diff --git a/.github/workflows/commit-built-file-changes.yml b/.github/workflows/commit-built-file-changes.yml index f93cd4bd662ec..b6ba9935ba675 100644 --- a/.github/workflows/commit-built-file-changes.yml +++ b/.github/workflows/commit-built-file-changes.yml @@ -131,11 +131,12 @@ jobs: path: 'pr-repo' show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} token: ${{ env.ACCESS_TOKEN }} + persist-credentials: true - name: Apply patch if: ${{ steps.artifact-check.outputs.exists == 'true' }} working-directory: 'pr-repo' - run: git apply ${{ github.workspace }}/changes.diff + run: git apply "$GITHUB_WORKSPACE/changes.diff" - name: Display changes to versioned files if: ${{ steps.artifact-check.outputs.exists == 'true' }} @@ -149,7 +150,7 @@ jobs: GH_APP_ID: ${{ secrets.GH_PR_BUILT_FILES_APP_ID }} run: | git config user.name "wordpress-develop-pr-bot[bot]" - git config user.email ${{ env.GH_APP_ID }}+wordpress-develop-pr-bot[bot]@users.noreply.github.com + git config user.email "${GH_APP_ID}+wordpress-develop-pr-bot[bot]@users.noreply.github.com" - name: Stage changes if: ${{ steps.artifact-check.outputs.exists == 'true' }} diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index b397a2241947e..4375091546dd7 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -53,7 +53,7 @@ permissions: {} env: LOCAL_DIR: build - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true jobs: # Runs the end-to-end test suite. diff --git a/.github/workflows/install-testing.yml b/.github/workflows/install-testing.yml index f15d6e4830268..8da6a84f1caeb 100644 --- a/.github/workflows/install-testing.yml +++ b/.github/workflows/install-testing.yml @@ -49,7 +49,6 @@ jobs: uses: ./.github/workflows/reusable-support-json-reader-v1.yml permissions: contents: read - secrets: inherit if: ${{ github.repository == 'WordPress/wordpress-develop' }} with: wp-version: ${{ inputs.wp-version }} @@ -118,7 +117,7 @@ jobs: steps: - name: Set up PHP ${{ matrix.php }} - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: '${{ matrix.php }}' coverage: none diff --git a/.github/workflows/local-docker-environment.yml b/.github/workflows/local-docker-environment.yml index c9dbae312595a..d42bba623ec64 100644 --- a/.github/workflows/local-docker-environment.yml +++ b/.github/workflows/local-docker-environment.yml @@ -79,7 +79,6 @@ jobs: uses: ./.github/workflows/reusable-support-json-reader-v1.yml permissions: contents: read - secrets: inherit if: ${{ github.repository == 'WordPress/wordpress-develop' }} with: wp-version: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }} diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index de36d5a505187..74dfc220c04a6 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -66,7 +66,9 @@ jobs: uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read - secrets: inherit + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }} strategy: fail-fast: false @@ -143,7 +145,9 @@ jobs: uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read - secrets: inherit + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }} strategy: fail-fast: false @@ -177,7 +181,7 @@ jobs: multisite: ${{ matrix.multisite }} memcached: ${{ matrix.memcached }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} - report: ${{ false }} + report: false # # Creates PHPUnit test jobs to test MariaDB and MySQL innovation releases. @@ -195,7 +199,9 @@ jobs: uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read - secrets: inherit + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }} strategy: fail-fast: false @@ -223,7 +229,7 @@ jobs: multisite: ${{ matrix.multisite }} memcached: ${{ matrix.memcached }} phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }} - report: ${{ false }} + report: false # # Runs the HTML API test group. @@ -238,7 +244,9 @@ jobs: uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read - secrets: inherit + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} if: ${{ startsWith( github.repository, 'WordPress/' ) && ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) }} strategy: fail-fast: false @@ -267,7 +275,9 @@ jobs: uses: ./.github/workflows/reusable-phpunit-tests-v3.yml permissions: contents: read - secrets: inherit + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }} if: ${{ ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request' }} strategy: fail-fast: false diff --git a/.github/workflows/reusable-check-built-files.yml b/.github/workflows/reusable-check-built-files.yml index 11d97639a30fc..290161c485324 100644 --- a/.github/workflows/reusable-check-built-files.yml +++ b/.github/workflows/reusable-check-built-files.yml @@ -40,6 +40,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + persist-credentials: false - name: Set up Node.js uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 @@ -56,7 +57,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/reusable-cleanup-pull-requests.yml b/.github/workflows/reusable-cleanup-pull-requests.yml index 9dae63cb213d3..cdce56001d16b 100644 --- a/.github/workflows/reusable-cleanup-pull-requests.yml +++ b/.github/workflows/reusable-cleanup-pull-requests.yml @@ -19,7 +19,7 @@ jobs: # - Parse fixed ticket numbers from the commit message. # - Parse the SVN revision from the commit message. # - Searches for pull requests referencing any fixed tickets. - # - Leaves a comment on each PR before closing. +# - Comments on pull requests referencing any fixed tickets before closing. close-prs: name: Find and close PRs runs-on: ubuntu-24.04 @@ -43,13 +43,17 @@ jobs: COMMIT_MESSAGE="$(echo "$COMMIT_MSG_RAW" | sed -n '$p')" echo "svn_revision_number=$(echo "$COMMIT_MESSAGE" | sed -n 's/.*git-svn-id: https:\/\/develop.svn.wordpress.org\/[^@]*@\([0-9]*\) .*/\1/p')" >> "$GITHUB_OUTPUT" - - name: Find pull requests - id: linked-prs + - name: Find, comment on, and close pull requests if: ${{ steps.trac-tickets.outputs.fixed_list != '' && steps.git-svn-id.outputs.svn_revision_number != '' }} uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + env: + FIXED_LIST: ${{ steps.trac-tickets.outputs.fixed_list }} + SVN_REVISION_NUMBER: ${{ steps.git-svn-id.outputs.svn_revision_number }} with: script: | - const fixedList = "${{ steps.trac-tickets.outputs.fixed_list }}".split(' ').filter(Boolean); + const fixedList = process.env.FIXED_LIST.split(' ').filter(Boolean); + const svnRevisionNumber = process.env.SVN_REVISION_NUMBER; + const githubSha = process.env.GITHUB_SHA; let prNumbers = []; for (const ticket of fixedList) { @@ -86,19 +90,10 @@ jobs: prNumbers.push(...matchingPRs); } - return prNumbers; - - - name: Comment and close pull requests - if: ${{ steps.trac-tickets.outputs.fixed_list != '' && steps.git-svn-id.outputs.svn_revision_number != '' }} - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - script: | - const prNumbers = ${{ steps.linked-prs.outputs.result }}; - const commentBody = `A commit was made that fixes the Trac ticket referenced in the description of this pull request. - SVN changeset: [${{ steps.git-svn-id.outputs.svn_revision_number }}](https://core.trac.wordpress.org/changeset/${{ steps.git-svn-id.outputs.svn_revision_number }}) - GitHub commit: https://github.com/WordPress/wordpress-develop/commit/${{ github.sha }} + SVN changeset: [${svnRevisionNumber}](https://core.trac.wordpress.org/changeset/${svnRevisionNumber}) + GitHub commit: https://github.com/WordPress/wordpress-develop/commit/${githubSha} This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.`; diff --git a/.github/workflows/reusable-coding-standards-javascript.yml b/.github/workflows/reusable-coding-standards-javascript.yml index 5c9a0c1ec0d03..6d776aabf1e27 100644 --- a/.github/workflows/reusable-coding-standards-javascript.yml +++ b/.github/workflows/reusable-coding-standards-javascript.yml @@ -7,7 +7,7 @@ on: workflow_call: env: - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true # Disable permissions for all available scopes by default. # Any needed permissions should be configured at the job level. diff --git a/.github/workflows/reusable-coding-standards-php.yml b/.github/workflows/reusable-coding-standards-php.yml index 1213ccb6baa6f..99683e0850d64 100644 --- a/.github/workflows/reusable-coding-standards-php.yml +++ b/.github/workflows/reusable-coding-standards-php.yml @@ -52,7 +52,7 @@ jobs: persist-credentials: false - name: Set up PHP - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: ${{ inputs.php-version }} coverage: none @@ -75,7 +75,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/reusable-performance-test-v2.yml b/.github/workflows/reusable-performance-test-v2.yml index f572060e26d63..691e79c39508a 100644 --- a/.github/workflows/reusable-performance-test-v2.yml +++ b/.github/workflows/reusable-performance-test-v2.yml @@ -49,7 +49,7 @@ on: required: false env: - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true # Prevent wp-scripts from downloading extra Playwright browsers, # since Chromium will be installed in its dedicated step already. diff --git a/.github/workflows/reusable-performance.yml b/.github/workflows/reusable-performance.yml index 923b472f609c6..3ebe31ff8e38f 100644 --- a/.github/workflows/reusable-performance.yml +++ b/.github/workflows/reusable-performance.yml @@ -37,7 +37,7 @@ on: required: false env: - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true # Prevent wp-scripts from downloading extra Playwright browsers, # since Chromium will be installed in its dedicated step already. diff --git a/.github/workflows/reusable-php-compatibility.yml b/.github/workflows/reusable-php-compatibility.yml index fee371fbdf7a0..a00c952bae6d1 100644 --- a/.github/workflows/reusable-php-compatibility.yml +++ b/.github/workflows/reusable-php-compatibility.yml @@ -46,7 +46,7 @@ jobs: persist-credentials: false - name: Set up PHP - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: ${{ inputs.php-version }} coverage: none @@ -71,7 +71,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/reusable-phpstan-static-analysis-v1.yml b/.github/workflows/reusable-phpstan-static-analysis-v1.yml index bbf1b78589a8c..d1ac9f9799792 100644 --- a/.github/workflows/reusable-phpstan-static-analysis-v1.yml +++ b/.github/workflows/reusable-phpstan-static-analysis-v1.yml @@ -52,7 +52,7 @@ jobs: cache: npm - name: Set up PHP - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: ${{ inputs.php-version }} coverage: none @@ -73,7 +73,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/reusable-phpunit-tests-v1.yml b/.github/workflows/reusable-phpunit-tests-v1.yml index bcb0451d7134b..b55e9f58fcf17 100644 --- a/.github/workflows/reusable-phpunit-tests-v1.yml +++ b/.github/workflows/reusable-phpunit-tests-v1.yml @@ -50,13 +50,13 @@ on: type: boolean default: false env: - COMPOSER_INSTALL: ${{ false }} + COMPOSER_INSTALL: false LOCAL_PHP: ${{ inputs.php }}-fpm LOCAL_PHPUNIT: ${{ inputs.phpunit && inputs.phpunit || inputs.php }}-fpm LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }} PHPUNIT_CONFIG: ${{ inputs.phpunit-config }} PHPUNIT_SCRIPT: php - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true SLOW_TESTS: 'external-http,media' # Disable permissions for all available scopes by default. diff --git a/.github/workflows/reusable-phpunit-tests-v2.yml b/.github/workflows/reusable-phpunit-tests-v2.yml index 4e7b6716ebef1..36d5927976505 100644 --- a/.github/workflows/reusable-phpunit-tests-v2.yml +++ b/.github/workflows/reusable-phpunit-tests-v2.yml @@ -58,7 +58,7 @@ env: LOCAL_PHP: ${{ inputs.php }}-fpm LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }} PHPUNIT_CONFIG: ${{ inputs.phpunit-config }} - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true # Controls which npm script to use for running PHPUnit tests. Options ar `php` and `php-composer`. PHPUNIT_SCRIPT: php SLOW_TESTS: 'external-http,media' diff --git a/.github/workflows/reusable-phpunit-tests-v3.yml b/.github/workflows/reusable-phpunit-tests-v3.yml index da0372f8538be..793fac8adfc4f 100644 --- a/.github/workflows/reusable-phpunit-tests-v3.yml +++ b/.github/workflows/reusable-phpunit-tests-v3.yml @@ -89,7 +89,7 @@ env: LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }} LOCAL_WP_TESTS_DOMAIN: ${{ inputs.tests-domain }} PHPUNIT_CONFIG: ${{ inputs.phpunit-config }} - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true # Disable permissions for all available scopes by default. # Any needed permissions should be configured at the job level. @@ -150,7 +150,7 @@ jobs: # dependency versions are installed and cached. ## - name: Set up PHP - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: '${{ inputs.php }}' coverage: none @@ -158,7 +158,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") diff --git a/.github/workflows/reusable-test-core-build-process.yml b/.github/workflows/reusable-test-core-build-process.yml index fbb6a08b15820..b5c40eb040e64 100644 --- a/.github/workflows/reusable-test-core-build-process.yml +++ b/.github/workflows/reusable-test-core-build-process.yml @@ -38,7 +38,7 @@ on: default: false env: - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true NODE_OPTIONS: --max-old-space-size=4096 # Disable permissions for all available scopes by default. @@ -86,7 +86,7 @@ jobs: # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies if: ${{ inputs.test-certificates }} - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: ${{ steps.get-date.outputs.date }} diff --git a/.github/workflows/reusable-test-gutenberg-build-process.yml b/.github/workflows/reusable-test-gutenberg-build-process.yml index 6fff07a842bf2..772b8ee577d7f 100644 --- a/.github/workflows/reusable-test-gutenberg-build-process.yml +++ b/.github/workflows/reusable-test-gutenberg-build-process.yml @@ -19,7 +19,7 @@ on: env: GUTENBERG_DIRECTORY: ${{ inputs.directory == 'build' && 'build' || 'src' }}/wp-content/plugins/gutenberg - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true NODE_OPTIONS: '--max-old-space-size=8192' # Disable permissions for all available scopes by default. diff --git a/.github/workflows/reusable-test-local-docker-environment-v1.yml b/.github/workflows/reusable-test-local-docker-environment-v1.yml index 9aa0fb124a22e..370b88c6c0231 100644 --- a/.github/workflows/reusable-test-local-docker-environment-v1.yml +++ b/.github/workflows/reusable-test-local-docker-environment-v1.yml @@ -45,7 +45,7 @@ env: LOCAL_DB_VERSION: ${{ inputs.db-version }} LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }} LOCAL_WP_TESTS_DOMAIN: ${{ inputs.tests-domain }} - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + PUPPETEER_SKIP_DOWNLOAD: true # Disable permissions for all available scopes by default. # Any needed permissions should be configured at the job level. @@ -105,7 +105,7 @@ jobs: # dependency versions are installed and cached. ## - name: Set up PHP - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: '${{ inputs.php }}' coverage: none @@ -113,7 +113,7 @@ jobs: # Since Composer dependencies are installed using `composer update` and no lock file is in version control, # passing a custom cache suffix ensures that the cache is flushed at least once per week. - name: Install Composer dependencies - uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 with: custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F") diff --git a/.github/workflows/reusable-upgrade-testing.yml b/.github/workflows/reusable-upgrade-testing.yml index 60d5523a9e3b6..372b6ae0c3e60 100644 --- a/.github/workflows/reusable-upgrade-testing.yml +++ b/.github/workflows/reusable-upgrade-testing.yml @@ -78,7 +78,7 @@ jobs: steps: - name: Set up PHP ${{ inputs.php }} - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 with: php-version: '${{ inputs.php }}' coverage: none diff --git a/.github/workflows/reusable-workflow-lint.yml b/.github/workflows/reusable-workflow-lint.yml index 3a538a8a99690..13fcde47f5731 100644 --- a/.github/workflows/reusable-workflow-lint.yml +++ b/.github/workflows/reusable-workflow-lint.yml @@ -7,12 +7,10 @@ permissions: {} jobs: # Runs the actionlint GitHub Action workflow file linter. # + # See https://github.com/rhysd/actionlint. + # # This helps guard against common mistakes including strong type checking for expressions (${{ }}), security checks, # `run:` script checking, glob syntax validation, and more. - # - # Performs the following steps: - # - Checks out the repository. - # - Runs actionlint. actionlint: name: Run actionlint runs-on: ubuntu-24.04 @@ -26,9 +24,46 @@ jobs: persist-credentials: false show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - # actionlint is static checker for GitHub Actions workflow files. - # See https://github.com/rhysd/actionlint. - name: Run actionlint - uses: docker://rhysd/actionlint@sha256:887a259a5a534f3c4f36cb02dca341673c6089431057242cdc931e9f133147e9 # v1.7.7 + uses: docker://rhysd/actionlint@sha256:5457037ba91acd225478edac3d4b32e45cf6c10291e0dabbfd2491c63129afe1 # v1.7.11 with: args: "-color -verbose" + + # Runs the Zizmor GitHub Action workflow file linter. + # + # See https://github.com/zizmorcore/zizmor + # + # This helps guard against supply chain attacks, unpinned dependencies, excessive permissions, + # dangerous triggers, credential leaks, and sophisticated security vulnerabilities. + # + # Performs the following steps: + # - Checks out the repository. + # - Installs and configures uv. + # - Runs a zizmor scan. + # - Uploads the SARIF file to GitHub. + zizmor: + name: Zizmor + runs-on: ubuntu-24.04 + permissions: + security-events: write + actions: read + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 + + - name: Run zizmor + run: uvx zizmor@1.24.1 --persona=regular --format=sarif --strict-collection . > results.sarif + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0 + with: + sarif_file: results.sarif + category: zizmor diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index deb190eba9e9b..f2b0afce3256f 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -40,8 +40,8 @@ permissions: {} env: LOCAL_PHP_XDEBUG: true LOCAL_PHP_XDEBUG_MODE: 'coverage' - LOCAL_PHP_MEMCACHED: ${{ false }} - PUPPETEER_SKIP_DOWNLOAD: ${{ true }} + LOCAL_PHP_MEMCACHED: false + PUPPETEER_SKIP_DOWNLOAD: true jobs: # diff --git a/.github/workflows/upgrade-develop-testing.yml b/.github/workflows/upgrade-develop-testing.yml index 7dfe96271f459..5f86e170fcdae 100644 --- a/.github/workflows/upgrade-develop-testing.yml +++ b/.github/workflows/upgrade-develop-testing.yml @@ -75,7 +75,7 @@ jobs: db-type: [ 'mysql' ] db-version: [ '5.7', '8.4' ] # WordPress 5.3 is the oldest version that supports PHP 7.4. - wp: [ '5.3', '6.8', '6.9', '7.0-RC2' ] + wp: [ '5.3', '6.8', '6.9', '7.0-RC3' ] multisite: [ false, true ] with: os: ${{ matrix.os }} @@ -101,7 +101,7 @@ jobs: php: [ '7.4', '8.4' ] db-type: [ 'mysql' ] db-version: [ '8.4' ] - wp: [ '6.8', '6.9', '7.0-RC2' ] + wp: [ '6.8', '6.9', '7.0-RC3' ] multisite: [ false, true ] with: os: ${{ matrix.os }} diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index b8953bad20def..1e54a946c03eb 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -71,7 +71,7 @@ jobs: php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] db-type: [ 'mysql' ] db-version: [ '5.7', '8.0', '8.4', '9.6' ] - wp: [ '6.8', '6.9', '7.0-RC2' ] + wp: [ '6.8', '6.9', '7.0-RC3' ] multisite: [ false, true ] with: os: ${{ matrix.os }} diff --git a/Gruntfile.js b/Gruntfile.js index 5f9109fac3cb0..8863d030627b8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -397,6 +397,55 @@ module.exports = function(grunt) { 'suggest*' ], dest: WORKING_DIR + 'wp-includes/js/jquery/' + }, + { + [ WORKING_DIR + 'wp-includes/js/dist/vendor/lodash.js' ]: [ './node_modules/lodash/lodash.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/lodash.min.js' ]: [ './node_modules/lodash/lodash.min.js' ], + }, + { + [ WORKING_DIR + 'wp-includes/js/dist/vendor/moment.js' ]: [ './node_modules/moment/moment.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/moment.min.js' ]: [ './node_modules/moment/min/moment.min.js' ], + }, + { + [ WORKING_DIR + 'wp-includes/js/dist/vendor/regenerator-runtime.js' ]: [ './node_modules/regenerator-runtime/runtime.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/regenerator-runtime.min.js' ]: [ './node_modules/regenerator-runtime/runtime.js' ], + }, + // React libraries: react, react-dom + { + [ WORKING_DIR + 'wp-includes/js/dist/vendor/react.js' ]: [ './node_modules/react/umd/react.development.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/react.min.js' ]: [ './node_modules/react/umd/react.production.min.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/react-dom.js' ]: [ './node_modules/react-dom/umd/react-dom.development.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/react-dom.min.js' ]: [ './node_modules/react-dom/umd/react-dom.production.min.js' ], + }, + // Polyfills + { + // @wordpress/babel-preset-default + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill.js' ]: [ './node_modules/@wordpress/babel-preset-default/build/polyfill.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill.min.js' ]: [ './node_modules/@wordpress/babel-preset-default/build/polyfill.min.js' ], + // polyfill-library (DOMRect) + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-dom-rect.js' ]: [ './node_modules/polyfill-library/polyfills/__dist/DOMRect/raw.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js' ]: [ './node_modules/polyfill-library/polyfills/__dist/DOMRect/min.js' ], + // element-closest + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-element-closest.js' ]: [ './node_modules/element-closest/browser.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js' ]: [ './node_modules/element-closest/browser.js' ], + // whatwg-fetch + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-fetch.js' ]: [ './node_modules/whatwg-fetch/dist/fetch.umd.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js' ]: [ './node_modules/whatwg-fetch/dist/fetch.umd.js' ], + // formdata-polyfill + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-formdata.js' ]: [ './node_modules/formdata-polyfill/FormData.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js' ]: [ './node_modules/formdata-polyfill/formdata.min.js' ], + // wicg-inert + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-inert.js' ]: [ './node_modules/wicg-inert/dist/inert.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-inert.min.js' ]: [ './node_modules/wicg-inert/dist/inert.min.js' ], + // polyfill-library (Node.prototype.contains) + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-node-contains.js' ]: [ './node_modules/polyfill-library/polyfills/__dist/Node.prototype.contains/raw.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js' ]: [ './node_modules/polyfill-library/polyfills/__dist/Node.prototype.contains/min.js' ], + // objectFitPolyfill + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-object-fit.js' ]: [ './node_modules/objectFitPolyfill/src/objectFitPolyfill.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-object-fit.min.js' ]: [ './node_modules/objectFitPolyfill/dist/objectFitPolyfill.min.js' ], + // core-js-url-browser + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-url.js' ]: [ './node_modules/core-js-url-browser/url.js' ], + [ WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-url.min.js' ]: [ './node_modules/core-js-url-browser/url.min.js' ], } ].concat( // Copy tinymce.js only when building to /src. @@ -1107,6 +1156,14 @@ module.exports = function(grunt) { src: WORKING_DIR + 'wp-includes/js/dist/vendor/moment.js', dest: WORKING_DIR + 'wp-includes/js/dist/vendor/moment.min.js' }, + 'regenerator-runtime': { + src: WORKING_DIR + 'wp-includes/js/dist/vendor/regenerator-runtime.js', + dest: WORKING_DIR + 'wp-includes/js/dist/vendor/regenerator-runtime.min.js' + }, + 'wp-polyfill-fetch': { + src: WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-fetch.js', + dest: WORKING_DIR + 'wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js' + }, dynamic: { expand: true, cwd: WORKING_DIR, @@ -1635,18 +1692,6 @@ module.exports = function(grunt) { } ); } ); - grunt.registerTask( 'copy-vendor-scripts', 'Copies vendor scripts from node_modules to wp-includes/js/dist/vendor/.', function() { - const done = this.async(); - const buildDir = grunt.option( 'dev' ) ? 'src' : 'build'; - grunt.util.spawn( { - cmd: 'node', - args: [ 'tools/vendors/copy-vendors.js', `--build-dir=${ buildDir }` ], - opts: { stdio: 'inherit' } - }, function( error ) { - done( ! error ); - } ); - } ); - grunt.renameTask( 'watch', '_watch' ); grunt.registerTask( 'watch', function() { @@ -1675,6 +1720,8 @@ module.exports = function(grunt) { 'uglify:imgareaselect', 'uglify:jqueryform', 'uglify:moment', + 'uglify:regenerator-runtime', + 'uglify:wp-polyfill-fetch', 'qunit:compiled' ] ); @@ -1817,7 +1864,9 @@ module.exports = function(grunt) { 'uglify:jquery-ui', 'uglify:imgareaselect', 'uglify:jqueryform', - 'uglify:moment' + 'uglify:moment', + 'uglify:regenerator-runtime', + 'uglify:wp-polyfill-fetch' ] ); grunt.registerTask( 'build:codemirror', [ @@ -1837,7 +1886,6 @@ module.exports = function(grunt) { 'clean:js', 'build:webpack', 'copy:js', - 'copy-vendor-scripts', 'file_append', 'uglify:all', 'concat:tinymce', diff --git a/README.md b/README.md index 4c27999495f55..5201a5180c1da 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,29 @@ npm run test:php -- --filter npm run test:php -- --group ``` +#### To lint the workflow files + +GitHub Actions workflows operate in a privileged software supply chain environment, therefore all workflow files must adhere to a high degree of quality and security standards. + +All YAML workflow files within the `.github/workflows` directory are statically scanned when modified using [Actionlint](https://github.com/rhysd/actionlint) and [Zizmor](https://github.com/zizmorcore/zizmor). It's recommended that you install both of these tools locally using a package manager to run prior to submitting changes to workflow files. + +- [Actionlint installations instructions](https://github.com/rhysd/actionlint/blob/main/docs/install.md) +- [Zizmor installation instructions](https://docs.zizmor.sh/installation/) + +To run Actionlint: + +``` +actionlint +``` + +To run Zizmor for all workflow files (note the trailing period): + +``` +zizmor . +``` + +**Note:** A workflow run failure will not occur when issues are detected by Zizmor. Instead, the generated report is submitted to GitHub Code Scanning and surfaced through a status check. Some locally reported issues may be ignored based on the repository's configured Code Scanning settings. + #### Generating a code coverage report PHP code coverage reports are [generated daily](https://github.com/WordPress/wordpress-develop/actions/workflows/test-coverage.yml) and [submitted to Codecov.io](https://app.codecov.io/gh/WordPress/wordpress-develop). diff --git a/composer.json b/composer.json index ee5c5d0c0aa03..aee7a09524994 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "ext-dom": "*" }, "require-dev": { - "composer/ca-bundle": "1.5.10", + "composer/ca-bundle": "1.5.11", "squizlabs/php_codesniffer": "3.13.5", "wp-coding-standards/wpcs": "~3.3.0", "phpcompatibility/phpcompatibility-wp": "~2.1.3", @@ -32,6 +32,11 @@ }, "lock": false }, + "autoload-dev": { + "psr-4": { + "WordPress\\PHPStan\\": "tests/phpstan/" + } + }, "scripts": { "phpstan": "@php ./vendor/bin/phpstan analyse --memory-limit=2G", "compat": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --standard=phpcompat.xml.dist --report=summary,source", diff --git a/package-lock.json b/package-lock.json index a48bff6270b72..c043f24fa34c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "WordPress", "version": "7.1.0", - "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { "backbone": "1.6.1", @@ -27,7 +26,7 @@ "jquery-form": "4.3.0", "jquery-hoverintent": "1.10.2", "jsonlint": "1.6.3", - "lodash": "4.17.23", + "lodash": "4.18.1", "masonry-layout": "4.2.2", "moment": "2.30.1", "objectFitPolyfill": "2.3.5", @@ -17291,6 +17290,13 @@ "node": ">=8" } }, + "node_modules/grunt-legacy-log-utils/node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, "node_modules/grunt-legacy-log-utils/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -17303,6 +17309,13 @@ "node": ">=8" } }, + "node_modules/grunt-legacy-log/node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, "node_modules/grunt-legacy-util": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", @@ -17328,6 +17341,13 @@ "dev": true, "license": "MIT" }, + "node_modules/grunt-legacy-util/node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, "node_modules/grunt-patch-wordpress": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/grunt-patch-wordpress/-/grunt-patch-wordpress-4.0.0.tgz", @@ -22576,6 +22596,13 @@ "date-now": "^0.1.4" } }, + "node_modules/jshint/node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "dev": true, + "license": "MIT" + }, "node_modules/jshint/node_modules/minimatch": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", @@ -23265,9 +23292,9 @@ } }, "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/lodash-es": { diff --git a/package.json b/package.json index 4d0b8110e0a9f..396ae5589560b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "gutenberg": { - "sha": "e2970ba736edb99e08fb369d4fb0c378189468ee", + "sha": "a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd", "ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build" }, "engines": { @@ -99,7 +99,7 @@ "jquery-form": "4.3.0", "jquery-hoverintent": "1.10.2", "jsonlint": "1.6.3", - "lodash": "4.17.23", + "lodash": "4.18.1", "masonry-layout": "4.2.2", "moment": "2.30.1", "objectFitPolyfill": "2.3.5", @@ -113,7 +113,6 @@ "wicg-inert": "3.1.3" }, "scripts": { - "postinstall": "npm run gutenberg:verify", "build": "grunt build", "build:dev": "grunt build --dev", "build:gutenberg": "grunt build:gutenberg", @@ -142,7 +141,6 @@ "typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan", "gutenberg:copy": "node tools/gutenberg/copy.js", "gutenberg:verify": "node tools/gutenberg/utils.js", - "gutenberg:download": "node tools/gutenberg/download.js && grunt build:gutenberg --dev", - "vendor:copy": "node tools/vendors/copy-vendors.js" + "gutenberg:download": "node tools/gutenberg/download.js && grunt build:gutenberg --dev" } } diff --git a/src/js/_enqueues/admin/edit-comments.js b/src/js/_enqueues/admin/edit-comments.js index 9a3d81a751bd8..78ee78de759ff 100644 --- a/src/js/_enqueues/admin/edit-comments.js +++ b/src/js/_enqueues/admin/edit-comments.js @@ -14,7 +14,7 @@ var getCount, updateCount, updateCountText, updatePending, updateApproved, updateHtmlTitle, updateDashboardText, updateInModerationText, adminTitle = document.title, isDashboard = $('#dashboard_right_now').length, titleDiv, titleRegEx, - __ = wp.i18n.__; + __ = wp.i18n.__, _x = wp.i18n._x; /** * Extracts a number from the content of a jQuery element. @@ -370,7 +370,8 @@ window.setCommentsList = function() { } else { if ( settings.data.id == replyID ) - replyButton.text( __( 'Reply' ) ); + /* translators: Comment reply button text. */ + replyButton.text( _x( 'Reply', 'verb' ) ); c.find( '.row-actions span.view' ).removeClass( 'hidden' ).end() .find( 'div.comment_status' ).html( '1' ); @@ -1012,7 +1013,8 @@ window.commentReply = { if ( c.hasClass('unapproved') ) { replyButton.text( __( 'Approve and Reply' ) ); } else { - replyButton.text( __( 'Reply' ) ); + /* translators: Comment reply button text. */ + replyButton.text( _x( 'Reply', 'verb' ) ); } $('#replyrow').fadeIn(300, function(){ $(this).show(); }); diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js index 5e0eb2746a206..6e9f4e9f20503 100644 --- a/src/js/_enqueues/admin/inline-edit-post.js +++ b/src/js/_enqueues/admin/inline-edit-post.js @@ -614,8 +614,7 @@ $( function() { } }).on( 'heartbeat-tick.wp-check-locked-posts', function( e, data ) { var locked = data['wp-check-locked-posts'] || {}, - isRtc = window._wpCollaborationEnabled, - lockedClass = isRtc ? 'wp-collaborative-editing' : 'wp-locked'; + lockedClass = 'wp-locked'; $('#the-list tr').each( function(i, el) { var key = el.id, row = $(el), lock_data, avatar; @@ -626,7 +625,7 @@ $( function() { row.find('.column-title .locked-text').text( lock_data.text ); row.find('.check-column checkbox').prop('checked', false); - if ( ! isRtc && lock_data.avatar_src ) { + if ( lock_data.avatar_src ) { avatar = $( '', { 'class': 'avatar avatar-18 photo', width: 18, diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index 1dde10ffc8aae..d50fe6007d33b 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -1028,7 +1028,7 @@ jQuery( function($) { revert_e = $el.html(); buttons.html( - ' ' + + ' ' + '' ); diff --git a/src/js/_enqueues/lib/codemirror/javascript-lint.js b/src/js/_enqueues/lib/codemirror/javascript-lint.js index 592d077b80914..2c96798a20ae3 100644 --- a/src/js/_enqueues/lib/codemirror/javascript-lint.js +++ b/src/js/_enqueues/lib/codemirror/javascript-lint.js @@ -30,6 +30,7 @@ import CodeMirror from 'codemirror'; * @property {boolean} [es3] - "This option tells JSHint that your code needs to adhere to ECMAScript 3 specification. Use this option if you need your program to be executable in older browsers—such as Internet Explorer 6/7/8/9—and other legacy JavaScript environments." * @property {boolean} [module] - "This option informs JSHint that the input code describes an ECMAScript 6 module. All module code is interpreted as strict mode code." * @property {'implied'} [strict] - "This option requires the code to run in ECMAScript 5's strict mode." + * @property {string} [espreeModuleUrl] - The URL to the espree script module. */ /** @@ -42,9 +43,13 @@ import CodeMirror from 'codemirror'; * @returns {Promise} */ async function validator( text, options ) { + if ( ! options.espreeModuleUrl ) { + return []; + } + const errors = /** @type {CodeMirrorLintError[]} */ []; try { - const espree = await import( /* webpackIgnore: true */ 'espree' ); + const espree = await import( /* webpackIgnore: true */ options.espreeModuleUrl ); espree.parse( text, { ...getEspreeOptions( options ), loc: true, diff --git a/src/js/_enqueues/wp/code-editor.js b/src/js/_enqueues/wp/code-editor.js index 86d5e03254166..ed8be9d6a5580 100644 --- a/src/js/_enqueues/wp/code-editor.js +++ b/src/js/_enqueues/wp/code-editor.js @@ -2,6 +2,8 @@ * @output wp-admin/js/code-editor.js */ +/* global console */ + /* eslint-env es2020 */ if ( 'undefined' === typeof window.wp ) { @@ -412,6 +414,10 @@ if ( 'undefined' === typeof window.wp.codeEditor ) { * @return {CodeEditorInstance} Instance. */ wp.codeEditor.initialize = function initialize( textarea, settings ) { + if ( document.readyState === 'loading' ) { + console.warn( 'wp.codeEditor.initialize() ran too early. Invoke this function in a `DOMContentLoaded` event listener.' ); + } + let $textarea; if ( 'string' === typeof textarea ) { $textarea = $( '#' + textarea ); diff --git a/src/js/media/views/attachments/browser.js b/src/js/media/views/attachments/browser.js index 65936efc186ef..26218ea2fa1ae 100644 --- a/src/js/media/views/attachments/browser.js +++ b/src/js/media/views/attachments/browser.js @@ -198,44 +198,32 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro } if ( showFilterByType ) { - // "Filters" is a , a label element needs to be rendered before. + this.toolbar.set( 'filtersLabel', new wp.media.view.Label({ value: l10n.filterByType, attributes: { 'for': 'media-attachment-filters' }, priority: -80 - }); + }).render() ); if ( 'uploaded' === this.options.filters ) { - Filters = new wp.media.view.AttachmentFilters.Uploaded({ + this.toolbar.set( 'filters', new wp.media.view.AttachmentFilters.Uploaded({ controller: this.controller, model: this.collection.props, - }); + priority: -80 + }).render() ); } else { Filters = new wp.media.view.AttachmentFilters.All({ controller: this.controller, model: this.collection.props, + priority: -80 }); - } - - var filterContainer = wp.media.View.extend({ - tagname: 'div', - className: 'media-filter-container type-filter', - - initialize: function() { - this.views.add( [ filtersLabel, Filters ] ); - } - }); - this.toolbar.set( 'filters', new filterContainer({ - controller: this.controller, - model: this.controller.props, - priority: -80 - }).render() ); + this.toolbar.set( 'filters', Filters.render() ); + } } - var dateFilter, dateFilterLabel, dateFilterContainer; /* * Feels odd to bring the global media library switcher into the Attachment browser view. * Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar ); @@ -252,31 +240,18 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro priority: -90 }).render() ); - // DateFilter is a , a label element needs to be rendered before. + this.toolbar.set( 'dateFilter', new wp.media.view.Label({ value: l10n.filterByDate, attributes: { 'for': 'media-attachment-date-filters' }, - }); - dateFilter = new wp.media.view.DateFilter({ - controller: this.controller, - model: this.collection.props, - }); - - dateFilterContainer = wp.media.View.extend({ - tagname: 'div', - className: 'media-filter-container date-filter', - - initialize: function() { - this.views.add( [ dateFilterLabel, dateFilter ] ); - } - }); - - this.toolbar.set( 'dateFilters', new dateFilterContainer({ + priority: -75 + }).render() ); + this.toolbar.set( 'dateFilter', new wp.media.view.DateFilter({ controller: this.controller, model: this.collection.props, - priority: -75 + priority: -75, }).render() ); // BulkSelection is a
with subviews, including screen reader text. @@ -387,28 +362,15 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro } } else if ( this.options.date ) { - // DateFilter is a , a label element needs to be rendered before. + this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({ value: l10n.filterByDate, attributes: { 'for': 'media-attachment-date-filters' }, - }); - dateFilter = new wp.media.view.DateFilter({ - controller: this.controller, - model: this.collection.props, - }); - - dateFilterContainer = wp.media.View.extend({ - tagname: 'div', - className: 'media-filter-container date-filter', - - initialize: function() { - this.views.add( [ dateFilterLabel, dateFilter ] ); - } - }); - - this.toolbar.set( 'dateFilters', new dateFilterContainer({ + priority: -75 + }).render() ); + this.toolbar.set( 'dateFilter', new wp.media.view.DateFilter({ controller: this.controller, model: this.collection.props, priority: -75 diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 962a68a3b87af..f8c48bb195b3c 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -14,7 +14,7 @@ $title = _x( 'About', 'page title' ); list( $display_version ) = explode( '-', wp_get_wp_version() ); -$display_major_version = '6.9'; +$display_major_version = '7.0'; $release_notes_url = sprintf( /* translators: %s: WordPress version number. */ @@ -61,68 +61,68 @@
-
-

-

+
+

+

-
-

+
+

-
- +
+

-
+
- +
-
+
- +
-
-

+
+

-
- +
+

-
-

+
+

-
- +
+

-
+
- +
-
+
- +
-
-

+
+

-
- +
+

@@ -130,30 +130,30 @@
-
+
-

-

LCP (Largest Contentful Paint) metric is achieved through improved loading of conditional and inlined stylesheets, script loading with fetchpriority support, and additional core optimizations. Editor advances include fixes for layout shifts caused by the Video block and faster loading of the terms selector.' ); ?>

+

+

-
+
-

-

+

+

-
+

@@ -176,10 +176,10 @@


-
- +
+
-
+

-
+
-
+
- <?php echo esc_attr( $header_alt_text ); ?> + <?php echo esc_attr( $header_alt_text ); ?>
diff --git a/src/wp-admin/credits.php b/src/wp-admin/credits.php index c3d544b410df0..3aa8e06b63d0a 100644 --- a/src/wp-admin/credits.php +++ b/src/wp-admin/credits.php @@ -28,7 +28,7 @@
- <?php echo esc_attr( $header_alt_text ); ?> + <?php echo esc_attr( $header_alt_text ); ?>
diff --git a/src/wp-admin/css/about.css b/src/wp-admin/css/about.css index 1d4583d1095bb..721a98078f0d6 100644 --- a/src/wp-admin/css/about.css +++ b/src/wp-admin/css/about.css @@ -21,8 +21,8 @@ .about__container { /* Section backgrounds */ - --background: #ececec; - --subtle-background: #eef0fd; + --background: #ebe8e5; + --subtle-background: #ebe8e5; /* Main text color */ --text: #1e1e1e; @@ -42,7 +42,7 @@ --nav-color: var(--text); --nav-current: var(--accent-1); - --border-radius: 0; + --border-radius: 0.5rem; --gap: 2rem; } @@ -132,6 +132,7 @@ .about__container .has-subtle-background-color { background-color: var(--subtle-background); + border-radius: var(--border-radius); } .about__container .has-background-image { @@ -150,6 +151,14 @@ padding: var(--gap); } +.about__section .column.is-left-padding-zero { + padding-left: 0; +} + +.about__section .column.is-right-padding-zero { + padding-right: 0; +} + .about__section + .about__section .is-section-header { padding-bottom: var(--gap); } @@ -340,6 +349,14 @@ .about__section.has-2-columns.has-gutters .column:last-child { margin-bottom: 0; } + + .about__section .column.is-left-padding-zero { + padding-right: 0; + } + + .about__section .column.is-right-padding-zero { + padding-left: 0; + } } @media screen and (max-width: 480px) { @@ -579,7 +596,7 @@ padding-right: 26rem; /* Space for the background image. */ min-height: clamp(10rem, 25vw, 18.75rem); border-radius: var(--border-radius); - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40721)'%3E%3Cpath fill='url(%23paint0_linear_6958_40721)' d='M0 0h1000v300H0z'/%3E%3Cg clip-path='url(%23clip1_6958_40721)'%3E%3Cpath d='M643.203 90.702c29.374-29.375 76.993-29.375 106.367 0 67.745 73.346-33.051 174.1-106.367 106.367-29.369-29.369-29.369-76.993 0-106.367z' stroke='url(%23paint1_linear_6958_40721)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M643.215 90.71L763.002-29.074' stroke='url(%23paint2_linear_6958_40721)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M981.603 113.114c-29.375 29.375-76.993 29.375-106.368 0-67.745-73.347 33.051-174.1 106.368-106.368 29.367 29.37 29.367 76.993 0 106.368z' stroke='url(%23paint3_linear_6958_40721)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M981.622 113.105L870.501 224.226' stroke='url(%23paint4_linear_6958_40721)' stroke-width='50' stroke-miterlimit='10'/%3E%3Ccircle cx='816.697' cy='221.067' r='24.068' fill='%233858E9'/%3E%3C/g%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40721' x1='47' y1='46' x2='963.5' y2='318.5' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40721' x1='565.98' y1='158.471' x2='700.462' y2='23.995' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint2_linear_6958_40721' x1='722.025' y1='-41.283' x2='545.675' y2='135.067' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.5' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint3_linear_6958_40721' x1='1058.83' y1='45.345' x2='924.344' y2='179.821' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint4_linear_6958_40721' x1='902.813' y1='245.098' x2='1079.16' y2='68.748' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.5' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40721'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3CclipPath id='clip1_6958_40721'%3E%3Cpath fill='%23fff' transform='translate(596 -42)' d='M0 0h433v287.934H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-default.webp?ver=20260514" ); background-repeat: no-repeat; background-position: right center; background-size: cover; @@ -588,42 +605,41 @@ } .credits-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40732)'%3E%3Cpath fill='url(%23paint0_linear_6958_40732)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M964.296 78.3c35.067-35.067 91.914-35.067 126.984 0 80.87 87.56-39.46 207.839-126.984 126.98-35.061-35.06-35.061-91.913 0-126.98z' stroke='url(%23paint1_linear_6958_40732)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M784.296 78.3c35.067-35.067 91.914-35.067 126.982 0 80.875 87.56-39.456 207.839-126.982 126.98-35.061-35.06-35.061-91.913 0-126.98z' stroke='url(%23paint2_linear_6958_40732)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40732' x1='378.5' y1='402' x2='926' y2='9.5' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40732' x1='872.106' y1='159.202' x2='1032.65' y2='-1.337' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint2_linear_6958_40732' x1='692.106' y1='159.202' x2='852.648' y2='-1.337' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40732'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-credits.webp?ver=20260514" ); } .freedoms-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40736)'%3E%3Cpath fill='url(%23paint0_linear_6958_40736)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M847.111 61.731a1 1 0 0 1 1.778 0l29.511 57.436c.096.186.247.337.433.433l57.436 29.511a1 1 0 0 1 0 1.778L878.833 180.4a1.006 1.006 0 0 0-.433.433l-29.511 57.436a1 1 0 0 1-1.778 0L817.6 180.833a1.006 1.006 0 0 0-.433-.433l-57.436-29.511a1 1 0 0 1 0-1.778l57.436-29.511c.186-.096.337-.247.433-.433l29.511-57.436z' stroke='url(%23paint1_linear_6958_40736)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40736' x1='47' y1='46' x2='1264.5' y2='46' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40736' x1='692.106' y1='167.202' x2='852.648' y2='6.663' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40736'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-freedoms.webp?ver=20260514" ); } .privacy-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40739)'%3E%3Cpath fill='url(%23paint0_radial_6958_40739)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M758 90l90-30 90 30v11.511c0 59.891-35.271 114.165-90 138.489-54.729-24.324-90-78.598-90-138.489V90z' stroke='url(%23paint1_linear_6958_40739)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3CradialGradient id='paint0_radial_6958_40739' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='rotate(37.724 183.217 1253.89) scale(615.701 397.883)'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.35' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/radialGradient%3E%3ClinearGradient id='paint1_linear_6958_40739' x1='692.106' y1='167.202' x2='852.648' y2='6.663' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40739'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-privacy.webp?ver=20260514" ); } .contribute-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40742)'%3E%3Cpath fill='url(%23paint0_linear_6958_40742)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M924.567 149.134a1 1 0 0 1 0 1.732L771.5 239.135a1 1 0 0 1-1.5-.866V61.731a1 1 0 0 1 1.5-.866l153.067 88.269z' stroke='url(%23paint1_linear_6958_40742)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40742' x1='606.5' x2='721' y2='355' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40742' x1='833.12' y1='-5.894' x2='992.039' y2='131.9' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40742'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-get-involved.webp?ver=20260514" ); } [dir="rtl"] .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40746)'%3E%3Cpath transform='matrix(-1 0 0 1 1000 0)' fill='url(%23paint0_linear_6958_40746)' d='M0 0h1000v300H0z'/%3E%3Cg clip-path='url(%23clip1_6958_40746)'%3E%3Cpath d='M18.203 90.702c29.375-29.375 76.993-29.375 106.367 0 67.745 73.346-33.05 174.1-106.367 106.367-29.369-29.369-29.369-76.993 0-106.367z' stroke='url(%23paint1_linear_6958_40746)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M18.215 90.71L138.002-29.074' stroke='url(%23paint2_linear_6958_40746)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M356.603 113.114c-29.375 29.375-76.993 29.375-106.368 0-67.745-73.347 33.051-174.1 106.368-106.368 29.368 29.37 29.368 76.993 0 106.368z' stroke='url(%23paint3_linear_6958_40746)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M356.622 113.105L245.501 224.226' stroke='url(%23paint4_linear_6958_40746)' stroke-width='50' stroke-miterlimit='10'/%3E%3Ccircle cx='191.698' cy='221.067' r='24.068' fill='%233858E9'/%3E%3C/g%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40746' x1='47' y1='46' x2='963.5' y2='318.5' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40746' x1='218' y1='120.499' x2='51.502' y2='21.995' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint2_linear_6958_40746' x1='78' y1='-29.003' x2='216' y2='68.497' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.5' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint3_linear_6958_40746' x1='175.805' y1='53.58' x2='405.499' y2='103.005' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.608' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint4_linear_6958_40746' x1='414' y1='137.499' x2='180.5' y2='59.499' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.5' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40746'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3CclipPath id='clip1_6958_40746'%3E%3Cpath fill='%23fff' transform='translate(-29 -42)' d='M0 0h433v287.934H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-default-rtl.webp?ver=20260514" ); } [dir="rtl"] .credits-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40757)'%3E%3Cpath transform='matrix(-1 0 0 1 1000 0)' fill='url(%23paint0_linear_6958_40757)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M35.705 78.3C.637 43.233-56.21 43.233-91.279 78.3c-80.875 87.56 39.457 207.839 126.983 126.98 35.06-35.06 35.06-91.913 0-126.98z' stroke='url(%23paint1_linear_6958_40757)' stroke-width='50' stroke-miterlimit='10'/%3E%3Cpath d='M215.704 78.3c-35.067-35.067-91.914-35.067-126.982 0-80.875 87.56 39.456 207.839 126.982 126.98 35.061-35.06 35.061-91.913 0-126.98z' stroke='url(%23paint2_linear_6958_40757)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40757' x1='378.5' y1='402' x2='926' y2='9.5' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40757' x1='127.894' y1='159.202' x2='-32.648' y2='-1.337' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint2_linear_6958_40757' x1='307.894' y1='159.202' x2='147.352' y2='-1.337' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40757'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-credits-rtl.webp?ver=20260514" ); } [dir="rtl"] .freedoms-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40762)'%3E%3Cpath transform='matrix(-1 0 0 1 1000 0)' fill='url(%23paint0_linear_6958_40762)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M152.889 61.731a1 1 0 0 0-1.778 0L121.6 119.167a1.006 1.006 0 0 1-.433.433l-57.436 29.511a1 1 0 0 0 0 1.778l57.436 29.511c.186.096.337.247.433.433l29.511 57.436a1 1 0 0 0 1.778 0l29.511-57.436c.096-.186.247-.337.433-.433l57.436-29.511a1 1 0 0 0 0-1.778L182.833 119.6a1.006 1.006 0 0 1-.433-.433l-29.511-57.436z' stroke='url(%23paint1_linear_6958_40762)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40762' x1='47' y1='46' x2='1264.5' y2='46' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40762' x1='307.894' y1='167.202' x2='147.352' y2='6.663' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40762'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-freedoms-rtl.webp?ver=20260514" ); } [dir="rtl"] .privacy-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40765)'%3E%3Cpath transform='matrix(-1 0 0 1 1000 0)' fill='url(%23paint0_radial_6958_40765)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M242 90l-90-30-90 30v11.511C62 161.402 97.27 215.676 152 240c54.729-24.324 90-78.598 90-138.489V90z' stroke='url(%23paint1_linear_6958_40765)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3CradialGradient id='paint0_radial_6958_40765' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse' gradientTransform='rotate(37.724 183.217 1253.89) scale(615.701 397.883)'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.35' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/radialGradient%3E%3ClinearGradient id='paint1_linear_6958_40765' x1='307.894' y1='167.202' x2='147.352' y2='6.663' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.665' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40765'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-privacy-rtl.webp?ver=20260514" ); } [dir="rtl"] .contribute-php .about__header { - background-image: url("data:image/svg+xml,%3Csvg width='1000' height='300' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_6958_40768)'%3E%3Cpath transform='matrix(-1 0 0 1 1000 0)' fill='url(%23paint0_linear_6958_40768)' d='M0 0h1000v300H0z'/%3E%3Cpath d='M241.498 149.134a1 1 0 0 1 0 1.732L88.43 239.135a1 1 0 0 1-1.5-.866V61.731a1 1 0 0 1 1.5-.866l153.068 88.269z' stroke='url(%23paint1_linear_6958_40768)' stroke-width='50' stroke-miterlimit='10'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_6958_40768' x1='606.5' x2='721' y2='355' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='.65' stop-color='%233858E9'/%3E%3Cstop offset='1' stop-color='%23D3CDB6'/%3E%3C/linearGradient%3E%3ClinearGradient id='paint1_linear_6958_40768' x1='176' y1='45.5' x2='-6.506' y2='213.124' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D3CDB6'/%3E%3Cstop offset='.64' stop-color='%233858E9'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3CclipPath id='clip0_6958_40768'%3E%3Cpath fill='%23fff' d='M0 0h1000v300H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"); + background-image: url( "../images/about-header-get-involved-rtl.webp?ver=20260514" ); } - .about__header-image { margin: 0 0 calc(var(--gap) * 1.5); } @@ -641,6 +657,7 @@ font-size: clamp(2rem, 20vw - 9rem, 4rem); line-height: 1; font-weight: 600; + color: var(--text); } .about-php .about__header-title h1, @@ -659,6 +676,7 @@ padding: 0; font-size: 1.6rem; line-height: 1.15; + color: var(--text); } .about__header-navigation { @@ -695,6 +713,7 @@ .about__header-navigation .nav-tab:active { background-color: var(--nav-current); color: var(--text-light); + border-radius: var(--border-radius); } .about__header-navigation .nav-tab-active { @@ -709,6 +728,7 @@ background-color: var(--nav-current); color: var(--text-light); border-color: var(--nav-current); + border-radius: var(--border-radius); } @media screen and (max-width: 960px) { @@ -761,14 +781,6 @@ padding-right: var(--gap); } - .about__header, - .credits-php .about__header, - .freedoms-php .about__header, - .privacy-php .about__header, - .contribute-php .about__header { - background: var(--accent-gradient) !important; - } - .about__header-navigation { display: block; } @@ -795,7 +807,6 @@ .about__section .wp-people-group-title { margin-bottom: calc(var(--gap) * 2 - 10px); text-align: center; - } .about__section .wp-people-group { diff --git a/src/wp-admin/css/colors/_admin.scss b/src/wp-admin/css/colors/_admin.scss index 271cefcd854d0..313666e3ded73 100644 --- a/src/wp-admin/css/colors/_admin.scss +++ b/src/wp-admin/css/colors/_admin.scss @@ -475,13 +475,13 @@ ul#adminmenu > li.current > a.current:after { #wpadminbar .quicklinks li a:focus .blavatar, #wpadminbar .quicklinks .ab-sub-wrapper .menupop.hover > a .blavatar, #wpadminbar .menupop .menupop > .ab-item:hover:before, -#wpadminbar.mobile .quicklinks .ab-icon:before, -#wpadminbar.mobile .quicklinks .ab-item:before { +#wpadminbar.mobile .quicklinks .hover .ab-icon:before, +#wpadminbar.mobile .quicklinks .hover .ab-item:before { color: variables.$menu-submenu-focus-text; } -#wpadminbar.mobile .quicklinks .hover .ab-icon:before, -#wpadminbar.mobile .quicklinks .hover .ab-item:before { +#wpadminbar.mobile .quicklinks .ab-icon:before, +#wpadminbar.mobile .quicklinks .ab-item:before { color: variables.$menu-icon; } diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index b317af45e023e..55b721e7f12da 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -829,7 +829,7 @@ img.emoji { border-radius: 50%; color: var(--wp-admin-theme-color, #3858e9); /* vertically center the icon cross browsers */ - line-height: 1.28; + line-height: 1.1; } .tagchecklist .ntdelbutton:focus { @@ -942,13 +942,6 @@ a#remove-post-thumbnail:hover, line-height: 2.30769231; /* 30px */ } -#delete-link { - line-height: 2.30769231; /* 30px */ - vertical-align: middle; - text-align: left; - margin-left: 8px; -} - #delete-link a { text-decoration: none; } @@ -961,7 +954,6 @@ a#remove-post-thumbnail:hover, #publishing-action .spinner { float: none; - margin-top: 5px; } #misc-publishing-actions { @@ -2460,7 +2452,7 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */ filter: alpha(opacity=70); width: 20px; height: 20px; - margin: 4px 10px 0; + margin: 10px 10px 0; } .spinner.is-active, @@ -2480,6 +2472,7 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */ } #template .submit .spinner { float: none; + vertical-align: top; } .metabox-holder .stuffbox > h3, /* Back-compat for pre-4.4 */ @@ -3340,7 +3333,7 @@ img { .postbox .handle-order-higher:focus, .postbox .handle-order-lower:focus, .postbox .handlediv:focus { - box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color); + box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color); border-radius: 50%; /* Only visible in Windows High Contrast mode */ outline: 2px solid transparent; diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index 2b4e87daa7ce7..3dfdfea790fb3 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -70,7 +70,7 @@ body { #customize-save-button-wrapper { float: right; - margin-top: 3px; /* Vertically center 40px button in 45px header */ + margin-top: 7px; /* Vertically center 32px button in 45px header */ } body:not(.ready) #customize-save-button-wrapper .save { @@ -572,6 +572,10 @@ body.trashing #publish-settings { display: block; } +.accordion-section-title button.accordion-trigger .spinner { + margin-top: 0; +} + @media (prefers-reduced-motion: reduce) { #customize-theme-controls .accordion-section-title, #customize-outer-theme-controls .accordion-section-title { @@ -2996,9 +3000,8 @@ body.adding-widget .add-new-widget:before, } .wp-core-ui.wp-customizer .button { - min-height: 30px; padding: 0 14px; - line-height: 2; + line-height: 2.14285714; /* 30px */ font-size: 14px; vertical-align: middle; } diff --git a/src/wp-admin/css/dashboard.css b/src/wp-admin/css/dashboard.css index 324637a7a7b08..ab73f828f7067 100644 --- a/src/wp-admin/css/dashboard.css +++ b/src/wp-admin/css/dashboard.css @@ -60,7 +60,6 @@ /* Required min-height to make the jQuery UI Sortable drop zone work. */ min-height: 0; margin: 0 8px 20px; - padding: 0; } #dashboard-widgets .meta-box-sortables:not(:empty) { diff --git a/src/wp-admin/css/edit.css b/src/wp-admin/css/edit.css index b98dd889c59fe..f1dd76ac31474 100644 --- a/src/wp-admin/css/edit.css +++ b/src/wp-admin/css/edit.css @@ -5,7 +5,6 @@ #poststuff #post-body { padding: 0; - margin: 0 -4px; } #poststuff .postbox-container { @@ -121,7 +120,6 @@ input#link_url { #edit-slug-box .cancel { margin-right: 10px; padding: 0; - font-size: 11px; } #comment-link-box { @@ -140,7 +138,7 @@ input#link_url { #editable-post-name input { font-size: 13px; font-weight: 400; - height: 24px; + min-height: 32px; margin: 0; width: 16em; } @@ -174,10 +172,6 @@ body.post-type-wp_navigation .inline-edit-status { /* Post Screen */ -.metabox-holder .postbox-container .meta-box-sortables { - padding: 4px; -} - /* Only highlight drop zones when dragging and only in the 2 columns layout. */ .is-dragging-metaboxes .metabox-holder .postbox-container .meta-box-sortables { border-radius: 8px; @@ -1068,6 +1062,10 @@ form#tags-filter { #edit-slug-box { padding: 0; } + + #editable-post-name input { + min-height: 40px; + } } @media only screen and (max-width: 1004px) { @@ -1543,6 +1541,9 @@ p.popular-tags a { } .edit-tag-actions { + display: flex; + align-items: center; + gap: 8px; margin-top: 20px; } diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index e4e09ca1b6023..b48825a1ef5a3 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -583,6 +583,12 @@ input[type="number"].tiny-text { vertical-align: middle; } +.button.wp-hide-pw.user-new-password-toggle { + display: inline-flex; + align-items: center; + column-gap: 4px; +} + .wp-cancel-pw .dashicons-no { display: none; } diff --git a/src/wp-admin/css/install.css b/src/wp-admin/css/install.css index 71ea71c7d2863..9476749dd7cf2 100644 --- a/src/wp-admin/css/install.css +++ b/src/wp-admin/css/install.css @@ -16,16 +16,16 @@ body { } a { - color: #2271b1; + color: var(--wp-admin-theme-color); } a:hover, a:active { - color: #135e96; + color: var(--wp-admin-theme-color-darker-20); } a:focus { - color: #043959; + color: var(--wp-admin-theme-color-darker-20); border-radius: 2px; box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9); /* Only visible in Windows High Contrast mode */ diff --git a/src/wp-admin/css/list-tables.css b/src/wp-admin/css/list-tables.css index c659079bea2e9..e2d49d09b0a42 100644 --- a/src/wp-admin/css/list-tables.css +++ b/src/wp-admin/css/list-tables.css @@ -635,22 +635,6 @@ tr.wp-locked .row-actions .trash { display: none; } -.wp-collaborative-editing .locked-info { - display: block; -} - -.join-action-text { - display: none; -} - -.wp-collaborative-editing .edit-action-text { - display: none; -} - -.wp-collaborative-editing .join-action-text { - display: inline; -} - #menu-locations-wrap .widefat { width: 60%; } @@ -1104,6 +1088,7 @@ tr.inline-edit-row td { } .inline-edit-row select { + line-height: 2.14285714; /* 30px for 32px height with 14px font */ padding-right: 24px; } @@ -1609,7 +1594,7 @@ div.action-links, } .plugin-card h3 { - margin: 0 12px 12px 0; + margin: 0 12px 16px 0; font-size: 18px; line-height: 1.3; } diff --git a/src/wp-admin/css/media.css b/src/wp-admin/css/media.css index 20806972d3aa1..ae21bb77d3f82 100644 --- a/src/wp-admin/css/media.css +++ b/src/wp-admin/css/media.css @@ -555,8 +555,18 @@ border color while dragging a file over the uploader drop area */ height: auto; } -.media-frame.mode-grid .media-toolbar label { - display: block; +.media-frame.mode-grid .media-toolbar label:not(.media-search-input-label) { + border: 0; + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + /* Many screen reader and browser combinations announce broken words as they would appear visually. */ + word-wrap: normal !important; + word-break: normal !important; } .media-frame.mode-grid .media-toolbar select { @@ -571,11 +581,11 @@ border color while dragging a file over the uploader drop area */ padding: 0 8px; } -.media-frame.mode-grid .media-toolbar .button { - min-height: 32px; - line-height: 2.30769231; /* 30px for 32px height with 13px font */ - padding: 0 12px; - align-self: end; +.media-frame.mode-grid .media-toolbar-secondary { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; } .media-frame.mode-grid.mode-edit .media-toolbar-secondary > .select-mode-toggle-button { diff --git a/src/wp-admin/css/revisions.css b/src/wp-admin/css/revisions.css index 4cb824c8574c2..da238456178fc 100644 --- a/src/wp-admin/css/revisions.css +++ b/src/wp-admin/css/revisions.css @@ -309,7 +309,6 @@ table.diff .diff-addedline ins { float: right; margin-left: 6px; margin-right: 6px; - margin-top: 2px; } .diff-meta-from { @@ -632,8 +631,4 @@ div.revisions-controls > .wp-slider > .ui-slider-handle { word-break: break-all; word-wrap: break-word; } - - .diff-meta input.restore-revision { - margin-top: 0; - } } diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index bd116288723dc..4a644974c50c4 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -1967,7 +1967,7 @@ body.full-overlay-active { .theme-install-overlay .wp-full-overlay-header .button { float: right; - margin: 3px 10px 0 0; /* Vertically center 40px button in 45px header */ + margin: 7px 10px 0 0; /* Vertically center 32px button in 45px header */ } .theme-install-overlay .wp-full-overlay-sidebar { @@ -2053,8 +2053,6 @@ body.full-overlay-active { .theme-install-overlay .wp-full-overlay-header .button { font-size: 13px; - line-height: 2.15384615; - min-height: 30px; } .theme-browser .theme .theme-actions .button { diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index 2065e55ffb3ce..257dbbe0d60a8 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -198,19 +198,19 @@ is_theme_active() ? __( 'Publish' ) : __( 'Activate & Publish' ); ?>
- - + +
- +
diff --git a/src/wp-admin/freedoms.php b/src/wp-admin/freedoms.php index 711f9b9414fcb..aabfc5d4c77b8 100644 --- a/src/wp-admin/freedoms.php +++ b/src/wp-admin/freedoms.php @@ -31,7 +31,7 @@
- <?php echo esc_attr( $header_alt_text ); ?> + <?php echo esc_attr( $header_alt_text ); ?>
diff --git a/src/wp-admin/images/about-header-credits-rtl.webp b/src/wp-admin/images/about-header-credits-rtl.webp new file mode 100644 index 0000000000000..b65ce15238ea9 Binary files /dev/null and b/src/wp-admin/images/about-header-credits-rtl.webp differ diff --git a/src/wp-admin/images/about-header-credits.webp b/src/wp-admin/images/about-header-credits.webp new file mode 100644 index 0000000000000..b83bb5b49e1c4 Binary files /dev/null and b/src/wp-admin/images/about-header-credits.webp differ diff --git a/src/wp-admin/images/about-header-default-rtl.webp b/src/wp-admin/images/about-header-default-rtl.webp new file mode 100644 index 0000000000000..7de0c9a4ffec2 Binary files /dev/null and b/src/wp-admin/images/about-header-default-rtl.webp differ diff --git a/src/wp-admin/images/about-header-default.webp b/src/wp-admin/images/about-header-default.webp new file mode 100644 index 0000000000000..020a92a7265ae Binary files /dev/null and b/src/wp-admin/images/about-header-default.webp differ diff --git a/src/wp-admin/images/about-header-freedoms-rtl.webp b/src/wp-admin/images/about-header-freedoms-rtl.webp new file mode 100644 index 0000000000000..506c20f4cf620 Binary files /dev/null and b/src/wp-admin/images/about-header-freedoms-rtl.webp differ diff --git a/src/wp-admin/images/about-header-freedoms.webp b/src/wp-admin/images/about-header-freedoms.webp new file mode 100644 index 0000000000000..4740e8ab087b0 Binary files /dev/null and b/src/wp-admin/images/about-header-freedoms.webp differ diff --git a/src/wp-admin/images/about-header-get-involved-rtl.webp b/src/wp-admin/images/about-header-get-involved-rtl.webp new file mode 100644 index 0000000000000..4cd5b89c61c00 Binary files /dev/null and b/src/wp-admin/images/about-header-get-involved-rtl.webp differ diff --git a/src/wp-admin/images/about-header-get-involved.webp b/src/wp-admin/images/about-header-get-involved.webp new file mode 100644 index 0000000000000..33a6708b9f2fa Binary files /dev/null and b/src/wp-admin/images/about-header-get-involved.webp differ diff --git a/src/wp-admin/images/about-header-privacy-rtl.webp b/src/wp-admin/images/about-header-privacy-rtl.webp new file mode 100644 index 0000000000000..0ee585216df5e Binary files /dev/null and b/src/wp-admin/images/about-header-privacy-rtl.webp differ diff --git a/src/wp-admin/images/about-header-privacy.webp b/src/wp-admin/images/about-header-privacy.webp new file mode 100644 index 0000000000000..5178051483f75 Binary files /dev/null and b/src/wp-admin/images/about-header-privacy.webp differ diff --git a/src/wp-admin/images/about-release-badge.svg b/src/wp-admin/images/about-release-badge.svg index f2894d8b5030f..751068ebe62ed 100644 --- a/src/wp-admin/images/about-release-badge.svg +++ b/src/wp-admin/images/about-release-badge.svg @@ -1,13 +1,14 @@ - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/src/wp-admin/images/about-release-logo.svg b/src/wp-admin/images/about-release-logo.svg index 15c35b521b8de..d497949fe8b74 100644 --- a/src/wp-admin/images/about-release-logo.svg +++ b/src/wp-admin/images/about-release-logo.svg @@ -1,40 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + diff --git a/src/wp-admin/includes/class-custom-background.php b/src/wp-admin/includes/class-custom-background.php index e42a38f4eb689..75aa75d968fa2 100644 --- a/src/wp-admin/includes/class-custom-background.php +++ b/src/wp-admin/includes/class-custom-background.php @@ -279,7 +279,7 @@ public function admin_page() { - + - + - - - - diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php index bb98824f9a56a..b45cbb00387ce 100644 --- a/src/wp-admin/options.php +++ b/src/wp-admin/options.php @@ -153,7 +153,6 @@ 'default_email_category', 'default_link_category', 'default_post_format', - 'wp_collaboration_enabled', ), ); $allowed_options['misc'] = array(); diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php index 29dda79f0090b..4c47063ef8fc7 100644 --- a/src/wp-admin/privacy.php +++ b/src/wp-admin/privacy.php @@ -25,7 +25,7 @@
- <?php echo esc_attr( $header_alt_text ); ?> + <?php echo esc_attr( $header_alt_text ); ?>
diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index e9d217c0f7525..5723f8e6244cc 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -422,7 +422,7 @@ <# } #> <# } else { #> - + <# } #> <# } else { #> <# } else { #> - + <# } #> <# } #> <# } else { #> @@ -445,14 +445,14 @@ $aria_label = sprintf( _x( 'Install %s', 'theme' ), '{{ data.name }}' ); ?> - + <# } else { #> - + <# } #> <# } #>
@@ -487,18 +487,18 @@ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); ?> <# if ( ! data.active ) { #> - + <# } else { #> - + <# } #> <# } else { #> - + <# } #> <# } else { #> <# if ( data.compatible_wp && data.compatible_php ) { #> - + <# } else { #> - + <# } #> <# } #>
@@ -605,7 +605,7 @@
- +
diff --git a/src/wp-admin/user-edit.php b/src/wp-admin/user-edit.php index cfad6afbab8dc..c25380a93ee91 100644 --- a/src/wp-admin/user-edit.php +++ b/src/wp-admin/user-edit.php @@ -695,7 +695,7 @@ - diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php index c93d34d014182..acc9f96fe750f 100644 --- a/src/wp-content/themes/twentyeleven/header.php +++ b/src/wp-content/themes/twentyeleven/header.php @@ -38,7 +38,7 @@ ?> - + true ) ); + wp_enqueue_script( 'twentyfifteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20260105', array( 'in_footer' => true ) ); } add_action( 'customize_preview_init', 'twentyfifteen_customize_preview_js' ); diff --git a/src/wp-content/themes/twentyfifteen/readme.txt b/src/wp-content/themes/twentyfifteen/readme.txt index 046bb8f1ea83c..068837a257c34 100644 --- a/src/wp-content/themes/twentyfifteen/readme.txt +++ b/src/wp-content/themes/twentyfifteen/readme.txt @@ -1,9 +1,9 @@ === Twenty Fifteen === Contributors: wordpressdotorg Requires at least: 4.1 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 -Version: 4.1 +Version: 4.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, block-patterns @@ -73,6 +73,11 @@ Source: https://stocksnap.io/photo/purple-yellow-ACF0693B9C == Changelog == += 4.2 = +* Released: May 20, 2026 + +https://wordpress.org/documentation/article/twenty-fifteen-changelog/#Version_4.2 + = 4.1 = * Released: December 2, 2025 diff --git a/src/wp-content/themes/twentyfifteen/style.css b/src/wp-content/themes/twentyfifteen/style.css index bbcae0f209e8c..c82ae835bce86 100644 --- a/src/wp-content/themes/twentyfifteen/style.css +++ b/src/wp-content/themes/twentyfifteen/style.css @@ -4,9 +4,9 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer. -Version: 4.1 +Version: 4.2 Requires at least: 4.1 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 5dcb04c6b6698..381c5c44ec2a7 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -345,7 +345,7 @@ function twentyfourteen_scripts() { wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '20251101' ); // Load our main stylesheet. - wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array(), '20251202' ); + wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri(), array(), '20260520' ); // Theme block stylesheet. wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20250715' ); diff --git a/src/wp-content/themes/twentyfourteen/readme.txt b/src/wp-content/themes/twentyfourteen/readme.txt index a4402691516b7..fbf080fe3e729 100644 --- a/src/wp-content/themes/twentyfourteen/readme.txt +++ b/src/wp-content/themes/twentyfourteen/readme.txt @@ -1,9 +1,9 @@ === Twenty Fourteen === Contributors: wordpressdotorg Requires at least: 3.6 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 -Stable tag: 4.4 +Stable tag: 4.5 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready, block-patterns @@ -60,6 +60,11 @@ Source: https://stocksnap.io/photo/fog-mountain-ZKN6UKFKEO == Changelog == += 4.5 = +* Released: May 20, 2026 + +https://wordpress.org/documentation/article/twenty-fourteen-changelog/#Version_4.5 + = 4.4 = * Released: December 2, 2025 diff --git a/src/wp-content/themes/twentyfourteen/style.css b/src/wp-content/themes/twentyfourteen/style.css index 311ecd79b65f3..e742d4e3a75d7 100644 --- a/src/wp-content/themes/twentyfourteen/style.css +++ b/src/wp-content/themes/twentyfourteen/style.css @@ -4,9 +4,9 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier. -Version: 4.4 +Version: 4.5 Requires at least: 3.6 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/src/wp-content/themes/twentynineteen/package-lock.json b/src/wp-content/themes/twentynineteen/package-lock.json index 6f3e13324cc2a..616dcc79f6dae 100644 --- a/src/wp-content/themes/twentynineteen/package-lock.json +++ b/src/wp-content/themes/twentynineteen/package-lock.json @@ -1,12 +1,12 @@ { "name": "twentynineteen", - "version": "3.2.0", + "version": "3.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "twentynineteen", - "version": "3.2.0", + "version": "3.3.0", "devDependencies": { "@wordpress/browserslist-config": "^6.34.0", "autoprefixer": "^10.4.22", diff --git a/src/wp-content/themes/twentynineteen/package.json b/src/wp-content/themes/twentynineteen/package.json index f52cfcd9957bb..36db278d2ca76 100644 --- a/src/wp-content/themes/twentynineteen/package.json +++ b/src/wp-content/themes/twentynineteen/package.json @@ -1,6 +1,6 @@ { "name": "twentynineteen", - "version": "3.2.0", + "version": "3.3.0", "description": "Default WP Theme", "bugs": { "url": "https://core.trac.wordpress.org/" diff --git a/src/wp-content/themes/twentynineteen/readme.txt b/src/wp-content/themes/twentynineteen/readme.txt index 1f2ffbc7b828c..a135531f9ee85 100644 --- a/src/wp-content/themes/twentynineteen/readme.txt +++ b/src/wp-content/themes/twentynineteen/readme.txt @@ -2,9 +2,9 @@ Contributors: wordpressdotorg Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready, block-patterns Requires at least: 4.7 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 -Stable tag: 3.2 +Stable tag: 3.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -40,6 +40,11 @@ GNU General Public License for more details. == Changelog == += 3.3 = +* Released: May 20, 2026 + +https://wordpress.org/documentation/article/twenty-nineteen-changelog/#Version_3.3 + = 3.2 = * Released: December 2, 2025 diff --git a/src/wp-content/themes/twentynineteen/style-rtl.css b/src/wp-content/themes/twentynineteen/style-rtl.css index ae969d6e88e84..719f0f52fc7ad 100644 --- a/src/wp-content/themes/twentynineteen/style-rtl.css +++ b/src/wp-content/themes/twentynineteen/style-rtl.css @@ -5,10 +5,10 @@ Theme URI: https://wordpress.org/themes/twentynineteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes. -Tested up to: 6.9 +Tested up to: 7.0 Requires at least: 4.7 Requires PHP: 5.2.4 -Version: 3.2 +Version: 3.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentynineteen diff --git a/src/wp-content/themes/twentynineteen/style.css b/src/wp-content/themes/twentynineteen/style.css index 1dafa52fd6be7..22c57138ee73f 100644 --- a/src/wp-content/themes/twentynineteen/style.css +++ b/src/wp-content/themes/twentynineteen/style.css @@ -5,10 +5,10 @@ Theme URI: https://wordpress.org/themes/twentynineteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes. -Tested up to: 6.9 +Tested up to: 7.0 Requires at least: 4.7 Requires PHP: 5.2.4 -Version: 3.2 +Version: 3.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentynineteen diff --git a/src/wp-content/themes/twentynineteen/style.scss b/src/wp-content/themes/twentynineteen/style.scss index b9a54490b915e..699ce75c1fd47 100644 --- a/src/wp-content/themes/twentynineteen/style.scss +++ b/src/wp-content/themes/twentynineteen/style.scss @@ -4,10 +4,10 @@ Theme URI: https://wordpress.org/themes/twentynineteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes. -Tested up to: 6.9 +Tested up to: 7.0 Requires at least: 4.7 Requires PHP: 5.2.4 -Version: 3.2 +Version: 3.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentynineteen diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index 30d95aaf93f83..9f4d73dbde375 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -461,7 +461,7 @@ function twentyseventeen_scripts() { wp_enqueue_style( 'twentyseventeen-fonts', twentyseventeen_fonts_url(), array(), $font_version ); // Theme stylesheet. - wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri(), array(), '20251202' ); + wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri(), array(), '20260520' ); // Theme block stylesheet. wp_enqueue_style( 'twentyseventeen-block-style', get_theme_file_uri( '/assets/css/blocks.css' ), array( 'twentyseventeen-style' ), '20240729' ); diff --git a/src/wp-content/themes/twentyseventeen/readme.txt b/src/wp-content/themes/twentyseventeen/readme.txt index 93d3765e2c3bd..b7ee61dc1df8c 100644 --- a/src/wp-content/themes/twentyseventeen/readme.txt +++ b/src/wp-content/themes/twentyseventeen/readme.txt @@ -1,9 +1,9 @@ === Twenty Seventeen === Contributors: wordpressdotorg Requires at least: 4.7 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 -Version: 4.0 +Version: 4.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-patterns @@ -71,6 +71,11 @@ Source: https://stocksnap.io/photo/striped-fabric-9CBVWF2CDU == Changelog == += 4.1 = +* Released: May 20, 2026 + +https://wordpress.org/documentation/article/twenty-seventeen-changelog/#Version_4.1 + = 4.0 = * Released: December 2, 2025 diff --git a/src/wp-content/themes/twentyseventeen/style.css b/src/wp-content/themes/twentyseventeen/style.css index 1c507a9955c53..cd0bb51f124c0 100644 --- a/src/wp-content/themes/twentyseventeen/style.css +++ b/src/wp-content/themes/twentyseventeen/style.css @@ -4,8 +4,8 @@ Theme URI: https://wordpress.org/themes/twentyseventeen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device. -Version: 4.0 -Tested up to: 6.9 +Version: 4.1 +Tested up to: 7.0 Requires at least: 4.7 Requires PHP: 5.2.4 License: GNU General Public License v2 or later diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php index 26c84a7a347bc..696c5431e4f51 100644 --- a/src/wp-content/themes/twentysixteen/functions.php +++ b/src/wp-content/themes/twentysixteen/functions.php @@ -405,10 +405,10 @@ function twentysixteen_scripts() { wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '20251101' ); // Theme stylesheet. - wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri(), array(), '20251202' ); + wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri(), array(), '20260520' ); // Theme block stylesheet. - wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20240817' ); + wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20260105' ); // Register handles for removed stylesheets and scripts. wp_register_style( 'twentysixteen-ie', false, array( 'twentysixteen-style' ) ); @@ -454,7 +454,7 @@ function twentysixteen_scripts() { */ function twentysixteen_block_editor_styles() { // Block styles. - wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20250715' ); + wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20260105' ); // Add custom fonts. $font_version = ( 0 === strpos( (string) twentysixteen_fonts_url(), get_template_directory_uri() . '/' ) ) ? '20230328' : null; wp_enqueue_style( 'twentysixteen-fonts', twentysixteen_fonts_url(), array(), $font_version ); diff --git a/src/wp-content/themes/twentysixteen/inc/customizer.php b/src/wp-content/themes/twentysixteen/inc/customizer.php index 86d1528c85547..f72a83d53b51b 100644 --- a/src/wp-content/themes/twentysixteen/inc/customizer.php +++ b/src/wp-content/themes/twentysixteen/inc/customizer.php @@ -497,7 +497,7 @@ function twentysixteen_customize_control_js() { * @since Twenty Sixteen 1.0 */ function twentysixteen_customize_preview_js() { - wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20170530', array( 'in_footer' => true ) ); + wp_enqueue_script( 'twentysixteen-customize-preview', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20260105', array( 'in_footer' => true ) ); } add_action( 'customize_preview_init', 'twentysixteen_customize_preview_js' ); diff --git a/src/wp-content/themes/twentysixteen/readme.txt b/src/wp-content/themes/twentysixteen/readme.txt index c93f3510ff198..6b11b572a1189 100644 --- a/src/wp-content/themes/twentysixteen/readme.txt +++ b/src/wp-content/themes/twentysixteen/readme.txt @@ -1,9 +1,9 @@ === Twenty Sixteen === Contributors: wordpressdotorg Requires at least: 4.4 -Tested up to: 6.9 +Tested up to: 7.0 Requires PHP: 5.2.4 -Version: 3.7 +Version: 3.8 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog, block-patterns @@ -68,6 +68,11 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch == Changelog == += 3.8 = +* Released: May 20, 2026 + +https://wordpress.org/documentation/article/twenty-sixteen-changelog/#Version_3.8 + = 3.7 = * Released: December 2, 2025 diff --git a/src/wp-content/themes/twentysixteen/style.css b/src/wp-content/themes/twentysixteen/style.css index 1fa05165775be..56f081030f09e 100644 --- a/src/wp-content/themes/twentysixteen/style.css +++ b/src/wp-content/themes/twentysixteen/style.css @@ -4,8 +4,8 @@ Theme URI: https://wordpress.org/themes/twentysixteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere. -Version: 3.7 -Tested up to: 6.9 +Version: 3.8 +Tested up to: 7.0 Requires at least: 4.4 Requires PHP: 5.2.4 License: GNU General Public License v2 or later diff --git a/src/wp-content/themes/twentyten/header.php b/src/wp-content/themes/twentyten/header.php index 2e3d0e7054cbf..3b2999f6434e0 100644 --- a/src/wp-content/themes/twentyten/header.php +++ b/src/wp-content/themes/twentyten/header.php @@ -39,7 +39,7 @@ ?> - +name ), + esc_html( $e->getMessage() ) + ) + ); + } } /** diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index b9c7872d0cc07..50868b11a2870 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/wp-includes/admin-bar.php @@ -949,16 +949,44 @@ function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void { return; } - $is_apple_os = (bool) preg_match( '/Macintosh|Mac OS X|Mac_PowerPC/i', $_SERVER['HTTP_USER_AGENT'] ?? '' ); - $shortcut_label = $is_apple_os - ? _x( '⌘K', 'keyboard shortcut to open the command palette' ) - : _x( 'Ctrl+K', 'keyboard shortcut to open the command palette' ); - $title = sprintf( + $shortcut_labels = array( + 'appleOS' => _x( '⌘K', 'keyboard shortcut to open the command palette' ), + 'default' => _x( 'Ctrl+K', 'keyboard shortcut to open the command palette' ), + ); + $apple_pattern = 'Macintosh|Mac OS X|Mac_PowerPC'; + $is_apple_os = (bool) preg_match( "/{$apple_pattern}/i", $_SERVER['HTTP_USER_AGENT'] ?? '' ); + $shortcut_label = $is_apple_os ? $shortcut_labels['appleOS'] : $shortcut_labels['default']; + $title = sprintf( '%s %s', $shortcut_label, /* translators: Hidden accessibility text. */ __( 'Open command palette' ), ); + /* + * Detect Apple OS via JavaScript for sites behind a CDN blocking the UA header. + * + * Running the script as the admin bar is rendered avoids a flash of incorrect content + * for users with Apple OS when the UA header is blocked. It also prevents the need for + * wp-i18n to be loaded as a dependency. + */ + $function = <<<'JS' + ( applePattern, appleOSLabel ) => { + if ( ! ( new RegExp( applePattern, 'i' ) ).test( navigator.userAgent ) ) { + return; + } + const kbd = document.querySelector( '#wp-admin-bar-command-palette .ab-label kbd' ); + if ( kbd ) { + kbd.textContent = appleOSLabel; + } + } + JS; + $script = sprintf( + '( %s )( %s, %s );', + $function, + wp_json_encode( $apple_pattern, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), + wp_json_encode( $shortcut_labels['appleOS'], JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) + ); + $script .= "\n//# sourceURL=" . rawurlencode( __FUNCTION__ ); $wp_admin_bar->add_node( array( 'id' => 'command-palette', @@ -967,6 +995,7 @@ function wp_admin_bar_command_palette_menu( WP_Admin_Bar $wp_admin_bar ): void { 'meta' => array( 'class' => 'hide-if-no-js', 'onclick' => 'wp.data.dispatch( "core/commands" ).open(); return false;', + 'html' => wp_get_inline_script_tag( $script ), ), ) ); @@ -1437,49 +1466,3 @@ function _get_admin_bar_pref( $context = 'front', $user = 0 ) { return 'true' === $pref; } - -/** - * Adds CSS from the administration color scheme stylesheet on the front end. - * - * @since 7.0.0 - * - * @global array $_wp_admin_css_colors Registered administration color schemes. - */ -function wp_admin_bar_add_color_scheme_to_front_end() { - if ( is_admin() ) { - return; - } - - global $_wp_admin_css_colors; - - if ( empty( $_wp_admin_css_colors ) ) { - register_admin_color_schemes(); - } - - $color_scheme = get_user_option( 'admin_color' ); - - if ( empty( $color_scheme ) || ! isset( $_wp_admin_css_colors[ $color_scheme ] ) ) { - $color_scheme = 'modern'; - } - - $color = $_wp_admin_css_colors[ $color_scheme ] ?? null; - $url = $color->url ?? ''; - - if ( $url ) { - $response = wp_remote_get( $url ); - if ( ! is_wp_error( $response ) ) { - $css = $response['body']; - if ( is_string( $css ) && str_contains( $css, '#wpadminbar' ) ) { - $start_position = strpos( $css, '#wpadminbar' ); - $end_position = strpos( $css, '.wp-pointer' ); - if ( false !== $end_position && $end_position > $start_position ) { - $css = substr( $css, $start_position, $end_position - $start_position ); - if ( SCRIPT_DEBUG ) { - $css = str_replace( '/* Pointers */', '', $css ); - } - } - wp_add_inline_style( 'admin-bar', $css ); - } - } - } -} diff --git a/src/wp-includes/ai-client.php b/src/wp-includes/ai-client.php index 818e1dbaedcde..b38c7b721416d 100644 --- a/src/wp-includes/ai-client.php +++ b/src/wp-includes/ai-client.php @@ -8,6 +8,8 @@ */ use WordPress\AiClient\AiClient; +use WordPress\AiClient\Messages\DTO\Message; +use WordPress\AiClient\Messages\DTO\MessagePart; /** * Returns whether AI features are supported in the current environment. @@ -17,20 +19,22 @@ * @return bool Whether AI features are supported. */ function wp_supports_ai(): bool { - $is_enabled = defined( 'WP_AI_SUPPORT' ) ? WP_AI_SUPPORT : true; + // Return early if AI is disabled by the current environment. + if ( defined( 'WP_AI_SUPPORT' ) && ! WP_AI_SUPPORT ) { + return false; + } /** - * Filters whether the current request should use AI. + * Filters whether the current request can use AI. * * This allows plugins and 3rd-party code to disable AI features on a per-request basis, or to even override explicit * preferences defined by the site owner. * * @since 7.0.0 * - * @param bool $is_enabled Whether the current request should use AI. Default to WP_AI_SUPPORT constant, or true if - * the constant is not defined. + * @param bool $is_enabled Whether AI is available. Default to true. */ - return (bool) apply_filters( 'wp_supports_ai', $is_enabled ); + return (bool) apply_filters( 'wp_supports_ai', true ); } /** @@ -53,6 +57,6 @@ function wp_supports_ai(): bool { * conversations. Default null. * @return WP_AI_Client_Prompt_Builder The prompt builder instance. */ -function wp_ai_client_prompt( $prompt = null ) { +function wp_ai_client_prompt( $prompt = null ): WP_AI_Client_Prompt_Builder { return new WP_AI_Client_Prompt_Builder( AiClient::defaultRegistry(), $prompt ); } diff --git a/src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php b/src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php index 18d85eee6c9e6..45504897485f7 100644 --- a/src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php +++ b/src/wp-includes/ai-client/adapters/class-wp-ai-client-cache.php @@ -104,7 +104,7 @@ public function clear(): bool { * @param mixed $default_value Default value to return for keys that do not exist. * @return array A list of key => value pairs. */ - public function getMultiple( $keys, $default_value = null ) { + public function getMultiple( $keys, $default_value = null ): array { /** * Keys array. * diff --git a/src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php b/src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php index f1827db0e437c..f6c6dea441d1c 100644 --- a/src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php +++ b/src/wp-includes/ai-client/adapters/class-wp-ai-client-http-client.php @@ -32,17 +32,15 @@ class WP_AI_Client_HTTP_Client implements ClientInterface, ClientWithOptionsInte * Response factory instance. * * @since 7.0.0 - * @var ResponseFactoryInterface */ - private $response_factory; + private ResponseFactoryInterface $response_factory; /** * Stream factory instance. * * @since 7.0.0 - * @var StreamFactoryInterface */ - private $stream_factory; + private StreamFactoryInterface $stream_factory; /** * Constructor. diff --git a/src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php b/src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php index d1f2271bd47d3..da7858dd76555 100644 --- a/src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php +++ b/src/wp-includes/ai-client/class-wp-ai-client-prompt-builder.php @@ -190,14 +190,29 @@ public function __construct( ProviderRegistry $registry, $prompt = null ) { $this->error = $this->exception_to_wp_error( $e ); } + $default_timeout = 30.0; + /** * Filters the default request timeout in seconds for AI Client HTTP requests. * * @since 7.0.0 * - * @param int $default_timeout The default timeout in seconds. + * @param float $default_timeout The default timeout in seconds. */ - $default_timeout = (int) apply_filters( 'wp_ai_client_default_request_timeout', 30 ); + $filtered_default_timeout = apply_filters( 'wp_ai_client_default_request_timeout', $default_timeout ); + if ( is_numeric( $filtered_default_timeout ) && (float) $filtered_default_timeout >= 0.0 ) { + $default_timeout = (float) $filtered_default_timeout; + } else { + _doing_it_wrong( + __METHOD__, + sprintf( + /* translators: %s: wp_ai_client_default_request_timeout */ + __( 'The %s filter must return a non-negative number.' ), + 'wp_ai_client_default_request_timeout' + ), + '7.0.0' + ); + } $this->builder->usingRequestOptions( RequestOptions::fromArray( diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php index 10af74b63ce36..fa631e47f7afd 100644 --- a/src/wp-includes/assets/script-loader-packages.php +++ b/src/wp-includes/assets/script-loader-packages.php @@ -100,7 +100,7 @@ 'wp-url', 'wp-warning' ), - 'version' => '2300d40abe29e438beda' + 'version' => '93c3566b7f24c15b7e17' ), 'block-library.js' => array( 'dependencies' => array( @@ -142,7 +142,7 @@ 'import' => 'dynamic' ) ), - 'version' => '67d1a681ec0100a25d78' + 'version' => '2dffdfe77b9c5cba960e' ), 'block-serialization-default-parser.js' => array( 'dependencies' => array( @@ -214,7 +214,7 @@ 'wp-rich-text', 'wp-warning' ), - 'version' => '2cbe9a66c53c614d7d6f' + 'version' => '5dedfe13f08880193a28' ), 'compose.js' => array( 'dependencies' => array( @@ -257,16 +257,16 @@ 'wp-data', 'wp-deprecated', 'wp-element', + 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-private-apis', 'wp-rich-text', - 'wp-sync', 'wp-undo-manager', 'wp-url', 'wp-warning' ), - 'version' => '4d15c0f82a9fb01a04ed' + 'version' => '89931f90e4df5eb5f8a3' ), 'customize-widgets.js' => array( 'dependencies' => array( @@ -304,7 +304,7 @@ 'wp-private-apis', 'wp-redux-routine' ), - 'version' => 'dc7feb6ad8da53887680' + 'version' => '1756b6a2676c1b3369ab' ), 'data-controls.js' => array( 'dependencies' => array( @@ -381,7 +381,7 @@ 'import' => 'static' ) ), - 'version' => 'f84d20a8526b3463e9ff' + 'version' => '28ef50b859708963e197' ), 'edit-site.js' => array( 'dependencies' => array( @@ -428,7 +428,7 @@ 'import' => 'static' ) ), - 'version' => 'd36eb0c37b644e4cd4c8' + 'version' => 'dfd078032a67983c4d32' ), 'edit-widgets.js' => array( 'dependencies' => array( @@ -519,7 +519,7 @@ 'import' => 'static' ) ), - 'version' => '63782008412a6163c9f0' + 'version' => '37faadbdf6c40cb0c71c' ), 'element.js' => array( 'dependencies' => array( @@ -675,7 +675,7 @@ 'wp-private-apis', 'wp-url' ), - 'version' => '4b640c092eb654d2bd78' + 'version' => '714c49ed2942c98d088f' ), 'plugins.js' => array( 'dependencies' => array( @@ -758,7 +758,7 @@ 'wp-primitives', 'wp-url' ), - 'version' => 'c72d27a8ac4e33cb74d6' + 'version' => '21d86e46535b79d9afda' ), 'rich-text.js' => array( 'dependencies' => array( @@ -811,14 +811,6 @@ ), 'version' => 'faa37ce61b7ec8394b2a' ), - 'sync.js' => array( - 'dependencies' => array( - 'wp-api-fetch', - 'wp-hooks', - 'wp-private-apis' - ), - 'version' => '8186bfbc15b827d261f5' - ), 'theme.js' => array( 'dependencies' => array( 'react-jsx-runtime', diff --git a/src/wp-includes/assets/script-modules-packages.php b/src/wp-includes/assets/script-modules-packages.php index 534ce123add0f..7ece82f318d50 100644 --- a/src/wp-includes/assets/script-modules-packages.php +++ b/src/wp-includes/assets/script-modules-packages.php @@ -166,7 +166,7 @@ 'import' => 'static' ) ), - 'version' => '42d3f09bba14cce3054d' + 'version' => '54bb5a420026a61c7e4f' ), 'connectors/index.js' => array( 'dependencies' => array( @@ -190,7 +190,7 @@ 'import' => 'static' ) ), - 'version' => '7cd8fe3a80dded97579b' + 'version' => '012760fd849397dd0031' ), 'edit-site-init/index.js' => array( 'dependencies' => array( @@ -211,7 +211,7 @@ 'dependencies' => array( ), - 'version' => '4d2a3a72c7410d548881' + 'version' => 'efaa5193bbad9c60ffd1' ), 'interactivity-router/full-page.js' => array( 'dependencies' => array( diff --git a/src/wp-includes/block-supports/custom-css.php b/src/wp-includes/block-supports/custom-css.php index 9d5b13426f4ef..d4331ae3706ae 100644 --- a/src/wp-includes/block-supports/custom-css.php +++ b/src/wp-includes/block-supports/custom-css.php @@ -12,17 +12,28 @@ * * @param array $parsed_block The parsed block. * @return array The same parsed block with custom CSS class name added if appropriate. + * + * @phpstan-param array{ + * blockName: string|null, + * attrs: array{ + * className?: string, + * style?: array{ + * css?: string, + * ... + * }, + * ... + * }, + * ... + * } $parsed_block */ function wp_render_custom_css_support_styles( $parsed_block ) { - $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $parsed_block['blockName'] ); - - if ( ! block_has_support( $block_type, 'customCSS', true ) ) { + $custom_css = $parsed_block['attrs']['style']['css'] ?? null; + if ( ! is_string( $custom_css ) || '' === trim( $custom_css ) ) { return $parsed_block; } - $custom_css = trim( $parsed_block['attrs']['style']['css'] ?? '' ); - - if ( empty( $custom_css ) ) { + $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $parsed_block['blockName'] ); + if ( ! block_has_support( $block_type, 'customCSS', true ) ) { return $parsed_block; } @@ -32,9 +43,10 @@ function wp_render_custom_css_support_styles( $parsed_block ) { } // Generate a unique class name for this block instance. - $class_name = wp_unique_id_from_values( $parsed_block, 'wp-custom-css-' ); - $updated_class_name = isset( $parsed_block['attrs']['className'] ) - ? $parsed_block['attrs']['className'] . " $class_name" + $class_name = wp_unique_id_from_values( $parsed_block, 'wp-custom-css-' ); + $existing_class_name = $parsed_block['attrs']['className'] ?? null; + $updated_class_name = is_string( $existing_class_name ) + ? "$existing_class_name $class_name" : $class_name; _wp_array_set( $parsed_block, array( 'attrs', 'className' ), $updated_class_name ); @@ -68,7 +80,7 @@ function wp_enqueue_block_custom_css() { /** * Applies the custom CSS class name to the block's rendered HTML. * - * The class name is generated in `wp_render_custom_css_support_styles` + * The class name is generated in {@see wp_render_custom_css_support_styles()} * and stored in block attributes. This filter adds it to the actual markup. * * @since 7.0.0 @@ -76,12 +88,34 @@ function wp_enqueue_block_custom_css() { * @param string $block_content Rendered block content. * @param array $block Block object. * @return string Filtered block content. + * + * @phpstan-param array{ + * attrs: array{ + * className?: string, + * ... + * }, + * ... + * } $block */ function wp_render_custom_css_class_name( $block_content, $block ) { - $class_string = $block['attrs']['className'] ?? ''; - preg_match( '/\bwp-custom-css-\S+\b/', $class_string, $matches ); + $class_name_attr = $block['attrs']['className'] ?? null; + + if ( ! is_string( $class_name_attr ) || ! str_contains( $class_name_attr, 'wp-custom-css-' ) ) { + return $block_content; + } - if ( empty( $matches ) ) { + // Parse out the 'wp-custom-css-*' class name added by wp_render_custom_css_support_styles(). + $custom_class_name = null; + $token_delimiter = " \t\f\r\n"; + $class_token = strtok( $class_name_attr, $token_delimiter ); + while ( false !== $class_token ) { + if ( str_starts_with( $class_token, 'wp-custom-css-' ) ) { + $custom_class_name = $class_token; + break; + } + $class_token = strtok( $token_delimiter ); + } + if ( null === $custom_class_name ) { return $block_content; } @@ -89,7 +123,7 @@ function wp_render_custom_css_class_name( $block_content, $block ) { if ( $tags->next_tag() ) { $tags->add_class( 'has-custom-css' ); - $tags->add_class( $matches[0] ); + $tags->add_class( $custom_class_name ); } return $tags->get_updated_html(); @@ -124,6 +158,158 @@ function wp_register_custom_css_support( $block_type ) { } } +/** + * Strips custom CSS (`style.css` in attributes) from all blocks in post content. + * + * Uses {@see WP_Block_Parser::next_token()} to scan block tokens and surgically + * replace only the attribute JSON that changed — no parse_blocks() + + * serialize_blocks() round-trip needed. + * + * @since 7.0.0 + * @access private + * + * @param string $content Post content to filter, expected to be escaped with slashes. + * @return string Filtered post content with block custom CSS removed. + */ +function wp_strip_custom_css_from_blocks( $content ) { + if ( ! has_blocks( $content ) ) { + return $content; + } + + $unslashed = stripslashes( $content ); + + $parser = new WP_Block_Parser(); + $parser->document = $unslashed; + $parser->offset = 0; + $end = strlen( $unslashed ); + $replacements = array(); + + while ( $parser->offset < $end ) { + $next_token = $parser->next_token(); + + if ( 'no-more-tokens' === $next_token[0] ) { + break; + } + + list( $token_type, , $attrs, $start_offset, $token_length ) = $next_token; + + $parser->offset = $start_offset + $token_length; + + if ( 'block-opener' !== $token_type && 'void-block' !== $token_type ) { + continue; + } + + if ( ! isset( $attrs['style']['css'] ) ) { + continue; + } + + // Remove css and clean up empty style. + unset( $attrs['style']['css'] ); + if ( empty( $attrs['style'] ) ) { + unset( $attrs['style'] ); + } + + // Locate the JSON portion within the token. + $token_string = substr( $unslashed, $start_offset, $token_length ); + $json_rel_start = strcspn( $token_string, '{' ); + $json_rel_end = strrpos( $token_string, '}' ); + + $json_start = $start_offset + $json_rel_start; + $json_length = $json_rel_end - $json_rel_start + 1; + + // Re-encode attributes. If attrs is now empty, remove JSON and trailing space. + if ( empty( $attrs ) ) { + // Remove the trailing space after JSON. + $replacements[] = array( $json_start, $json_length + 1, '' ); + } else { + $replacements[] = array( $json_start, $json_length, serialize_block_attributes( $attrs ) ); + } + } + + if ( empty( $replacements ) ) { + return $content; + } + + // Build the result by splicing replacements into the original string. + $result = ''; + $was_at = 0; + + foreach ( $replacements as $replacement ) { + list( $offset, $length, $new_json ) = $replacement; + $result .= substr( $unslashed, $was_at, $offset - $was_at ) . $new_json; + $was_at = $offset + $length; + } + + if ( $was_at < $end ) { + $result .= substr( $unslashed, $was_at ); + } + + return addslashes( $result ); +} + +/** + * Adds the filters to strip custom CSS from block content on save. + * Priority of 8 to run before wp_filter_global_styles_post (priority 9) and wp_filter_post_kses (priority 10). + * + * @since 7.0.0 + * @access private + */ +function wp_custom_css_kses_init_filters() { + add_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks', 8 ); + add_filter( 'content_filtered_save_pre', 'wp_strip_custom_css_from_blocks', 8 ); +} + +/** + * Removes the filters that strip custom CSS from block content on save. + * Priority of 8 to run before wp_filter_global_styles_post (priority 9) and wp_filter_post_kses (priority 10). + * + * @since 7.0.0 + * @access private + */ +function wp_custom_css_remove_filters() { + remove_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks', 8 ); + remove_filter( 'content_filtered_save_pre', 'wp_strip_custom_css_from_blocks', 8 ); +} + +/** + * Registers the custom CSS content filters if the user does not have the edit_css capability. + * + * @since 7.0.0 + * @access private + */ +function wp_custom_css_kses_init() { + wp_custom_css_remove_filters(); + if ( ! current_user_can( 'edit_css' ) ) { + wp_custom_css_kses_init_filters(); + } +} + +/** + * Initializes custom CSS content filters when imported data should be filtered. + * + * Runs at priority 999 on {@see 'force_filtered_html_on_import'} to ensure it + * fires after general KSES initialization, independently of user capabilities. + * If the input of the filter is true it means we are in an import situation and should + * enable the custom CSS filters, independently of the user capabilities. + * + * @since 7.0.0 + * @access private + * + * @param mixed $arg Input argument of the filter. + * @return mixed Input argument of the filter. + */ +function wp_custom_css_force_filtered_html_on_import_filter( $arg ) { + if ( $arg ) { + wp_custom_css_kses_init_filters(); + } + return $arg; +} + +// Run before wp_filter_global_styles_post (priority 9) and wp_filter_post_kses (priority 10). +add_action( 'init', 'wp_custom_css_kses_init', 20 ); +add_action( 'set_current_user', 'wp_custom_css_kses_init' ); +add_filter( 'force_filtered_html_on_import', 'wp_custom_css_force_filtered_html_on_import_filter', 999 ); + // Register the block support. WP_Block_Supports::get_instance()->register( 'custom-css', diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 170d7c0fbf10a..6a6418d966457 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -1196,6 +1196,7 @@ function apply_block_hooks_to_content( $content, $context = null, $callback = 'i * of the block that corresponds to the post type are handled correctly. * * @since 6.8.0 + * @since 7.0.0 Added the `$ignored_hooked_blocks_at_root` parameter. * @access private * * @param string $content Serialized content. @@ -1205,9 +1206,17 @@ function apply_block_hooks_to_content( $content, $context = null, $callback = 'i * @param callable $callback A function that will be called for each block to generate * the markup for a given list of blocks that are hooked to it. * Default: 'insert_hooked_blocks'. + * @param array|null $ignored_hooked_blocks_at_root A reference to an array that will be populated + * with the ignored hooked blocks at the root level. + * Default: `null`. * @return string The serialized markup. */ -function apply_block_hooks_to_content_from_post_object( $content, $post = null, $callback = 'insert_hooked_blocks' ) { +function apply_block_hooks_to_content_from_post_object( + $content, + $post = null, + $callback = 'insert_hooked_blocks', + &$ignored_hooked_blocks_at_root = null +) { // Default to the current post if no context is provided. if ( null === $post ) { $post = get_post(); @@ -1287,6 +1296,16 @@ function apply_block_hooks_to_content_from_post_object( $content, $post = null, $content = apply_block_hooks_to_content( $content, $post, $callback ); remove_filter( 'hooked_block_types', $suppress_blocks_from_insertion_before_and_after_wrapper_block, PHP_INT_MAX ); + if ( null !== $ignored_hooked_blocks_at_root ) { + // Check wrapper block's metadata for ignored hooked blocks at the root level, and populate the reference parameter if needed. + $wrapper_block_markup = extract_serialized_parent_block( $content ); + $wrapper_block = parse_blocks( $wrapper_block_markup )[0]; + + if ( ! empty( $wrapper_block['attrs']['metadata']['ignoredHookedBlocks'] ) ) { + $ignored_hooked_blocks_at_root = $wrapper_block['attrs']['metadata']['ignoredHookedBlocks']; + } + } + // Finally, we need to remove the temporary wrapper block. $content = remove_serialized_parent_block( $content ); @@ -1449,6 +1468,7 @@ function insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata( &$parsed_a * * @since 6.6.0 * @since 6.8.0 Support non-`wp_navigation` post types. + * @since 7.0.0 Set `_wp_ignored_hooked_blocks` meta in the response for blocks hooked at the root level. * * @param WP_REST_Response $response The response object. * @param WP_Post $post Post object. @@ -1459,12 +1479,18 @@ function insert_hooked_blocks_into_rest_response( $response, $post ) { return $response; } + $ignored_hooked_blocks_at_root = array(); $response->data['content']['raw'] = apply_block_hooks_to_content_from_post_object( $response->data['content']['raw'], $post, - 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' + 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata', + $ignored_hooked_blocks_at_root ); + if ( ! empty( $ignored_hooked_blocks_at_root ) ) { + $response->data['meta']['_wp_ignored_hooked_blocks'] = wp_json_encode( $ignored_hooked_blocks_at_root ); + } + // If the rendered content was previously empty, we leave it like that. if ( empty( $response->data['content']['rendered'] ) ) { return $response; @@ -2578,9 +2604,9 @@ function unregister_block_style( $block_name, $block_style_name ) { * @since 5.8.0 * @since 6.4.0 The `$feature` parameter now supports a string. * - * @param WP_Block_Type $block_type Block type to check for support. - * @param string|array $feature Feature slug, or path to a specific feature to check support for. - * @param mixed $default_value Optional. Fallback value for feature support. Default false. + * @param WP_Block_Type|null $block_type Block type to check for support. + * @param string|array $feature Feature slug, or path to a specific feature to check support for. + * @param mixed $default_value Optional. Fallback value for feature support. Default false. * @return bool Whether the feature is supported. */ function block_has_support( $block_type, $feature, $default_value = false ) { diff --git a/src/wp-includes/blocks/image.php b/src/wp-includes/blocks/image.php index 02b60f91c030a..22b0ecc2aea33 100644 --- a/src/wp-includes/blocks/image.php +++ b/src/wp-includes/blocks/image.php @@ -205,8 +205,8 @@ function block_core_image_render_lightbox( $block_content, $block, $block_instan array( 'defaultAriaLabel' => __( 'Enlarged image' ), 'closeButtonText' => esc_html__( 'Close' ), - 'prevButtonText' => esc_html__( 'Previous' ), - 'nextButtonText' => esc_html__( 'Next' ), + 'prevButtonText' => esc_html_x( 'Previous', 'previous image in lightbox' ), + 'nextButtonText' => esc_html_x( 'Next', 'next image in lightbox' ), ) ); @@ -323,8 +323,8 @@ class="lightbox-trigger" function block_core_image_print_lightbox_overlay() { $dialog_label = esc_attr__( 'Enlarged images' ); $close_button_text = esc_attr__( 'Close' ); - $prev_button_text = esc_attr__( 'Previous' ); - $next_button_text = esc_attr__( 'Next' ); + $prev_button_text = esc_attr_x( 'Previous', 'previous image in lightbox' ); + $next_button_text = esc_attr_x( 'Next', 'next image in lightbox' ); $close_button_icon = ''; $prev_button_icon = ''; $next_button_icon = ''; diff --git a/src/wp-includes/blocks/navigation.php b/src/wp-includes/blocks/navigation.php index 7863f80a9bdc4..71e8d85b035dc 100644 --- a/src/wp-includes/blocks/navigation.php +++ b/src/wp-includes/blocks/navigation.php @@ -425,7 +425,11 @@ private static function get_overlay_blocks_from_template_part( $overlay_template $full_template_part_id = $theme . '//' . $slug; $block_template = get_block_file_template( $full_template_part_id, 'wp_template_part' ); if ( isset( $block_template->content ) ) { - $parsed_blocks = parse_blocks( $block_template->content ); + // Expand shortcodes before parsing blocks, matching the order in + // `render_block_core_template_part()`. + $content = shortcode_unautop( $block_template->content ); + $content = do_shortcode( $content ); + $parsed_blocks = parse_blocks( $content ); $blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks ); // Disable overlay menu for any navigation blocks within the overlay to prevent nested overlays. $blocks = static::disable_overlay_menu_for_nested_navigation_blocks( $blocks ); @@ -449,6 +453,12 @@ private static function get_overlay_blocks_from_template_part( $overlay_template // Re-serialize, and run Block Hooks algorithm to inject hooked blocks. $markup = serialize_blocks( $blocks ); $markup = apply_block_hooks_to_content_from_post_object( $markup, $template_part_post ); + + // Expand shortcodes before parsing blocks, matching the order in + // `render_block_core_template_part()`. + $markup = shortcode_unautop( $markup ); + $markup = do_shortcode( $markup ); + $blocks = parse_blocks( $markup ); // Disable overlay menu for any navigation blocks within the overlay to prevent nested overlays. diff --git a/src/wp-includes/build/pages/font-library/page-wp-admin.php b/src/wp-includes/build/pages/font-library/page-wp-admin.php index 4d41be02ae892..b5974ceca1e53 100644 --- a/src/wp-includes/build/pages/font-library/page-wp-admin.php +++ b/src/wp-includes/build/pages/font-library/page-wp-admin.php @@ -153,12 +153,35 @@ function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) { // 2. It initializes the boot module as an inline script. wp_register_script( 'font-library-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true ); - // Add inline script to initialize the app using initSinglePage (no menuItems) + /* + * Add inline script to initialize the app using initSinglePage (no menuItems). + * The dynamic import is deferred until DOMContentLoaded so that all classic + * script dependencies of @wordpress/boot (wp-private-apis, wp-components, + * wp-theme, etc.) have finished parsing and executing before the boot module + * evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race + * against the classic-script-printing pass on fast CDN-fronted hosts in + * Chrome, evaluating before wp.theme.privateApis is defined and throwing + * "Cannot unlock an undefined object". See . + */ + $init_js_function = <<<'JS' + ( mountId, routes ) => { + const run = async () => { + const mod = await import( "@wordpress/boot" ); + mod.initSinglePage( { mountId, routes } ); + }; + if ( document.readyState === "loading" ) { + document.addEventListener( "DOMContentLoaded", run ); + } else { + run(); + } + } + JS; wp_add_inline_script( 'font-library-wp-admin-prerequisites', sprintf( - 'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));', - 'font-library-wp-admin-app', + '( %s )( %s, %s );', + $init_js_function, + wp_json_encode( 'font-library-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) ); diff --git a/src/wp-includes/build/pages/options-connectors/page-wp-admin.php b/src/wp-includes/build/pages/options-connectors/page-wp-admin.php index 3f3048b8fb98b..b8937db2e2b91 100644 --- a/src/wp-includes/build/pages/options-connectors/page-wp-admin.php +++ b/src/wp-includes/build/pages/options-connectors/page-wp-admin.php @@ -153,12 +153,35 @@ function wp_options_connectors_wp_admin_enqueue_scripts( $hook_suffix ) { // 2. It initializes the boot module as an inline script. wp_register_script( 'options-connectors-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true ); - // Add inline script to initialize the app using initSinglePage (no menuItems) + /* + * Add inline script to initialize the app using initSinglePage (no menuItems). + * The dynamic import is deferred until DOMContentLoaded so that all classic + * script dependencies of @wordpress/boot (wp-private-apis, wp-components, + * wp-theme, etc.) have finished parsing and executing before the boot module + * evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race + * against the classic-script-printing pass on fast CDN-fronted hosts in + * Chrome, evaluating before wp.theme.privateApis is defined and throwing + * "Cannot unlock an undefined object". See . + */ + $init_js_function = <<<'JS' + ( mountId, routes ) => { + const run = async () => { + const mod = await import( "@wordpress/boot" ); + mod.initSinglePage( { mountId, routes } ); + }; + if ( document.readyState === "loading" ) { + document.addEventListener( "DOMContentLoaded", run ); + } else { + run(); + } + } + JS; wp_add_inline_script( 'options-connectors-wp-admin-prerequisites', sprintf( - 'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));', - 'options-connectors-wp-admin-app', + '( %s )( %s, %s );', + $init_js_function, + wp_json_encode( 'options-connectors-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ), wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) ) ); diff --git a/src/wp-includes/build/routes/connectors-home/content.js b/src/wp-includes/build/routes/connectors-home/content.js index c285e273ea082..f248d626abc2d 100644 --- a/src/wp-includes/build/routes/connectors-home/content.js +++ b/src/wp-includes/build/routes/connectors-home/content.js @@ -7,6 +7,10 @@ var __hasOwnProp = Object.prototype.hasOwnProperty; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) @@ -59,6 +63,13 @@ var require_react = __commonJS({ } }); +// package-external:@wordpress/primitives +var require_primitives = __commonJS({ + "package-external:@wordpress/primitives"(exports, module) { + module.exports = window.wp.primitives; + } +}); + // package-external:@wordpress/private-apis var require_private_apis = __commonJS({ "package-external:@wordpress/private-apis"(exports, module) { @@ -80,6 +91,13 @@ var require_core_data = __commonJS({ } }); +// package-external:@wordpress/notices +var require_notices = __commonJS({ + "package-external:@wordpress/notices"(exports, module) { + module.exports = window.wp.notices; + } +}); + // package-external:@wordpress/url var require_url = __commonJS({ "package-external:@wordpress/url"(exports, module) { @@ -536,8 +554,46 @@ var Badge = (0, import_element2.forwardRef)(function Badge2({ children, intent = return element; }); -// packages/ui/build-module/stack/stack.mjs +// packages/ui/build-module/icon/icon.mjs var import_element3 = __toESM(require_element(), 1); +var import_primitives = __toESM(require_primitives(), 1); +var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); +var Icon = (0, import_element3.forwardRef)(function Icon2({ icon, size = 24, ...restProps }, ref) { + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( + import_primitives.SVG, + { + ref, + fill: "currentColor", + ...icon.props, + ...restProps, + width: size, + height: size + } + ); +}); + +// packages/icons/build-module/library/caution.mjs +var import_primitives2 = __toESM(require_primitives(), 1); +var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); +var caution_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives2.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z" }) }); + +// packages/icons/build-module/library/error.mjs +var import_primitives3 = __toESM(require_primitives(), 1); +var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); +var error_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives3.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z" }) }); + +// packages/icons/build-module/library/info.mjs +var import_primitives4 = __toESM(require_primitives(), 1); +var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); +var info_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives4.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z" }) }); + +// packages/icons/build-module/library/published.mjs +var import_primitives5 = __toESM(require_primitives(), 1); +var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); +var published_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z" }) }); + +// packages/ui/build-module/stack/stack.mjs +var import_element4 = __toESM(require_element(), 1); if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='71d20935c2']")) { const style = document.createElement("style"); style.setAttribute("data-wp-hash", "71d20935c2"); @@ -554,7 +610,7 @@ var gapTokens = { "2xl": "var(--wpds-dimension-gap-2xl, 32px)", "3xl": "var(--wpds-dimension-gap-3xl, 40px)" }; -var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { +var Stack = (0, import_element4.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { const style = { gap: gap && gapTokens[gap], alignItems: align, @@ -570,14 +626,157 @@ var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, al return element; }); +// packages/ui/build-module/notice/index.mjs +var notice_exports = {}; +__export(notice_exports, { + Description: () => Description, + Root: () => Root +}); + +// packages/ui/build-module/notice/root.mjs +var import_element5 = __toESM(require_element(), 1); +import { speak } from "@wordpress/a11y"; +var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "671ebfc62d"); + style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}")); + document.head.appendChild(style); +} +var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='a66a881fc5']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "a66a881fc5"); + style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._4145abab73d17514__notice{--icon-height:24px;--text-vertical-padding:calc((var(--icon-height) - var(--wpds-font-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#d8d8d8);--wp-ui-notice-text-color:var(--wpds-color-fg-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{text-wrap:pretty;color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-info-weak,#f2f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#9fbcdc);--wp-ui-notice-text-color:var(--wpds-color-fg-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-warning-weak,#fff7e0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#d0b381);--wp-ui-notice-text-color:var(--wpds-color-fg-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-success-weak,#eaffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#8ac894);--wp-ui-notice-text-color:var(--wpds-color-fg-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-success-weak,#007f30)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-error-weak,#fff6f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#daa39b);--wp-ui-notice-text-color:var(--wpds-color-fg-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-error-weak,#cc1818)}}")); + document.head.appendChild(style); +} +var style_default3 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; +var icons = { + neutral: null, + info: info_default, + warning: caution_default, + success: published_default, + error: error_default +}; +function getDefaultPoliteness(intent) { + return intent === "error" ? "assertive" : "polite"; +} +function safeRenderToString(message) { + if (!message) { + return void 0; + } + if (typeof message === "string") { + return message; + } + try { + return (0, import_element5.renderToString)(message); + } catch { + return void 0; + } +} +function useSpokenMessage(message, politeness) { + const spokenMessage = safeRenderToString(message); + (0, import_element5.useEffect)(() => { + if (spokenMessage) { + speak(spokenMessage, politeness); + } + }, [spokenMessage, politeness]); +} +var Root = (0, import_element5.forwardRef)(function Notice({ + intent = "neutral", + children, + icon, + spokenMessage = children, + politeness = getDefaultPoliteness(intent), + render, + ...restProps +}, ref) { + useSpokenMessage(spokenMessage, politeness); + const iconElement = icon === null ? null : icon ?? icons[intent]; + const mergedClassName = clsx_default( + style_default3.notice, + style_default3[`is-${intent}`], + resets_default["box-sizing"] + ); + const element = useRender({ + defaultTagName: "div", + render, + ref, + props: mergeProps( + { + className: mergedClassName, + children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [ + children, + iconElement && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( + Icon, + { + className: style_default3.icon, + icon: iconElement + } + ) + ] }) + }, + restProps + ) + }); + return element; +}); + +// packages/ui/build-module/notice/description.mjs +var import_element7 = __toESM(require_element(), 1); + +// packages/ui/build-module/text/text.mjs +var import_element6 = __toESM(require_element(), 1); +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='6675f7d310']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "6675f7d310"); + style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{font-size:var(--wpds-font-size-2xl,32px);line-height:var(--wpds-font-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-md,24px)}.aa58f227716bcde2__heading-lg{font-size:var(--wpds-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{font-size:var(--wpds-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{font-size:var(--wpds-font-size-lg,15px);line-height:var(--wpds-font-line-height-md,24px)}._131101940be12424__body-md{font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px)}}')); + document.head.appendChild(style); +} +var style_default4 = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" }; +var Text = (0, import_element6.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) { + const element = useRender({ + render, + defaultTagName: "span", + ref, + props: mergeProps(props, { + className: clsx_default(style_default4.text, style_default4[variant], className) + }) + }); + return element; +}); + +// packages/ui/build-module/notice/description.mjs +var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='a66a881fc5']")) { + const style = document.createElement("style"); + style.setAttribute("data-wp-hash", "a66a881fc5"); + style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._4145abab73d17514__notice{--icon-height:24px;--text-vertical-padding:calc((var(--icon-height) - var(--wpds-font-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#d8d8d8);--wp-ui-notice-text-color:var(--wpds-color-fg-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{text-wrap:pretty;color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-info-weak,#f2f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#9fbcdc);--wp-ui-notice-text-color:var(--wpds-color-fg-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-warning-weak,#fff7e0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#d0b381);--wp-ui-notice-text-color:var(--wpds-color-fg-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-success-weak,#eaffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#8ac894);--wp-ui-notice-text-color:var(--wpds-color-fg-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-success-weak,#007f30)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-error-weak,#fff6f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#daa39b);--wp-ui-notice-text-color:var(--wpds-color-fg-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-error-weak,#cc1818)}}")); + document.head.appendChild(style); +} +var style_default5 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; +var Description = (0, import_element7.forwardRef)( + function NoticeDescription({ className, ...props }, ref) { + return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)( + Text, + { + ref, + variant: "body-md", + className: clsx_default(style_default5.description, className), + ...props + } + ); + } +); + // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs var import_components = __toESM(require_components(), 1); var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle"); // packages/admin-ui/build-module/page/header.mjs -var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); +var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1); function Header({ - headingLevel = 2, + headingLevel = 1, breadcrumbs, badges, title, @@ -586,46 +785,38 @@ function Header({ showSidebarToggle = true }) { const HeadingTag = `h${headingLevel}`; - return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)( - Stack, - { - direction: "column", - className: "admin-ui-page__header", - render: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("header", {}), - children: [ - /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [ - /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [ - showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( - SidebarToggleSlot, - { - bubblesVirtually: true, - className: "admin-ui-page__sidebar-toggle-slot" - } - ), - title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }), - breadcrumbs, - badges - ] }), - /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( - Stack, - { - direction: "row", - gap: "sm", - style: { width: "auto", flexShrink: 0 }, - className: "admin-ui-page__header-actions", - align: "center", - children: actions - } - ) - ] }), - subTitle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle }) - ] - } - ); + return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Stack, { direction: "column", className: "admin-ui-page__header", children: [ + /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [ + /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [ + showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)( + SidebarToggleSlot, + { + bubblesVirtually: true, + className: "admin-ui-page__sidebar-toggle-slot" + } + ), + title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }), + breadcrumbs, + badges + ] }), + /* @__PURE__ */ (0, import_jsx_runtime9.jsx)( + Stack, + { + direction: "row", + gap: "sm", + style: { width: "auto", flexShrink: 0 }, + className: "admin-ui-page__header-actions", + align: "center", + children: actions + } + ) + ] }), + subTitle && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle }) + ] }); } // packages/admin-ui/build-module/page/index.mjs -var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); +var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1); function Page({ headingLevel, breadcrumbs, @@ -639,8 +830,8 @@ function Page({ showSidebarToggle = true }) { const classes = clsx_default("admin-ui-page", className); - return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(navigable_region_default, { className: classes, ariaLabel: title, children: [ - (title || breadcrumbs || badges) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)( + return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(navigable_region_default, { className: classes, ariaLabel: title, children: [ + (title || breadcrumbs || badges) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( Header, { headingLevel, @@ -652,7 +843,7 @@ function Page({ showSidebarToggle } ), - hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children + hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "admin-ui-page__content has-padding", children }) : children ] }); } Page.SidebarToggleFill = SidebarToggleFill; @@ -660,47 +851,56 @@ var page_default = Page; // routes/connectors-home/stage.tsx var import_components4 = __toESM(require_components()); -var import_data3 = __toESM(require_data()); -var import_element7 = __toESM(require_element()); +var import_data4 = __toESM(require_data()); +var import_element11 = __toESM(require_element()); var import_i18n4 = __toESM(require_i18n()); var import_core_data3 = __toESM(require_core_data()); import { - privateApis as connectorsPrivateApis + privateApis as connectorsPrivateApis2 } from "@wordpress/connectors"; // routes/connectors-home/style.scss -if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='1b00f16b8d']")) { +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='eb5f96e519']")) { const style = document.createElement("style"); - style.setAttribute("data-wp-hash", "1b00f16b8d"); - style.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background:linear-gradient(90deg,#fff9,#fff9),linear-gradient(90deg,#89dcdc,#c7eb5c 46.15%,#a920c1);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:220px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background:linear-gradient(270deg,#fff9,#fff9),linear-gradient(270deg,#89dcdc,#c7eb5c 46.15%,#a920c1)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:248px;inset-inline-end:8px;position:absolute;top:-15px;width:248px}.connectors-page>p{color:#949494;text-align:center}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:84px}.connectors-page .ai-plugin-callout__decoration{height:134px;inset-inline-end:4px;top:-8px;width:134px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")); + style.setAttribute("data-wp-hash", "eb5f96e519"); + style.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,#ca9ec6bf 0,#ca9ec600 60%),radial-gradient(ellipse 55% 110% at 92% -15%,#d0afd9b3 0,#d0afd900 65%),radial-gradient(ellipse 40% 85% at 58% -10%,#aa82b873 0,#aa82b800 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,#ca9ec6bf 0,#ca9ec600 60%),radial-gradient(ellipse 55% 110% at 8% -15%,#d0afd9b3 0,#d0afd900 65%),radial-gradient(ellipse 40% 85% at 42% -10%,#aa82b873 0,#aa82b800 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page>p{color:#949494}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")); document.head.appendChild(style); } // routes/connectors-home/ai-plugin-callout.tsx var import_components3 = __toESM(require_components()); var import_core_data2 = __toESM(require_core_data()); -var import_data2 = __toESM(require_data()); -var import_element6 = __toESM(require_element()); +var import_data3 = __toESM(require_data()); +var import_element10 = __toESM(require_element()); var import_i18n3 = __toESM(require_i18n()); +var import_notices2 = __toESM(require_notices()); var import_url = __toESM(require_url()); -import { speak as speak2 } from "@wordpress/a11y"; // routes/connectors-home/default-connectors.tsx var import_components2 = __toESM(require_components()); -var import_element5 = __toESM(require_element()); +var import_element9 = __toESM(require_element()); +var import_data2 = __toESM(require_data()); var import_i18n2 = __toESM(require_i18n()); import { __experimentalRegisterConnector as registerConnector, __experimentalConnectorItem as ConnectorItem, - __experimentalDefaultConnectorSettings as DefaultConnectorSettings + __experimentalDefaultConnectorSettings as DefaultConnectorSettings, + privateApis as connectorsPrivateApis } from "@wordpress/connectors"; +// routes/lock-unlock.ts +var import_private_apis = __toESM(require_private_apis()); +var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( + "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", + "@wordpress/routes" +); + // routes/connectors-home/use-connector-plugin.ts var import_core_data = __toESM(require_core_data()); var import_data = __toESM(require_data()); -var import_element4 = __toESM(require_element()); +var import_element8 = __toESM(require_element()); var import_i18n = __toESM(require_i18n()); -import { speak } from "@wordpress/a11y"; +var import_notices = __toESM(require_notices()); function useConnectorPlugin({ file: pluginFileFromServer, settingName, @@ -710,10 +910,10 @@ function useConnectorPlugin({ keySource = "none", initialIsConnected = false }) { - const [isExpanded, setIsExpanded] = (0, import_element4.useState)(false); - const [isBusy, setIsBusy] = (0, import_element4.useState)(false); - const [connectedState, setConnectedState] = (0, import_element4.useState)(initialIsConnected); - const [pluginStatusOverride, setPluginStatusOverride] = (0, import_element4.useState)(null); + const [isExpanded, setIsExpanded] = (0, import_element8.useState)(false); + const [isBusy, setIsBusy] = (0, import_element8.useState)(false); + const [connectedState, setConnectedState] = (0, import_element8.useState)(initialIsConnected); + const [pluginStatusOverride, setPluginStatusOverride] = (0, import_element8.useState)(null); const pluginBasename = pluginFileFromServer?.replace(/\.php$/, ""); const pluginSlug = pluginBasename?.includes("/") ? pluginBasename.split("/")[0] : pluginBasename; const { @@ -722,8 +922,8 @@ function useConnectorPlugin({ currentApiKey, canInstallPlugins } = (0, import_data.useSelect)( - (select) => { - const store2 = select(import_core_data.store); + (select2) => { + const store2 = select2(import_core_data.store); const siteSettings = store2.getEntityRecord("root", "site"); const apiKey = siteSettings?.[settingName] ?? ""; const canCreate = !!store2.canUser("create", { @@ -760,8 +960,9 @@ function useConnectorPlugin({ }; } if (plugin) { + const isPluginActive = plugin.status === "active" || plugin.status === "network-active"; return { - derivedPluginStatus: plugin.status === "active" ? "active" : "inactive", + derivedPluginStatus: isPluginActive ? "active" : "inactive", canManagePlugins: true, currentApiKey: apiKey, canInstallPlugins: canCreate @@ -788,6 +989,7 @@ function useConnectorPlugin({ // update connected state (mirrors what the server would report on page load). pluginStatusOverride === "active" && !!currentApiKey; const { saveEntityRecord, invalidateResolution } = (0, import_data.useDispatch)(import_core_data.store); + const { createSuccessNotice, createErrorNotice } = (0, import_data.useDispatch)(import_notices.store); const installPlugin = async () => { if (!pluginSlug) { return; @@ -803,21 +1005,28 @@ function useConnectorPlugin({ setPluginStatusOverride("active"); invalidateResolution("getEntityRecord", ["root", "site"]); setIsExpanded(true); - speak( + createSuccessNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("Plugin for %s installed and activated successfully."), connectorName - ) + ), + { + id: "connector-plugin-install-success", + type: "snackbar" + } ); } catch { - speak( + createErrorNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("Failed to install plugin for %s."), connectorName ), - "assertive" + { + id: "connector-plugin-install-error", + type: "snackbar" + } ); } finally { setIsBusy(false); @@ -841,21 +1050,28 @@ function useConnectorPlugin({ setPluginStatusOverride("active"); invalidateResolution("getEntityRecord", ["root", "site"]); setIsExpanded(true); - speak( + createSuccessNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("Plugin for %s activated successfully."), connectorName - ) + ), + { + id: "connector-plugin-activate-success", + type: "snackbar" + } ); } catch { - speak( + createErrorNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("Failed to activate plugin for %s."), connectorName ), - "assertive" + { + id: "connector-plugin-activate-error", + type: "snackbar" + } ); } finally { setIsBusy(false); @@ -914,12 +1130,16 @@ function useConnectorPlugin({ ); } setConnectedState(true); - speak( + createSuccessNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("%s connected successfully."), connectorName - ) + ), + { + id: "connector-connect-success", + type: "snackbar" + } ); } catch (error) { console.error("Failed to save API key:", error); @@ -935,22 +1155,29 @@ function useConnectorPlugin({ { throwOnError: true } ); setConnectedState(false); - speak( + createSuccessNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("%s disconnected."), connectorName - ) + ), + { + id: "connector-disconnect-success", + type: "snackbar" + } ); } catch (error) { console.error("Failed to remove API key:", error); - speak( + createErrorNotice( (0, import_i18n.sprintf)( /* translators: %s: Name of the connector (e.g. "OpenAI"). */ (0, import_i18n.__)("Failed to disconnect %s."), connectorName ), - "assertive" + { + id: "connector-disconnect-error", + type: "snackbar" + } ); throw error; } @@ -1133,18 +1360,24 @@ var GeminiLogo = () => /* @__PURE__ */ React.createElement( ); // routes/connectors-home/default-connectors.tsx -function getConnectorData() { +var { store: connectorsStore } = unlock(connectorsPrivateApis); +function getConnectorScriptModuleData() { try { - const parsed = JSON.parse( + return JSON.parse( document.getElementById( "wp-script-module-data-options-connectors-wp-admin" - )?.textContent ?? "" + )?.textContent ?? "{}" ); - return parsed?.connectors ?? {}; } catch { return {}; } } +function getConnectorData() { + return getConnectorScriptModuleData().connectors ?? {}; +} +function getIsFileModDisabled() { + return !!getConnectorScriptModuleData().isFileModDisabled; +} var CONNECTOR_LOGOS = { google: GeminiLogo, openai: OpenAILogo, @@ -1176,6 +1409,17 @@ var ConnectedBadge = () => /* @__PURE__ */ React.createElement( }, (0, import_i18n2.__)("Connected") ); +var PluginDirectoryLink = ({ slug }) => /* @__PURE__ */ React.createElement( + import_components2.ExternalLink, + { + href: (0, import_i18n2.sprintf)( + /* translators: %s: plugin slug. */ + (0, import_i18n2.__)("https://wordpress.org/plugins/%s/"), + slug + ) + }, + (0, import_i18n2.__)("Learn more") +); var UnavailableActionBadge = () => /* @__PURE__ */ React.createElement(Badge, null, (0, import_i18n2.__)("Not available")); function ApiKeyConnector({ name, @@ -1222,20 +1466,7 @@ function ApiKeyConnector({ const isExternallyConfigured = keySource === "env" || keySource === "constant"; const showUnavailableBadge = pluginStatus === "not-installed" && canInstallPlugins === false || pluginStatus === "inactive" && canActivatePlugins === false; const showActionButton = !showUnavailableBadge; - const actionButtonRef = (0, import_element5.useRef)(null); - const pendingFocusRef = (0, import_element5.useRef)(false); - (0, import_element5.useEffect)(() => { - if (pendingFocusRef.current && !isBusy) { - pendingFocusRef.current = false; - actionButtonRef.current?.focus(); - } - }, [isBusy, isExpanded, isConnected]); - const handleActionClick = () => { - if (pluginStatus === "not-installed" || pluginStatus === "inactive") { - pendingFocusRef.current = true; - } - handleButtonClick(); - }; + const actionButtonRef = (0, import_element9.useRef)(null); return /* @__PURE__ */ React.createElement( ConnectorItem, { @@ -1243,15 +1474,16 @@ function ApiKeyConnector({ logo, name, description, - actionArea: /* @__PURE__ */ React.createElement(import_components2.__experimentalHStack, { spacing: 3, expanded: false }, isConnected && /* @__PURE__ */ React.createElement(ConnectedBadge, null), showUnavailableBadge && /* @__PURE__ */ React.createElement(UnavailableActionBadge, null), showActionButton && /* @__PURE__ */ React.createElement( + actionArea: /* @__PURE__ */ React.createElement(import_components2.__experimentalHStack, { spacing: 3, expanded: false }, isConnected && /* @__PURE__ */ React.createElement(ConnectedBadge, null), showUnavailableBadge && (pluginSlug ? /* @__PURE__ */ React.createElement(PluginDirectoryLink, { slug: pluginSlug }) : /* @__PURE__ */ React.createElement(UnavailableActionBadge, null)), showActionButton && /* @__PURE__ */ React.createElement( import_components2.Button, { ref: actionButtonRef, variant: isExpanded || isConnected ? "tertiary" : "secondary", size: "compact", - onClick: handleActionClick, + onClick: handleButtonClick, disabled: pluginStatus === "checking" || isBusy, - isBusy + isBusy, + accessibleWhenDisabled: true }, getButtonLabel() )) @@ -1266,17 +1498,13 @@ function ApiKeyConnector({ readOnly: isConnected || isExternallyConfigured, keySource, onRemove: isExternallyConfigured ? void 0 : async () => { - pendingFocusRef.current = true; - try { - await removeApiKey(); - } catch { - pendingFocusRef.current = false; - } + await removeApiKey(); + actionButtonRef.current?.focus(); }, onSave: async (apiKey) => { await saveApiKey(apiKey); - pendingFocusRef.current = true; setIsExpanded(false); + actionButtonRef.current?.focus(); } } ) @@ -1299,7 +1527,10 @@ function registerDefaultConnectors() { authentication, plugin: data.plugin }; - if (authentication.method === "api_key") { + const existing = unlock((0, import_data2.select)(connectorsStore)).getConnector( + connectorName + ); + if (authentication.method === "api_key" && !existing?.render) { args.render = ApiKeyConnector; } registerConnector(connectorName, args); @@ -1320,35 +1551,18 @@ function WpLogoDecoration() { /* @__PURE__ */ React.createElement( "image", { - href: "data:image/png;base64,iVBORw0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gwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC", width: "248", height: "248", style: { mixBlendMode: "multiply" } } - ), - /* @__PURE__ */ React.createElement("rect", { x: "184.055", y: "54.995", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "170.059", y: "44.06", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "200.238", y: "77.302", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "212.048", y: "87.8", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "206.799", y: "83.425", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "204.175", y: "85.612", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "219.046", y: "103.108", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "154.751", y: "30.064", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "188.866", y: "63.742", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "148.189", y: "34", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "134.051", y: "31.707", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "126.124", y: "24.771", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "115.385", y: "29.19", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "95.702", y: "31.376", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "91.766", y: "27.002", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "90.454", y: "32.688", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "184.389", y: "45.58", width: "2.187", height: "2.187" }), - /* @__PURE__ */ React.createElement("rect", { x: "162.185", y: "41.873", width: "2.187", height: "2.187" }) + ) )); } // routes/connectors-home/ai-plugin-callout.tsx var AI_PLUGIN_SLUG = "ai"; +var AI_PLUGIN_PAGE_SLUG = "ai-wp-admin"; var AI_PLUGIN_ID = "ai/ai"; var AI_PLUGIN_URL = "https://wordpress.org/plugins/ai/"; var connectorDataValues = Object.values(getConnectorData()); @@ -1362,15 +1576,15 @@ for (const c of connectorDataValues) { } } function AiPluginCallout() { - const [isBusy, setIsBusy] = (0, import_element6.useState)(false); - const [justActivated, setJustActivated] = (0, import_element6.useState)(false); - const actionButtonRef = (0, import_element6.useRef)(null); - (0, import_element6.useEffect)(() => { + const [isBusy, setIsBusy] = (0, import_element10.useState)(false); + const [justActivated, setJustActivated] = (0, import_element10.useState)(false); + const actionButtonRef = (0, import_element10.useRef)(null); + (0, import_element10.useEffect)(() => { if (justActivated) { actionButtonRef.current?.focus(); } }, [justActivated]); - const initialHasConnectedProvider = (0, import_element6.useRef)( + const initialHasConnectedProvider = (0, import_element10.useRef)( connectorDataValues.some( (c) => c.type === "ai_provider" && c.authentication.method === "api_key" && c.authentication.isConnected ) @@ -1380,8 +1594,8 @@ function AiPluginCallout() { canInstallPlugins, canManagePlugins, hasConnectedProvider - } = (0, import_data2.useSelect)((select) => { - const store2 = select(import_core_data2.store); + } = (0, import_data3.useSelect)((select2) => { + const store2 = select2(import_core_data2.store); const canCreate = !!store2.canUser("create", { kind: "root", name: "plugin" @@ -1423,7 +1637,8 @@ function AiPluginCallout() { hasConnectedProvider: hasConnected }; }, []); - const { saveEntityRecord } = (0, import_data2.useDispatch)(import_core_data2.store); + const { saveEntityRecord } = (0, import_data3.useDispatch)(import_core_data2.store); + const { createSuccessNotice, createErrorNotice } = (0, import_data3.useDispatch)(import_notices2.store); const installPlugin = async () => { setIsBusy(true); try { @@ -1434,9 +1649,18 @@ function AiPluginCallout() { { throwOnError: true } ); setJustActivated(true); - speak2((0, import_i18n3.__)("AI plugin installed and activated successfully.")); + createSuccessNotice( + (0, import_i18n3.__)("AI plugin installed and activated successfully."), + { + id: "ai-plugin-install-success", + type: "snackbar" + } + ); } catch { - speak2((0, import_i18n3.__)("Failed to install the AI plugin."), "assertive"); + createErrorNotice((0, import_i18n3.__)("Failed to install the AI plugin."), { + id: "ai-plugin-install-error", + type: "snackbar" + }); } finally { setIsBusy(false); } @@ -1451,9 +1675,15 @@ function AiPluginCallout() { { throwOnError: true } ); setJustActivated(true); - speak2((0, import_i18n3.__)("AI plugin activated successfully.")); + createSuccessNotice((0, import_i18n3.__)("AI plugin activated successfully."), { + id: "ai-plugin-activate-success", + type: "snackbar" + }); } catch { - speak2((0, import_i18n3.__)("Failed to activate the AI plugin."), "assertive"); + createErrorNotice((0, import_i18n3.__)("Failed to activate the AI plugin."), { + id: "ai-plugin-activate-error", + type: "snackbar" + }); } finally { setIsBusy(false); } @@ -1467,15 +1697,13 @@ function AiPluginCallout() { if (pluginStatus === "active" && initialHasConnectedProvider && !justActivated) { return null; } - if (pluginStatus === "not-installed" && canInstallPlugins === false) { - return null; - } if (pluginStatus === "inactive" && canManagePlugins === false) { return null; } const isActiveNoProvider = pluginStatus === "active" && !hasConnectedProvider; const isJustConnected = pluginStatus === "active" && hasConnectedProvider && (!initialHasConnectedProvider || justActivated); const showInstallActivate = pluginStatus === "not-installed" || pluginStatus === "inactive"; + const hideButtons = pluginStatus === "not-installed" && canInstallPlugins === false; const getMessage = () => { if (isJustConnected) { return (0, import_i18n3.__)( @@ -1484,11 +1712,11 @@ function AiPluginCallout() { } if (isActiveNoProvider) { return (0, import_i18n3.__)( - "The AI plugin is installed. Connect a provider below to generate featured images, alt text, titles, excerpts, and more. Learn more" + "The AI plugin is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. Learn more" ); } return (0, import_i18n3.__)( - "The AI plugin can use your connectors to generate featured images, alt text, titles, excerpts and more. Learn more" + "The AI plugin can use your AI connectors to generate featured images, alt text, titles, excerpts and more. Learn more" ); }; const getPrimaryButtonProps = () => { @@ -1505,11 +1733,11 @@ function AiPluginCallout() { onClick: isBusy ? void 0 : activatePlugin }; }; - return /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout" }, /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__content" }, /* @__PURE__ */ React.createElement("p", null, (0, import_element6.createInterpolateElement)(getMessage(), { + return /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout" }, /* @__PURE__ */ React.createElement("div", { className: "ai-plugin-callout__content" }, /* @__PURE__ */ React.createElement("p", null, (0, import_element10.createInterpolateElement)(getMessage(), { strong: /* @__PURE__ */ React.createElement("strong", null), // @ts-ignore children are injected by createInterpolateElement at runtime. a: /* @__PURE__ */ React.createElement(import_components3.ExternalLink, { href: AI_PLUGIN_URL }) - })), showInstallActivate ? /* @__PURE__ */ React.createElement( + })), !hideButtons && (showInstallActivate ? /* @__PURE__ */ React.createElement( import_components3.Button, { variant: "primary", @@ -1527,43 +1755,73 @@ function AiPluginCallout() { variant: "secondary", size: "compact", href: (0, import_url.addQueryArgs)("options-general.php", { - page: AI_PLUGIN_SLUG + page: AI_PLUGIN_PAGE_SLUG }) }, (0, import_i18n3.__)("Control features in the AI plugin") - )), /* @__PURE__ */ React.createElement(WpLogoDecoration, null)); + ))), /* @__PURE__ */ React.createElement(WpLogoDecoration, null)); } -// routes/lock-unlock.ts -var import_private_apis = __toESM(require_private_apis()); -var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( - "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", - "@wordpress/routes" -); - // routes/connectors-home/stage.tsx -var { store } = unlock(connectorsPrivateApis); +var { store } = unlock(connectorsPrivateApis2); registerDefaultConnectors(); function ConnectorsPage() { - const { connectors, canInstallPlugins } = (0, import_data3.useSelect)( - (select) => ({ - connectors: unlock(select(store)).getConnectors(), - canInstallPlugins: select(import_core_data3.store).canUser("create", { - kind: "root", - name: "plugin" - }) - }), + const isFileModDisabled = getIsFileModDisabled(); + const { connectors, canInstallPlugins, isAiPluginInstalled } = (0, import_data4.useSelect)( + (select2) => { + const coreSelect = select2(import_core_data3.store); + const aiPlugin = coreSelect.getEntityRecord( + "root", + "plugin", + "ai/ai" + ); + return { + connectors: unlock(select2(store)).getConnectors(), + canInstallPlugins: coreSelect.canUser("create", { + kind: "root", + name: "plugin" + }), + isAiPluginInstalled: !!aiPlugin + }; + }, [] ); const renderableConnectors = connectors.filter( (connector) => connector.render ); + const aiProviderPluginSlugs = Array.from( + new Set( + connectors.filter( + (connector) => connector.type === "ai_provider" + ).map( + (connector) => connector.plugin?.file?.split("/")[0] + ).filter((slug) => !!slug) + ) + ).sort(); + const installedPluginSlugs = new Set( + connectors.filter( + (connector) => connector.plugin?.isInstalled + ).map( + (connector) => connector.plugin?.file?.split("/")[0] + ).filter((slug) => !!slug) + ); + if (isAiPluginInstalled) { + installedPluginSlugs.add("ai"); + } + const manualInstallPluginSlugs = ["ai", ...aiProviderPluginSlugs].filter( + (slug) => !installedPluginSlugs.has(slug) + ); const isEmpty = renderableConnectors.length === 0; + const showFileModsNotice = manualInstallPluginSlugs.length > 0 && (isFileModDisabled || !canInstallPlugins); + const fileModsNoticeMessage = isFileModDisabled ? (0, import_i18n4.__)( + "Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow." + ) : (0, import_i18n4.__)( + "You do not have permission to install plugins. Please ask a site administrator to install them for you." + ); return /* @__PURE__ */ React.createElement( page_default, { title: (0, import_i18n4.__)("Connectors"), - headingLevel: 1, subTitle: (0, import_i18n4.__)( "All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere." ) @@ -1573,6 +1831,14 @@ function ConnectorsPage() { { className: `connectors-page${isEmpty ? " connectors-page--empty" : ""}` }, + showFileModsNotice && /* @__PURE__ */ React.createElement( + notice_exports.Root, + { + intent: "info", + className: "connectors-page__file-mods-notice" + }, + /* @__PURE__ */ React.createElement(notice_exports.Description, null, fileModsNoticeMessage) + ), isEmpty ? /* @__PURE__ */ React.createElement( import_components4.__experimentalVStack, { @@ -1584,25 +1850,27 @@ function ConnectorsPage() { "Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place." ))), /* @__PURE__ */ React.createElement(import_components4.Button, { variant: "secondary", href: "plugin-install.php" }, (0, import_i18n4.__)("Learn more")) - ) : /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { spacing: 3 }, /* @__PURE__ */ React.createElement(AiPluginCallout, null), connectors.map((connector) => { - if (connector.render) { - return /* @__PURE__ */ React.createElement( - connector.render, - { - key: connector.slug, - slug: connector.slug, - name: connector.name, - description: connector.description, - type: connector.type, - logo: connector.logo, - authentication: connector.authentication, - plugin: connector.plugin - } - ); + ) : /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { spacing: 3 }, /* @__PURE__ */ React.createElement(AiPluginCallout, null), /* @__PURE__ */ React.createElement(import_components4.__experimentalVStack, { spacing: 3, role: "list" }, connectors.map( + (connector) => { + if (connector.render) { + return /* @__PURE__ */ React.createElement( + connector.render, + { + key: connector.slug, + slug: connector.slug, + name: connector.name, + description: connector.description, + type: connector.type, + logo: connector.logo, + authentication: connector.authentication, + plugin: connector.plugin + } + ); + } + return null; } - return null; - })), - canInstallPlugins && /* @__PURE__ */ React.createElement("p", null, (0, import_element7.createInterpolateElement)( + ))), + canInstallPlugins && !isFileModDisabled && /* @__PURE__ */ React.createElement("p", null, (0, import_element11.createInterpolateElement)( (0, import_i18n4.__)( "If the connector you need is not listed, search the plugin directory to see if a connector is available." ), diff --git a/src/wp-includes/build/routes/connectors-home/content.min.asset.php b/src/wp-includes/build/routes/connectors-home/content.min.asset.php index ef57aa56cd29b..6580252cd27a6 100644 --- a/src/wp-includes/build/routes/connectors-home/content.min.asset.php +++ b/src/wp-includes/build/routes/connectors-home/content.min.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/connectors', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '067df442b07dc9245aee'); \ No newline at end of file + array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/connectors', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'b614fcaf0d408b3eff9d'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/connectors-home/content.min.js b/src/wp-includes/build/routes/connectors-home/content.min.js index ffe9257b61415..1cedc12752760 100644 --- a/src/wp-includes/build/routes/connectors-home/content.min.js +++ b/src/wp-includes/build/routes/connectors-home/content.min.js @@ -1 +1 @@ -var Tt=Object.create;var qe=Object.defineProperty;var Vt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Xt=Object.getPrototypeOf,Yt=Object.prototype.hasOwnProperty;var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var St=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Nt(t))!Yt.call(e,r)&&r!==n&&qe(e,r,{get:()=>t[r],enumerable:!(o=Vt(t,r))||o.enumerable});return e};var s=(e,t,n)=>(n=e!=null?Tt(Xt(e)):{},St(t||!e||!e.__esModule?qe(n,"default",{value:e,enumerable:!0}):n,e));var I=O((Ln,Te)=>{Te.exports=window.wp.i18n});var k=O((yn,Ve)=>{Ve.exports=window.wp.components});var re=O((xn,Ne)=>{Ne.exports=window.ReactJSXRuntime});var H=O((zn,Ye)=>{Ye.exports=window.wp.element});var E=O((Dn,Ae)=>{Ae.exports=window.React});var st=O((lr,it)=>{it.exports=window.wp.privateApis});var ie=O((Gr,gt)=>{gt.exports=window.wp.data});var se=O((zr,mt)=>{mt.exports=window.wp.coreData});var ht=O((Mr,vt)=>{vt.exports=window.wp.url});function Xe(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t(0,Ze.jsx)(o,{ref:a,className:C("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...r,children:e}));Ce.displayName="NavigableRegion";var Ee=Ce;var Ke=s(E(),1),We={};function ge(e,t){let n=Ke.useRef(We);return n.current===We&&(n.current=e(t)),n}function me(e,...t){let n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${n} for the full message.`}var oe=s(E(),1);function ve(e,t,n,o){let r=ge(ke).current;return Ct(r,e,t,n,o)&&Ue(r,[e,t,n,o]),r.callback}function Ie(e){let t=ge(ke).current;return Et(t,e)&&Ue(t,e),t.callback}function ke(){return{callback:null,cleanup:null,refs:[]}}function Ct(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Et(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Ue(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){let o=Array(t.length).fill(null);for(let r=0;r{for(let r=0;r=e}function he(e){if(!Fe.isValidElement(e))return null;let t=e,n=t.props;return(Je(19)?n?.ref:t.ref)??null}function U(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _e(e,t){let n={};for(let o in e){let r=e[o];if(t?.hasOwnProperty(o)){let a=t[o](r);a!=null&&Object.assign(n,a);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function $e(e,t){return typeof e=="function"?e(t):e}function et(e,t){return typeof e=="function"?e(t):e}var J={};function A(e,t,n,o,r){let a={...Pe(e,J)};return t&&(a=Q(a,t)),n&&(a=Q(a,n)),o&&(a=Q(a,o)),r&&(a=Q(a,r)),a}function tt(e){if(e.length===0)return J;if(e.length===1)return Pe(e[0],J);let t={...Pe(e[0],J)};for(let n=1;n=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function nt(e){return typeof e=="function"}function Pe(e,t){return nt(e)?e(t):e??J}function It(e,t){return t?e?n=>{if(Ut(n)){let r=n;kt(r);let a=t(r);return r.baseUIHandlerPrevented||e?.(r),a}let o=t(n);return e?.(n),o}:t:e}function kt(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function be(e,t){return t?e?t+" "+e:t:e}function Ut(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Qt=Object.freeze([]),R=Object.freeze({});var we=s(E(),1);function rt(e,t,n={}){let o=t.render,r=Jt(t,n);if(n.enabled===!1)return null;let a=n.state??R;return Ft(e,o,r,a)}function Jt(e,t={}){let{className:n,style:o,render:r}=e,{state:a=R,ref:i,props:c,stateAttributesMapping:u,enabled:d=!0}=t,f=d?$e(n,a):void 0,g=d?et(o,a):void 0,D=d?_e(a,u):R,p=d?U(D,Array.isArray(c)?tt(c):c)??R:R;return typeof document<"u"&&(d?Array.isArray(i)?p.ref=Ie([p.ref,he(r),...i]):p.ref=ve(p.ref,he(r),i):ve(null,null)),d?(f!==void 0&&(p.className=be(p.className,f)),g!==void 0&&(p.style=U(p.style,g)),p):R}function Ft(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);let r=A(n,t.props);return r.ref=n.ref,oe.cloneElement(t,r)}if(e&&typeof e=="string")return _t(e,n);throw new Error(me(8))}function _t(e,t){return e==="button"?(0,we.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,we.createElement)("img",{alt:"",...t,key:t.key}):oe.createElement(e,t)}function ae(e){return rt(e.defaultTagName??"div",e,e)}var at=s(H(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var ot={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},Le=(0,at.forwardRef)(function({children:t,intent:n="none",render:o,className:r,...a},i){return ae({render:o,defaultTagName:"span",ref:i,props:A(a,{className:C(ot.badge,ot[`is-${n}-intent`],r),children:t})})});var lt=s(H(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var $t={stack:"_19ce0419607e1896__stack"},en={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},W=(0,lt.forwardRef)(function({direction:t,gap:n,align:o,justify:r,wrap:a,render:i,...c},u){let d={gap:n&&en[n],alignItems:o,justifyContent:r,flexDirection:t,flexWrap:a};return ae({render:i,ref:u,props:A(c,{style:d,className:$t.stack})})});var ct=s(k(),1),{Fill:dt,Slot:ut}=(0,ct.createSlotFill)("SidebarToggle");var w=s(re(),1);function ft({headingLevel:e=2,breadcrumbs:t,badges:n,title:o,subTitle:r,actions:a,showSidebarToggle:i=!0}){let c=`h${e}`;return(0,w.jsxs)(W,{direction:"column",className:"admin-ui-page__header",render:(0,w.jsx)("header",{}),children:[(0,w.jsxs)(W,{direction:"row",justify:"space-between",gap:"sm",children:[(0,w.jsxs)(W,{direction:"row",gap:"sm",align:"center",justify:"start",children:[i&&(0,w.jsx)(ut,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),o&&(0,w.jsx)(c,{className:"admin-ui-page__header-title",children:o}),t,n]}),(0,w.jsx)(W,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:a})]}),r&&(0,w.jsx)("p",{className:"admin-ui-page__header-subtitle",children:r})]})}var F=s(re(),1);function pt({headingLevel:e,breadcrumbs:t,badges:n,title:o,subTitle:r,children:a,className:i,actions:c,hasPadding:u=!1,showSidebarToggle:d=!0}){let f=C("admin-ui-page",i);return(0,F.jsxs)(Ee,{className:f,ariaLabel:o,children:[(o||t||n)&&(0,F.jsx)(ft,{headingLevel:e,breadcrumbs:t,badges:n,title:o,subTitle:r,actions:c,showSidebarToggle:d}),u?(0,F.jsx)("div",{className:"admin-ui-page__content has-padding",children:a}):a]})}pt.SidebarToggleFill=dt;var ye=pt;var y=s(k()),Ht=s(ie()),Rt=s(H()),Z=s(I()),qt=s(se());import{privateApis as fn}from"@wordpress/connectors";if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='1b00f16b8d']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","1b00f16b8d"),e.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background:linear-gradient(90deg,#fff9,#fff9),linear-gradient(90deg,#89dcdc,#c7eb5c 46.15%,#a920c1);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:220px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background:linear-gradient(270deg,#fff9,#fff9),linear-gradient(270deg,#89dcdc,#c7eb5c 46.15%,#a920c1)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:248px;inset-inline-end:8px;position:absolute;top:-15px;width:248px}.connectors-page>p{color:#949494;text-align:center}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:84px}.connectors-page .ai-plugin-callout__decoration{height:134px;inset-inline-end:4px;top:-8px;width:134px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")),document.head.appendChild(e)}var ee=s(k()),Oe=s(se()),ue=s(ie()),L=s(H()),m=s(I()),Ot=s(ht());import{speak as de}from"@wordpress/a11y";var ce=s(k()),$=s(H()),Ge=s(I());import{__experimentalRegisterConnector as tn,__experimentalConnectorItem as nn,__experimentalDefaultConnectorSettings as rn}from"@wordpress/connectors";var xe=s(se()),le=s(ie()),_=s(H()),l=s(I());import{speak as S}from"@wordpress/a11y";function Pt({file:e,settingName:t,connectorName:n,isInstalled:o,isActivated:r,keySource:a="none",initialIsConnected:i=!1}){let[c,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),[g,D]=(0,_.useState)(i),[p,B]=(0,_.useState)(null),h=e?.replace(/\.php$/,""),x=h?.includes("/")?h.split("/")[0]:h,{derivedPluginStatus:P,canManagePlugins:G,currentApiKey:v,canInstallPlugins:z}=(0,le.useSelect)(N=>{let X=N(xe.store),K=X.getEntityRecord("root","site")?.[t]??"",Y=!!X.canUser("create",{kind:"root",name:"plugin"});if(!e)return{derivedPluginStatus:X.hasFinishedResolution("getEntityRecord",["root","site"])?"active":"checking",canManagePlugins:void 0,currentApiKey:K,canInstallPlugins:Y};let Re=X.getEntityRecord("root","plugin",h);if(!X.hasFinishedResolution("getEntityRecord",["root","plugin",h]))return{derivedPluginStatus:"checking",canManagePlugins:void 0,currentApiKey:K,canInstallPlugins:Y};if(Re)return{derivedPluginStatus:Re.status==="active"?"active":"inactive",canManagePlugins:!0,currentApiKey:K,canInstallPlugins:Y};let pe="not-installed";return r?pe="active":o&&(pe="inactive"),{derivedPluginStatus:pe,canManagePlugins:!1,currentApiKey:K,canInstallPlugins:Y}},[h,t,o,r]),b=p??P,j=G,q=b==="active"&&g||p==="active"&&!!v,{saveEntityRecord:M,invalidateResolution:T}=(0,le.useDispatch)(xe.store),fe=async()=>{if(x){f(!0);try{await M("root","plugin",{slug:x,status:"active"},{throwOnError:!0}),B("active"),T("getEntityRecord",["root","site"]),u(!0),S((0,l.sprintf)((0,l.__)("Plugin for %s installed and activated successfully."),n))}catch{S((0,l.sprintf)((0,l.__)("Failed to install plugin for %s."),n),"assertive")}finally{f(!1)}}},te=async()=>{if(e){f(!0);try{await M("root","plugin",{plugin:h,status:"active"},{throwOnError:!0}),B("active"),T("getEntityRecord",["root","site"]),u(!0),S((0,l.sprintf)((0,l.__)("Plugin for %s activated successfully."),n))}catch{S((0,l.sprintf)((0,l.__)("Failed to activate plugin for %s."),n),"assertive")}finally{f(!1)}}};return{pluginStatus:b,canInstallPlugins:z,canActivatePlugins:j,isExpanded:c,setIsExpanded:u,isBusy:d,isConnected:q,currentApiKey:v,keySource:a,handleButtonClick:()=>{if(b==="not-installed"){if(z===!1)return;fe()}else if(b==="inactive"){if(j===!1)return;te()}else u(!c)},getButtonLabel:()=>{if(d)return b==="not-installed"?(0,l.__)("Installing\u2026"):(0,l.__)("Activating\u2026");if(c)return(0,l.__)("Cancel");if(q)return(0,l.__)("Edit");switch(b){case"checking":return(0,l.__)("Checking\u2026");case"not-installed":return(0,l.__)("Install");case"inactive":return(0,l.__)("Activate");case"active":return(0,l.__)("Set up")}},saveApiKey:async N=>{let X=v;try{let Y=(await M("root","site",{[t]:N},{throwOnError:!0}))?.[t];if(N&&(Y===X||!Y))throw new Error("It was not possible to connect to the provider using this key.");D(!0),S((0,l.sprintf)((0,l.__)("%s connected successfully."),n))}catch(ne){throw console.error("Failed to save API key:",ne),ne}},removeApiKey:async()=>{try{await M("root","site",{[t]:""},{throwOnError:!0}),D(!1),S((0,l.sprintf)((0,l.__)("%s disconnected."),n))}catch(N){throw console.error("Failed to remove API key:",N),S((0,l.sprintf)((0,l.__)("Failed to disconnect %s."),n),"assertive"),N}}}}var bt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})),wt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",fill:"#D97757"})),Lt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",fill:"#F0F0F0"}),React.createElement("path",{d:"M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",fill:"#949494"})),yt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("rect",{width:"44",height:"44",fill:"#357B49",rx:"6"}),React.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",clipRule:"evenodd"})),xt=()=>React.createElement("svg",{width:"40",height:"40",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-0)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-1)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-2)"}),React.createElement("defs",null,React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},React.createElement("stop",{stopColor:"#08B962"}),React.createElement("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},React.createElement("stop",{stopColor:"#F94543"}),React.createElement("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},React.createElement("stop",{stopColor:"#FABC12"}),React.createElement("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"}))));function ze(){try{return JSON.parse(document.getElementById("wp-script-module-data-options-connectors-wp-admin")?.textContent??"")?.connectors??{}}catch{return{}}}var on={google:xt,openai:bt,anthropic:wt,akismet:yt};function an(e,t){if(t)return React.createElement("img",{src:t,alt:"",width:40,height:40});let n=on[e];return React.createElement(n||Lt,null)}var sn=()=>React.createElement("span",{style:{color:"#345b37",backgroundColor:"#eff8f0",padding:"4px 12px",borderRadius:"2px",fontSize:"13px",fontWeight:500,whiteSpace:"nowrap"}},(0,Ge.__)("Connected")),ln=()=>React.createElement(Le,null,(0,Ge.__)("Not available"));function cn({name:e,description:t,logo:n,authentication:o,plugin:r}){let a=o?.method==="api_key"?o:void 0,i=a?.settingName??"",c=a?.credentialsUrl??void 0,u=r?.file?.replace(/\.php$/,""),d=u?.includes("/")?u.split("/")[0]:u,f;try{c&&(f=new URL(c).hostname)}catch{}let{pluginStatus:g,canInstallPlugins:D,canActivatePlugins:p,isExpanded:B,setIsExpanded:h,isBusy:x,isConnected:P,currentApiKey:G,keySource:v,handleButtonClick:z,getButtonLabel:b,saveApiKey:j,removeApiKey:q}=Pt({file:r?.file,settingName:i,connectorName:e,isInstalled:r?.isInstalled,isActivated:r?.isActivated,keySource:a?.keySource,initialIsConnected:a?.isConnected}),M=v==="env"||v==="constant",T=g==="not-installed"&&D===!1||g==="inactive"&&p===!1,fe=!T,te=(0,$.useRef)(null),V=(0,$.useRef)(!1);(0,$.useEffect)(()=>{V.current&&!x&&(V.current=!1,te.current?.focus())},[x,B,P]);let je=()=>{(g==="not-installed"||g==="inactive")&&(V.current=!0),z()};return React.createElement(nn,{className:d?`connector-item--${d}`:void 0,logo:n,name:e,description:t,actionArea:React.createElement(ce.__experimentalHStack,{spacing:3,expanded:!1},P&&React.createElement(sn,null),T&&React.createElement(ln,null),fe&&React.createElement(ce.Button,{ref:te,variant:B||P?"tertiary":"secondary",size:"compact",onClick:je,disabled:g==="checking"||x,isBusy:x},b()))},B&&g==="active"&&React.createElement(rn,{key:P?"connected":"setup",initialValue:M?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":G,helpUrl:c,helpLabel:f,readOnly:P||M,keySource:v,onRemove:M?void 0:async()=>{V.current=!0;try{await q()}catch{V.current=!1}},onSave:async He=>{await j(He),V.current=!0,h(!1)}}))}function Gt(){let e=ze(),t=n=>n.replace(/[^a-z0-9-_]/gi,"-");for(let[n,o]of Object.entries(e)){if(n==="akismet"&&!o.plugin?.isInstalled)continue;let{authentication:r}=o,a=t(n),i={name:o.name,description:o.description,type:o.type,logo:an(n,o.logoUrl),authentication:r,plugin:o.plugin};r.method==="api_key"&&(i.render=cn),tn(a,i)}}function zt(){return React.createElement("div",{className:"ai-plugin-callout__decoration","aria-hidden":"true"},React.createElement("svg",{viewBox:"0 0 248 248",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",focusable:"false",style:{width:"100%",height:"100%"}},React.createElement("image",{href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAAD4CAYAAADB0SsLAAC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3rJBRkkYfvD/zRQV8eeBqBABa8Oe5vGXgRbacN/Lklh7RMQrm0ZL4z6vbOKLuY+Lq+25HD8f7TS39z+K1MNxPwsQnTPOQNezQmBNxkEon+9bqSMMjOarqkHh1vjFh2FceY5bUtSGipRRUOLjkppar75ndrKPB6Zf85Rlaap5bMAqPnNiNOj69RIOicfe6BJ8TK8uySmoPQUQs7/H4I6YFBzwxyH88hqeQfBLmf4cKTy9Jyyzc0NAzYu6S9zu7dVjL18wtKCqLppK8YeHHkEj1QnzUUeOr6SfgQSur6I2NrP6HX87oWxxjjWHooqZ56TPbG4x56osFqaGhYBgidnp7zbUdJtVgqqV59HoiKLltqVdH7udolVfSLBl4v/taB5wdgb/9fmV1HnNDr2XuMhXkuAW+C3tAwByZt8vn4CeiVqcVbS9rqbHbqN0F9Wcke3Pj5K4dj2fB6ag6wJw28HlzeObze+5iSyR6o9tKi3qWket9DOeu2er9rbz7+v6GhoaGhoaGhoeEXHGMVf2wHL4SHsWq9G5OgoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaFhDeL/AbL/6dpoj+OHAAAAAElFTkSuQmCC",width:"248",height:"248",style:{mixBlendMode:"multiply"}}),React.createElement("rect",{x:"184.055",y:"54.995",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"170.059",y:"44.06",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"200.238",y:"77.302",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"212.048",y:"87.8",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"206.799",y:"83.425",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"204.175",y:"85.612",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"219.046",y:"103.108",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"154.751",y:"30.064",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"188.866",y:"63.742",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"148.189",y:"34",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"134.051",y:"31.707",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"126.124",y:"24.771",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"115.385",y:"29.19",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"95.702",y:"31.376",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"91.766",y:"27.002",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"90.454",y:"32.688",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"184.389",y:"45.58",width:"2.187",height:"2.187"}),React.createElement("rect",{x:"162.185",y:"41.873",width:"2.187",height:"2.187"})))}var Mt="ai",Me="ai/ai",dn="https://wordpress.org/plugins/ai/",De=Object.values(ze()),un=De.some(e=>e.type==="ai_provider"),Dt=[];for(let e of De)e.type==="ai_provider"&&e.authentication.method==="api_key"&&Dt.push(e.authentication.settingName);function Bt(){let[e,t]=(0,L.useState)(!1),[n,o]=(0,L.useState)(!1),r=(0,L.useRef)(null);(0,L.useEffect)(()=>{n&&r.current?.focus()},[n]);let a=(0,L.useRef)(De.some(G=>G.type==="ai_provider"&&G.authentication.method==="api_key"&&G.authentication.isConnected)).current,{pluginStatus:i,canInstallPlugins:c,canManagePlugins:u,hasConnectedProvider:d}=(0,ue.useSelect)(G=>{let v=G(Oe.store),z=!!v.canUser("create",{kind:"root",name:"plugin"}),b=v.getEntityRecord("root","site"),j=a||Dt.some(T=>!!b?.[T]),q=v.getEntityRecord("root","plugin",Me);return v.hasFinishedResolution("getEntityRecord",["root","plugin",Me])?q?{pluginStatus:q.status==="active"?"active":"inactive",canInstallPlugins:z,canManagePlugins:!0,hasConnectedProvider:j}:{pluginStatus:"not-installed",canInstallPlugins:z,canManagePlugins:z,hasConnectedProvider:j}:{pluginStatus:"checking",canInstallPlugins:z,canManagePlugins:void 0,hasConnectedProvider:j}},[]),{saveEntityRecord:f}=(0,ue.useDispatch)(Oe.store),g=async()=>{t(!0);try{await f("root","plugin",{slug:Mt,status:"active"},{throwOnError:!0}),o(!0),de((0,m.__)("AI plugin installed and activated successfully."))}catch{de((0,m.__)("Failed to install the AI plugin."),"assertive")}finally{t(!1)}},D=async()=>{t(!0);try{await f("root","plugin",{plugin:Me,status:"active"},{throwOnError:!0}),o(!0),de((0,m.__)("AI plugin activated successfully."))}catch{de((0,m.__)("Failed to activate the AI plugin."),"assertive")}finally{t(!1)}};if(!un||i==="checking"||i==="active"&&a&&!n||i==="not-installed"&&c===!1||i==="inactive"&&u===!1)return null;let p=i==="active"&&!d,B=i==="active"&&d&&(!a||n),h=i==="not-installed"||i==="inactive",x=()=>B?(0,m.__)("The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. Learn more"):p?(0,m.__)("The AI plugin is installed. Connect a provider below to generate featured images, alt text, titles, excerpts, and more. Learn more"):(0,m.__)("The AI plugin can use your connectors to generate featured images, alt text, titles, excerpts and more. Learn more"),P=()=>i==="not-installed"?{label:e?(0,m.__)("Installing\u2026"):(0,m.__)("Install the AI plugin"),disabled:e,onClick:e?void 0:g}:{label:e?(0,m.__)("Activating\u2026"):(0,m.__)("Activate the AI plugin"),disabled:e,onClick:e?void 0:D};return React.createElement("div",{className:"ai-plugin-callout"},React.createElement("div",{className:"ai-plugin-callout__content"},React.createElement("p",null,(0,L.createInterpolateElement)(x(),{strong:React.createElement("strong",null),a:React.createElement(ee.ExternalLink,{href:dn})})),h?React.createElement(ee.Button,{variant:"primary",size:"compact",isBusy:e,disabled:P().disabled,accessibleWhenDisabled:!0,onClick:P().onClick},P().label):React.createElement(ee.Button,{ref:r,variant:"secondary",size:"compact",href:(0,Ot.addQueryArgs)("options-general.php",{page:Mt})},(0,m.__)("Control features in the AI plugin"))),React.createElement(zt,null))}var jt=s(st()),{lock:Zr,unlock:Be}=(0,jt.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/routes");var{store:pn}=Be(fn);Gt();function gn(){let{connectors:e,canInstallPlugins:t}=(0,Ht.useSelect)(r=>({connectors:Be(r(pn)).getConnectors(),canInstallPlugins:r(qt.store).canUser("create",{kind:"root",name:"plugin"})}),[]),o=e.filter(r=>r.render).length===0;return React.createElement(ye,{title:(0,Z.__)("Connectors"),headingLevel:1,subTitle:(0,Z.__)("All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere.")},React.createElement("div",{className:`connectors-page${o?" connectors-page--empty":""}`},o?React.createElement(y.__experimentalVStack,{alignment:"center",spacing:3,style:{maxWidth:480}},React.createElement(y.__experimentalVStack,{alignment:"center",spacing:2},React.createElement(y.__experimentalHeading,{level:2,size:15,weight:600},(0,Z.__)("No connectors yet")),React.createElement(y.__experimentalText,{size:12},(0,Z.__)("Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."))),React.createElement(y.Button,{variant:"secondary",href:"plugin-install.php"},(0,Z.__)("Learn more"))):React.createElement(y.__experimentalVStack,{spacing:3},React.createElement(Bt,null),e.map(r=>r.render?React.createElement(r.render,{key:r.slug,slug:r.slug,name:r.name,description:r.description,type:r.type,logo:r.logo,authentication:r.authentication,plugin:r.plugin}):null)),t&&React.createElement("p",null,(0,Rt.createInterpolateElement)((0,Z.__)("If the connector you need is not listed, search the plugin directory to see if a connector is available."),{a:React.createElement("a",{href:"plugin-install.php?s=connector&tab=search&type=tag"})}))))}function mn(){return React.createElement(gn,null)}var vn=mn;export{vn as stage}; +var pa=Object.create;var Ae=Object.defineProperty;var ma=Object.getOwnPropertyDescriptor;var ga=Object.getOwnPropertyNames;var wa=Object.getPrototypeOf,ha=Object.prototype.hasOwnProperty;var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),va=(e,t)=>{for(var a in t)Ae(e,a,{get:t[a],enumerable:!0})},xa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ga(t))!ha.call(e,r)&&r!==a&&Ae(e,r,{get:()=>t[r],enumerable:!(o=ma(t,r))||o.enumerable});return e};var i=(e,t,a)=>(a=e!=null?pa(wa(e)):{},xa(t||!e||!e.__esModule?Ae(a,"default",{value:e,enumerable:!0}):a,e));var te=y((go,qe)=>{qe.exports=window.wp.i18n});var ae=y((wo,Ue)=>{Ue.exports=window.wp.components});var A=y((ho,Qe)=>{Qe.exports=window.ReactJSXRuntime});var x=y((xo,$e)=>{$e.exports=window.wp.element});var G=y((Ao,rt)=>{rt.exports=window.React});var Z=y((ar,yt)=>{yt.exports=window.wp.primitives});var Bt=y((gr,Nt)=>{Nt.exports=window.wp.privateApis});var le=y((as,jt)=>{jt.exports=window.wp.data});var xe=y((os,Yt)=>{Yt.exports=window.wp.coreData});var Ve=y((rs,Rt)=>{Rt.exports=window.wp.notices});var Vt=y((ss,Wt)=>{Wt.exports=window.wp.url});function Je(e){var t,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t(0,tt.jsx)(o,{ref:s,className:v("admin-ui-navigable-region",t),"aria-label":a,role:"region",tabIndex:"-1",...r,children:e}));at.displayName="NavigableRegion";var ot=at;var it=i(G(),1),st={};function Pe(e,t){let a=it.useRef(st);return a.current===st&&(a.current=e(t)),a}function Le(e,...t){let a=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(o=>a.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${a} for the full message.`}var me=i(G(),1);function Ne(e,t,a,o){let r=Pe(lt).current;return ya(r,e,t,a,o)&&ft(r,[e,t,a,o]),r.callback}function nt(e){let t=Pe(lt).current;return Aa(t,e)&&ft(t,e),t.callback}function lt(){return{callback:null,cleanup:null,refs:[]}}function ya(e,t,a,o,r){return e.refs[0]!==t||e.refs[1]!==a||e.refs[2]!==o||e.refs[3]!==r}function Aa(e,t){return e.refs.length!==t.length||e.refs.some((a,o)=>a!==t[o])}function ft(e,t){if(e.refs=t,t.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){let o=Array(t.length).fill(null);for(let r=0;r{for(let r=0;r=e}function Be(e){if(!ct.isValidElement(e))return null;let t=e,a=t.props;return(ut(19)?a?.ref:t.ref)??null}function oe(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function pt(e,t){let a={};for(let o in e){let r=e[o];if(t?.hasOwnProperty(o)){let s=t[o](r);s!=null&&Object.assign(a,s);continue}r===!0?a[`data-${o.toLowerCase()}`]="":r&&(a[`data-${o.toLowerCase()}`]=r.toString())}return a}function mt(e,t){return typeof e=="function"?e(t):e}function gt(e,t){return typeof e=="function"?e(t):e}var se={};function N(e,t,a,o,r){let s={...Ce(e,se)};return t&&(s=re(s,t)),a&&(s=re(s,a)),o&&(s=re(s,o)),r&&(s=re(s,r)),s}function wt(e){if(e.length===0)return se;if(e.length===1)return Ce(e[0],se);let t={...Ce(e[0],se)};for(let a=1;a=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function ht(e){return typeof e=="function"}function Ce(e,t){return ht(e)?e(t):e??se}function Ba(e,t){return t?e?a=>{if(Ha(a)){let r=a;Ca(r);let s=t(r);return r.baseUIHandlerPrevented||e?.(r),s}let o=t(a);return e?.(a),o}:t:e}function Ca(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function He(e,t){return t?e?t+" "+e:t:e}function Ha(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Oa=Object.freeze([]),I=Object.freeze({});var Oe=i(G(),1);function vt(e,t,a={}){let o=t.render,r=Da(t,a);if(a.enabled===!1)return null;let s=a.state??I;return Ta(e,o,r,s)}function Da(e,t={}){let{className:a,style:o,render:r}=e,{state:s=I,ref:l,props:f,stateAttributesMapping:c,enabled:d=!0}=t,p=d?mt(a,s):void 0,n=d?gt(o,s):void 0,h=d?pt(s,c):I,m=d?oe(h,Array.isArray(f)?wt(f):f)??I:I;return typeof document<"u"&&(d?Array.isArray(l)?m.ref=nt([m.ref,Be(r),...l]):m.ref=Ne(m.ref,Be(r),l):Ne(null,null)),d?(p!==void 0&&(m.className=He(m.className,p)),n!==void 0&&(m.style=oe(m.style,n)),m):I}function Ta(e,t,a,o){if(t){if(typeof t=="function")return t(a,o);let r=N(a,t.props);return r.ref=a.ref,me.cloneElement(t,r)}if(e&&typeof e=="string")return za(e,a);throw new Error(Le(8))}function za(e,t){return e==="button"?(0,Oe.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Oe.createElement)("img",{alt:"",...t,key:t.key}):me.createElement(e,t)}function M(e){return vt(e.defaultTagName??"div",e,e)}var bt=i(x(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='244b5c59c0']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","244b5c59c0"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}')),document.head.appendChild(e)}var xt={badge:"_96e6251aad1a6136__badge","is-high-intent":"_99f7158cb520f750__is-high-intent","is-medium-intent":"c20ebef2365bc8b7__is-medium-intent","is-low-intent":"_365e1626c6202e52__is-low-intent","is-stable-intent":"_33f8198127ddf4ef__is-stable-intent","is-informational-intent":"_04c1aca8fc449412__is-informational-intent","is-draft-intent":"_90726e69d495ec19__is-draft-intent","is-none-intent":"_898f4a544993bd39__is-none-intent"},De=(0,bt.forwardRef)(function({children:t,intent:a="none",render:o,className:r,...s},l){return M({render:o,defaultTagName:"span",ref:l,props:N(s,{className:v(xt.badge,xt[`is-${a}-intent`],r),children:t})})});var At=i(x(),1),Pt=i(Z(),1),Lt=i(A(),1),Te=(0,At.forwardRef)(function({icon:t,size:a=24,...o},r){return(0,Lt.jsx)(Pt.SVG,{ref:r,fill:"currentColor",...t.props,...o,width:a,height:a})});var ge=i(Z(),1),ze=i(A(),1),ke=(0,ze.jsx)(ge.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ze.jsx)(ge.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})});var we=i(Z(),1),Se=i(A(),1),_e=(0,Se.jsx)(we.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Se.jsx)(we.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});var he=i(Z(),1),Ee=i(A(),1),Ie=(0,Ee.jsx)(he.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ee.jsx)(he.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});var ve=i(Z(),1),Me=i(A(),1),je=(0,Me.jsx)(ve.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Me.jsx)(ve.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var Ct=i(x(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","71d20935c2"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(e)}var ka={stack:"_19ce0419607e1896__stack"},Sa={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},X=(0,Ct.forwardRef)(function({direction:t,gap:a,align:o,justify:r,wrap:s,render:l,...f},c){let d={gap:a&&Sa[a],alignItems:o,justifyContent:r,flexDirection:t,flexWrap:s};return M({render:l,ref:c,props:N(f,{style:d,className:ka.stack})})});var ie={};va(ie,{Description:()=>kt,Root:()=>Ht});var K=i(x(),1);import{speak as _a}from"@wordpress/a11y";var q=i(A(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='671ebfc62d']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","671ebfc62d"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}")),document.head.appendChild(e)}var Ea={"box-sizing":"_336cd3e4e743482f__box-sizing"};if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='a66a881fc5']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","a66a881fc5"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._4145abab73d17514__notice{--icon-height:24px;--text-vertical-padding:calc((var(--icon-height) - var(--wpds-font-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#d8d8d8);--wp-ui-notice-text-color:var(--wpds-color-fg-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{text-wrap:pretty;color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-info-weak,#f2f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#9fbcdc);--wp-ui-notice-text-color:var(--wpds-color-fg-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-warning-weak,#fff7e0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#d0b381);--wp-ui-notice-text-color:var(--wpds-color-fg-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-success-weak,#eaffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#8ac894);--wp-ui-notice-text-color:var(--wpds-color-fg-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-success-weak,#007f30)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-error-weak,#fff6f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#daa39b);--wp-ui-notice-text-color:var(--wpds-color-fg-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-error-weak,#cc1818)}}")),document.head.appendChild(e)}var Ye={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",description:"_1904b570a89bb815__description","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error"},Ia={neutral:null,info:Ie,warning:ke,success:je,error:_e};function Ma(e){return e==="error"?"assertive":"polite"}function ja(e){if(e){if(typeof e=="string")return e;try{return(0,K.renderToString)(e)}catch{return}}}function Ya(e,t){let a=ja(e);(0,K.useEffect)(()=>{a&&_a(a,t)},[a,t])}var Ht=(0,K.forwardRef)(function({intent:t="neutral",children:a,icon:o,spokenMessage:r=a,politeness:s=Ma(t),render:l,...f},c){Ya(r,s);let d=o===null?null:o??Ia[t],p=v(Ye.notice,Ye[`is-${t}`],Ea["box-sizing"]);return M({defaultTagName:"div",render:l,ref:c,props:N({className:p,children:(0,q.jsxs)(q.Fragment,{children:[a,d&&(0,q.jsx)(Te,{className:Ye.icon,icon:d})]})},f)})});var Tt=i(x(),1);var Dt=i(x(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='6675f7d310']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","6675f7d310"),e.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{font-size:var(--wpds-font-size-2xl,32px);line-height:var(--wpds-font-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-md,24px)}.aa58f227716bcde2__heading-lg{font-size:var(--wpds-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{font-size:var(--wpds-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-xs,11px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{font-size:var(--wpds-font-size-xl,20px);line-height:var(--wpds-font-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{font-size:var(--wpds-font-size-lg,15px);line-height:var(--wpds-font-line-height-md,24px)}._131101940be12424__body-md{font-size:var(--wpds-font-size-md,13px);line-height:var(--wpds-font-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{font-size:var(--wpds-font-size-sm,12px);line-height:var(--wpds-font-line-height-xs,16px)}}')),document.head.appendChild(e)}var Ot={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"},Re=(0,Dt.forwardRef)(function({variant:t="body-md",render:a,className:o,...r},s){return M({render:a,defaultTagName:"span",ref:s,props:N(r,{className:v(Ot.text,Ot[t],o)})})});var zt=i(A(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='a66a881fc5']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","a66a881fc5"),e.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._4145abab73d17514__notice{--icon-height:24px;--text-vertical-padding:calc((var(--icon-height) - var(--wpds-font-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#d8d8d8);--wp-ui-notice-text-color:var(--wpds-color-fg-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{text-wrap:pretty;color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-info-weak,#f2f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#9fbcdc);--wp-ui-notice-text-color:var(--wpds-color-fg-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-warning-weak,#fff7e0);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#d0b381);--wp-ui-notice-text-color:var(--wpds-color-fg-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-success-weak,#eaffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#8ac894);--wp-ui-notice-text-color:var(--wpds-color-fg-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-success-weak,#007f30)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-bg-surface-error-weak,#fff6f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#daa39b);--wp-ui-notice-text-color:var(--wpds-color-fg-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-fg-content-error-weak,#cc1818)}}")),document.head.appendChild(e)}var Ra={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",description:"_1904b570a89bb815__description","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error"},kt=(0,Tt.forwardRef)(function({className:t,...a},o){return(0,zt.jsx)(Re,{ref:o,variant:"body-md",className:v(Ra.description,t),...a})});var St=i(ae(),1),{Fill:_t,Slot:Et}=(0,St.createSlotFill)("SidebarToggle");var z=i(A(),1);function It({headingLevel:e=1,breadcrumbs:t,badges:a,title:o,subTitle:r,actions:s,showSidebarToggle:l=!0}){let f=`h${e}`;return(0,z.jsxs)(X,{direction:"column",className:"admin-ui-page__header",children:[(0,z.jsxs)(X,{direction:"row",justify:"space-between",gap:"sm",children:[(0,z.jsxs)(X,{direction:"row",gap:"sm",align:"center",justify:"start",children:[l&&(0,z.jsx)(Et,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),o&&(0,z.jsx)(f,{className:"admin-ui-page__header-title",children:o}),t,a]}),(0,z.jsx)(X,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:s})]}),r&&(0,z.jsx)("p",{className:"admin-ui-page__header-subtitle",children:r})]})}var ne=i(A(),1);function Mt({headingLevel:e,breadcrumbs:t,badges:a,title:o,subTitle:r,children:s,className:l,actions:f,hasPadding:c=!1,showSidebarToggle:d=!0}){let p=v("admin-ui-page",l);return(0,ne.jsxs)(ot,{className:p,ariaLabel:o,children:[(o||t||a)&&(0,ne.jsx)(It,{headingLevel:e,breadcrumbs:t,badges:a,title:o,subTitle:r,actions:f,showSidebarToggle:d}),c?(0,ne.jsx)("div",{className:"admin-ui-page__content has-padding",children:s}):s]})}Mt.SidebarToggleFill=_t;var We=Mt;var P=i(ae()),la=i(le()),fa=i(x()),k=i(te()),da=i(xe());import{privateApis as oo}from"@wordpress/connectors";if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='eb5f96e519']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","eb5f96e519"),e.appendChild(document.createTextNode(".connectors-page{box-sizing:border-box;margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px;scroll-margin-top:120px}.connectors-page .connector-settings__error{color:#cc1818}.connectors-page .connector-settings .components-text-control__input{font-family:monospace;scroll-margin-top:120px}.connectors-page__file-mods-notice{margin-bottom:16px}.connectors-page--empty{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:32px;justify-content:center;text-align:center}.connectors-page .ai-plugin-callout{background-color:#e7d4e4;background-image:radial-gradient(ellipse 70% 120% at 18% 115%,#ca9ec6bf 0,#ca9ec600 60%),radial-gradient(ellipse 55% 110% at 92% -15%,#d0afd9b3 0,#d0afd900 65%),radial-gradient(ellipse 40% 85% at 58% -10%,#aa82b873 0,#aa82b800 70%);border-radius:8px;overflow:hidden;padding:24px;padding-inline-end:150px;position:relative}[dir=rtl] .connectors-page .ai-plugin-callout{background-image:radial-gradient(ellipse 70% 120% at 82% 115%,#ca9ec6bf 0,#ca9ec600 60%),radial-gradient(ellipse 55% 110% at 8% -15%,#d0afd9b3 0,#d0afd900 65%),radial-gradient(ellipse 40% 85% at 42% -10%,#aa82b873 0,#aa82b800 70%)}.connectors-page .ai-plugin-callout__content{align-items:flex-start;display:flex;flex-direction:column;gap:12px;padding-top:2px}.connectors-page .ai-plugin-callout__content p{font-size:13px;line-height:20px;margin:0}.connectors-page .ai-plugin-callout__decoration{height:110px;inset-inline-end:16px;position:absolute;top:12px;width:110px}.connectors-page>p{color:#949494}@media (max-width:680px){.connectors-page .ai-plugin-callout{padding:12px;padding-inline-end:100px}.connectors-page .ai-plugin-callout__decoration{height:75px;inset-inline-end:8px;top:8px;width:75px}}@media (max-width:480px){.connectors-page{padding:8px}.connectors-page .ai-plugin-callout{padding-inline-end:130px}.connectors-page .components-item{padding:12px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child svg{height:32px;width:32px}.connectors-page .components-item>.components-v-stack>.components-h-stack:first-child>.components-h-stack:last-child{align-items:flex-end;flex-direction:column}}")),document.head.appendChild(e)}var ue=i(ae()),Xe=i(xe()),ce=i(le()),B=i(x()),w=i(te()),ra=i(Ve()),sa=i(Vt());var Q=i(ae()),Jt=i(x()),$t=i(le()),F=i(te());import{__experimentalRegisterConnector as Wa,__experimentalConnectorItem as Va,__experimentalDefaultConnectorSettings as Fa,privateApis as Ga}from"@wordpress/connectors";var Ft=i(Bt()),{lock:is,unlock:U}=(0,Ft.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/routes");var Fe=i(xe()),de=i(le()),fe=i(x()),u=i(te()),Gt=i(Ve());function Zt({file:e,settingName:t,connectorName:a,isInstalled:o,isActivated:r,keySource:s="none",initialIsConnected:l=!1}){let[f,c]=(0,fe.useState)(!1),[d,p]=(0,fe.useState)(!1),[n,h]=(0,fe.useState)(l),[m,j]=(0,fe.useState)(null),b=e?.replace(/\.php$/,""),Y=b?.includes("/")?b.split("/")[0]:b,{derivedPluginStatus:S,canManagePlugins:J,currentApiKey:C,canInstallPlugins:_}=(0,de.useSelect)(R=>{let W=R(Fe.store),ee=W.getEntityRecord("root","site")?.[t]??"",V=!!W.canUser("create",{kind:"root",name:"plugin"});if(!e)return{derivedPluginStatus:W.hasFinishedResolution("getEntityRecord",["root","site"])?"active":"checking",canManagePlugins:void 0,currentApiKey:ee,canInstallPlugins:V};let be=W.getEntityRecord("root","plugin",b);if(!W.hasFinishedResolution("getEntityRecord",["root","plugin",b]))return{derivedPluginStatus:"checking",canManagePlugins:void 0,currentApiKey:ee,canInstallPlugins:V};if(be)return{derivedPluginStatus:be.status==="active"||be.status==="network-active"?"active":"inactive",canManagePlugins:!0,currentApiKey:ee,canInstallPlugins:V};let ye="not-installed";return r?ye="active":o&&(ye="inactive"),{derivedPluginStatus:ye,canManagePlugins:!1,currentApiKey:ee,canInstallPlugins:V}},[b,t,o,r]),g=m??S,H=J,O=g==="active"&&n||m==="active"&&!!C,{saveEntityRecord:L,invalidateResolution:D}=(0,de.useDispatch)(Fe.store),{createSuccessNotice:T,createErrorNotice:E}=(0,de.useDispatch)(Gt.store),$=async()=>{if(Y){p(!0);try{await L("root","plugin",{slug:Y,status:"active"},{throwOnError:!0}),j("active"),D("getEntityRecord",["root","site"]),c(!0),T((0,u.sprintf)((0,u.__)("Plugin for %s installed and activated successfully."),a),{id:"connector-plugin-install-success",type:"snackbar"})}catch{E((0,u.sprintf)((0,u.__)("Failed to install plugin for %s."),a),{id:"connector-plugin-install-error",type:"snackbar"})}finally{p(!1)}}},ua=async()=>{if(e){p(!0);try{await L("root","plugin",{plugin:b,status:"active"},{throwOnError:!0}),j("active"),D("getEntityRecord",["root","site"]),c(!0),T((0,u.sprintf)((0,u.__)("Plugin for %s activated successfully."),a),{id:"connector-plugin-activate-success",type:"snackbar"})}catch{E((0,u.sprintf)((0,u.__)("Failed to activate plugin for %s."),a),{id:"connector-plugin-activate-error",type:"snackbar"})}finally{p(!1)}}};return{pluginStatus:g,canInstallPlugins:_,canActivatePlugins:H,isExpanded:f,setIsExpanded:c,isBusy:d,isConnected:O,currentApiKey:C,keySource:s,handleButtonClick:()=>{if(g==="not-installed"){if(_===!1)return;$()}else if(g==="inactive"){if(H===!1)return;ua()}else c(!f)},getButtonLabel:()=>{if(d)return g==="not-installed"?(0,u.__)("Installing\u2026"):(0,u.__)("Activating\u2026");if(f)return(0,u.__)("Cancel");if(O)return(0,u.__)("Edit");switch(g){case"checking":return(0,u.__)("Checking\u2026");case"not-installed":return(0,u.__)("Install");case"inactive":return(0,u.__)("Activate");case"active":return(0,u.__)("Set up")}},saveApiKey:async R=>{let W=C;try{let V=(await L("root","site",{[t]:R},{throwOnError:!0}))?.[t];if(R&&(V===W||!V))throw new Error("It was not possible to connect to the provider using this key.");h(!0),T((0,u.sprintf)((0,u.__)("%s connected successfully."),a),{id:"connector-connect-success",type:"snackbar"})}catch(pe){throw console.error("Failed to save API key:",pe),pe}},removeApiKey:async()=>{try{await L("root","site",{[t]:""},{throwOnError:!0}),h(!1),T((0,u.sprintf)((0,u.__)("%s disconnected."),a),{id:"connector-disconnect-success",type:"snackbar"})}catch(R){throw console.error("Failed to remove API key:",R),E((0,u.sprintf)((0,u.__)("Failed to disconnect %s."),a),{id:"connector-disconnect-error",type:"snackbar"}),R}}}}var Xt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})),Kt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",fill:"#D97757"})),qt=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4V28C32 30.2091 30.2091 32 28 32H4C1.79086 32 0 30.2091 0 28V4Z",fill:"#F0F0F0"}),React.createElement("path",{d:"M14.5 8V12H17.5V8H19V12H20.5C20.7652 12 21.0196 12.1054 21.2071 12.2929C21.3946 12.4804 21.5 12.7348 21.5 13V17L18.5 21V23C18.5 23.2652 18.3946 23.5196 18.2071 23.7071C18.0196 23.8946 17.7652 24 17.5 24H14.5C14.2348 24 13.9804 23.8946 13.7929 23.7071C13.6054 23.5196 13.5 23.2652 13.5 23V21L10.5 17V13C10.5 12.7348 10.6054 12.4804 10.7929 12.2929C10.9804 12.1054 11.2348 12 11.5 12H13V8H14.5ZM15 20.5V22.5H17V20.5L20 16.5V13.5H12V16.5L15 20.5Z",fill:"#949494"})),Ut=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("rect",{width:"44",height:"44",fill:"#357B49",rx:"6"}),React.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z",clipRule:"evenodd"})),Qt=()=>React.createElement("svg",{width:"40",height:"40",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-0)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-1)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-2)"}),React.createElement("defs",null,React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},React.createElement("stop",{stopColor:"#08B962"}),React.createElement("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},React.createElement("stop",{stopColor:"#F94543"}),React.createElement("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},React.createElement("stop",{stopColor:"#FABC12"}),React.createElement("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"}))));var{store:Za}=U(Ga);function ea(){try{return JSON.parse(document.getElementById("wp-script-module-data-options-connectors-wp-admin")?.textContent??"{}")}catch{return{}}}function Ge(){return ea().connectors??{}}function ta(){return!!ea().isFileModDisabled}var Xa={google:Qt,openai:Xt,anthropic:Kt,akismet:Ut};function Ka(e,t){if(t)return React.createElement("img",{src:t,alt:"",width:40,height:40});let a=Xa[e];return React.createElement(a||qt,null)}var qa=()=>React.createElement("span",{style:{color:"#345b37",backgroundColor:"#eff8f0",padding:"4px 12px",borderRadius:"2px",fontSize:"13px",fontWeight:500,whiteSpace:"nowrap"}},(0,F.__)("Connected")),Ua=({slug:e})=>React.createElement(Q.ExternalLink,{href:(0,F.sprintf)((0,F.__)("https://wordpress.org/plugins/%s/"),e)},(0,F.__)("Learn more")),Qa=()=>React.createElement(De,null,(0,F.__)("Not available"));function Ja({name:e,description:t,logo:a,authentication:o,plugin:r}){let s=o?.method==="api_key"?o:void 0,l=s?.settingName??"",f=s?.credentialsUrl??void 0,c=r?.file?.replace(/\.php$/,""),d=c?.includes("/")?c.split("/")[0]:c,p;try{f&&(p=new URL(f).hostname)}catch{}let{pluginStatus:n,canInstallPlugins:h,canActivatePlugins:m,isExpanded:j,setIsExpanded:b,isBusy:Y,isConnected:S,currentApiKey:J,keySource:C,handleButtonClick:_,getButtonLabel:g,saveApiKey:H,removeApiKey:O}=Zt({file:r?.file,settingName:l,connectorName:e,isInstalled:r?.isInstalled,isActivated:r?.isActivated,keySource:s?.keySource,initialIsConnected:s?.isConnected}),L=C==="env"||C==="constant",D=n==="not-installed"&&h===!1||n==="inactive"&&m===!1,T=!D,E=(0,Jt.useRef)(null);return React.createElement(Va,{className:d?`connector-item--${d}`:void 0,logo:a,name:e,description:t,actionArea:React.createElement(Q.__experimentalHStack,{spacing:3,expanded:!1},S&&React.createElement(qa,null),D&&(d?React.createElement(Ua,{slug:d}):React.createElement(Qa,null)),T&&React.createElement(Q.Button,{ref:E,variant:j||S?"tertiary":"secondary",size:"compact",onClick:_,disabled:n==="checking"||Y,isBusy:Y,accessibleWhenDisabled:!0},g()))},j&&n==="active"&&React.createElement(Fa,{key:S?"connected":"setup",initialValue:L?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":J,helpUrl:f,helpLabel:p,readOnly:S||L,keySource:C,onRemove:L?void 0:async()=>{await O(),E.current?.focus()},onSave:async $=>{await H($),b(!1),E.current?.focus()}}))}function aa(){let e=Ge(),t=a=>a.replace(/[^a-z0-9-_]/gi,"-");for(let[a,o]of Object.entries(e)){if(a==="akismet"&&!o.plugin?.isInstalled)continue;let{authentication:r}=o,s=t(a),l={name:o.name,description:o.description,type:o.type,logo:Ka(a,o.logoUrl),authentication:r,plugin:o.plugin},f=U((0,$t.select)(Za)).getConnector(s);r.method==="api_key"&&!f?.render&&(l.render=Ja),Wa(s,l)}}function oa(){return React.createElement("div",{className:"ai-plugin-callout__decoration","aria-hidden":"true"},React.createElement("svg",{viewBox:"0 0 248 248",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",focusable:"false",style:{width:"100%",height:"100%"}},React.createElement("image",{href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAQAElEQVR4AezdC3ojWW5tYflOzPbIbI/M9sh8+WdrdZ+KpiiKL5FB5KedwN7AeSFIpHRYmfX/PubXVGAqMBV4kQpMw3qRBzXbnApMBT4+pmHNq2AqMBV4mQpMw3qZR3X9RmeGqcCrV2Aa1qs/wdn/VOCNKjAN640e9hx1KvDqFZiG9epPcPY/FThWgZ1q07B2+mDnWFOBPVZgGtYen+qcaSqw0wpMw9rpg51jTQX2WIFpWMee6mhTganAU1ZgGtZTPpbZ1FRgKnCsAtOwjlVltKnAVOApKzAN6ykfy2zqcRWYlV6pAtOwXulpzV6nAm9egWlYb/4CmONPBV6pAtOwXulpve9e//Nw9P/7xL8d7Hy9aQWubFhvWrU59qMr8D+HBcPBna93rcA0rHd98q91bs3q3w9bBv7Bna93rMA0rHd86nPmqcCLVmAa1os+uF/Y9m8u6Q7rvw8bgLnDOhTiXb+mYb3rk3+tc//rYbsaVTjQP18amct4+h9hftt3BaZh7fv57v107rNg7+ec831WYBrWZyHGPHUF/vewu//6xNqg+HMRfyjMrb+edb5pWM/6ZGZfawX86Bc0qTU2/htVYBrWGz3sOepU4NUrMA3r1Z/g7H8q8EYVmIZ1h4c9U04FpgL3qcA0rPvUdWadCkwF7lCBaVh3KOpMORWYCtynAtOw7lPXmfVdKjDnfGgFpmE9tNyz2FRgKnBNBaZhXVO9GTsVmAo8tALTsB5a7llsKjAVuKYCv9uwrtn5jJ0KTAXergLTsN7ukc+BpwKvW4FpWK/77GbnU4G3q8A0rLd75L914Fl3KnB9BaZhXV/DmWEqMBV4UAWmYT2o0LPMVGAqcH0FpmFdX8OZYSowFfhrBe7GpmHd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HYNJYG/IDDmsvfavJpwA84GJPG32piNOCHY7lp21wcGsuWy+LAlwd4wCHOlsviQR7EWRzWXP5WW3P5QR4YE/DBUoFpWEsxDq4XiotNcMl5kP588cMf4fBbnDXuIH2wOLg8/fj8hYdP6SPOGkdn8UCDOIvDmsvfamsuP8gDY9La66qJyQN+kENj0xpPT2Nx4AfjaGzatePNY07gBxzWtfhbTT4N+AEHY9La66qJyQN+kENj0xpPT2NxkOv1B3za4LMC07A+CzFmKjAVeP4KTMP66zNyZxBcnhZNY9PEcUjjB/Fjepp4uWlsGosDP+AQZ/GAh3M1ezmVK35qTvFHj7dee2Jx4Acc4iwe8PAX7UDoB/Pnix/ufVbruMQH/p8NzG9/q8A0rL/Vod+9QHwSA+4W0vEghy6exqeJbTV6GiuHZgwOfJoYHmgQZ+XQWBzuPd781gH+V+vT5QQcjEnj047tn14eK4dmDA58mhgeaBBn5dBYHO493vzWAf5X69PlBBzs1TjAB0sFpmEtxRh3KjAVeO4KTMN67ufzTLv7yQXwT3Kf6YyzlyevwF0a1pOfebZ3ugKajX8sbpvlkyyxVceP/ejiE641b/ypwE0qMA3rJmXc1STuUPxTJttDuWsRW3X8WMM6Nn4dN/5U4KIKTMO6qGwzaCowFfiNCkzD+o2q72nNOctU4IEVmIb1wGLPUlOBqcB1FZiGdV39ZvRUYCrwwApMw3pgsWepqcBrV+D3dz8N6/efwexgKjAVOLMC07DOLNSkTQWmAr9fgWlYv/8MZgdTganAmRWYhnVmoa5PmxmmAlOBayswDevaCs74qcBU4GEVmIb1sFLPQlOBqcC1FZiGdW0FZ/xU4J8rMMqdKjAN606FnWmnAlOB21dgGtbtazozTgWmAneqwDSsOxV2pp0KTAVuX4H/DwAA//9sB2hHAAAABklEQVQDAB9QlitZA9bLAAAAAElFTkSuQmCC",width:"248",height:"248",style:{mixBlendMode:"multiply"}})))}var $a="ai",eo="ai-wp-admin",Ze="ai/ai",to="https://wordpress.org/plugins/ai/",Ke=Object.values(Ge()),ao=Ke.some(e=>e.type==="ai_provider"),ia=[];for(let e of Ke)e.type==="ai_provider"&&e.authentication.method==="api_key"&&ia.push(e.authentication.settingName);function na(){let[e,t]=(0,B.useState)(!1),[a,o]=(0,B.useState)(!1),r=(0,B.useRef)(null);(0,B.useEffect)(()=>{a&&r.current?.focus()},[a]);let s=(0,B.useRef)(Ke.some(g=>g.type==="ai_provider"&&g.authentication.method==="api_key"&&g.authentication.isConnected)).current,{pluginStatus:l,canInstallPlugins:f,canManagePlugins:c,hasConnectedProvider:d}=(0,ce.useSelect)(g=>{let H=g(Xe.store),O=!!H.canUser("create",{kind:"root",name:"plugin"}),L=H.getEntityRecord("root","site"),D=s||ia.some($=>!!L?.[$]),T=H.getEntityRecord("root","plugin",Ze);return H.hasFinishedResolution("getEntityRecord",["root","plugin",Ze])?T?{pluginStatus:T.status==="active"?"active":"inactive",canInstallPlugins:O,canManagePlugins:!0,hasConnectedProvider:D}:{pluginStatus:"not-installed",canInstallPlugins:O,canManagePlugins:O,hasConnectedProvider:D}:{pluginStatus:"checking",canInstallPlugins:O,canManagePlugins:void 0,hasConnectedProvider:D}},[]),{saveEntityRecord:p}=(0,ce.useDispatch)(Xe.store),{createSuccessNotice:n,createErrorNotice:h}=(0,ce.useDispatch)(ra.store),m=async()=>{t(!0);try{await p("root","plugin",{slug:$a,status:"active"},{throwOnError:!0}),o(!0),n((0,w.__)("AI plugin installed and activated successfully."),{id:"ai-plugin-install-success",type:"snackbar"})}catch{h((0,w.__)("Failed to install the AI plugin."),{id:"ai-plugin-install-error",type:"snackbar"})}finally{t(!1)}},j=async()=>{t(!0);try{await p("root","plugin",{plugin:Ze,status:"active"},{throwOnError:!0}),o(!0),n((0,w.__)("AI plugin activated successfully."),{id:"ai-plugin-activate-success",type:"snackbar"})}catch{h((0,w.__)("Failed to activate the AI plugin."),{id:"ai-plugin-activate-error",type:"snackbar"})}finally{t(!1)}};if(!ao||l==="checking"||l==="active"&&s&&!a||l==="inactive"&&c===!1)return null;let b=l==="active"&&!d,Y=l==="active"&&d&&(!s||a),S=l==="not-installed"||l==="inactive",J=l==="not-installed"&&f===!1,C=()=>Y?(0,w.__)("The AI plugin is ready to use. You can use it to generate featured images, alt text, titles, excerpts and more. Learn more"):b?(0,w.__)("The AI plugin is installed. Connect an AI provider below to generate featured images, alt text, titles, excerpts, and more. Learn more"):(0,w.__)("The AI plugin can use your AI connectors to generate featured images, alt text, titles, excerpts and more. Learn more"),_=()=>l==="not-installed"?{label:e?(0,w.__)("Installing\u2026"):(0,w.__)("Install the AI plugin"),disabled:e,onClick:e?void 0:m}:{label:e?(0,w.__)("Activating\u2026"):(0,w.__)("Activate the AI plugin"),disabled:e,onClick:e?void 0:j};return React.createElement("div",{className:"ai-plugin-callout"},React.createElement("div",{className:"ai-plugin-callout__content"},React.createElement("p",null,(0,B.createInterpolateElement)(C(),{strong:React.createElement("strong",null),a:React.createElement(ue.ExternalLink,{href:to})})),!J&&(S?React.createElement(ue.Button,{variant:"primary",size:"compact",isBusy:e,disabled:_().disabled,accessibleWhenDisabled:!0,onClick:_().onClick},_().label):React.createElement(ue.Button,{ref:r,variant:"secondary",size:"compact",href:(0,sa.addQueryArgs)("options-general.php",{page:eo})},(0,w.__)("Control features in the AI plugin")))),React.createElement(oa,null))}var{store:ro}=U(oo);aa();function so(){let e=ta(),{connectors:t,canInstallPlugins:a,isAiPluginInstalled:o}=(0,la.useSelect)(n=>{let h=n(da.store),m=h.getEntityRecord("root","plugin","ai/ai");return{connectors:U(n(ro)).getConnectors(),canInstallPlugins:h.canUser("create",{kind:"root",name:"plugin"}),isAiPluginInstalled:!!m}},[]),r=t.filter(n=>n.render),s=Array.from(new Set(t.filter(n=>n.type==="ai_provider").map(n=>n.plugin?.file?.split("/")[0]).filter(n=>!!n))).sort(),l=new Set(t.filter(n=>n.plugin?.isInstalled).map(n=>n.plugin?.file?.split("/")[0]).filter(n=>!!n));o&&l.add("ai");let f=["ai",...s].filter(n=>!l.has(n)),c=r.length===0,d=f.length>0&&(e||!a),p=e?(0,k.__)("Plugins cannot be installed here due to your site configuration. Install them manually using your normal deployment workflow."):(0,k.__)("You do not have permission to install plugins. Please ask a site administrator to install them for you.");return React.createElement(We,{title:(0,k.__)("Connectors"),subTitle:(0,k.__)("All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere.")},React.createElement("div",{className:`connectors-page${c?" connectors-page--empty":""}`},d&&React.createElement(ie.Root,{intent:"info",className:"connectors-page__file-mods-notice"},React.createElement(ie.Description,null,p)),c?React.createElement(P.__experimentalVStack,{alignment:"center",spacing:3,style:{maxWidth:480}},React.createElement(P.__experimentalVStack,{alignment:"center",spacing:2},React.createElement(P.__experimentalHeading,{level:2,size:15,weight:600},(0,k.__)("No connectors yet")),React.createElement(P.__experimentalText,{size:12},(0,k.__)("Connectors appear here when you install plugins that use external services. Each plugin registers the API keys it needs, and you manage them all in one place."))),React.createElement(P.Button,{variant:"secondary",href:"plugin-install.php"},(0,k.__)("Learn more"))):React.createElement(P.__experimentalVStack,{spacing:3},React.createElement(na,null),React.createElement(P.__experimentalVStack,{spacing:3,role:"list"},t.map(n=>n.render?React.createElement(n.render,{key:n.slug,slug:n.slug,name:n.name,description:n.description,type:n.type,logo:n.logo,authentication:n.authentication,plugin:n.plugin}):null))),a&&!e&&React.createElement("p",null,(0,fa.createInterpolateElement)((0,k.__)("If the connector you need is not listed, search the plugin directory to see if a connector is available."),{a:React.createElement("a",{href:"plugin-install.php?s=connector&tab=search&type=tag"})}))))}function io(){return React.createElement(so,null)}var no=io;export{no as stage}; diff --git a/src/wp-includes/build/routes/font-list/content.js b/src/wp-includes/build/routes/font-list/content.js index 72bac46d69beb..e6565158d7f48 100644 --- a/src/wp-includes/build/routes/font-list/content.js +++ b/src/wp-includes/build/routes/font-list/content.js @@ -810,7 +810,7 @@ var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components // packages/admin-ui/build-module/page/header.mjs var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); function Header({ - headingLevel = 2, + headingLevel = 1, breadcrumbs, badges, title, @@ -819,42 +819,34 @@ function Header({ showSidebarToggle = true }) { const HeadingTag = `h${headingLevel}`; - return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)( - Stack, - { - direction: "column", - className: "admin-ui-page__header", - render: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("header", {}), - children: [ - /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [ - /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [ - showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( - SidebarToggleSlot, - { - bubblesVirtually: true, - className: "admin-ui-page__sidebar-toggle-slot" - } - ), - title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }), - breadcrumbs, - badges - ] }), - /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( - Stack, - { - direction: "row", - gap: "sm", - style: { width: "auto", flexShrink: 0 }, - className: "admin-ui-page__header-actions", - align: "center", - children: actions - } - ) - ] }), - subTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle }) - ] - } - ); + return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "column", className: "admin-ui-page__header", children: [ + /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "row", justify: "space-between", gap: "sm", children: [ + /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [ + showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( + SidebarToggleSlot, + { + bubblesVirtually: true, + className: "admin-ui-page__sidebar-toggle-slot" + } + ), + title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(HeadingTag, { className: "admin-ui-page__header-title", children: title }), + breadcrumbs, + badges + ] }), + /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( + Stack, + { + direction: "row", + gap: "sm", + style: { width: "auto", flexShrink: 0 }, + className: "admin-ui-page__header-actions", + align: "center", + children: actions + } + ) + ] }), + subTitle && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "admin-ui-page__header-subtitle", children: subTitle }) + ] }); } // packages/admin-ui/build-module/page/index.mjs @@ -15437,10 +15429,10 @@ var { unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPI ); // routes/font-list/style.scss -if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='89af99528f']")) { +if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='4bbd4c3e39']")) { const style = document.createElement("style"); - style.setAttribute("data-wp-hash", "89af99528f"); - style.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')); + style.setAttribute("data-wp-hash", "4bbd4c3e39"); + style.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')); document.head.appendChild(style); } diff --git a/src/wp-includes/build/routes/font-list/content.min.asset.php b/src/wp-includes/build/routes/font-list/content.min.asset.php index 960493b0a9953..cc0fc7a6eb103 100644 --- a/src/wp-includes/build/routes/font-list/content.min.asset.php +++ b/src/wp-includes/build/routes/font-list/content.min.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-style-engine', 'wp-theme'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'a3428f105aa265b2e8dc'); \ No newline at end of file + array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-private-apis', 'wp-style-engine', 'wp-theme'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => 'f4a76b3cfc58409a8d9c'); \ No newline at end of file diff --git a/src/wp-includes/build/routes/font-list/content.min.js b/src/wp-includes/build/routes/font-list/content.min.js index 85179044b73e0..576cc3541569e 100644 --- a/src/wp-includes/build/routes/font-list/content.min.js +++ b/src/wp-includes/build/routes/font-list/content.min.js @@ -1,12 +1,12 @@ -var Xu=Object.create;var ra=Object.defineProperty;var Ku=Object.getOwnPropertyDescriptor;var Ju=Object.getOwnPropertyNames;var Qu=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty;var ue=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var tf=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ju(e))!$u.call(t,s)&&s!==r&&ra(t,s,{get:()=>e[s],enumerable:!(o=Ku(e,s))||o.enumerable});return t};var u=(t,e,r)=>(r=t!=null?Xu(Qu(t)):{},tf(e||!t||!t.__esModule?ra(r,"default",{value:t,enumerable:!0}):r,t));var ut=Ht((Jg,oa)=>{oa.exports=window.wp.i18n});var X=Ht((Qg,sa)=>{sa.exports=window.wp.components});var z=Ht(($g,na)=>{na.exports=window.ReactJSXRuntime});var yt=Ht((ey,ia)=>{ia.exports=window.wp.element});var _r=Ht((sy,da)=>{da.exports=window.React});var Pr=Ht((Iy,_a)=>{_a.exports=window.wp.primitives});var Vs=Ht((Xy,Pa)=>{Pa.exports=window.wp.privateApis});var cr=Ht((Ky,Aa)=>{Aa.exports=window.wp.compose});var Na=Ht((dv,Va)=>{Va.exports=window.wp.editor});var be=Ht((mv,za)=>{za.exports=window.wp.coreData});var fe=Ht((pv,Ma)=>{Ma.exports=window.wp.data});var Rr=Ht((hv,Ga)=>{Ga.exports=window.wp.blocks});var ce=Ht((gv,ja)=>{ja.exports=window.wp.blockEditor});var Ha=Ht((xv,Ua)=>{Ua.exports=window.wp.styleEngine});var Xa=Ht((Lv,Za)=>{"use strict";Za.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,s,a;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),o=a.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=o;s--!==0;){var n=a[s];if(!t(e[n],r[n]))return!1}return!0}return e!==e&&r!==r}});var $a=Ht((Dv,Qa)=>{"use strict";var Pf=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Lf(t)}var Ef=typeof Symbol=="function"&&Symbol.for,If=Ef?Symbol.for("react.element"):60103;function Lf(t){return t.$$typeof===If}function Bf(t){return Array.isArray(t)?[]:{}}function so(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Ir(Bf(t),t,e):t}function Df(t,e,r){return t.concat(e).map(function(o){return so(o,r)})}function Vf(t,e){if(!e.customMerge)return Ir;var r=e.customMerge(t);return typeof r=="function"?r:Ir}function Nf(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Ka(t){return Object.keys(t).concat(Nf(t))}function Ja(t,e){try{return e in t}catch{return!1}}function zf(t,e){return Ja(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Mf(t,e,r){var o={};return r.isMergeableObject(t)&&Ka(t).forEach(function(s){o[s]=so(t[s],r)}),Ka(e).forEach(function(s){zf(t,s)||(Ja(t,s)&&r.isMergeableObject(e[s])?o[s]=Vf(s,r)(t[s],e[s],r):o[s]=so(e[s],r))}),o}function Ir(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Df,r.isMergeableObject=r.isMergeableObject||Pf,r.cloneUnlessOtherwiseSpecified=so;var o=Array.isArray(e),s=Array.isArray(t),a=o===s;return a?o?r.arrayMerge(t,e,r):Mf(t,e,r):so(e,r)}Ir.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,s){return Ir(o,s,r)},{})};var Gf=Ir;Qa.exports=Gf});var dn=Ht((H0,Ki)=>{Ki.exports=window.wp.keycodes});var el=Ht((eb,tl)=>{tl.exports=window.wp.apiFetch});var _u=Ht((FF,Tu)=>{Tu.exports=window.wp.date});function aa(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e(0,ua.jsx)(o,{ref:a,className:ve("admin-ui-navigable-region",e),"aria-label":r,role:"region",tabIndex:"-1",...s,children:t}));fa.displayName="NavigableRegion";var ca=fa;var pa=u(_r(),1),ma={};function Fs(t,e){let r=pa.useRef(ma);return r.current===ma&&(r.current=t(e)),r}function ks(t,...e){let r=new URL(`https://base-ui.com/production-error/${t}`);return e.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${t}; visit ${r} for the full message.`}var Oo=u(_r(),1);function Os(t,e,r,o){let s=Fs(ga).current;return rf(s,t,e,r,o)&&ya(s,[t,e,r,o]),s.callback}function ha(t){let e=Fs(ga).current;return of(e,t)&&ya(e,t),e.callback}function ga(){return{callback:null,cleanup:null,refs:[]}}function rf(t,e,r,o,s){return t.refs[0]!==e||t.refs[1]!==r||t.refs[2]!==o||t.refs[3]!==s}function of(t,e){return t.refs.length!==e.length||t.refs.some((r,o)=>r!==e[o])}function ya(t,e){if(t.refs=e,e.every(r=>r==null)){t.callback=null;return}t.callback=r=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),r!=null){let o=Array(e.length).fill(null);for(let s=0;s{for(let s=0;s=t}function Ts(t){if(!wa.isValidElement(t))return null;let e=t,r=e.props;return(ba(19)?r?.ref:e.ref)??null}function Jr(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function Sa(t,e){let r={};for(let o in t){let s=t[o];if(e?.hasOwnProperty(o)){let a=e[o](s);a!=null&&Object.assign(r,a);continue}s===!0?r[`data-${o.toLowerCase()}`]="":s&&(r[`data-${o.toLowerCase()}`]=s.toString())}return r}function xa(t,e){return typeof t=="function"?t(e):t}function Ca(t,e){return typeof t=="function"?t(e):t}var $r={};function ko(t,e,r,o,s){let a={..._s(t,$r)};return e&&(a=Qr(a,e)),r&&(a=Qr(a,r)),o&&(a=Qr(a,o)),s&&(a=Qr(a,s)),a}function Fa(t){if(t.length===0)return $r;if(t.length===1)return _s(t[0],$r);let e={..._s(t[0],$r)};for(let r=1;r=65&&s<=90&&(typeof e=="function"||typeof e>"u")}function ka(t){return typeof t=="function"}function _s(t,e){return ka(t)?t(e):t??$r}function lf(t,e){return e?t?r=>{if(ff(r)){let s=r;uf(s);let a=e(s);return s.baseUIHandlerPrevented||t?.(s),a}let o=e(r);return t?.(r),o}:e:t}function uf(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function Ps(t,e){return e?t?e+" "+t:e:t}function ff(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}var cf=Object.freeze([]),Ke=Object.freeze({});var As=u(_r(),1);function Oa(t,e,r={}){let o=e.render,s=df(e,r);if(r.enabled===!1)return null;let a=r.state??Ke;return mf(t,o,s,a)}function df(t,e={}){let{className:r,style:o,render:s}=t,{state:a=Ke,ref:n,props:l,stateAttributesMapping:m,enabled:f=!0}=e,c=f?xa(r,a):void 0,d=f?Ca(o,a):void 0,g=f?Sa(a,m):Ke,h=f?Jr(g,Array.isArray(l)?Fa(l):l)??Ke:Ke;return typeof document<"u"&&(f?Array.isArray(n)?h.ref=ha([h.ref,Ts(s),...n]):h.ref=Os(h.ref,Ts(s),n):Os(null,null)),f?(c!==void 0&&(h.className=Ps(h.className,c)),d!==void 0&&(h.style=Jr(h.style,d)),h):Ke}function mf(t,e,r,o){if(e){if(typeof e=="function")return e(r,o);let s=ko(r,e.props);return s.ref=r.ref,Oo.cloneElement(e,s)}if(t&&typeof t=="string")return pf(t,r);throw new Error(ks(8))}function pf(t,e){return t==="button"?(0,As.createElement)("button",{type:"button",...e,key:e.key}):t==="img"?(0,As.createElement)("img",{alt:"",...e,key:e.key}):Oo.createElement(t,e)}function Ta(t){return Oa(t.defaultTagName??"div",t,t)}var To=u(yt(),1),to=(0,To.forwardRef)(({icon:t,size:e=24,...r},o)=>(0,To.cloneElement)(t,{width:e,height:e,...r,ref:o}));var _o=u(Pr(),1),Rs=u(z(),1),ur=(0,Rs.jsx)(_o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rs.jsx)(_o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Po=u(Pr(),1),Es=u(z(),1),fr=(0,Es.jsx)(Po.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Es.jsx)(Po.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Ao=u(Pr(),1),Is=u(z(),1),Ls=(0,Is.jsx)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Is.jsx)(Ao.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Ro=u(Pr(),1),Bs=u(z(),1),Eo=(0,Bs.jsx)(Ro.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Bs.jsx)(Ro.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var Io=u(Pr(),1),Ds=u(z(),1),Lo=(0,Ds.jsx)(Io.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ds.jsx)(Io.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var Ra=u(yt(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","71d20935c2"),t.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(t)}var hf={stack:"_19ce0419607e1896__stack"},gf={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Ar=(0,Ra.forwardRef)(function({direction:e,gap:r,align:o,justify:s,wrap:a,render:n,...l},m){let f={gap:r&&gf[r],alignItems:o,justifyContent:s,flexDirection:e,flexWrap:a};return Ta({render:n,ref:m,props:ko(l,{style:f,className:hf.stack})})});var Ea=u(X(),1),{Fill:Ia,Slot:La}=(0,Ea.createSlotFill)("SidebarToggle");var Re=u(z(),1);function Ba({headingLevel:t=2,breadcrumbs:e,badges:r,title:o,subTitle:s,actions:a,showSidebarToggle:n=!0}){let l=`h${t}`;return(0,Re.jsxs)(Ar,{direction:"column",className:"admin-ui-page__header",render:(0,Re.jsx)("header",{}),children:[(0,Re.jsxs)(Ar,{direction:"row",justify:"space-between",gap:"sm",children:[(0,Re.jsxs)(Ar,{direction:"row",gap:"sm",align:"center",justify:"start",children:[n&&(0,Re.jsx)(La,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),o&&(0,Re.jsx)(l,{className:"admin-ui-page__header-title",children:o}),e,r]}),(0,Re.jsx)(Ar,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:a})]}),s&&(0,Re.jsx)("p",{className:"admin-ui-page__header-subtitle",children:s})]})}var eo=u(z(),1);function Da({headingLevel:t,breadcrumbs:e,badges:r,title:o,subTitle:s,children:a,className:n,actions:l,hasPadding:m=!1,showSidebarToggle:f=!0}){let c=ve("admin-ui-page",n);return(0,eo.jsxs)(ca,{className:c,ariaLabel:o,children:[(o||e||r)&&(0,eo.jsx)(Ba,{headingLevel:t,breadcrumbs:e,badges:r,title:o,subTitle:s,actions:l,showSidebarToggle:f}),m?(0,eo.jsx)("div",{className:"admin-ui-page__content has-padding",children:a}):a]})}Da.SidebarToggleFill=Ia;var Ns=Da;var xo=u(ut()),Uu=u(X()),Hu=u(Na()),ws=u(be()),Wu=u(fe()),Yu=u(yt());var Mu=u(X(),1),Gu=u(Rr(),1),Mg=u(fe(),1),Gg=u(ce(),1),qn=u(yt(),1),jg=u(cr(),1);function Er(t,e,r){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let o=e.pop(),s=t;for(let a of e){let n=s[a];s=s[a]=Array.isArray(n)?[...n]:{...n}}return s[o]=r,t}var we=(t,e,r)=>{let o=Array.isArray(e)?e:e.split("."),s=t;return o.forEach(a=>{s=s?.[a]}),s??r};var yf=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function zs(t,e,r){let o=r?".blocks."+r:"",s=e?"."+e:"",a=`settings${o}${s}`,n=`settings${s}`;if(e)return we(t,a)??we(t,n);let l={};return yf.forEach(m=>{let f=we(t,`settings${o}.${m}`)??we(t,`settings.${m}`);f!==void 0&&(l=Er(l,m.split("."),f))}),l}function Ms(t,e,r,o){let s=o?".blocks."+o:"",a=e?"."+e:"",n=`settings${s}${a}`;return Er(t,n.split("."),r)}var kf=u(Ha(),1);var vf="1600px",bf="320px",wf=1,Sf=.25,xf=.75,Cf="14px";function Wa({minimumFontSize:t,maximumFontSize:e,fontSize:r,minimumViewportWidth:o=bf,maximumViewportWidth:s=vf,scaleFactor:a=wf,minimumFontSizeLimit:n}){if(n=Ee(n)?n:Cf,r){let b=Ee(r);if(!b?.unit||!b?.value)return null;let T=Ee(n,{coerceTo:b.unit});if(T?.value&&!t&&!e&&b?.value<=T?.value)return null;if(e||(e=`${b.value}${b.unit}`),!t){let Y=b.unit==="px"?b.value:b.value*16,I=Math.min(Math.max(1-.075*Math.log2(Y),Sf),xf),V=ro(b.value*I,3);T?.value&&V0}function Ff(t){let e=t?.typography??{},r=t?.layout,o=Ee(r?.wideSize)?r?.wideSize:null;return Gs(e)&&o?{fluid:{maxViewportWidth:o,...typeof e.fluid=="object"?e.fluid:{}}}:{fluid:e?.fluid}}function Ya(t,e){let{size:r}=t;if(!r||r==="0"||t?.fluid===!1||!Gs(e?.typography)&&!Gs(t))return r;let o=Ff(e)?.fluid??{},s=Wa({minimumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.min,maximumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return s||r}var Of=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:t})=>`url( '#wp-duotone-${t}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(t,e)=>Ya(t,e),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:t})=>t,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function qa(t,e,r=[],o="slug",s){let a=[e?we(t,["blocks",e,...r]):void 0,we(t,r)].filter(Boolean);for(let n of a)if(n){let l=["custom","theme","default"];for(let m of l){let f=n[m];if(f){let c=f.find(d=>d[o]===s);if(c)return o==="slug"||qa(t,e,r,"slug",c.slug)[o]===c[o]?c:void 0}}}}function Tf(t,e,r,[o,s]=[]){let a=Of.find(l=>l.cssVarInfix===o);if(!a||!t.settings)return r;let n=qa(t.settings,e,a.path,"slug",s);if(n){let{valueKey:l}=a,m=n[l];return Bo(t,e,m)}return r}function _f(t,e,r,o=[]){let s=(e?we(t?.settings??{},["blocks",e,"custom",...o]):void 0)??we(t?.settings??{},["custom",...o]);return s?Bo(t,e,s):r}function Bo(t,e,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let f=we(t,r.ref);if(!f||typeof f=="object"&&"ref"in f)return f;r=f}else return r;let o="var:",s="var(--wp--",a=")",n;if(r.startsWith(o))n=r.slice(o.length).split("|");else if(r.startsWith(s)&&r.endsWith(a))n=r.slice(s.length,-a.length).split("--");else return r;let[l,...m]=n;return l==="preset"?Tf(t,e,r,m):l==="custom"?_f(t,e,r,m):r}function js(t,e,r,o=!0){let s=e?"."+e:"",a=r?`styles.blocks.${r}${s}`:`styles${s}`;if(!t)return;let n=we(t,a);return o?Bo(t,r,n):n}function Us(t,e,r,o){let s=e?"."+e:"",a=o?`styles.blocks.${o}${s}`:`styles${s}`;return Er(t,a.split("."),r)}var Hs=u(Xa(),1);function oo(t,e){return typeof t!="object"||typeof e!="object"?t===e:(0,Hs.default)(t?.styles,e?.styles)&&(0,Hs.default)(t?.settings,e?.settings)}var ri=u($a(),1);function ti(t){return Object.prototype.toString.call(t)==="[object Object]"}function ei(t){var e,r;return ti(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ti(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function dr(t,e){return(0,ri.default)(t,e,{isMergeableObject:ei,customMerge:r=>{if(r==="backgroundImage")return(o,s)=>s??o}})}var jf={grad:.9,turn:360,rad:360/(2*Math.PI)},je=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},qt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Fe=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},fi=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},oi=function(t){return{r:Fe(t.r,0,255),g:Fe(t.g,0,255),b:Fe(t.b,0,255),a:Fe(t.a)}},Ws=function(t){return{r:qt(t.r),g:qt(t.g),b:qt(t.b),a:qt(t.a,3)}},Uf=/^#([0-9a-f]{3,8})$/i,Do=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},ci=function(t){var e=t.r,r=t.g,o=t.b,s=t.a,a=Math.max(e,r,o),n=a-Math.min(e,r,o),l=n?a===e?(r-o)/n:a===r?2+(o-e)/n:4+(e-r)/n:0;return{h:60*(l<0?l+6:l),s:a?n/a*100:0,v:a/255*100,a:s}},di=function(t){var e=t.h,r=t.s,o=t.v,s=t.a;e=e/360*6,r/=100,o/=100;var a=Math.floor(e),n=o*(1-r),l=o*(1-(e-a)*r),m=o*(1-(1-e+a)*r),f=a%6;return{r:255*[o,l,n,n,m,o][f],g:255*[m,o,o,l,n,n][f],b:255*[n,n,m,o,o,l][f],a:s}},si=function(t){return{h:fi(t.h),s:Fe(t.s,0,100),l:Fe(t.l,0,100),a:Fe(t.a)}},ni=function(t){return{h:qt(t.h),s:qt(t.s),l:qt(t.l),a:qt(t.a,3)}},ai=function(t){return di((r=(e=t).s,{h:e.h,s:(r*=((o=e.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:e.a}));var e,r,o},no=function(t){return{h:(e=ci(t)).h,s:(s=(200-(r=e.s))*(o=e.v)/100)>0&&s<200?r*o/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,r,o,s},Hf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zs={string:[[function(t){var e=Uf.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?qt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?qt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Yf.exec(t)||qf.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:oi({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Hf.exec(t)||Wf.exec(t);if(!e)return null;var r,o,s=si({h:(r=e[1],o=e[2],o===void 0&&(o="deg"),Number(r)*(jf[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ai(s)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,o=t.b,s=t.a,a=s===void 0?1:s;return je(e)&&je(r)&&je(o)?oi({r:Number(e),g:Number(r),b:Number(o),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,o=t.l,s=t.a,a=s===void 0?1:s;if(!je(e)||!je(r)||!je(o))return null;var n=si({h:Number(e),s:Number(r),l:Number(o),a:Number(a)});return ai(n)},"hsl"],[function(t){var e=t.h,r=t.s,o=t.v,s=t.a,a=s===void 0?1:s;if(!je(e)||!je(r)||!je(o))return null;var n=(function(l){return{h:fi(l.h),s:Fe(l.s,0,100),v:Fe(l.v,0,100),a:Fe(l.a)}})({h:Number(e),s:Number(r),v:Number(o),a:Number(a)});return di(n)},"hsv"]]},ii=function(t,e){for(var r=0;r=.5},t.prototype.toHex=function(){return e=Ws(this.rgba),r=e.r,o=e.g,s=e.b,n=(a=e.a)<1?Do(qt(255*a)):"","#"+Do(r)+Do(o)+Do(s)+n;var e,r,o,s,a,n},t.prototype.toRgb=function(){return Ws(this.rgba)},t.prototype.toRgbString=function(){return e=Ws(this.rgba),r=e.r,o=e.g,s=e.b,(a=e.a)<1?"rgba("+r+", "+o+", "+s+", "+a+")":"rgb("+r+", "+o+", "+s+")";var e,r,o,s,a},t.prototype.toHsl=function(){return ni(no(this.rgba))},t.prototype.toHslString=function(){return e=ni(no(this.rgba)),r=e.h,o=e.s,s=e.l,(a=e.a)<1?"hsla("+r+", "+o+"%, "+s+"%, "+a+")":"hsl("+r+", "+o+"%, "+s+"%)";var e,r,o,s,a},t.prototype.toHsv=function(){return e=ci(this.rgba),{h:qt(e.h),s:qt(e.s),v:qt(e.v),a:qt(e.a,3)};var e},t.prototype.invert=function(){return Ie({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),Ie(Ys(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ie(Ys(this.rgba,-e))},t.prototype.grayscale=function(){return Ie(Ys(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Ie(li(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Ie(li(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?Ie({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):qt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=no(this.rgba);return typeof e=="number"?Ie({h:e,s:r.s,l:r.l,a:r.a}):qt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Ie(e).toHex()},t})(),Ie=function(t){return t instanceof Xs?t:new Xs(t)},ui=[],mi=function(t){t.forEach(function(e){ui.indexOf(e)<0&&(e(Xs,Zs),ui.push(e))})};var Ks=u(yt(),1);var pi=u(yt(),1),Xt=(0,pi.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var hi=u(z(),1);function ao({children:t,value:e,baseValue:r,onChange:o,fontLibraryEnabled:s}){let a=(0,Ks.useMemo)(()=>dr(r,e),[r,e]),n=(0,Ks.useMemo)(()=>({user:e,base:r,merged:a,onChange:o,fontLibraryEnabled:s}),[e,r,a,o,s]);return(0,hi.jsx)(Xt.Provider,{value:n,children:t})}var Ue=u(X(),1),Li=u(ut(),1);var lc=u(fe(),1),uc=u(be(),1);var gi=u(z(),1);function Js({className:t,...e}){return(0,gi.jsx)(to,{className:ve(t,"global-styles-ui-icon-with-current-color"),...e})}var Je=u(X(),1);var mr=u(z(),1);function Xf({icon:t,children:e,...r}){return(0,mr.jsxs)(Je.__experimentalItem,{...r,children:[t&&(0,mr.jsxs)(Je.__experimentalHStack,{justify:"flex-start",children:[(0,mr.jsx)(Js,{icon:t,size:24}),(0,mr.jsx)(Je.FlexItem,{children:e})]}),!t&&e]})}function Le(t){return(0,mr.jsx)(Je.Navigator.Button,{as:Xf,...t})}var Qf=u(X(),1);var $f=u(ut(),1),Ci=u(ce(),1);var Qs=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},$s=function(t){return .2126*Qs(t.r)+.7152*Qs(t.g)+.0722*Qs(t.b)};function yi(t){t.prototype.luminance=function(){return e=$s(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*e)/o+0;var e,r,o},t.prototype.contrast=function(e){e===void 0&&(e="#FFF");var r,o,s,a,n,l,m,f=e instanceof t?e:new t(e);return a=this.rgba,n=f.toRgb(),l=$s(a),m=$s(n),r=l>m?(l+.05)/(m+.05):(m+.05)/(l+.05),(o=2)===void 0&&(o=0),s===void 0&&(s=Math.pow(10,o)),Math.floor(s*r)/s+0},t.prototype.isReadable=function(e,r){return e===void 0&&(e="#FFF"),r===void 0&&(r={}),this.contrast(e)>=(l=(n=(o=r).size)===void 0?"normal":n,(a=(s=o.level)===void 0?"AA":s)==="AAA"&&l==="normal"?7:a==="AA"&&l==="large"?3:4.5);var o,s,a,n,l}}var Pe=u(yt(),1),wi=u(fe(),1),Si=u(be(),1),en=u(ut(),1);function tn(t,e){if(!e?.length||typeof t!="object"||!t||!Object.keys(t).length)return t;for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&tn(t[r],e);return t}var Vo=(t,e)=>{if(!t||!e?.length)return{};let r={};return Object.keys(t).forEach(o=>{if(e.includes(o))r[o]=t[o];else if(typeof t[o]=="object"){let s=Vo(t[o],e);Object.keys(s).length&&(r[o]=s)}}),r};function io(t,e){let r=Vo(structuredClone(t),e);return oo(r,t)}function vi(t,e){if(!Array.isArray(t)||!e)return null;let o=e.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return t.find(s=>s.slug===o)}function bi(t){let e=t?.settings?.typography?.fontFamilies?.theme,r=t?.settings?.typography?.fontFamilies?.custom,o=[];e&&r?o=[...e,...r]:e?o=e:r&&(o=r);let s=t?.styles?.typography?.fontFamily,a=vi(o,s),n=t?.styles?.elements?.heading?.typography?.fontFamily,l;return n?l=vi(o,t?.styles?.elements?.heading?.typography?.fontFamily):l=a,[a,l]}mi([yi]);function kt(t,e,r="merged",o=!0){let{user:s,base:a,merged:n,onChange:l}=(0,Pe.useContext)(Xt),m=n;r==="base"?m=a:r==="user"&&(m=s);let f=(0,Pe.useMemo)(()=>js(m,t,e,o),[m,t,e,o]),c=(0,Pe.useCallback)(d=>{let g=Us(s,t,d,e);l(g)},[s,l,t,e]);return[f,c]}function _t(t,e,r="merged"){let{user:o,base:s,merged:a,onChange:n}=(0,Pe.useContext)(Xt),l=a;r==="base"?l=s:r==="user"&&(l=o);let m=(0,Pe.useMemo)(()=>zs(l,t,e),[l,t,e]),f=(0,Pe.useCallback)(c=>{let d=Ms(o,t,c,e);n(d)},[o,n,t,e]);return[m,f]}var Kf=[];function Jf({title:t,settings:e,styles:r}){return t===(0,en.__)("Default")||Object.keys(e||{}).length>0||Object.keys(r||{}).length>0}function No(t=[]){let{variationsFromTheme:e}=(0,wi.useSelect)(o=>({variationsFromTheme:o(Si.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Kf}),[]),{user:r}=(0,Pe.useContext)(Xt);return(0,Pe.useMemo)(()=>{let o=structuredClone(r),s=tn(o,t);s.title=(0,en.__)("Default");let a=e.filter(l=>io(l,t)).map(l=>dr(s,l)),n=[s,...a];return n?.length?n.filter(Jf):[]},[t,r,e])}var xi=u(Vs(),1),{lock:d1,unlock:vt}=(0,xi.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/global-styles-ui");var rn=u(z(),1),{useHasDimensionsPanel:y1,useHasTypographyPanel:v1,useHasColorPanel:b1,useSettingsForBlockElement:w1,useHasBackgroundPanel:S1}=vt(Ci.privateApis);var Be=u(X(),1);function Lr(){let[t="black"]=kt("color.text"),[e="white"]=kt("color.background"),[r=t]=kt("elements.h1.color.text"),[o=r]=kt("elements.link.color.text"),[s=o]=kt("elements.button.color.background"),[a]=_t("color.palette.core")||[],[n]=_t("color.palette.theme")||[],[l]=_t("color.palette.custom")||[],m=(n??[]).concat(l??[]).concat(a??[]),f=m.filter(({color:g})=>g===t),c=m.filter(({color:g})=>g===s),d=f.concat(c).concat(m).filter(({color:g})=>g!==e).slice(0,2);return{paletteColors:m,highlightedColors:d}}var Oi=u(yt(),1),Ti=u(X(),1),sn=u(ut(),1);function tc(t,e){return e.length===0?null:(e.sort((r,o)=>Math.abs(t-r)-Math.abs(t-o)),e[0])}function ec(t){let e=[];return t.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let s=parseInt(o[0]),a=parseInt(o[1]);for(let n=s;n<=a;n+=100)e.push(n)}else o.length===1&&e.push(parseInt(o[0]))}),e}function Fi(t){let e=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=t.trim(),o=s=>(s=s.trim(),s.match(e)?(s=s.replace(/^["']|["']$/g,""),`"${s}"`):s);return r.includes(",")?r.split(",").map(o).filter(s=>s!=="").join(", "):o(r)}function on(t){if(!t)return"";let e=t.trim();return e.includes(",")&&(e=(e.split(",").find(r=>r.trim()!=="")??"").trim()),e=e.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(e=`"${e}"`),e}function Br(t){let e={fontFamily:Fi(t.fontFamily)};if(!("fontFace"in t)||!Array.isArray(t.fontFace))return e.fontWeight="400",e.fontStyle="normal",e;if(t.fontFace){let r=t.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){e.fontStyle="normal";let o=ec(r),s=tc(400,o);e.fontWeight=String(s)||"400"}else e.fontStyle=t.fontFace.length&&t.fontFace[0].fontStyle||"normal",e.fontWeight=t.fontFace.length&&String(t.fontFace[0].fontWeight)||"400"}return e}function ki(t){return{fontFamily:Fi(t.fontFamily),fontStyle:t.fontStyle||"normal",fontWeight:t.fontWeight||"400"}}var lo=u(z(),1);function zo({fontSize:t,variation:e}){let{base:r}=(0,Oi.useContext)(Xt),o=r;e&&(o={...r,...e});let[s]=kt("color.text"),[a,n]=bi(o),l=a?Br(a):{},m=n?Br(n):{};return s&&(l.color=s,m.color=s),t&&(l.fontSize=t,m.fontSize=t),(0,lo.jsxs)(Ti.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,lo.jsx)("span",{style:m,children:(0,sn._x)("A","Uppercase letter A")}),(0,lo.jsx)("span",{style:l,children:(0,sn._x)("a","Lowercase letter A")})]})}var _i=u(X(),1);var Pi=u(z(),1);function Ai({normalizedColorSwatchSize:t,ratio:e}){let{highlightedColors:r}=Lr(),o=t*e;return r.map(({slug:s,color:a},n)=>(0,Pi.jsx)(_i.__unstableMotion.div,{style:{height:o,width:o,background:a,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:n===1?.2:.1}},`${s}-${n}`))}var Ii=u(X(),1),Dr=u(cr(),1),pr=u(yt(),1);var Qe=u(z(),1),Ri=248,Ei=152,rc={leading:!0,trailing:!0};function oc({children:t,label:e,isFocused:r,withHoverView:o}){let[s="white"]=kt("color.background"),[a]=kt("color.gradient"),n=(0,Dr.useReducedMotion)(),[l,m]=(0,pr.useState)(!1),[f,{width:c}]=(0,Dr.useResizeObserver)(),[d,g]=(0,pr.useState)(c),[h,v]=(0,pr.useState)(),_=(0,Dr.useThrottle)(g,250,rc);(0,pr.useLayoutEffect)(()=>{c&&_(c)},[c,_]),(0,pr.useLayoutEffect)(()=>{let b=d?d/Ri:1,T=b-(h||0);(Math.abs(T)>.1||!h)&&v(b)},[d,h]);let A=c?c/Ri:1,k=h||A;return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("div",{style:{position:"relative"},children:f}),!!c&&(0,Qe.jsx)("div",{className:"global-styles-ui-preview__wrapper",style:{height:Ei*k},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),tabIndex:-1,children:(0,Qe.jsx)(Ii.__unstableMotion.div,{style:{height:Ei*k,width:"100%",background:a??s,cursor:o?"pointer":void 0},initial:"start",animate:(l||r)&&!n&&e?"hover":"start",children:[].concat(t).map((b,T)=>b({ratio:k,key:T}))})})]})}var Vr=oc;var de=u(z(),1),sc={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},nc={hover:{opacity:1},start:{opacity:.5}},ac={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function ic({label:t,isFocused:e,withHoverView:r,variation:o}){let[s]=kt("typography.fontWeight"),[a="serif"]=kt("typography.fontFamily"),[n=a]=kt("elements.h1.typography.fontFamily"),[l=s]=kt("elements.h1.typography.fontWeight"),[m="black"]=kt("color.text"),[f=m]=kt("elements.h1.color.text"),{paletteColors:c}=Lr();return(0,de.jsxs)(Vr,{label:t,isFocused:e,withHoverView:r,children:[({ratio:d,key:g})=>(0,de.jsx)(Be.__unstableMotion.div,{variants:sc,style:{height:"100%",overflow:"hidden"},children:(0,de.jsxs)(Be.__experimentalHStack,{spacing:10*d,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,de.jsx)(zo,{fontSize:65*d,variation:o}),(0,de.jsx)(Be.__experimentalVStack,{spacing:4*d,children:(0,de.jsx)(Ai,{normalizedColorSwatchSize:32,ratio:d})})]})},g),({key:d})=>(0,de.jsx)(Be.__unstableMotion.div,{variants:r?nc:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,de.jsx)(Be.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:c.slice(0,4).map(({color:g},h)=>(0,de.jsx)("div",{style:{height:"100%",background:g,flexGrow:1}},h))})},d),({ratio:d,key:g})=>(0,de.jsx)(Be.__unstableMotion.div,{variants:ac,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,de.jsx)(Be.__experimentalVStack,{spacing:3*d,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*d,boxSizing:"border-box"},children:t&&(0,de.jsx)("div",{style:{fontSize:40*d,fontFamily:n,color:f,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:t})})},g)]})}var nn=ic;var Bi=u(z(),1);var ln=u(Rr(),1),Nr=u(ut(),1),gr=u(X(),1),un=u(fe(),1),$e=u(yt(),1),Mo=u(ce(),1),Mi=u(cr(),1);import{speak as mc}from"@wordpress/a11y";var Di=u(Rr(),1),Vi=u(fe(),1),fc=u(X(),1);var cc=u(z(),1);function dc(t,e){return t?.filter(r=>r.source==="block"||e.includes(r.name))||[]}function an(t){let e=(0,Vi.useSelect)(s=>{let{getBlockStyles:a}=s(Di.store);return a(t)},[t]),[r]=kt("variations",t),o=Object.keys(r??{});return dc(e,o)}var hr=u(X(),1),Ni=u(ut(),1);var zi=u(z(),1);var De=u(z(),1),{useHasDimensionsPanel:pc,useHasTypographyPanel:hc,useHasBorderPanel:gc,useSettingsForBlockElement:yc,useHasColorPanel:vc}=vt(Mo.privateApis);function bc(){let t=(0,un.useSelect)(s=>s(ln.store).getBlockTypes(),[]),e=(s,a)=>{let{core:n,noncore:l}=s;return(a.name.startsWith("core/")?n:l).push(a),s},{core:r,noncore:o}=t.reduce(e,{core:[],noncore:[]});return[...r,...o]}function wc(t){let[e]=_t("",t),r=yc(e,t),o=hc(r),s=vc(r),a=gc(r),n=pc(r),l=a||n,m=!!an(t)?.length;return o||s||l||m}function Sc({block:t}){return wc(t.name)?(0,De.jsx)(Le,{path:"/blocks/"+encodeURIComponent(t.name),children:(0,De.jsxs)(gr.__experimentalHStack,{justify:"flex-start",children:[(0,De.jsx)(Mo.BlockIcon,{icon:t.icon}),(0,De.jsx)(gr.FlexItem,{children:t.title})]})}):null}function xc({filterValue:t}){let e=bc(),r=(0,Mi.useDebounce)(mc,500),{isMatchingSearchTerm:o}=(0,un.useSelect)(ln.store),s=t?e.filter(n=>o(n,t)):e,a=(0,$e.useRef)(null);return(0,$e.useEffect)(()=>{if(!t)return;let n=a.current?.childElementCount||0,l=(0,Nr.sprintf)((0,Nr._n)("%d result found.","%d results found.",n),n);r(l,"polite")},[t,r]),(0,De.jsx)("div",{ref:a,className:"global-styles-ui-block-types-item-list",role:"list",children:s.length===0?(0,De.jsx)(gr.__experimentalText,{align:"center",as:"p",children:(0,Nr.__)("No blocks found.")}):s.map(n=>(0,De.jsx)(Sc,{block:n},"menu-itemblock-"+n.name))})}var o0=(0,$e.memo)(xc);var Tc=u(Rr(),1),Hi=u(ce(),1),Wi=u(yt(),1),_c=u(fe(),1),Pc=u(be(),1),fn=u(X(),1),Yi=u(ut(),1);var Cc=u(ce(),1),Gi=u(Rr(),1),Fc=u(X(),1),kc=u(yt(),1);var Oc=u(z(),1);var ji=u(X(),1),Ui=u(z(),1);function Se({children:t,level:e=2}){return(0,Ui.jsx)(ji.__experimentalHeading,{className:"global-styles-ui-subtitle",level:e,children:t})}var cn=u(z(),1);var{useHasDimensionsPanel:v0,useHasTypographyPanel:b0,useHasBorderPanel:w0,useSettingsForBlockElement:S0,useHasColorPanel:x0,useHasFiltersPanel:C0,useHasImageSettingsPanel:F0,useHasBackgroundPanel:k0,BackgroundPanel:O0,BorderPanel:T0,ColorPanel:_0,TypographyPanel:P0,DimensionsPanel:A0,FiltersPanel:R0,ImageSettingsPanel:E0,AdvancedPanel:I0}=vt(Hi.privateApis);var jh=u(ut(),1),Uh=u(X(),1),Hh=u(yt(),1);var Ac=u(X(),1);var Rc=u(z(),1);var Ec=u(ut(),1),Go=u(X(),1);var qi=u(z(),1);var Ho=u(X(),1);var Zi=u(X(),1);var jo=u(z(),1),Ic=({variation:t,isFocused:e,withHoverView:r})=>(0,jo.jsx)(Vr,{label:t.title,isFocused:e,withHoverView:r,children:({ratio:o,key:s})=>(0,jo.jsx)(Zi.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,jo.jsx)(zo,{variation:t,fontSize:85*o})},s)}),Xi=Ic;var Ji=u(X(),1),yr=u(yt(),1),Qi=u(dn(),1),Uo=u(ut(),1);var uo=u(z(),1);function zr({variation:t,children:e,isPill:r=!1,properties:o,showTooltip:s=!1}){let[a,n]=(0,yr.useState)(!1),{base:l,user:m,onChange:f}=(0,yr.useContext)(Xt),c=(0,yr.useMemo)(()=>{let A=dr(l,t);return o&&(A=Vo(A,o)),{user:t,base:l,merged:A,onChange:()=>{}}},[t,l,o]),d=()=>f(t),g=A=>{A.keyCode===Qi.ENTER&&(A.preventDefault(),d())},h=(0,yr.useMemo)(()=>oo(m,t),[m,t]),v=t?.title;t?.description&&(v=(0,Uo.sprintf)((0,Uo._x)("%1$s (%2$s)","variation label"),t?.title,t?.description));let _=(0,uo.jsx)("div",{className:ve("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:d,onKeyDown:g,tabIndex:0,"aria-label":v,"aria-current":h,onFocus:()=>n(!0),onBlur:()=>n(!1),children:(0,uo.jsx)("div",{className:ve("global-styles-ui-variations_item-preview",{"is-pill":r}),children:e(a)})});return(0,uo.jsx)(Xt.Provider,{value:c,children:s?(0,uo.jsx)(Ji.Tooltip,{text:t?.title,children:_}):_})}var vr=u(z(),1),$i=["typography"];function Wo({title:t,gap:e=2}){let r=No($i);return r?.length<=1?null:(0,vr.jsxs)(Ho.__experimentalVStack,{spacing:3,children:[t&&(0,vr.jsx)(Se,{level:3,children:t}),(0,vr.jsx)(Ho.__experimentalGrid,{columns:3,gap:e,className:"global-styles-ui-style-variations-container",children:r.map((o,s)=>(0,vr.jsx)(zr,{variation:o,properties:$i,showTooltip:!0,children:()=>(0,vr.jsx)(Xi,{variation:o})},s))})]})}var Mh=u(ut(),1),yo=u(X(),1);var Gh=u(yt(),1);var He=u(yt(),1),or=u(fe(),1),rr=u(be(),1),gn=u(ut(),1);var mn=u(el(),1),rl=u(be(),1),ol="/wp/v2/font-families";function sl(t){let{receiveEntityRecords:e}=t.dispatch(rl.store);e("postType","wp_font_family",[],void 0,!0)}async function nl(t,e){let o=await(0,mn.default)({path:ol,method:"POST",body:t});return sl(e),{id:o.id,...o.font_family_settings,fontFace:[]}}async function al(t,e,r){let o={path:`${ol}/${t}/font-faces`,method:"POST",body:e},s=await(0,mn.default)(o);return sl(r),{id:s.id,...s.font_face_settings}}var ul=u(X(),1);var ke=u(ut(),1),pn=["otf","ttf","woff","woff2"],il={100:(0,ke._x)("Thin","font weight"),200:(0,ke._x)("Extra-light","font weight"),300:(0,ke._x)("Light","font weight"),400:(0,ke._x)("Normal","font weight"),500:(0,ke._x)("Medium","font weight"),600:(0,ke._x)("Semi-bold","font weight"),700:(0,ke._x)("Bold","font weight"),800:(0,ke._x)("Extra-bold","font weight"),900:(0,ke._x)("Black","font weight")},ll={normal:(0,ke._x)("Normal","font style"),italic:(0,ke._x)("Italic","font style")};var{File:fl}=window,{kebabCase:Lc}=vt(ul.privateApis);function tr(t,e={}){return!t.name&&(t.fontFamily||t.slug)&&(t.name=t.fontFamily||t.slug),{...t,...e}}function Bc(t){return typeof t!="string"?!1:t!==decodeURIComponent(t)}function Yo(t){let e=il[t.fontWeight??""]||t.fontWeight,r=t.fontStyle==="normal"?"":ll[t.fontStyle??""]||t.fontStyle;return`${e} ${r}`}function Dc(t=[],e=[]){let r=new Map;for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function cl(t=[],e=[]){let r=new Map;for(let o of t)r.set(o.slug,{...o});for(let o of e)if(r.has(o.slug)){let{fontFace:s,...a}=o,n=r.get(o.slug),l=Dc(n.fontFace,s);r.set(o.slug,{...a,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function er(t,e,r="all"){let o;if(typeof e=="string")o=`url(${e})`;else if(e instanceof fl)o=await e.arrayBuffer();else return;let a=await new window.FontFace(on(t.fontFamily),o,{style:t.fontStyle,weight:String(t.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(a),r==="iframe"||r==="all"){let n=document.querySelector('iframe[name="editor-canvas"]');n?.contentDocument&&n.contentDocument.fonts.add(a)}}function fo(t,e="all"){let r=o=>{o.forEach(s=>{s.family===on(t?.fontFamily)&&s.weight===t?.fontWeight&&s.style===t?.fontStyle&&o.delete(s)})};if((e==="document"||e==="all")&&r(document.fonts),e==="iframe"||e==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function Mr(t){if(!t)return;let e;if(Array.isArray(t)?e=t[0]:e=t,!e.startsWith("file:."))return Bc(e)||(e=encodeURI(e)),e}function dl(t){let e=new FormData,{fontFace:r,category:o,...s}=t,a={...s,slug:Lc(t.slug)};return e.append("font_family_settings",JSON.stringify(a)),e}function ml(t){return(t?.fontFace??[]).map((r,o)=>{let s={...r},a=new FormData;if(s.file){let n=Array.isArray(s.file)?s.file:[s.file],l=[];n.forEach((m,f)=>{let c=`file-${o}-${f}`;a.append(c,m,m.name),l.push(c)}),s.src=l.length===1?l[0]:l,delete s.file,a.append("font_face_settings",JSON.stringify(s))}else a.append("font_face_settings",JSON.stringify(s));return a})}async function pl(t,e,r){let o=[];for(let a of e)try{let n=await al(t,a,r);o.push({status:"fulfilled",value:n})}catch(n){o.push({status:"rejected",reason:n})}let s={errors:[],successes:[]};return o.forEach((a,n)=>{if(a.status==="fulfilled"&&a.value){let l=a.value;s.successes.push(l)}else a.reason&&s.errors.push({data:e[n],message:a.reason.message})}),s}async function hl(t){t=Array.isArray(t)?t:[t];let e=await Promise.all(t.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let s=r.split("/").pop();return new fl([o],s,{type:o.type})})));return e.length===1?e[0]:e}function hn(t,e){return e.findIndex(r=>r.fontWeight===t.fontWeight&&r.fontStyle===t.fontStyle)!==-1}function gl(t,e,r){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let o=e.pop(),s=t;for(let a of e){let n=s[a];s=s[a]=Array.isArray(n)?[...n]:{...n}}return s[o]=r,t}function qo(t,e,r=[]){let o=m=>m.slug===t.slug,s=m=>m.find(o),a=m=>m?r.filter(f=>!o(f)):[...r,t],n=m=>{let f=d=>d.fontWeight===e.fontWeight&&d.fontStyle===e.fontStyle;if(!m)return[...r,{...t,fontFace:[e]}];let c=m.fontFace||[];return c.find(f)?c=c.filter(d=>!f(d)):c=[...c,e],c.length===0?r.filter(d=>!o(d)):r.map(d=>o(d)?{...d,fontFace:c}:d)},l=s(r);return e?n(l):a(l)}var yl=u(z(),1),ne=(0,He.createContext)({});ne.displayName="FontLibraryContext";function Vc({children:t}){let e=(0,or.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,or.useDispatch)(rr.store),{globalStylesId:s}=(0,or.useSelect)(S=>{let{__experimentalGetCurrentGlobalStylesId:E}=S(rr.store);return{globalStylesId:E()}},[]),a=(0,rr.useEntityRecord)("root","globalStyles",s),[n,l]=(0,He.useState)(!1),{records:m=[],isResolving:f}=(0,rr.useEntityRecords)("postType","wp_font_family",{_embed:!0}),c=(m||[]).map(S=>({id:S.id,...S.font_family_settings||{},fontFace:S?._embedded?.font_faces?.map(E=>E.font_face_settings)||[]}))||[],[d,g]=_t("typography.fontFamilies"),h=async S=>{if(!a.record)return;let E=a.record,et=gl(E??{},["settings","typography","fontFamilies"],S);await r("root","globalStyles",et)},[v,_]=(0,He.useState)(""),[A,k]=(0,He.useState)(void 0),x=d?.theme?d.theme.map(S=>tr(S,{source:"theme"})).sort((S,E)=>S.name.localeCompare(E.name)):[],b=d?.custom?d.custom.map(S=>tr(S,{source:"custom"})).sort((S,E)=>S.name.localeCompare(E.name)):[],T=c?c.map(S=>tr(S,{source:"custom"})).sort((S,E)=>S.name.localeCompare(E.name)):[];(0,He.useEffect)(()=>{v||k(void 0)},[v]);let Y=S=>{if(!S){k(void 0);return}let et=(S.source==="theme"?x:T).find(ct=>ct.slug===S.slug);k({...et||S,source:S.source})},[I]=(0,He.useState)(new Set),V=S=>S.reduce((et,ct)=>{let at=ct?.fontFace&&ct.fontFace?.length>0?ct?.fontFace.map(Ct=>`${Ct.fontStyle??""}${Ct.fontWeight??""}`):["normal400"];return et[ct.slug]=at,et},{}),H=S=>V(S==="theme"?x:b),$=(S,E,et,ct)=>!E&&!et?!!H(ct)[S]:!!H(ct)[S]?.includes((E??"")+(et??"")),bt=(S,E)=>H(E)[S]||[];async function W(S){l(!0);try{let E=[],et=[];for(let at of S){let Ct=!1,Wt=await(0,or.resolveSelect)(rr.store).getEntityRecords("postType","wp_font_family",{slug:at.slug,per_page:1,_embed:!0}),Ot=Wt&&Wt.length>0?Wt[0]:null,J=Ot?{id:Ot.id,...Ot.font_family_settings,fontFace:(Ot?._embedded?.font_faces??[]).map(zt=>zt.font_face_settings)||[]}:null;J||(Ct=!0,J=await nl(dl(at),e));let St=J.fontFace&&at.fontFace?J.fontFace.filter(zt=>zt&&at.fontFace&&hn(zt,at.fontFace)):[];J.fontFace&&at.fontFace&&(at.fontFace=at.fontFace.filter(zt=>!hn(zt,J.fontFace)));let At=[],xe=[];if(at?.fontFace?.length??!1){let zt=await pl(J.id,ml(at),e);At=zt?.successes,xe=zt?.errors}(At?.length>0||St?.length>0)&&(J.fontFace=[...At],E.push(J)),J&&!at?.fontFace?.length&&E.push(J),Ct&&(at?.fontFace?.length??0)>0&&At?.length===0&&await o("postType","wp_font_family",J.id,{force:!0}),et=et.concat(xe)}let ct=et.reduce((at,Ct)=>at.includes(Ct.message)?at:[...at,Ct.message],[]);if(E.length>0){let at=it(E);await h(at)}if(ct.length>0){let at=new Error((0,gn.__)("There was an error installing fonts."));throw at.installationErrors=ct,at}}finally{l(!1)}}async function y(S){if(!S?.id)throw new Error((0,gn.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",S.id,{force:!0});let E=L(S);return await h(E),{deleted:!0}}catch(E){throw console.error("There was an error uninstalling the font family:",E),E}}let L=S=>{let et=(d?.[S.source??""]??[]).filter(at=>at.slug!==S.slug),ct={...d,[S.source??""]:et};return g(ct),S.fontFace&&S.fontFace.forEach(at=>{fo(at,"all")}),ct},it=S=>{let E=ot(S),et={...d,custom:cl(d?.custom,E)};return g(et),K(E),et},ot=S=>S.map(({id:E,fontFace:et,...ct})=>({...ct,...et&&et.length>0?{fontFace:et.map(({id:at,...Ct})=>Ct)}:{}})),K=S=>{S.forEach(E=>{E.fontFace&&E.fontFace.forEach(et=>{let ct=Mr(et?.src??"");ct&&er(et,ct,"all")})})},gt=(S,E)=>{let et=d?.[S.source??""]??[],ct=qo(S,E,et);g({...d,[S.source??""]:ct});let at=$(S.slug,E?.fontStyle??"",E?.fontWeight??"",S.source??"custom");if(E&&at)fo(E,"all");else{let Ct=Mr(E?.src??"");E&&Ct&&er(E,Ct,"all")}},R=async S=>{if(!S.src)return;let E=Mr(S.src);!E||I.has(E)||(er(S,E,"document"),I.add(E))};return(0,yl.jsx)(ne.Provider,{value:{libraryFontSelected:A,handleSetLibraryFontSelected:Y,fontFamilies:d??{},baseCustomFonts:T,isFontActivated:$,getFontFacesActivated:bt,loadFontFaceAsset:R,installFonts:W,uninstallFontFamily:y,toggleActivateFont:gt,getAvailableFontsOutline:V,modalTabOpen:v,setModalTabOpen:_,saveFontFamilies:h,isResolvingLibrary:f,isInstalling:n},children:t})}var Zo=Vc;var us=u(ut(),1),Sn=u(X(),1),$l=u(be(),1),Nh=u(fe(),1);var ht=u(X(),1),mo=u(be(),1),yn=u(fe(),1),wr=u(yt(),1),Et=u(ut(),1);var jr=u(ut(),1),Oe=u(X(),1);var vl=u(X(),1),Ve=u(yt(),1);var Xo=u(z(),1);function Nc(t){if(t.preview)return t.preview;if(t.src)return Array.isArray(t.src)?t.src[0]:t.src}function zc(t){return"fontStyle"in t&&t.fontStyle||"fontWeight"in t&&t.fontWeight?t:"fontFace"in t&&t.fontFace&&t.fontFace.length?t.fontFace.find(e=>e.fontStyle==="normal"&&e.fontWeight==="400")||t.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:t.fontFamily}}function Mc({font:t,text:e}){let r=(0,Ve.useRef)(null),o=zc(t),s=Br(t);e=e||("name"in t?t.name:"");let a=t.preview,[n,l]=(0,Ve.useState)(!1),[m,f]=(0,Ve.useState)(!1),{loadFontFaceAsset:c}=(0,Ve.useContext)(ne),d=a??Nc(o),g=d&&d.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=ki(o),v={fontSize:"18px",lineHeight:1,opacity:m?"1":"0",...s,...h};return(0,Ve.useEffect)(()=>{let _=new window.IntersectionObserver(([A])=>{l(A.isIntersecting)},{});return r.current&&_.observe(r.current),()=>_.disconnect()},[r]),(0,Ve.useEffect)(()=>{(async()=>n&&(!g&&o.src&&await c(o),f(!0)))()},[o,n,c,g]),(0,Xo.jsx)("div",{ref:r,children:g?(0,Xo.jsx)("img",{src:d,loading:"lazy",alt:e,className:"font-library__font-variant_demo-image"}):(0,Xo.jsx)(vl.__experimentalText,{style:v,className:"font-library__font-variant_demo-text",children:e})})}var Gr=Mc;var Ne=u(z(),1);function Gc({font:t,onClick:e,variantsText:r,navigatorPath:o}){let s=t.fontFace?.length||1,a={cursor:e?"pointer":"default"},n=(0,Oe.useNavigator)();return(0,Ne.jsx)(Oe.Button,{__next40pxDefaultSize:!0,onClick:()=>{e(),o&&n.goTo(o)},style:a,className:"font-library__font-card",children:(0,Ne.jsxs)(Oe.Flex,{justify:"space-between",wrap:!1,children:[(0,Ne.jsx)(Gr,{font:t}),(0,Ne.jsxs)(Oe.Flex,{justify:"flex-end",children:[(0,Ne.jsx)(Oe.FlexItem,{children:(0,Ne.jsx)(Oe.__experimentalText,{className:"font-library__font-card__count",children:r||(0,jr.sprintf)((0,jr._n)("%d variant","%d variants",s),s)})}),(0,Ne.jsx)(Oe.FlexItem,{children:(0,Ne.jsx)(to,{icon:(0,jr.isRTL)()?ur:fr})})]})]})})}var co=Gc;var Ko=u(yt(),1),Jo=u(X(),1);var br=u(z(),1);function jc({face:t,font:e}){let{isFontActivated:r,toggleActivateFont:o}=(0,Ko.useContext)(ne),s=(e?.fontFace?.length??0)>0?r(e.slug,t.fontStyle,t.fontWeight,e.source):r(e.slug,void 0,void 0,e.source),a=()=>{if((e?.fontFace?.length??0)>0){o(e,t);return}o(e)},n=e.name+" "+Yo(t),l=(0,Ko.useId)();return(0,br.jsx)("div",{className:"font-library__font-card",children:(0,br.jsxs)(Jo.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,br.jsx)(Jo.CheckboxControl,{checked:s,onChange:a,id:l}),(0,br.jsx)("label",{htmlFor:l,children:(0,br.jsx)(Gr,{font:t,text:n,onClick:a})})]})})}var bl=jc;function wl(t){switch(t){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(t,10)}}function Qo(t){return t.sort((e,r)=>e.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&e.fontStyle!=="normal"?1:e.fontStyle===r.fontStyle?wl(e.fontWeight?.toString()??"normal")-wl(r.fontWeight?.toString()??"normal"):!e.fontStyle||!r.fontStyle?e.fontStyle?-1:1:e.fontStyle.localeCompare(r.fontStyle))}var ft=u(z(),1);function Uc(){let{baseCustomFonts:t,libraryFontSelected:e,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:s,isInstalling:a,saveFontFamilies:n,getFontFacesActivated:l}=(0,wr.useContext)(ne),[m,f]=_t("typography.fontFamilies"),[c,d]=(0,wr.useState)(!1),[g,h]=(0,wr.useState)(null),[v]=_t("typography.fontFamilies",void 0,"base"),_=(0,yn.useSelect)(R=>{let{__experimentalGetCurrentGlobalStylesId:S}=R(mo.store);return S()},[]),k=!!(0,mo.useEntityRecord)("root","globalStyles",_)?.edits?.settings?.typography?.fontFamilies,x=m?.theme?m.theme.map(R=>tr(R,{source:"theme"})).sort((R,S)=>R.name.localeCompare(S.name)):[],b=new Set(x.map(R=>R.slug)),T=v?.theme?x.concat(v.theme.filter(R=>!b.has(R.slug)).map(R=>tr(R,{source:"theme"})).sort((R,S)=>R.name.localeCompare(S.name))):[],Y=e?.source==="custom"&&e?.id,I=(0,yn.useSelect)(R=>{let{canUser:S}=R(mo.store);return Y&&S("delete",{kind:"postType",name:"wp_font_family",id:Y})},[Y]),V=!!e&&e?.source!=="theme"&&I,H=()=>{d(!0)},$=async()=>{h(null);try{await n(m),h({type:"success",message:(0,Et.__)("Font family updated successfully.")})}catch(R){h({type:"error",message:(0,Et.sprintf)((0,Et.__)("There was an error updating the font family. %s"),R.message)})}},bt=R=>R?!R.fontFace||!R.fontFace.length?[{fontFamily:R.fontFamily,fontStyle:"normal",fontWeight:"400"}]:Qo(R.fontFace):[],W=R=>{let S=R?.fontFace&&(R?.fontFace?.length??0)>0?R.fontFace.length:1,E=l(R.slug,R.source).length;return(0,Et.sprintf)((0,Et.__)("%1$d/%2$d variants active"),E,S)};(0,wr.useEffect)(()=>{r(e)},[]);let y=e?l(e.slug,e.source).length:0,L=e?.fontFace?.length??(e?.fontFamily?1:0),it=y>0&&y!==L,ot=y===L,K=()=>{if(!e||!e?.source)return;let R=m?.[e.source]?.filter(E=>E.slug!==e.slug)??[],S=ot?R:[...R,e];f({...m,[e.source]:S}),e.fontFace&&e.fontFace.forEach(E=>{if(ot)fo(E,"all");else{let et=Mr(E?.src??"");et&&er(E,et,"all")}})},gt=T.length>0||t.length>0;return(0,ft.jsxs)("div",{className:"font-library__tabpanel-layout",children:[s&&(0,ft.jsx)("div",{className:"font-library__loading",children:(0,ft.jsx)(ht.ProgressBar,{})}),!s&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsxs)(ht.Navigator,{initialPath:e?"/fontFamily":"/",children:[(0,ft.jsx)(ht.Navigator.Screen,{path:"/",children:(0,ft.jsxs)(ht.__experimentalVStack,{spacing:"8",children:[g&&(0,ft.jsx)(ht.Notice,{status:g.type,onRemove:()=>h(null),children:g.message}),!gt&&(0,ft.jsx)(ht.__experimentalText,{as:"p",children:(0,Et.__)("No fonts installed.")}),T.length>0&&(0,ft.jsxs)(ht.__experimentalVStack,{children:[(0,ft.jsx)("h2",{className:"font-library__fonts-title",children:(0,Et._x)("Theme","font source")}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:T.map(R=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(co,{font:R,navigatorPath:"/fontFamily",variantsText:W(R),onClick:()=>{h(null),r(R)}})},R.slug))})]}),t.length>0&&(0,ft.jsxs)(ht.__experimentalVStack,{children:[(0,ft.jsx)("h2",{className:"font-library__fonts-title",children:(0,Et._x)("Custom","font source")}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t.map(R=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(co,{font:R,navigatorPath:"/fontFamily",variantsText:W(R),onClick:()=>{h(null),r(R)}})},R.slug))})]})]})}),(0,ft.jsxs)(ht.Navigator.Screen,{path:"/fontFamily",children:[e&&(0,ft.jsx)(Hc,{font:e,isOpen:c,setIsOpen:d,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,ft.jsxs)(ht.Flex,{justify:"flex-start",children:[(0,ft.jsx)(ht.Navigator.BackButton,{icon:(0,Et.isRTL)()?fr:ur,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,Et.__)("Back")}),(0,ft.jsx)(ht.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:e?.name})]}),g&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)(ht.__experimentalSpacer,{margin:1}),(0,ft.jsx)(ht.Notice,{status:g.type,onRemove:()=>h(null),children:g.message}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:1})]}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:4}),(0,ft.jsx)(ht.__experimentalText,{children:(0,Et.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:4}),(0,ft.jsxs)(ht.__experimentalVStack,{spacing:0,children:[(0,ft.jsx)(ht.CheckboxControl,{className:"font-library__select-all",label:(0,Et.__)("Select all"),checked:ot,onChange:K,indeterminate:it}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:8}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e&&bt(e).map((R,S)=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(bl,{font:e,face:R},`face${S}`)},`face${S}`))})]})]})]}),(0,ft.jsxs)(ht.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[a&&(0,ft.jsx)(ht.ProgressBar,{}),V&&(0,ft.jsx)(ht.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:H,children:(0,Et.__)("Delete")}),(0,ft.jsx)(ht.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:$,disabled:!k,accessibleWhenDisabled:!0,children:(0,Et.__)("Update")})]})]})]})}function Hc({font:t,isOpen:e,setIsOpen:r,setNotice:o,uninstallFontFamily:s,handleSetLibraryFontSelected:a}){let n=(0,ht.useNavigator)(),l=async()=>{o(null),r(!1);try{await s(t),n.goBack(),a(void 0),o({type:"success",message:(0,Et.__)("Font family uninstalled successfully.")})}catch(f){o({type:"error",message:(0,Et.__)("There was an error uninstalling the font family.")+f.message})}},m=()=>{r(!1)};return(0,ft.jsx)(ht.__experimentalConfirmDialog,{isOpen:e,cancelButtonText:(0,Et.__)("Cancel"),confirmButtonText:(0,Et.__)("Delete"),onCancel:m,onConfirm:l,size:"medium",children:t&&(0,Et.sprintf)((0,Et.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),t.name)})}var $o=Uc;var Zt=u(yt(),1),nt=u(X(),1),_l=u(cr(),1),Rt=u(ut(),1);var Pl=u(be(),1);function Sl(t,e){let{category:r,search:o}=e,s=t||[];return r&&r!=="all"&&(s=s.filter(a=>a.categories&&a.categories.indexOf(r)!==-1)),o&&(s=s.filter(a=>a.font_family_settings&&a.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),s}function xl(t){return t.reduce((e,r)=>({...e,[r.slug]:(r?.fontFace||[]).reduce((o,s)=>({...o,[`${s.fontStyle}-${s.fontWeight}`]:!0}),{})}),{})}function Cl(t,e,r){return e?!!r[t]?.[`${e.fontStyle}-${e.fontWeight}`]:!!r[t]}var po=u(ut(),1),ae=u(X(),1),Te=u(z(),1);function Wc(){let t=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Te.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Te.jsx)(ae.Card,{children:(0,Te.jsxs)(ae.CardBody,{children:[(0,Te.jsx)(ae.__experimentalHeading,{level:2,children:(0,po.__)("Connect to Google Fonts")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:6}),(0,Te.jsx)(ae.__experimentalText,{as:"p",children:(0,po.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:3}),(0,Te.jsx)(ae.__experimentalText,{as:"p",children:(0,po.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:6}),(0,Te.jsx)(ae.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,po.__)("Allow access to Google Fonts")})]})})})}var Fl=Wc;var kl=u(yt(),1),ts=u(X(),1);var Sr=u(z(),1);function Yc({face:t,font:e,handleToggleVariant:r,selected:o}){let s=()=>{if(e?.fontFace){r(e,t);return}r(e)},a=e.name+" "+Yo(t),n=(0,kl.useId)();return(0,Sr.jsx)("div",{className:"font-library__font-card",children:(0,Sr.jsxs)(ts.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Sr.jsx)(ts.CheckboxControl,{checked:o,onChange:s,id:n}),(0,Sr.jsx)("label",{htmlFor:n,children:(0,Sr.jsx)(Gr,{font:t,text:a,onClick:s})})]})})}var Ol=Yc;var tt=u(z(),1),qc={slug:"all",name:(0,Rt._x)("All","font categories")},Tl="wp-font-library-google-fonts-permission",Zc=500;function Xc({slug:t}){let e=t==="google-fonts",r=()=>window.localStorage.getItem(Tl)==="true",[o,s]=(0,Zt.useState)(null),[a,n]=(0,Zt.useState)(null),[l,m]=(0,Zt.useState)([]),[f,c]=(0,Zt.useState)(1),[d,g]=(0,Zt.useState)({}),[h,v]=(0,Zt.useState)(e&&!r()),{installFonts:_,isInstalling:A}=(0,Zt.useContext)(ne),{record:k,isResolving:x}=(0,Pl.useEntityRecord)("root","fontCollection",t);(0,Zt.useEffect)(()=>{let J=()=>{v(e&&!r())};return J(),window.addEventListener("storage",J),()=>window.removeEventListener("storage",J)},[t,e]);let b=()=>{window.localStorage.setItem(Tl,"false"),window.dispatchEvent(new Event("storage"))};(0,Zt.useEffect)(()=>{s(null)},[t]),(0,Zt.useEffect)(()=>{m([])},[o]);let T=(0,Zt.useMemo)(()=>k?.font_families??[],[k]),Y=k?.categories??[],I=[qc,...Y],V=(0,Zt.useMemo)(()=>Sl(T,d),[T,d]),H=Math.max(window.innerHeight,Zc),$=Math.floor((H-417)/61),bt=Math.ceil(V.length/$),W=(f-1)*$,y=f*$,L=V.slice(W,y),it=J=>{g({...d,category:J}),c(1)},K=(0,_l.debounce)(J=>{g({...d,search:J}),c(1)},300),gt=(J,St)=>{let At=qo(J,St,l);m(At)},R=xl(l),S=()=>{m([])},E=l.length>0?l[0]?.fontFace?.length??0:0,et=E>0&&E!==o?.fontFace?.length,ct=E===o?.fontFace?.length,at=()=>{let J=[];!ct&&o&&J.push(o),m(J)},Ct=async()=>{n(null);let J=l[0];try{J?.fontFace&&await Promise.all(J.fontFace.map(async St=>{St.src&&(St.file=await hl(St.src))}))}catch{n({type:"error",message:(0,Rt.__)("Error installing the fonts, could not be downloaded.")});return}try{await _([J]),n({type:"success",message:(0,Rt.__)("Fonts were installed successfully.")})}catch(St){n({type:"error",message:St.message})}S()},Wt=J=>J?!J.fontFace||!J.fontFace.length?[{fontFamily:J.fontFamily,fontStyle:"normal",fontWeight:"400"}]:Qo(J.fontFace):[];if(h)return(0,tt.jsx)(Fl,{});let Ot=()=>t!=="google-fonts"||h||o?null:(0,tt.jsx)(nt.DropdownMenu,{icon:Ls,label:(0,Rt.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Rt.__)("Revoke access to Google Fonts"),onClick:b}]});return(0,tt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[x&&(0,tt.jsx)("div",{className:"font-library__loading",children:(0,tt.jsx)(nt.ProgressBar,{})}),!x&&k&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)(nt.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,tt.jsxs)(nt.Navigator.Screen,{path:"/",children:[(0,tt.jsxs)(nt.__experimentalHStack,{justify:"space-between",children:[(0,tt.jsxs)(nt.__experimentalVStack,{children:[(0,tt.jsx)(nt.__experimentalHeading,{level:2,size:13,children:k.name}),(0,tt.jsx)(nt.__experimentalText,{children:k.description})]}),(0,tt.jsx)(Ot,{})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsxs)(nt.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,tt.jsx)(nt.SearchControl,{value:d.search,placeholder:(0,Rt.__)("Font name\u2026"),label:(0,Rt.__)("Search"),onChange:K,hideLabelFromVision:!1}),(0,tt.jsx)(nt.SelectControl,{__next40pxDefaultSize:!0,label:(0,Rt.__)("Category"),value:d.category,onChange:it,children:I&&I.map(J=>(0,tt.jsx)("option",{value:J.slug,children:J.name},J.slug))})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),!!k?.font_families?.length&&!V.length&&(0,tt.jsx)(nt.__experimentalText,{children:(0,Rt.__)("No fonts found. Try with a different search term.")}),(0,tt.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:L.map(J=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(co,{font:J.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{s(J.font_family_settings)}})},J.font_family_settings.slug))})})]}),(0,tt.jsxs)(nt.Navigator.Screen,{path:"/fontFamily",children:[(0,tt.jsxs)(nt.Flex,{justify:"flex-start",children:[(0,tt.jsx)(nt.Navigator.BackButton,{icon:(0,Rt.isRTL)()?fr:ur,size:"small",onClick:()=>{s(null),n(null)},label:(0,Rt.__)("Back")}),(0,tt.jsx)(nt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),a&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(nt.__experimentalSpacer,{margin:1}),(0,tt.jsx)(nt.Notice,{status:a.type,onRemove:()=>n(null),children:a.message}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:1})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsx)(nt.__experimentalText,{children:(0,Rt.__)("Select font variants to install.")}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsx)(nt.CheckboxControl,{className:"font-library__select-all",label:(0,Rt.__)("Select all"),checked:ct,onChange:at,indeterminate:et}),(0,tt.jsx)(nt.__experimentalVStack,{spacing:0,children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&Wt(o).map((J,St)=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(Ol,{font:o,face:J,handleToggleVariant:gt,selected:Cl(o.slug,o.fontFace?J:null,R)})},`face${St}`))})}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:16})]})]}),o&&(0,tt.jsx)(nt.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,tt.jsx)(nt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:Ct,isBusy:A,disabled:l.length===0||A,accessibleWhenDisabled:!0,children:(0,Rt.__)("Install")})}),!o&&(0,tt.jsxs)(nt.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,tt.jsx)(nt.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,Zt.createInterpolateElement)((0,Rt.sprintf)((0,Rt._x)("
Page
%1$s
of %2$d
","paging"),"",bt),{div:(0,tt.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,tt.jsx)(nt.SelectControl,{"aria-label":(0,Rt.__)("Current page"),value:f.toString(),options:[...Array(bt)].map((J,St)=>({label:(St+1).toString(),value:(St+1).toString()})),onChange:J=>c(parseInt(J)),size:"small",variant:"minimal"})})}),(0,tt.jsxs)(nt.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tt.jsx)(nt.Button,{onClick:()=>c(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Rt.__)("Previous page"),icon:(0,Rt.isRTL)()?Eo:Lo,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,tt.jsx)(nt.Button,{onClick:()=>c(f+1),disabled:f===bt,accessibleWhenDisabled:!0,label:(0,Rt.__)("Next page"),icon:(0,Rt.isRTL)()?Lo:Eo,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var es=Xc;var Ur=u(ut(),1),$t=u(X(),1),go=u(yt(),1);var rs=(t=>typeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Al=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof rs=="function"&&rs;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof rs=="function"&&rs,f=0;f0},c.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var d=this.buf_ptr_,g=this.input_.read(this.buf_,d,n);if(g<0)throw new Error("Unexpected end of input");if(g=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&m]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},c.prototype.readBits=function(d){32-this.bit_pos_>>this.bit_pos_&f[d];return this.bit_pos_+=d,g},s.exports=c},{}],2:[function(o,s,a){var n=0,l=1,m=2,f=3;a.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2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,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,s,a){var n=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,m=o("./bit_reader"),f=o("./dictionary"),c=o("./huffman").HuffmanCode,d=o("./huffman").BrotliBuildHuffmanTable,g=o("./context"),h=o("./prefix"),v=o("./transform"),_=8,A=16,k=256,x=704,b=26,T=6,Y=2,I=8,V=255,H=1080,$=18,bt=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),W=16,y=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),L=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),it=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function ot(N){var O;return N.readBits(1)===0?16:(O=N.readBits(3),O>0?17+O:(O=N.readBits(3),O>0?8+O:17))}function K(N){if(N.readBits(1)){var O=N.readBits(3);return O===0?1:N.readBits(O)+(1<1&&dt===0)throw new Error("Invalid size byte");O.meta_block_length|=dt<4&&rt===0)throw new Error("Invalid size nibble");O.meta_block_length|=rt<>>B.bit_pos_&V,D=N[O].bits-I,D>0&&(B.bit_pos_+=I,O+=N[O].value,O+=B.val_>>>B.bit_pos_&(1<0;){var Ft=0,Kt;if(P.readMoreInput(),P.fillBitWindow(),Ft+=P.val_>>>P.bit_pos_&31,P.bit_pos_+=lt[Ft].bits,Kt=lt[Ft].value&255,Kt>Kt);else{var he=Kt-14,te,Jt,Dt=0;if(Kt===A&&(Dt=dt),st!==Dt&&(rt=0,st=Dt),te=rt,rt>0&&(rt-=2,rt<<=he),rt+=P.readBits(he)+3,Jt=rt-te,D+Jt>O)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Qt=0;Qt0;++st){var Dt=bt[st],Qt=0,ee;P.fillBitWindow(),Qt+=P.val_>>>P.bit_pos_&15,P.bit_pos_+=Jt[Qt].bits,ee=Jt[Qt].value,Kt[Dt]=ee,ee!==0&&(he-=32>>ee,++te)}if(!(te===1||he===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");E(Kt,N,rt,P)}if(D=d(O,B,I,rt,N),D===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return D}function ct(N,O,B){var P,D;return P=S(N,O,B),D=h.kBlockLengthPrefixCode[P].nbits,h.kBlockLengthPrefixCode[P].offset+B.readBits(D)}function at(N,O,B){var P;return N>>5]),this.htrees=new Uint32Array(O)}Ot.prototype.decode=function(N){var O,B,P=0;for(O=0;O=N)throw new Error("[DecodeContextMap] i >= context_map_size");wt[rt]=0,++rt}else wt[rt]=lt-D,++rt}return O.readBits(1)&&Wt(wt,N),B}function St(N,O,B,P,D,dt,rt){var st=B*2,wt=B,lt=S(O,B*H,rt),q;lt===0?q=D[st+(dt[wt]&1)]:lt===1?q=D[st+(dt[wt]-1&1)]+1:q=lt-2,q>=N&&(q-=N),P[B]=q,D[st+(dt[wt]&1)]=q,++dt[wt]}function At(N,O,B,P,D,dt){var rt=D+1,st=B&D,wt=dt.pos_&m.IBUF_MASK,lt;if(O<8||dt.bit_pos_+(O<<3)0;)dt.readMoreInput(),P[st++]=dt.readBits(8),st===rt&&(N.write(P,rt),st=0);return}if(dt.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;dt.bit_pos_<32;)P[st]=dt.val_>>>dt.bit_pos_,dt.bit_pos_+=8,++st,--O;if(lt=dt.bit_end_pos_-dt.bit_pos_>>3,wt+lt>m.IBUF_MASK){for(var q=m.IBUF_MASK+1-wt,Ft=0;Ft=rt){N.write(P,rt),st-=rt;for(var Ft=0;Ft=rt;){if(lt=rt-st,dt.input_.read(P,st,lt)O.buffer.length){var lr=new Uint8Array(P+Mt);lr.set(O.buffer),O.buffer=lr}if(D=Me.input_end,Co=Me.is_uncompressed,Me.is_metadata){for(xe(pt);Mt>0;--Mt)pt.readMoreInput(),pt.readBits(8);continue}if(Mt!==0){if(Co){pt.bit_pos_=pt.bit_pos_+7&-8,At(O,Mt,P,q,lt,pt),P+=Mt;continue}for(B=0;B<3;++B)ge[B]=K(pt)+1,ge[B]>=2&&(et(ge[B]+2,Qt,B*H,pt),et(b,ee,B*H,pt),Ce[B]=ct(ee,B*H,pt),M[B]=1);for(pt.readMoreInput(),i=pt.readBits(2),U=W+(pt.readBits(4)<0;){var Nt,se,ie,Or,Ss,le,ye,Ge,Zr,Tr,Xr;for(pt.readMoreInput(),Ce[1]===0&&(St(ge[1],Qt,1,Ae,w,M,pt),Ce[1]=ct(ee,H,pt),Yt=Dt[1].htrees[Ae[1]]),--Ce[1],Nt=S(Dt[1].codes,Yt,pt),se=Nt>>6,se>=2?(se-=2,ye=-1):ye=0,ie=h.kInsertRangeLut[se]+(Nt>>3&7),Or=h.kCopyRangeLut[se]+(Nt&7),Ss=h.kInsertLengthPrefixCode[ie].offset+pt.readBits(h.kInsertLengthPrefixCode[ie].nbits),le=h.kCopyLengthPrefixCode[Or].offset+pt.readBits(h.kCopyLengthPrefixCode[Or].nbits),te=q[P-1<],Jt=q[P-2<],Tr=0;Tr4?3:le-2)&255,It=F[ir+Zr],ye=S(Dt[2].codes,Dt[2].htrees[It],pt),ye>=U){var xs,Qn,Kr;ye-=U,Qn=ye&Pt,ye>>=i,xs=(ye>>1)+1,Kr=(2+(ye&1)<st)if(le>=f.minDictionaryWordLength&&le<=f.maxDictionaryWordLength){var Kr=f.offsetsByLength[le],$n=Ge-st-1,ta=f.sizeBitsByLength[le],qu=(1<>ta;if(Kr+=Zu*le,ea=Ft){O.write(q,wt);for(var Fo=0;Fo0&&(Kt[he&3]=Ge,++he),le>Mt)throw new Error("Invalid backward reference. pos: "+P+" distance: "+Ge+" len: "+le+" bytes left: "+Mt);for(Tr=0;Tr>=1;return(d&h-1)+h}function f(d,g,h,v,_){do v-=h,d[g+v]=new n(_.bits,_.value);while(v>0)}function c(d,g,h){for(var v=1<0;--y[x])k=new n(x&255,W[b++]&65535),f(d,g+T,Y,$,k),T=m(T,x);for(V=bt-1,I=-1,x=h+1,Y=2;x<=l;++x,Y<<=1)for(;y[x]>0;--y[x])(T&V)!==I&&(g+=$,H=c(y,x,h),$=1<>h),Y,$,k),T=m(T,x);return bt}},{}],8:[function(o,s,a){"use strict";a.byteLength=h,a.toByteArray=_,a.fromByteArray=x;for(var n=[],l=[],m=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,d=f.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var Y=b.indexOf("=");Y===-1&&(Y=T);var I=Y===T?0:4-Y%4;return[Y,I]}function h(b){var T=g(b),Y=T[0],I=T[1];return(Y+I)*3/4-I}function v(b,T,Y){return(T+Y)*3/4-Y}function _(b){for(var T,Y=g(b),I=Y[0],V=Y[1],H=new m(v(b,I,V)),$=0,bt=V>0?I-4:I,W=0;W>16&255,H[$++]=T>>8&255,H[$++]=T&255;return V===2&&(T=l[b.charCodeAt(W)]<<2|l[b.charCodeAt(W+1)]>>4,H[$++]=T&255),V===1&&(T=l[b.charCodeAt(W)]<<10|l[b.charCodeAt(W+1)]<<4|l[b.charCodeAt(W+2)]>>2,H[$++]=T>>8&255,H[$++]=T&255),H}function A(b){return n[b>>18&63]+n[b>>12&63]+n[b>>6&63]+n[b&63]}function k(b,T,Y){for(var I,V=[],H=T;Hbt?bt:$+H));return I===1?(T=b[Y-1],V.push(n[T>>2]+n[T<<4&63]+"==")):I===2&&(T=(b[Y-2]<<8)+b[Y-1],V.push(n[T>>10]+n[T>>4&63]+n[T<<2&63]+"=")),V.join("")}},{}],9:[function(o,s,a){function n(l,m){this.offset=l,this.nbits=m}a.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],a.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],a.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],a.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],a.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,s,a){function n(m){this.buffer=m,this.pos=0}n.prototype.read=function(m,f,c){this.pos+c>this.buffer.length&&(c=this.buffer.length-this.pos);for(var d=0;dthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(m.subarray(0,f),this.pos),this.pos+=f,f},a.BrotliOutput=l},{}],11:[function(o,s,a){var n=o("./dictionary"),l=0,m=1,f=2,c=3,d=4,g=5,h=6,v=7,_=8,A=9,k=10,x=11,b=12,T=13,Y=14,I=15,V=16,H=17,$=18,bt=19,W=20;function y(ot,K,gt){this.prefix=new Uint8Array(ot.length),this.transform=K,this.suffix=new Uint8Array(gt.length);for(var R=0;R'),new y("",l,` +var Xu=Object.create;var ra=Object.defineProperty;var Ku=Object.getOwnPropertyDescriptor;var Ju=Object.getOwnPropertyNames;var Qu=Object.getPrototypeOf,$u=Object.prototype.hasOwnProperty;var ue=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var tf=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ju(e))!$u.call(t,s)&&s!==r&&ra(t,s,{get:()=>e[s],enumerable:!(o=Ku(e,s))||o.enumerable});return t};var u=(t,e,r)=>(r=t!=null?Xu(Qu(t)):{},tf(e||!t||!t.__esModule?ra(r,"default",{value:t,enumerable:!0}):r,t));var ut=Ht((Jg,oa)=>{oa.exports=window.wp.i18n});var X=Ht((Qg,sa)=>{sa.exports=window.wp.components});var z=Ht(($g,na)=>{na.exports=window.ReactJSXRuntime});var yt=Ht((ey,ia)=>{ia.exports=window.wp.element});var _r=Ht((sy,da)=>{da.exports=window.React});var Pr=Ht((Iy,_a)=>{_a.exports=window.wp.primitives});var Vs=Ht((Xy,Pa)=>{Pa.exports=window.wp.privateApis});var cr=Ht((Ky,Aa)=>{Aa.exports=window.wp.compose});var Na=Ht((dv,Va)=>{Va.exports=window.wp.editor});var be=Ht((mv,za)=>{za.exports=window.wp.coreData});var fe=Ht((pv,Ma)=>{Ma.exports=window.wp.data});var Rr=Ht((hv,Ga)=>{Ga.exports=window.wp.blocks});var ce=Ht((gv,ja)=>{ja.exports=window.wp.blockEditor});var Ha=Ht((xv,Ua)=>{Ua.exports=window.wp.styleEngine});var Xa=Ht((Lv,Za)=>{"use strict";Za.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,s,a;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(o=e.length,o!=r.length)return!1;for(s=o;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),o=a.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=o;s--!==0;){var n=a[s];if(!t(e[n],r[n]))return!1}return!0}return e!==e&&r!==r}});var $a=Ht((Dv,Qa)=>{"use strict";var Pf=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Lf(t)}var Ef=typeof Symbol=="function"&&Symbol.for,If=Ef?Symbol.for("react.element"):60103;function Lf(t){return t.$$typeof===If}function Bf(t){return Array.isArray(t)?[]:{}}function so(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Ir(Bf(t),t,e):t}function Df(t,e,r){return t.concat(e).map(function(o){return so(o,r)})}function Vf(t,e){if(!e.customMerge)return Ir;var r=e.customMerge(t);return typeof r=="function"?r:Ir}function Nf(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Ka(t){return Object.keys(t).concat(Nf(t))}function Ja(t,e){try{return e in t}catch{return!1}}function zf(t,e){return Ja(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Mf(t,e,r){var o={};return r.isMergeableObject(t)&&Ka(t).forEach(function(s){o[s]=so(t[s],r)}),Ka(e).forEach(function(s){zf(t,s)||(Ja(t,s)&&r.isMergeableObject(e[s])?o[s]=Vf(s,r)(t[s],e[s],r):o[s]=so(e[s],r))}),o}function Ir(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||Df,r.isMergeableObject=r.isMergeableObject||Pf,r.cloneUnlessOtherwiseSpecified=so;var o=Array.isArray(e),s=Array.isArray(t),a=o===s;return a?o?r.arrayMerge(t,e,r):Mf(t,e,r):so(e,r)}Ir.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,s){return Ir(o,s,r)},{})};var Gf=Ir;Qa.exports=Gf});var dn=Ht((H0,Ki)=>{Ki.exports=window.wp.keycodes});var el=Ht((eb,tl)=>{tl.exports=window.wp.apiFetch});var _u=Ht((FF,Tu)=>{Tu.exports=window.wp.date});function aa(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e(0,ua.jsx)(o,{ref:a,className:ve("admin-ui-navigable-region",e),"aria-label":r,role:"region",tabIndex:"-1",...s,children:t}));fa.displayName="NavigableRegion";var ca=fa;var pa=u(_r(),1),ma={};function Fs(t,e){let r=pa.useRef(ma);return r.current===ma&&(r.current=t(e)),r}function ks(t,...e){let r=new URL(`https://base-ui.com/production-error/${t}`);return e.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${t}; visit ${r} for the full message.`}var Oo=u(_r(),1);function Os(t,e,r,o){let s=Fs(ga).current;return rf(s,t,e,r,o)&&ya(s,[t,e,r,o]),s.callback}function ha(t){let e=Fs(ga).current;return of(e,t)&&ya(e,t),e.callback}function ga(){return{callback:null,cleanup:null,refs:[]}}function rf(t,e,r,o,s){return t.refs[0]!==e||t.refs[1]!==r||t.refs[2]!==o||t.refs[3]!==s}function of(t,e){return t.refs.length!==e.length||t.refs.some((r,o)=>r!==e[o])}function ya(t,e){if(t.refs=e,e.every(r=>r==null)){t.callback=null;return}t.callback=r=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),r!=null){let o=Array(e.length).fill(null);for(let s=0;s{for(let s=0;s=t}function Ts(t){if(!wa.isValidElement(t))return null;let e=t,r=e.props;return(ba(19)?r?.ref:e.ref)??null}function Jr(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function Sa(t,e){let r={};for(let o in t){let s=t[o];if(e?.hasOwnProperty(o)){let a=e[o](s);a!=null&&Object.assign(r,a);continue}s===!0?r[`data-${o.toLowerCase()}`]="":s&&(r[`data-${o.toLowerCase()}`]=s.toString())}return r}function xa(t,e){return typeof t=="function"?t(e):t}function Ca(t,e){return typeof t=="function"?t(e):t}var $r={};function ko(t,e,r,o,s){let a={..._s(t,$r)};return e&&(a=Qr(a,e)),r&&(a=Qr(a,r)),o&&(a=Qr(a,o)),s&&(a=Qr(a,s)),a}function Fa(t){if(t.length===0)return $r;if(t.length===1)return _s(t[0],$r);let e={..._s(t[0],$r)};for(let r=1;r=65&&s<=90&&(typeof e=="function"||typeof e>"u")}function ka(t){return typeof t=="function"}function _s(t,e){return ka(t)?t(e):t??$r}function lf(t,e){return e?t?r=>{if(ff(r)){let s=r;uf(s);let a=e(s);return s.baseUIHandlerPrevented||t?.(s),a}let o=e(r);return t?.(r),o}:e:t}function uf(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function Ps(t,e){return e?t?e+" "+t:e:t}function ff(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}var cf=Object.freeze([]),Ke=Object.freeze({});var As=u(_r(),1);function Oa(t,e,r={}){let o=e.render,s=df(e,r);if(r.enabled===!1)return null;let a=r.state??Ke;return mf(t,o,s,a)}function df(t,e={}){let{className:r,style:o,render:s}=t,{state:a=Ke,ref:n,props:l,stateAttributesMapping:m,enabled:f=!0}=e,c=f?xa(r,a):void 0,d=f?Ca(o,a):void 0,g=f?Sa(a,m):Ke,h=f?Jr(g,Array.isArray(l)?Fa(l):l)??Ke:Ke;return typeof document<"u"&&(f?Array.isArray(n)?h.ref=ha([h.ref,Ts(s),...n]):h.ref=Os(h.ref,Ts(s),n):Os(null,null)),f?(c!==void 0&&(h.className=Ps(h.className,c)),d!==void 0&&(h.style=Jr(h.style,d)),h):Ke}function mf(t,e,r,o){if(e){if(typeof e=="function")return e(r,o);let s=ko(r,e.props);return s.ref=r.ref,Oo.cloneElement(e,s)}if(t&&typeof t=="string")return pf(t,r);throw new Error(ks(8))}function pf(t,e){return t==="button"?(0,As.createElement)("button",{type:"button",...e,key:e.key}):t==="img"?(0,As.createElement)("img",{alt:"",...e,key:e.key}):Oo.createElement(t,e)}function Ta(t){return Oa(t.defaultTagName??"div",t,t)}var To=u(yt(),1),to=(0,To.forwardRef)(({icon:t,size:e=24,...r},o)=>(0,To.cloneElement)(t,{width:e,height:e,...r,ref:o}));var _o=u(Pr(),1),Rs=u(z(),1),ur=(0,Rs.jsx)(_o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Rs.jsx)(_o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});var Po=u(Pr(),1),Es=u(z(),1),fr=(0,Es.jsx)(Po.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Es.jsx)(Po.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})});var Ao=u(Pr(),1),Is=u(z(),1),Ls=(0,Is.jsx)(Ao.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Is.jsx)(Ao.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Ro=u(Pr(),1),Bs=u(z(),1),Eo=(0,Bs.jsx)(Ro.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Bs.jsx)(Ro.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});var Io=u(Pr(),1),Ds=u(z(),1),Lo=(0,Ds.jsx)(Io.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Ds.jsx)(Io.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});var Ra=u(yt(),1);if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='71d20935c2']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","71d20935c2"),t.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}")),document.head.appendChild(t)}var hf={stack:"_19ce0419607e1896__stack"},gf={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},Ar=(0,Ra.forwardRef)(function({direction:e,gap:r,align:o,justify:s,wrap:a,render:n,...l},m){let f={gap:r&&gf[r],alignItems:o,justifyContent:s,flexDirection:e,flexWrap:a};return Ta({render:n,ref:m,props:ko(l,{style:f,className:hf.stack})})});var Ea=u(X(),1),{Fill:Ia,Slot:La}=(0,Ea.createSlotFill)("SidebarToggle");var Ge=u(z(),1);function Ba({headingLevel:t=1,breadcrumbs:e,badges:r,title:o,subTitle:s,actions:a,showSidebarToggle:n=!0}){let l=`h${t}`;return(0,Ge.jsxs)(Ar,{direction:"column",className:"admin-ui-page__header",children:[(0,Ge.jsxs)(Ar,{direction:"row",justify:"space-between",gap:"sm",children:[(0,Ge.jsxs)(Ar,{direction:"row",gap:"sm",align:"center",justify:"start",children:[n&&(0,Ge.jsx)(La,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),o&&(0,Ge.jsx)(l,{className:"admin-ui-page__header-title",children:o}),e,r]}),(0,Ge.jsx)(Ar,{direction:"row",gap:"sm",style:{width:"auto",flexShrink:0},className:"admin-ui-page__header-actions",align:"center",children:a})]}),s&&(0,Ge.jsx)("p",{className:"admin-ui-page__header-subtitle",children:s})]})}var eo=u(z(),1);function Da({headingLevel:t,breadcrumbs:e,badges:r,title:o,subTitle:s,children:a,className:n,actions:l,hasPadding:m=!1,showSidebarToggle:f=!0}){let c=ve("admin-ui-page",n);return(0,eo.jsxs)(ca,{className:c,ariaLabel:o,children:[(o||e||r)&&(0,eo.jsx)(Ba,{headingLevel:t,breadcrumbs:e,badges:r,title:o,subTitle:s,actions:l,showSidebarToggle:f}),m?(0,eo.jsx)("div",{className:"admin-ui-page__content has-padding",children:a}):a]})}Da.SidebarToggleFill=Ia;var Ns=Da;var xo=u(ut()),Uu=u(X()),Hu=u(Na()),ws=u(be()),Wu=u(fe()),Yu=u(yt());var Mu=u(X(),1),Gu=u(Rr(),1),Mg=u(fe(),1),Gg=u(ce(),1),qn=u(yt(),1),jg=u(cr(),1);function Er(t,e,r){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let o=e.pop(),s=t;for(let a of e){let n=s[a];s=s[a]=Array.isArray(n)?[...n]:{...n}}return s[o]=r,t}var we=(t,e,r)=>{let o=Array.isArray(e)?e:e.split("."),s=t;return o.forEach(a=>{s=s?.[a]}),s??r};var yf=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"];function zs(t,e,r){let o=r?".blocks."+r:"",s=e?"."+e:"",a=`settings${o}${s}`,n=`settings${s}`;if(e)return we(t,a)??we(t,n);let l={};return yf.forEach(m=>{let f=we(t,`settings${o}.${m}`)??we(t,`settings.${m}`);f!==void 0&&(l=Er(l,m.split("."),f))}),l}function Ms(t,e,r,o){let s=o?".blocks."+o:"",a=e?"."+e:"",n=`settings${s}${a}`;return Er(t,n.split("."),r)}var kf=u(Ha(),1);var vf="1600px",bf="320px",wf=1,Sf=.25,xf=.75,Cf="14px";function Wa({minimumFontSize:t,maximumFontSize:e,fontSize:r,minimumViewportWidth:o=bf,maximumViewportWidth:s=vf,scaleFactor:a=wf,minimumFontSizeLimit:n}){if(n=Re(n)?n:Cf,r){let b=Re(r);if(!b?.unit||!b?.value)return null;let T=Re(n,{coerceTo:b.unit});if(T?.value&&!t&&!e&&b?.value<=T?.value)return null;if(e||(e=`${b.value}${b.unit}`),!t){let Y=b.unit==="px"?b.value:b.value*16,I=Math.min(Math.max(1-.075*Math.log2(Y),Sf),xf),V=ro(b.value*I,3);T?.value&&V0}function Ff(t){let e=t?.typography??{},r=t?.layout,o=Re(r?.wideSize)?r?.wideSize:null;return Gs(e)&&o?{fluid:{maxViewportWidth:o,...typeof e.fluid=="object"?e.fluid:{}}}:{fluid:e?.fluid}}function Ya(t,e){let{size:r}=t;if(!r||r==="0"||t?.fluid===!1||!Gs(e?.typography)&&!Gs(t))return r;let o=Ff(e)?.fluid??{},s=Wa({minimumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.min,maximumFontSize:typeof t?.fluid=="boolean"?void 0:t?.fluid?.max,fontSize:r,minimumFontSizeLimit:typeof o=="object"?o?.minFontSize:void 0,maximumViewportWidth:typeof o=="object"?o?.maxViewportWidth:void 0,minimumViewportWidth:typeof o=="object"?o?.minViewportWidth:void 0});return s||r}var Of=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:t})=>`url( '#wp-duotone-${t}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(t,e)=>Ya(t,e),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:t})=>t,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}];function qa(t,e,r=[],o="slug",s){let a=[e?we(t,["blocks",e,...r]):void 0,we(t,r)].filter(Boolean);for(let n of a)if(n){let l=["custom","theme","default"];for(let m of l){let f=n[m];if(f){let c=f.find(d=>d[o]===s);if(c)return o==="slug"||qa(t,e,r,"slug",c.slug)[o]===c[o]?c:void 0}}}}function Tf(t,e,r,[o,s]=[]){let a=Of.find(l=>l.cssVarInfix===o);if(!a||!t.settings)return r;let n=qa(t.settings,e,a.path,"slug",s);if(n){let{valueKey:l}=a,m=n[l];return Bo(t,e,m)}return r}function _f(t,e,r,o=[]){let s=(e?we(t?.settings??{},["blocks",e,"custom",...o]):void 0)??we(t?.settings??{},["custom",...o]);return s?Bo(t,e,s):r}function Bo(t,e,r){if(!r||typeof r!="string")if(typeof r=="object"&&r!==null&&"ref"in r&&typeof r.ref=="string"){let f=we(t,r.ref);if(!f||typeof f=="object"&&"ref"in f)return f;r=f}else return r;let o="var:",s="var(--wp--",a=")",n;if(r.startsWith(o))n=r.slice(o.length).split("|");else if(r.startsWith(s)&&r.endsWith(a))n=r.slice(s.length,-a.length).split("--");else return r;let[l,...m]=n;return l==="preset"?Tf(t,e,r,m):l==="custom"?_f(t,e,r,m):r}function js(t,e,r,o=!0){let s=e?"."+e:"",a=r?`styles.blocks.${r}${s}`:`styles${s}`;if(!t)return;let n=we(t,a);return o?Bo(t,r,n):n}function Us(t,e,r,o){let s=e?"."+e:"",a=o?`styles.blocks.${o}${s}`:`styles${s}`;return Er(t,a.split("."),r)}var Hs=u(Xa(),1);function oo(t,e){return typeof t!="object"||typeof e!="object"?t===e:(0,Hs.default)(t?.styles,e?.styles)&&(0,Hs.default)(t?.settings,e?.settings)}var ri=u($a(),1);function ti(t){return Object.prototype.toString.call(t)==="[object Object]"}function ei(t){var e,r;return ti(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(ti(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function dr(t,e){return(0,ri.default)(t,e,{isMergeableObject:ei,customMerge:r=>{if(r==="backgroundImage")return(o,s)=>s??o}})}var jf={grad:.9,turn:360,rad:360/(2*Math.PI)},je=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},qt=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=Math.pow(10,e)),Math.round(r*t)/r+0},Fe=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=1),t>r?r:t>e?t:e},fi=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},oi=function(t){return{r:Fe(t.r,0,255),g:Fe(t.g,0,255),b:Fe(t.b,0,255),a:Fe(t.a)}},Ws=function(t){return{r:qt(t.r),g:qt(t.g),b:qt(t.b),a:qt(t.a,3)}},Uf=/^#([0-9a-f]{3,8})$/i,Do=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},ci=function(t){var e=t.r,r=t.g,o=t.b,s=t.a,a=Math.max(e,r,o),n=a-Math.min(e,r,o),l=n?a===e?(r-o)/n:a===r?2+(o-e)/n:4+(e-r)/n:0;return{h:60*(l<0?l+6:l),s:a?n/a*100:0,v:a/255*100,a:s}},di=function(t){var e=t.h,r=t.s,o=t.v,s=t.a;e=e/360*6,r/=100,o/=100;var a=Math.floor(e),n=o*(1-r),l=o*(1-(e-a)*r),m=o*(1-(1-e+a)*r),f=a%6;return{r:255*[o,l,n,n,m,o][f],g:255*[m,o,o,l,n,n][f],b:255*[n,n,m,o,o,l][f],a:s}},si=function(t){return{h:fi(t.h),s:Fe(t.s,0,100),l:Fe(t.l,0,100),a:Fe(t.a)}},ni=function(t){return{h:qt(t.h),s:qt(t.s),l:qt(t.l),a:qt(t.a,3)}},ai=function(t){return di((r=(e=t).s,{h:e.h,s:(r*=((o=e.l)<50?o:100-o)/100)>0?2*r/(o+r)*100:0,v:o+r,a:e.a}));var e,r,o},no=function(t){return{h:(e=ci(t)).h,s:(s=(200-(r=e.s))*(o=e.v)/100)>0&&s<200?r*o/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,r,o,s},Hf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wf=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qf=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zs={string:[[function(t){var e=Uf.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?qt(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?qt(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Yf.exec(t)||qf.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:oi({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Hf.exec(t)||Wf.exec(t);if(!e)return null;var r,o,s=si({h:(r=e[1],o=e[2],o===void 0&&(o="deg"),Number(r)*(jf[o]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return ai(s)},"hsl"]],object:[[function(t){var e=t.r,r=t.g,o=t.b,s=t.a,a=s===void 0?1:s;return je(e)&&je(r)&&je(o)?oi({r:Number(e),g:Number(r),b:Number(o),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,r=t.s,o=t.l,s=t.a,a=s===void 0?1:s;if(!je(e)||!je(r)||!je(o))return null;var n=si({h:Number(e),s:Number(r),l:Number(o),a:Number(a)});return ai(n)},"hsl"],[function(t){var e=t.h,r=t.s,o=t.v,s=t.a,a=s===void 0?1:s;if(!je(e)||!je(r)||!je(o))return null;var n=(function(l){return{h:fi(l.h),s:Fe(l.s,0,100),v:Fe(l.v,0,100),a:Fe(l.a)}})({h:Number(e),s:Number(r),v:Number(o),a:Number(a)});return di(n)},"hsv"]]},ii=function(t,e){for(var r=0;r=.5},t.prototype.toHex=function(){return e=Ws(this.rgba),r=e.r,o=e.g,s=e.b,n=(a=e.a)<1?Do(qt(255*a)):"","#"+Do(r)+Do(o)+Do(s)+n;var e,r,o,s,a,n},t.prototype.toRgb=function(){return Ws(this.rgba)},t.prototype.toRgbString=function(){return e=Ws(this.rgba),r=e.r,o=e.g,s=e.b,(a=e.a)<1?"rgba("+r+", "+o+", "+s+", "+a+")":"rgb("+r+", "+o+", "+s+")";var e,r,o,s,a},t.prototype.toHsl=function(){return ni(no(this.rgba))},t.prototype.toHslString=function(){return e=ni(no(this.rgba)),r=e.h,o=e.s,s=e.l,(a=e.a)<1?"hsla("+r+", "+o+"%, "+s+"%, "+a+")":"hsl("+r+", "+o+"%, "+s+"%)";var e,r,o,s,a},t.prototype.toHsv=function(){return e=ci(this.rgba),{h:qt(e.h),s:qt(e.s),v:qt(e.v),a:qt(e.a,3)};var e},t.prototype.invert=function(){return Ee({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),Ee(Ys(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ee(Ys(this.rgba,-e))},t.prototype.grayscale=function(){return Ee(Ys(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),Ee(li(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),Ee(li(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?Ee({r:(r=this.rgba).r,g:r.g,b:r.b,a:e}):qt(this.rgba.a,3);var r},t.prototype.hue=function(e){var r=no(this.rgba);return typeof e=="number"?Ee({h:e,s:r.s,l:r.l,a:r.a}):qt(r.h)},t.prototype.isEqual=function(e){return this.toHex()===Ee(e).toHex()},t})(),Ee=function(t){return t instanceof Xs?t:new Xs(t)},ui=[],mi=function(t){t.forEach(function(e){ui.indexOf(e)<0&&(e(Xs,Zs),ui.push(e))})};var Ks=u(yt(),1);var pi=u(yt(),1),Xt=(0,pi.createContext)({user:{styles:{},settings:{}},base:{styles:{},settings:{}},merged:{styles:{},settings:{}},onChange:()=>{},fontLibraryEnabled:!1});var hi=u(z(),1);function ao({children:t,value:e,baseValue:r,onChange:o,fontLibraryEnabled:s}){let a=(0,Ks.useMemo)(()=>dr(r,e),[r,e]),n=(0,Ks.useMemo)(()=>({user:e,base:r,merged:a,onChange:o,fontLibraryEnabled:s}),[e,r,a,o,s]);return(0,hi.jsx)(Xt.Provider,{value:n,children:t})}var Ue=u(X(),1),Li=u(ut(),1);var lc=u(fe(),1),uc=u(be(),1);var gi=u(z(),1);function Js({className:t,...e}){return(0,gi.jsx)(to,{className:ve(t,"global-styles-ui-icon-with-current-color"),...e})}var Je=u(X(),1);var mr=u(z(),1);function Xf({icon:t,children:e,...r}){return(0,mr.jsxs)(Je.__experimentalItem,{...r,children:[t&&(0,mr.jsxs)(Je.__experimentalHStack,{justify:"flex-start",children:[(0,mr.jsx)(Js,{icon:t,size:24}),(0,mr.jsx)(Je.FlexItem,{children:e})]}),!t&&e]})}function Ie(t){return(0,mr.jsx)(Je.Navigator.Button,{as:Xf,...t})}var Qf=u(X(),1);var $f=u(ut(),1),Ci=u(ce(),1);var Qs=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},$s=function(t){return .2126*Qs(t.r)+.7152*Qs(t.g)+.0722*Qs(t.b)};function yi(t){t.prototype.luminance=function(){return e=$s(this.rgba),(r=2)===void 0&&(r=0),o===void 0&&(o=Math.pow(10,r)),Math.round(o*e)/o+0;var e,r,o},t.prototype.contrast=function(e){e===void 0&&(e="#FFF");var r,o,s,a,n,l,m,f=e instanceof t?e:new t(e);return a=this.rgba,n=f.toRgb(),l=$s(a),m=$s(n),r=l>m?(l+.05)/(m+.05):(m+.05)/(l+.05),(o=2)===void 0&&(o=0),s===void 0&&(s=Math.pow(10,o)),Math.floor(s*r)/s+0},t.prototype.isReadable=function(e,r){return e===void 0&&(e="#FFF"),r===void 0&&(r={}),this.contrast(e)>=(l=(n=(o=r).size)===void 0?"normal":n,(a=(s=o.level)===void 0?"AA":s)==="AAA"&&l==="normal"?7:a==="AA"&&l==="large"?3:4.5);var o,s,a,n,l}}var Pe=u(yt(),1),wi=u(fe(),1),Si=u(be(),1),en=u(ut(),1);function tn(t,e){if(!e?.length||typeof t!="object"||!t||!Object.keys(t).length)return t;for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&tn(t[r],e);return t}var Vo=(t,e)=>{if(!t||!e?.length)return{};let r={};return Object.keys(t).forEach(o=>{if(e.includes(o))r[o]=t[o];else if(typeof t[o]=="object"){let s=Vo(t[o],e);Object.keys(s).length&&(r[o]=s)}}),r};function io(t,e){let r=Vo(structuredClone(t),e);return oo(r,t)}function vi(t,e){if(!Array.isArray(t)||!e)return null;let o=e.replace("var(","").replace(")","")?.split("--").slice(-1)[0];return t.find(s=>s.slug===o)}function bi(t){let e=t?.settings?.typography?.fontFamilies?.theme,r=t?.settings?.typography?.fontFamilies?.custom,o=[];e&&r?o=[...e,...r]:e?o=e:r&&(o=r);let s=t?.styles?.typography?.fontFamily,a=vi(o,s),n=t?.styles?.elements?.heading?.typography?.fontFamily,l;return n?l=vi(o,t?.styles?.elements?.heading?.typography?.fontFamily):l=a,[a,l]}mi([yi]);function kt(t,e,r="merged",o=!0){let{user:s,base:a,merged:n,onChange:l}=(0,Pe.useContext)(Xt),m=n;r==="base"?m=a:r==="user"&&(m=s);let f=(0,Pe.useMemo)(()=>js(m,t,e,o),[m,t,e,o]),c=(0,Pe.useCallback)(d=>{let g=Us(s,t,d,e);l(g)},[s,l,t,e]);return[f,c]}function _t(t,e,r="merged"){let{user:o,base:s,merged:a,onChange:n}=(0,Pe.useContext)(Xt),l=a;r==="base"?l=s:r==="user"&&(l=o);let m=(0,Pe.useMemo)(()=>zs(l,t,e),[l,t,e]),f=(0,Pe.useCallback)(c=>{let d=Ms(o,t,c,e);n(d)},[o,n,t,e]);return[m,f]}var Kf=[];function Jf({title:t,settings:e,styles:r}){return t===(0,en.__)("Default")||Object.keys(e||{}).length>0||Object.keys(r||{}).length>0}function No(t=[]){let{variationsFromTheme:e}=(0,wi.useSelect)(o=>({variationsFromTheme:o(Si.store).__experimentalGetCurrentThemeGlobalStylesVariations?.()||Kf}),[]),{user:r}=(0,Pe.useContext)(Xt);return(0,Pe.useMemo)(()=>{let o=structuredClone(r),s=tn(o,t);s.title=(0,en.__)("Default");let a=e.filter(l=>io(l,t)).map(l=>dr(s,l)),n=[s,...a];return n?.length?n.filter(Jf):[]},[t,r,e])}var xi=u(Vs(),1),{lock:d1,unlock:vt}=(0,xi.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/global-styles-ui");var rn=u(z(),1),{useHasDimensionsPanel:y1,useHasTypographyPanel:v1,useHasColorPanel:b1,useSettingsForBlockElement:w1,useHasBackgroundPanel:S1}=vt(Ci.privateApis);var Le=u(X(),1);function Lr(){let[t="black"]=kt("color.text"),[e="white"]=kt("color.background"),[r=t]=kt("elements.h1.color.text"),[o=r]=kt("elements.link.color.text"),[s=o]=kt("elements.button.color.background"),[a]=_t("color.palette.core")||[],[n]=_t("color.palette.theme")||[],[l]=_t("color.palette.custom")||[],m=(n??[]).concat(l??[]).concat(a??[]),f=m.filter(({color:g})=>g===t),c=m.filter(({color:g})=>g===s),d=f.concat(c).concat(m).filter(({color:g})=>g!==e).slice(0,2);return{paletteColors:m,highlightedColors:d}}var Oi=u(yt(),1),Ti=u(X(),1),sn=u(ut(),1);function tc(t,e){return e.length===0?null:(e.sort((r,o)=>Math.abs(t-r)-Math.abs(t-o)),e[0])}function ec(t){let e=[];return t.forEach(r=>{let o=String(r.fontWeight).split(" ");if(o.length===2){let s=parseInt(o[0]),a=parseInt(o[1]);for(let n=s;n<=a;n+=100)e.push(n)}else o.length===1&&e.push(parseInt(o[0]))}),e}function Fi(t){let e=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,r=t.trim(),o=s=>(s=s.trim(),s.match(e)?(s=s.replace(/^["']|["']$/g,""),`"${s}"`):s);return r.includes(",")?r.split(",").map(o).filter(s=>s!=="").join(", "):o(r)}function on(t){if(!t)return"";let e=t.trim();return e.includes(",")&&(e=(e.split(",").find(r=>r.trim()!=="")??"").trim()),e=e.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(e=`"${e}"`),e}function Br(t){let e={fontFamily:Fi(t.fontFamily)};if(!("fontFace"in t)||!Array.isArray(t.fontFace))return e.fontWeight="400",e.fontStyle="normal",e;if(t.fontFace){let r=t.fontFace.filter(o=>o?.fontStyle&&o.fontStyle.toLowerCase()==="normal");if(r.length>0){e.fontStyle="normal";let o=ec(r),s=tc(400,o);e.fontWeight=String(s)||"400"}else e.fontStyle=t.fontFace.length&&t.fontFace[0].fontStyle||"normal",e.fontWeight=t.fontFace.length&&String(t.fontFace[0].fontWeight)||"400"}return e}function ki(t){return{fontFamily:Fi(t.fontFamily),fontStyle:t.fontStyle||"normal",fontWeight:t.fontWeight||"400"}}var lo=u(z(),1);function zo({fontSize:t,variation:e}){let{base:r}=(0,Oi.useContext)(Xt),o=r;e&&(o={...r,...e});let[s]=kt("color.text"),[a,n]=bi(o),l=a?Br(a):{},m=n?Br(n):{};return s&&(l.color=s,m.color=s),t&&(l.fontSize=t,m.fontSize=t),(0,lo.jsxs)(Ti.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,lo.jsx)("span",{style:m,children:(0,sn._x)("A","Uppercase letter A")}),(0,lo.jsx)("span",{style:l,children:(0,sn._x)("a","Lowercase letter A")})]})}var _i=u(X(),1);var Pi=u(z(),1);function Ai({normalizedColorSwatchSize:t,ratio:e}){let{highlightedColors:r}=Lr(),o=t*e;return r.map(({slug:s,color:a},n)=>(0,Pi.jsx)(_i.__unstableMotion.div,{style:{height:o,width:o,background:a,borderRadius:o/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:n===1?.2:.1}},`${s}-${n}`))}var Ii=u(X(),1),Dr=u(cr(),1),pr=u(yt(),1);var Qe=u(z(),1),Ri=248,Ei=152,rc={leading:!0,trailing:!0};function oc({children:t,label:e,isFocused:r,withHoverView:o}){let[s="white"]=kt("color.background"),[a]=kt("color.gradient"),n=(0,Dr.useReducedMotion)(),[l,m]=(0,pr.useState)(!1),[f,{width:c}]=(0,Dr.useResizeObserver)(),[d,g]=(0,pr.useState)(c),[h,v]=(0,pr.useState)(),_=(0,Dr.useThrottle)(g,250,rc);(0,pr.useLayoutEffect)(()=>{c&&_(c)},[c,_]),(0,pr.useLayoutEffect)(()=>{let b=d?d/Ri:1,T=b-(h||0);(Math.abs(T)>.1||!h)&&v(b)},[d,h]);let A=c?c/Ri:1,k=h||A;return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("div",{style:{position:"relative"},children:f}),!!c&&(0,Qe.jsx)("div",{className:"global-styles-ui-preview__wrapper",style:{height:Ei*k},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),tabIndex:-1,children:(0,Qe.jsx)(Ii.__unstableMotion.div,{style:{height:Ei*k,width:"100%",background:a??s,cursor:o?"pointer":void 0},initial:"start",animate:(l||r)&&!n&&e?"hover":"start",children:[].concat(t).map((b,T)=>b({ratio:k,key:T}))})})]})}var Vr=oc;var de=u(z(),1),sc={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},nc={hover:{opacity:1},start:{opacity:.5}},ac={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function ic({label:t,isFocused:e,withHoverView:r,variation:o}){let[s]=kt("typography.fontWeight"),[a="serif"]=kt("typography.fontFamily"),[n=a]=kt("elements.h1.typography.fontFamily"),[l=s]=kt("elements.h1.typography.fontWeight"),[m="black"]=kt("color.text"),[f=m]=kt("elements.h1.color.text"),{paletteColors:c}=Lr();return(0,de.jsxs)(Vr,{label:t,isFocused:e,withHoverView:r,children:[({ratio:d,key:g})=>(0,de.jsx)(Le.__unstableMotion.div,{variants:sc,style:{height:"100%",overflow:"hidden"},children:(0,de.jsxs)(Le.__experimentalHStack,{spacing:10*d,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,de.jsx)(zo,{fontSize:65*d,variation:o}),(0,de.jsx)(Le.__experimentalVStack,{spacing:4*d,children:(0,de.jsx)(Ai,{normalizedColorSwatchSize:32,ratio:d})})]})},g),({key:d})=>(0,de.jsx)(Le.__unstableMotion.div,{variants:r?nc:void 0,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,de.jsx)(Le.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:c.slice(0,4).map(({color:g},h)=>(0,de.jsx)("div",{style:{height:"100%",background:g,flexGrow:1}},h))})},d),({ratio:d,key:g})=>(0,de.jsx)(Le.__unstableMotion.div,{variants:ac,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,de.jsx)(Le.__experimentalVStack,{spacing:3*d,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*d,boxSizing:"border-box"},children:t&&(0,de.jsx)("div",{style:{fontSize:40*d,fontFamily:n,color:f,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:t})})},g)]})}var nn=ic;var Bi=u(z(),1);var ln=u(Rr(),1),Nr=u(ut(),1),gr=u(X(),1),un=u(fe(),1),$e=u(yt(),1),Mo=u(ce(),1),Mi=u(cr(),1);import{speak as mc}from"@wordpress/a11y";var Di=u(Rr(),1),Vi=u(fe(),1),fc=u(X(),1);var cc=u(z(),1);function dc(t,e){return t?.filter(r=>r.source==="block"||e.includes(r.name))||[]}function an(t){let e=(0,Vi.useSelect)(s=>{let{getBlockStyles:a}=s(Di.store);return a(t)},[t]),[r]=kt("variations",t),o=Object.keys(r??{});return dc(e,o)}var hr=u(X(),1),Ni=u(ut(),1);var zi=u(z(),1);var Be=u(z(),1),{useHasDimensionsPanel:pc,useHasTypographyPanel:hc,useHasBorderPanel:gc,useSettingsForBlockElement:yc,useHasColorPanel:vc}=vt(Mo.privateApis);function bc(){let t=(0,un.useSelect)(s=>s(ln.store).getBlockTypes(),[]),e=(s,a)=>{let{core:n,noncore:l}=s;return(a.name.startsWith("core/")?n:l).push(a),s},{core:r,noncore:o}=t.reduce(e,{core:[],noncore:[]});return[...r,...o]}function wc(t){let[e]=_t("",t),r=yc(e,t),o=hc(r),s=vc(r),a=gc(r),n=pc(r),l=a||n,m=!!an(t)?.length;return o||s||l||m}function Sc({block:t}){return wc(t.name)?(0,Be.jsx)(Ie,{path:"/blocks/"+encodeURIComponent(t.name),children:(0,Be.jsxs)(gr.__experimentalHStack,{justify:"flex-start",children:[(0,Be.jsx)(Mo.BlockIcon,{icon:t.icon}),(0,Be.jsx)(gr.FlexItem,{children:t.title})]})}):null}function xc({filterValue:t}){let e=bc(),r=(0,Mi.useDebounce)(mc,500),{isMatchingSearchTerm:o}=(0,un.useSelect)(ln.store),s=t?e.filter(n=>o(n,t)):e,a=(0,$e.useRef)(null);return(0,$e.useEffect)(()=>{if(!t)return;let n=a.current?.childElementCount||0,l=(0,Nr.sprintf)((0,Nr._n)("%d result found.","%d results found.",n),n);r(l,"polite")},[t,r]),(0,Be.jsx)("div",{ref:a,className:"global-styles-ui-block-types-item-list",role:"list",children:s.length===0?(0,Be.jsx)(gr.__experimentalText,{align:"center",as:"p",children:(0,Nr.__)("No blocks found.")}):s.map(n=>(0,Be.jsx)(Sc,{block:n},"menu-itemblock-"+n.name))})}var o0=(0,$e.memo)(xc);var Tc=u(Rr(),1),Hi=u(ce(),1),Wi=u(yt(),1),_c=u(fe(),1),Pc=u(be(),1),fn=u(X(),1),Yi=u(ut(),1);var Cc=u(ce(),1),Gi=u(Rr(),1),Fc=u(X(),1),kc=u(yt(),1);var Oc=u(z(),1);var ji=u(X(),1),Ui=u(z(),1);function Se({children:t,level:e=2}){return(0,Ui.jsx)(ji.__experimentalHeading,{className:"global-styles-ui-subtitle",level:e,children:t})}var cn=u(z(),1);var{useHasDimensionsPanel:v0,useHasTypographyPanel:b0,useHasBorderPanel:w0,useSettingsForBlockElement:S0,useHasColorPanel:x0,useHasFiltersPanel:C0,useHasImageSettingsPanel:F0,useHasBackgroundPanel:k0,BackgroundPanel:O0,BorderPanel:T0,ColorPanel:_0,TypographyPanel:P0,DimensionsPanel:A0,FiltersPanel:R0,ImageSettingsPanel:E0,AdvancedPanel:I0}=vt(Hi.privateApis);var jh=u(ut(),1),Uh=u(X(),1),Hh=u(yt(),1);var Ac=u(X(),1);var Rc=u(z(),1);var Ec=u(ut(),1),Go=u(X(),1);var qi=u(z(),1);var Ho=u(X(),1);var Zi=u(X(),1);var jo=u(z(),1),Ic=({variation:t,isFocused:e,withHoverView:r})=>(0,jo.jsx)(Vr,{label:t.title,isFocused:e,withHoverView:r,children:({ratio:o,key:s})=>(0,jo.jsx)(Zi.__experimentalHStack,{spacing:10*o,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,jo.jsx)(zo,{variation:t,fontSize:85*o})},s)}),Xi=Ic;var Ji=u(X(),1),yr=u(yt(),1),Qi=u(dn(),1),Uo=u(ut(),1);var uo=u(z(),1);function zr({variation:t,children:e,isPill:r=!1,properties:o,showTooltip:s=!1}){let[a,n]=(0,yr.useState)(!1),{base:l,user:m,onChange:f}=(0,yr.useContext)(Xt),c=(0,yr.useMemo)(()=>{let A=dr(l,t);return o&&(A=Vo(A,o)),{user:t,base:l,merged:A,onChange:()=>{}}},[t,l,o]),d=()=>f(t),g=A=>{A.keyCode===Qi.ENTER&&(A.preventDefault(),d())},h=(0,yr.useMemo)(()=>oo(m,t),[m,t]),v=t?.title;t?.description&&(v=(0,Uo.sprintf)((0,Uo._x)("%1$s (%2$s)","variation label"),t?.title,t?.description));let _=(0,uo.jsx)("div",{className:ve("global-styles-ui-variations_item",{"is-active":h}),role:"button",onClick:d,onKeyDown:g,tabIndex:0,"aria-label":v,"aria-current":h,onFocus:()=>n(!0),onBlur:()=>n(!1),children:(0,uo.jsx)("div",{className:ve("global-styles-ui-variations_item-preview",{"is-pill":r}),children:e(a)})});return(0,uo.jsx)(Xt.Provider,{value:c,children:s?(0,uo.jsx)(Ji.Tooltip,{text:t?.title,children:_}):_})}var vr=u(z(),1),$i=["typography"];function Wo({title:t,gap:e=2}){let r=No($i);return r?.length<=1?null:(0,vr.jsxs)(Ho.__experimentalVStack,{spacing:3,children:[t&&(0,vr.jsx)(Se,{level:3,children:t}),(0,vr.jsx)(Ho.__experimentalGrid,{columns:3,gap:e,className:"global-styles-ui-style-variations-container",children:r.map((o,s)=>(0,vr.jsx)(zr,{variation:o,properties:$i,showTooltip:!0,children:()=>(0,vr.jsx)(Xi,{variation:o})},s))})]})}var Mh=u(ut(),1),yo=u(X(),1);var Gh=u(yt(),1);var He=u(yt(),1),or=u(fe(),1),rr=u(be(),1),gn=u(ut(),1);var mn=u(el(),1),rl=u(be(),1),ol="/wp/v2/font-families";function sl(t){let{receiveEntityRecords:e}=t.dispatch(rl.store);e("postType","wp_font_family",[],void 0,!0)}async function nl(t,e){let o=await(0,mn.default)({path:ol,method:"POST",body:t});return sl(e),{id:o.id,...o.font_family_settings,fontFace:[]}}async function al(t,e,r){let o={path:`${ol}/${t}/font-faces`,method:"POST",body:e},s=await(0,mn.default)(o);return sl(r),{id:s.id,...s.font_face_settings}}var ul=u(X(),1);var ke=u(ut(),1),pn=["otf","ttf","woff","woff2"],il={100:(0,ke._x)("Thin","font weight"),200:(0,ke._x)("Extra-light","font weight"),300:(0,ke._x)("Light","font weight"),400:(0,ke._x)("Normal","font weight"),500:(0,ke._x)("Medium","font weight"),600:(0,ke._x)("Semi-bold","font weight"),700:(0,ke._x)("Bold","font weight"),800:(0,ke._x)("Extra-bold","font weight"),900:(0,ke._x)("Black","font weight")},ll={normal:(0,ke._x)("Normal","font style"),italic:(0,ke._x)("Italic","font style")};var{File:fl}=window,{kebabCase:Lc}=vt(ul.privateApis);function tr(t,e={}){return!t.name&&(t.fontFamily||t.slug)&&(t.name=t.fontFamily||t.slug),{...t,...e}}function Bc(t){return typeof t!="string"?!1:t!==decodeURIComponent(t)}function Yo(t){let e=il[t.fontWeight??""]||t.fontWeight,r=t.fontStyle==="normal"?"":ll[t.fontStyle??""]||t.fontStyle;return`${e} ${r}`}function Dc(t=[],e=[]){let r=new Map;for(let o of t)r.set(`${o.fontWeight}${o.fontStyle}`,o);for(let o of e)r.set(`${o.fontWeight}${o.fontStyle}`,o);return Array.from(r.values())}function cl(t=[],e=[]){let r=new Map;for(let o of t)r.set(o.slug,{...o});for(let o of e)if(r.has(o.slug)){let{fontFace:s,...a}=o,n=r.get(o.slug),l=Dc(n.fontFace,s);r.set(o.slug,{...a,fontFace:l})}else r.set(o.slug,{...o});return Array.from(r.values())}async function er(t,e,r="all"){let o;if(typeof e=="string")o=`url(${e})`;else if(e instanceof fl)o=await e.arrayBuffer();else return;let a=await new window.FontFace(on(t.fontFamily),o,{style:t.fontStyle,weight:String(t.fontWeight)}).load();if((r==="document"||r==="all")&&document.fonts.add(a),r==="iframe"||r==="all"){let n=document.querySelector('iframe[name="editor-canvas"]');n?.contentDocument&&n.contentDocument.fonts.add(a)}}function fo(t,e="all"){let r=o=>{o.forEach(s=>{s.family===on(t?.fontFamily)&&s.weight===t?.fontWeight&&s.style===t?.fontStyle&&o.delete(s)})};if((e==="document"||e==="all")&&r(document.fonts),e==="iframe"||e==="all"){let o=document.querySelector('iframe[name="editor-canvas"]');o?.contentDocument&&r(o.contentDocument.fonts)}}function Mr(t){if(!t)return;let e;if(Array.isArray(t)?e=t[0]:e=t,!e.startsWith("file:."))return Bc(e)||(e=encodeURI(e)),e}function dl(t){let e=new FormData,{fontFace:r,category:o,...s}=t,a={...s,slug:Lc(t.slug)};return e.append("font_family_settings",JSON.stringify(a)),e}function ml(t){return(t?.fontFace??[]).map((r,o)=>{let s={...r},a=new FormData;if(s.file){let n=Array.isArray(s.file)?s.file:[s.file],l=[];n.forEach((m,f)=>{let c=`file-${o}-${f}`;a.append(c,m,m.name),l.push(c)}),s.src=l.length===1?l[0]:l,delete s.file,a.append("font_face_settings",JSON.stringify(s))}else a.append("font_face_settings",JSON.stringify(s));return a})}async function pl(t,e,r){let o=[];for(let a of e)try{let n=await al(t,a,r);o.push({status:"fulfilled",value:n})}catch(n){o.push({status:"rejected",reason:n})}let s={errors:[],successes:[]};return o.forEach((a,n)=>{if(a.status==="fulfilled"&&a.value){let l=a.value;s.successes.push(l)}else a.reason&&s.errors.push({data:e[n],message:a.reason.message})}),s}async function hl(t){t=Array.isArray(t)?t:[t];let e=await Promise.all(t.map(async r=>fetch(new Request(r)).then(o=>{if(!o.ok)throw new Error(`Error downloading font face asset from ${r}. Server responded with status: ${o.status}`);return o.blob()}).then(o=>{let s=r.split("/").pop();return new fl([o],s,{type:o.type})})));return e.length===1?e[0]:e}function hn(t,e){return e.findIndex(r=>r.fontWeight===t.fontWeight&&r.fontStyle===t.fontStyle)!==-1}function gl(t,e,r){e=Array.isArray(e)?[...e]:[e],t=Array.isArray(t)?[...t]:{...t};let o=e.pop(),s=t;for(let a of e){let n=s[a];s=s[a]=Array.isArray(n)?[...n]:{...n}}return s[o]=r,t}function qo(t,e,r=[]){let o=m=>m.slug===t.slug,s=m=>m.find(o),a=m=>m?r.filter(f=>!o(f)):[...r,t],n=m=>{let f=d=>d.fontWeight===e.fontWeight&&d.fontStyle===e.fontStyle;if(!m)return[...r,{...t,fontFace:[e]}];let c=m.fontFace||[];return c.find(f)?c=c.filter(d=>!f(d)):c=[...c,e],c.length===0?r.filter(d=>!o(d)):r.map(d=>o(d)?{...d,fontFace:c}:d)},l=s(r);return e?n(l):a(l)}var yl=u(z(),1),ne=(0,He.createContext)({});ne.displayName="FontLibraryContext";function Vc({children:t}){let e=(0,or.useRegistry)(),{saveEntityRecord:r,deleteEntityRecord:o}=(0,or.useDispatch)(rr.store),{globalStylesId:s}=(0,or.useSelect)(S=>{let{__experimentalGetCurrentGlobalStylesId:E}=S(rr.store);return{globalStylesId:E()}},[]),a=(0,rr.useEntityRecord)("root","globalStyles",s),[n,l]=(0,He.useState)(!1),{records:m=[],isResolving:f}=(0,rr.useEntityRecords)("postType","wp_font_family",{_embed:!0}),c=(m||[]).map(S=>({id:S.id,...S.font_family_settings||{},fontFace:S?._embedded?.font_faces?.map(E=>E.font_face_settings)||[]}))||[],[d,g]=_t("typography.fontFamilies"),h=async S=>{if(!a.record)return;let E=a.record,et=gl(E??{},["settings","typography","fontFamilies"],S);await r("root","globalStyles",et)},[v,_]=(0,He.useState)(""),[A,k]=(0,He.useState)(void 0),x=d?.theme?d.theme.map(S=>tr(S,{source:"theme"})).sort((S,E)=>S.name.localeCompare(E.name)):[],b=d?.custom?d.custom.map(S=>tr(S,{source:"custom"})).sort((S,E)=>S.name.localeCompare(E.name)):[],T=c?c.map(S=>tr(S,{source:"custom"})).sort((S,E)=>S.name.localeCompare(E.name)):[];(0,He.useEffect)(()=>{v||k(void 0)},[v]);let Y=S=>{if(!S){k(void 0);return}let et=(S.source==="theme"?x:T).find(ct=>ct.slug===S.slug);k({...et||S,source:S.source})},[I]=(0,He.useState)(new Set),V=S=>S.reduce((et,ct)=>{let at=ct?.fontFace&&ct.fontFace?.length>0?ct?.fontFace.map(Ct=>`${Ct.fontStyle??""}${Ct.fontWeight??""}`):["normal400"];return et[ct.slug]=at,et},{}),H=S=>V(S==="theme"?x:b),$=(S,E,et,ct)=>!E&&!et?!!H(ct)[S]:!!H(ct)[S]?.includes((E??"")+(et??"")),bt=(S,E)=>H(E)[S]||[];async function W(S){l(!0);try{let E=[],et=[];for(let at of S){let Ct=!1,Wt=await(0,or.resolveSelect)(rr.store).getEntityRecords("postType","wp_font_family",{slug:at.slug,per_page:1,_embed:!0}),Ot=Wt&&Wt.length>0?Wt[0]:null,J=Ot?{id:Ot.id,...Ot.font_family_settings,fontFace:(Ot?._embedded?.font_faces??[]).map(zt=>zt.font_face_settings)||[]}:null;J||(Ct=!0,J=await nl(dl(at),e));let St=J.fontFace&&at.fontFace?J.fontFace.filter(zt=>zt&&at.fontFace&&hn(zt,at.fontFace)):[];J.fontFace&&at.fontFace&&(at.fontFace=at.fontFace.filter(zt=>!hn(zt,J.fontFace)));let At=[],xe=[];if(at?.fontFace?.length??!1){let zt=await pl(J.id,ml(at),e);At=zt?.successes,xe=zt?.errors}(At?.length>0||St?.length>0)&&(J.fontFace=[...At],E.push(J)),J&&!at?.fontFace?.length&&E.push(J),Ct&&(at?.fontFace?.length??0)>0&&At?.length===0&&await o("postType","wp_font_family",J.id,{force:!0}),et=et.concat(xe)}let ct=et.reduce((at,Ct)=>at.includes(Ct.message)?at:[...at,Ct.message],[]);if(E.length>0){let at=it(E);await h(at)}if(ct.length>0){let at=new Error((0,gn.__)("There was an error installing fonts."));throw at.installationErrors=ct,at}}finally{l(!1)}}async function y(S){if(!S?.id)throw new Error((0,gn.__)("Font family to uninstall is not defined."));try{await o("postType","wp_font_family",S.id,{force:!0});let E=L(S);return await h(E),{deleted:!0}}catch(E){throw console.error("There was an error uninstalling the font family:",E),E}}let L=S=>{let et=(d?.[S.source??""]??[]).filter(at=>at.slug!==S.slug),ct={...d,[S.source??""]:et};return g(ct),S.fontFace&&S.fontFace.forEach(at=>{fo(at,"all")}),ct},it=S=>{let E=ot(S),et={...d,custom:cl(d?.custom,E)};return g(et),K(E),et},ot=S=>S.map(({id:E,fontFace:et,...ct})=>({...ct,...et&&et.length>0?{fontFace:et.map(({id:at,...Ct})=>Ct)}:{}})),K=S=>{S.forEach(E=>{E.fontFace&&E.fontFace.forEach(et=>{let ct=Mr(et?.src??"");ct&&er(et,ct,"all")})})},gt=(S,E)=>{let et=d?.[S.source??""]??[],ct=qo(S,E,et);g({...d,[S.source??""]:ct});let at=$(S.slug,E?.fontStyle??"",E?.fontWeight??"",S.source??"custom");if(E&&at)fo(E,"all");else{let Ct=Mr(E?.src??"");E&&Ct&&er(E,Ct,"all")}},R=async S=>{if(!S.src)return;let E=Mr(S.src);!E||I.has(E)||(er(S,E,"document"),I.add(E))};return(0,yl.jsx)(ne.Provider,{value:{libraryFontSelected:A,handleSetLibraryFontSelected:Y,fontFamilies:d??{},baseCustomFonts:T,isFontActivated:$,getFontFacesActivated:bt,loadFontFaceAsset:R,installFonts:W,uninstallFontFamily:y,toggleActivateFont:gt,getAvailableFontsOutline:V,modalTabOpen:v,setModalTabOpen:_,saveFontFamilies:h,isResolvingLibrary:f,isInstalling:n},children:t})}var Zo=Vc;var us=u(ut(),1),Sn=u(X(),1),$l=u(be(),1),Nh=u(fe(),1);var ht=u(X(),1),mo=u(be(),1),yn=u(fe(),1),wr=u(yt(),1),Et=u(ut(),1);var jr=u(ut(),1),Oe=u(X(),1);var vl=u(X(),1),De=u(yt(),1);var Xo=u(z(),1);function Nc(t){if(t.preview)return t.preview;if(t.src)return Array.isArray(t.src)?t.src[0]:t.src}function zc(t){return"fontStyle"in t&&t.fontStyle||"fontWeight"in t&&t.fontWeight?t:"fontFace"in t&&t.fontFace&&t.fontFace.length?t.fontFace.find(e=>e.fontStyle==="normal"&&e.fontWeight==="400")||t.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:t.fontFamily}}function Mc({font:t,text:e}){let r=(0,De.useRef)(null),o=zc(t),s=Br(t);e=e||("name"in t?t.name:"");let a=t.preview,[n,l]=(0,De.useState)(!1),[m,f]=(0,De.useState)(!1),{loadFontFaceAsset:c}=(0,De.useContext)(ne),d=a??Nc(o),g=d&&d.match(/\.(png|jpg|jpeg|gif|svg)$/i),h=ki(o),v={fontSize:"18px",lineHeight:1,opacity:m?"1":"0",...s,...h};return(0,De.useEffect)(()=>{let _=new window.IntersectionObserver(([A])=>{l(A.isIntersecting)},{});return r.current&&_.observe(r.current),()=>_.disconnect()},[r]),(0,De.useEffect)(()=>{(async()=>n&&(!g&&o.src&&await c(o),f(!0)))()},[o,n,c,g]),(0,Xo.jsx)("div",{ref:r,children:g?(0,Xo.jsx)("img",{src:d,loading:"lazy",alt:e,className:"font-library__font-variant_demo-image"}):(0,Xo.jsx)(vl.__experimentalText,{style:v,className:"font-library__font-variant_demo-text",children:e})})}var Gr=Mc;var Ve=u(z(),1);function Gc({font:t,onClick:e,variantsText:r,navigatorPath:o}){let s=t.fontFace?.length||1,a={cursor:e?"pointer":"default"},n=(0,Oe.useNavigator)();return(0,Ve.jsx)(Oe.Button,{__next40pxDefaultSize:!0,onClick:()=>{e(),o&&n.goTo(o)},style:a,className:"font-library__font-card",children:(0,Ve.jsxs)(Oe.Flex,{justify:"space-between",wrap:!1,children:[(0,Ve.jsx)(Gr,{font:t}),(0,Ve.jsxs)(Oe.Flex,{justify:"flex-end",children:[(0,Ve.jsx)(Oe.FlexItem,{children:(0,Ve.jsx)(Oe.__experimentalText,{className:"font-library__font-card__count",children:r||(0,jr.sprintf)((0,jr._n)("%d variant","%d variants",s),s)})}),(0,Ve.jsx)(Oe.FlexItem,{children:(0,Ve.jsx)(to,{icon:(0,jr.isRTL)()?ur:fr})})]})]})})}var co=Gc;var Ko=u(yt(),1),Jo=u(X(),1);var br=u(z(),1);function jc({face:t,font:e}){let{isFontActivated:r,toggleActivateFont:o}=(0,Ko.useContext)(ne),s=(e?.fontFace?.length??0)>0?r(e.slug,t.fontStyle,t.fontWeight,e.source):r(e.slug,void 0,void 0,e.source),a=()=>{if((e?.fontFace?.length??0)>0){o(e,t);return}o(e)},n=e.name+" "+Yo(t),l=(0,Ko.useId)();return(0,br.jsx)("div",{className:"font-library__font-card",children:(0,br.jsxs)(Jo.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,br.jsx)(Jo.CheckboxControl,{checked:s,onChange:a,id:l}),(0,br.jsx)("label",{htmlFor:l,children:(0,br.jsx)(Gr,{font:t,text:n,onClick:a})})]})})}var bl=jc;function wl(t){switch(t){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(t,10)}}function Qo(t){return t.sort((e,r)=>e.fontStyle==="normal"&&r.fontStyle!=="normal"?-1:r.fontStyle==="normal"&&e.fontStyle!=="normal"?1:e.fontStyle===r.fontStyle?wl(e.fontWeight?.toString()??"normal")-wl(r.fontWeight?.toString()??"normal"):!e.fontStyle||!r.fontStyle?e.fontStyle?-1:1:e.fontStyle.localeCompare(r.fontStyle))}var ft=u(z(),1);function Uc(){let{baseCustomFonts:t,libraryFontSelected:e,handleSetLibraryFontSelected:r,uninstallFontFamily:o,isResolvingLibrary:s,isInstalling:a,saveFontFamilies:n,getFontFacesActivated:l}=(0,wr.useContext)(ne),[m,f]=_t("typography.fontFamilies"),[c,d]=(0,wr.useState)(!1),[g,h]=(0,wr.useState)(null),[v]=_t("typography.fontFamilies",void 0,"base"),_=(0,yn.useSelect)(R=>{let{__experimentalGetCurrentGlobalStylesId:S}=R(mo.store);return S()},[]),k=!!(0,mo.useEntityRecord)("root","globalStyles",_)?.edits?.settings?.typography?.fontFamilies,x=m?.theme?m.theme.map(R=>tr(R,{source:"theme"})).sort((R,S)=>R.name.localeCompare(S.name)):[],b=new Set(x.map(R=>R.slug)),T=v?.theme?x.concat(v.theme.filter(R=>!b.has(R.slug)).map(R=>tr(R,{source:"theme"})).sort((R,S)=>R.name.localeCompare(S.name))):[],Y=e?.source==="custom"&&e?.id,I=(0,yn.useSelect)(R=>{let{canUser:S}=R(mo.store);return Y&&S("delete",{kind:"postType",name:"wp_font_family",id:Y})},[Y]),V=!!e&&e?.source!=="theme"&&I,H=()=>{d(!0)},$=async()=>{h(null);try{await n(m),h({type:"success",message:(0,Et.__)("Font family updated successfully.")})}catch(R){h({type:"error",message:(0,Et.sprintf)((0,Et.__)("There was an error updating the font family. %s"),R.message)})}},bt=R=>R?!R.fontFace||!R.fontFace.length?[{fontFamily:R.fontFamily,fontStyle:"normal",fontWeight:"400"}]:Qo(R.fontFace):[],W=R=>{let S=R?.fontFace&&(R?.fontFace?.length??0)>0?R.fontFace.length:1,E=l(R.slug,R.source).length;return(0,Et.sprintf)((0,Et.__)("%1$d/%2$d variants active"),E,S)};(0,wr.useEffect)(()=>{r(e)},[]);let y=e?l(e.slug,e.source).length:0,L=e?.fontFace?.length??(e?.fontFamily?1:0),it=y>0&&y!==L,ot=y===L,K=()=>{if(!e||!e?.source)return;let R=m?.[e.source]?.filter(E=>E.slug!==e.slug)??[],S=ot?R:[...R,e];f({...m,[e.source]:S}),e.fontFace&&e.fontFace.forEach(E=>{if(ot)fo(E,"all");else{let et=Mr(E?.src??"");et&&er(E,et,"all")}})},gt=T.length>0||t.length>0;return(0,ft.jsxs)("div",{className:"font-library__tabpanel-layout",children:[s&&(0,ft.jsx)("div",{className:"font-library__loading",children:(0,ft.jsx)(ht.ProgressBar,{})}),!s&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsxs)(ht.Navigator,{initialPath:e?"/fontFamily":"/",children:[(0,ft.jsx)(ht.Navigator.Screen,{path:"/",children:(0,ft.jsxs)(ht.__experimentalVStack,{spacing:"8",children:[g&&(0,ft.jsx)(ht.Notice,{status:g.type,onRemove:()=>h(null),children:g.message}),!gt&&(0,ft.jsx)(ht.__experimentalText,{as:"p",children:(0,Et.__)("No fonts installed.")}),T.length>0&&(0,ft.jsxs)(ht.__experimentalVStack,{children:[(0,ft.jsx)("h2",{className:"font-library__fonts-title",children:(0,Et._x)("Theme","font source")}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:T.map(R=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(co,{font:R,navigatorPath:"/fontFamily",variantsText:W(R),onClick:()=>{h(null),r(R)}})},R.slug))})]}),t.length>0&&(0,ft.jsxs)(ht.__experimentalVStack,{children:[(0,ft.jsx)("h2",{className:"font-library__fonts-title",children:(0,Et._x)("Custom","font source")}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:t.map(R=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(co,{font:R,navigatorPath:"/fontFamily",variantsText:W(R),onClick:()=>{h(null),r(R)}})},R.slug))})]})]})}),(0,ft.jsxs)(ht.Navigator.Screen,{path:"/fontFamily",children:[e&&(0,ft.jsx)(Hc,{font:e,isOpen:c,setIsOpen:d,setNotice:h,uninstallFontFamily:o,handleSetLibraryFontSelected:r}),(0,ft.jsxs)(ht.Flex,{justify:"flex-start",children:[(0,ft.jsx)(ht.Navigator.BackButton,{icon:(0,Et.isRTL)()?fr:ur,size:"small",onClick:()=>{r(void 0),h(null)},label:(0,Et.__)("Back")}),(0,ft.jsx)(ht.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:e?.name})]}),g&&(0,ft.jsxs)(ft.Fragment,{children:[(0,ft.jsx)(ht.__experimentalSpacer,{margin:1}),(0,ft.jsx)(ht.Notice,{status:g.type,onRemove:()=>h(null),children:g.message}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:1})]}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:4}),(0,ft.jsx)(ht.__experimentalText,{children:(0,Et.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:4}),(0,ft.jsxs)(ht.__experimentalVStack,{spacing:0,children:[(0,ft.jsx)(ht.CheckboxControl,{className:"font-library__select-all",label:(0,Et.__)("Select all"),checked:ot,onChange:K,indeterminate:it}),(0,ft.jsx)(ht.__experimentalSpacer,{margin:8}),(0,ft.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:e&&bt(e).map((R,S)=>(0,ft.jsx)("li",{className:"font-library__fonts-list-item",children:(0,ft.jsx)(bl,{font:e,face:R},`face${S}`)},`face${S}`))})]})]})]}),(0,ft.jsxs)(ht.__experimentalHStack,{justify:"flex-end",className:"font-library__footer",children:[a&&(0,ft.jsx)(ht.ProgressBar,{}),V&&(0,ft.jsx)(ht.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:H,children:(0,Et.__)("Delete")}),(0,ft.jsx)(ht.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:$,disabled:!k,accessibleWhenDisabled:!0,children:(0,Et.__)("Update")})]})]})]})}function Hc({font:t,isOpen:e,setIsOpen:r,setNotice:o,uninstallFontFamily:s,handleSetLibraryFontSelected:a}){let n=(0,ht.useNavigator)(),l=async()=>{o(null),r(!1);try{await s(t),n.goBack(),a(void 0),o({type:"success",message:(0,Et.__)("Font family uninstalled successfully.")})}catch(f){o({type:"error",message:(0,Et.__)("There was an error uninstalling the font family.")+f.message})}},m=()=>{r(!1)};return(0,ft.jsx)(ht.__experimentalConfirmDialog,{isOpen:e,cancelButtonText:(0,Et.__)("Cancel"),confirmButtonText:(0,Et.__)("Delete"),onCancel:m,onConfirm:l,size:"medium",children:t&&(0,Et.sprintf)((0,Et.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),t.name)})}var $o=Uc;var Zt=u(yt(),1),nt=u(X(),1),_l=u(cr(),1),Rt=u(ut(),1);var Pl=u(be(),1);function Sl(t,e){let{category:r,search:o}=e,s=t||[];return r&&r!=="all"&&(s=s.filter(a=>a.categories&&a.categories.indexOf(r)!==-1)),o&&(s=s.filter(a=>a.font_family_settings&&a.font_family_settings.name.toLowerCase().includes(o.toLowerCase()))),s}function xl(t){return t.reduce((e,r)=>({...e,[r.slug]:(r?.fontFace||[]).reduce((o,s)=>({...o,[`${s.fontStyle}-${s.fontWeight}`]:!0}),{})}),{})}function Cl(t,e,r){return e?!!r[t]?.[`${e.fontStyle}-${e.fontWeight}`]:!!r[t]}var po=u(ut(),1),ae=u(X(),1),Te=u(z(),1);function Wc(){let t=()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))};return(0,Te.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,Te.jsx)(ae.Card,{children:(0,Te.jsxs)(ae.CardBody,{children:[(0,Te.jsx)(ae.__experimentalHeading,{level:2,children:(0,po.__)("Connect to Google Fonts")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:6}),(0,Te.jsx)(ae.__experimentalText,{as:"p",children:(0,po.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:3}),(0,Te.jsx)(ae.__experimentalText,{as:"p",children:(0,po.__)("You can alternatively upload files directly on the Upload tab.")}),(0,Te.jsx)(ae.__experimentalSpacer,{margin:6}),(0,Te.jsx)(ae.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,po.__)("Allow access to Google Fonts")})]})})})}var Fl=Wc;var kl=u(yt(),1),ts=u(X(),1);var Sr=u(z(),1);function Yc({face:t,font:e,handleToggleVariant:r,selected:o}){let s=()=>{if(e?.fontFace){r(e,t);return}r(e)},a=e.name+" "+Yo(t),n=(0,kl.useId)();return(0,Sr.jsx)("div",{className:"font-library__font-card",children:(0,Sr.jsxs)(ts.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,Sr.jsx)(ts.CheckboxControl,{checked:o,onChange:s,id:n}),(0,Sr.jsx)("label",{htmlFor:n,children:(0,Sr.jsx)(Gr,{font:t,text:a,onClick:s})})]})})}var Ol=Yc;var tt=u(z(),1),qc={slug:"all",name:(0,Rt._x)("All","font categories")},Tl="wp-font-library-google-fonts-permission",Zc=500;function Xc({slug:t}){let e=t==="google-fonts",r=()=>window.localStorage.getItem(Tl)==="true",[o,s]=(0,Zt.useState)(null),[a,n]=(0,Zt.useState)(null),[l,m]=(0,Zt.useState)([]),[f,c]=(0,Zt.useState)(1),[d,g]=(0,Zt.useState)({}),[h,v]=(0,Zt.useState)(e&&!r()),{installFonts:_,isInstalling:A}=(0,Zt.useContext)(ne),{record:k,isResolving:x}=(0,Pl.useEntityRecord)("root","fontCollection",t);(0,Zt.useEffect)(()=>{let J=()=>{v(e&&!r())};return J(),window.addEventListener("storage",J),()=>window.removeEventListener("storage",J)},[t,e]);let b=()=>{window.localStorage.setItem(Tl,"false"),window.dispatchEvent(new Event("storage"))};(0,Zt.useEffect)(()=>{s(null)},[t]),(0,Zt.useEffect)(()=>{m([])},[o]);let T=(0,Zt.useMemo)(()=>k?.font_families??[],[k]),Y=k?.categories??[],I=[qc,...Y],V=(0,Zt.useMemo)(()=>Sl(T,d),[T,d]),H=Math.max(window.innerHeight,Zc),$=Math.floor((H-417)/61),bt=Math.ceil(V.length/$),W=(f-1)*$,y=f*$,L=V.slice(W,y),it=J=>{g({...d,category:J}),c(1)},K=(0,_l.debounce)(J=>{g({...d,search:J}),c(1)},300),gt=(J,St)=>{let At=qo(J,St,l);m(At)},R=xl(l),S=()=>{m([])},E=l.length>0?l[0]?.fontFace?.length??0:0,et=E>0&&E!==o?.fontFace?.length,ct=E===o?.fontFace?.length,at=()=>{let J=[];!ct&&o&&J.push(o),m(J)},Ct=async()=>{n(null);let J=l[0];try{J?.fontFace&&await Promise.all(J.fontFace.map(async St=>{St.src&&(St.file=await hl(St.src))}))}catch{n({type:"error",message:(0,Rt.__)("Error installing the fonts, could not be downloaded.")});return}try{await _([J]),n({type:"success",message:(0,Rt.__)("Fonts were installed successfully.")})}catch(St){n({type:"error",message:St.message})}S()},Wt=J=>J?!J.fontFace||!J.fontFace.length?[{fontFamily:J.fontFamily,fontStyle:"normal",fontWeight:"400"}]:Qo(J.fontFace):[];if(h)return(0,tt.jsx)(Fl,{});let Ot=()=>t!=="google-fonts"||h||o?null:(0,tt.jsx)(nt.DropdownMenu,{icon:Ls,label:(0,Rt.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,Rt.__)("Revoke access to Google Fonts"),onClick:b}]});return(0,tt.jsxs)("div",{className:"font-library__tabpanel-layout",children:[x&&(0,tt.jsx)("div",{className:"font-library__loading",children:(0,tt.jsx)(nt.ProgressBar,{})}),!x&&k&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsxs)(nt.Navigator,{initialPath:"/",className:"font-library__tabpanel-layout",children:[(0,tt.jsxs)(nt.Navigator.Screen,{path:"/",children:[(0,tt.jsxs)(nt.__experimentalHStack,{justify:"space-between",children:[(0,tt.jsxs)(nt.__experimentalVStack,{children:[(0,tt.jsx)(nt.__experimentalHeading,{level:2,size:13,children:k.name}),(0,tt.jsx)(nt.__experimentalText,{children:k.description})]}),(0,tt.jsx)(Ot,{})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsxs)(nt.__experimentalHStack,{spacing:4,justify:"space-between",children:[(0,tt.jsx)(nt.SearchControl,{value:d.search,placeholder:(0,Rt.__)("Font name\u2026"),label:(0,Rt.__)("Search"),onChange:K,hideLabelFromVision:!1}),(0,tt.jsx)(nt.SelectControl,{__next40pxDefaultSize:!0,label:(0,Rt.__)("Category"),value:d.category,onChange:it,children:I&&I.map(J=>(0,tt.jsx)("option",{value:J.slug,children:J.name},J.slug))})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),!!k?.font_families?.length&&!V.length&&(0,tt.jsx)(nt.__experimentalText,{children:(0,Rt.__)("No fonts found. Try with a different search term.")}),(0,tt.jsx)("div",{className:"font-library__fonts-grid__main",children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:L.map(J=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(co,{font:J.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{s(J.font_family_settings)}})},J.font_family_settings.slug))})})]}),(0,tt.jsxs)(nt.Navigator.Screen,{path:"/fontFamily",children:[(0,tt.jsxs)(nt.Flex,{justify:"flex-start",children:[(0,tt.jsx)(nt.Navigator.BackButton,{icon:(0,Rt.isRTL)()?fr:ur,size:"small",onClick:()=>{s(null),n(null)},label:(0,Rt.__)("Back")}),(0,tt.jsx)(nt.__experimentalHeading,{level:2,size:13,className:"global-styles-ui-header",children:o?.name})]}),a&&(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(nt.__experimentalSpacer,{margin:1}),(0,tt.jsx)(nt.Notice,{status:a.type,onRemove:()=>n(null),children:a.message}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:1})]}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsx)(nt.__experimentalText,{children:(0,Rt.__)("Select font variants to install.")}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:4}),(0,tt.jsx)(nt.CheckboxControl,{className:"font-library__select-all",label:(0,Rt.__)("Select all"),checked:ct,onChange:at,indeterminate:et}),(0,tt.jsx)(nt.__experimentalVStack,{spacing:0,children:(0,tt.jsx)("ul",{role:"list",className:"font-library__fonts-list",children:o&&Wt(o).map((J,St)=>(0,tt.jsx)("li",{className:"font-library__fonts-list-item",children:(0,tt.jsx)(Ol,{font:o,face:J,handleToggleVariant:gt,selected:Cl(o.slug,o.fontFace?J:null,R)})},`face${St}`))})}),(0,tt.jsx)(nt.__experimentalSpacer,{margin:16})]})]}),o&&(0,tt.jsx)(nt.Flex,{justify:"flex-end",className:"font-library__footer",children:(0,tt.jsx)(nt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:Ct,isBusy:A,disabled:l.length===0||A,accessibleWhenDisabled:!0,children:(0,Rt.__)("Install")})}),!o&&(0,tt.jsxs)(nt.__experimentalHStack,{expanded:!1,className:"font-library__footer",justify:"end",spacing:6,children:[(0,tt.jsx)(nt.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library__page-selection",children:(0,Zt.createInterpolateElement)((0,Rt.sprintf)((0,Rt._x)("
Page
%1$s
of %2$d
","paging"),"",bt),{div:(0,tt.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,tt.jsx)(nt.SelectControl,{"aria-label":(0,Rt.__)("Current page"),value:f.toString(),options:[...Array(bt)].map((J,St)=>({label:(St+1).toString(),value:(St+1).toString()})),onChange:J=>c(parseInt(J)),size:"small",variant:"minimal"})})}),(0,tt.jsxs)(nt.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,tt.jsx)(nt.Button,{onClick:()=>c(f-1),disabled:f===1,accessibleWhenDisabled:!0,label:(0,Rt.__)("Previous page"),icon:(0,Rt.isRTL)()?Eo:Lo,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,tt.jsx)(nt.Button,{onClick:()=>c(f+1),disabled:f===bt,accessibleWhenDisabled:!0,label:(0,Rt.__)("Next page"),icon:(0,Rt.isRTL)()?Lo:Eo,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]})}var es=Xc;var Ur=u(ut(),1),$t=u(X(),1),go=u(yt(),1);var rs=(t=>typeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Al=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof rs=="function"&&rs;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof rs=="function"&&rs,f=0;f0},c.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var d=this.buf_ptr_,g=this.input_.read(this.buf_,d,n);if(g<0)throw new Error("Unexpected end of input");if(g=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&m]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},c.prototype.readBits=function(d){32-this.bit_pos_>>this.bit_pos_&f[d];return this.bit_pos_+=d,g},s.exports=c},{}],2:[function(o,s,a){var n=0,l=1,m=2,f=3;a.lookup=new Uint8Array([0,0,0,0,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1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(o,s,a){var n=o("./streams").BrotliInput,l=o("./streams").BrotliOutput,m=o("./bit_reader"),f=o("./dictionary"),c=o("./huffman").HuffmanCode,d=o("./huffman").BrotliBuildHuffmanTable,g=o("./context"),h=o("./prefix"),v=o("./transform"),_=8,A=16,k=256,x=704,b=26,T=6,Y=2,I=8,V=255,H=1080,$=18,bt=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),W=16,y=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),L=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),it=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function ot(N){var O;return N.readBits(1)===0?16:(O=N.readBits(3),O>0?17+O:(O=N.readBits(3),O>0?8+O:17))}function K(N){if(N.readBits(1)){var O=N.readBits(3);return O===0?1:N.readBits(O)+(1<1&&dt===0)throw new Error("Invalid size byte");O.meta_block_length|=dt<4&&rt===0)throw new Error("Invalid size nibble");O.meta_block_length|=rt<>>B.bit_pos_&V,D=N[O].bits-I,D>0&&(B.bit_pos_+=I,O+=N[O].value,O+=B.val_>>>B.bit_pos_&(1<0;){var Ft=0,Kt;if(P.readMoreInput(),P.fillBitWindow(),Ft+=P.val_>>>P.bit_pos_&31,P.bit_pos_+=lt[Ft].bits,Kt=lt[Ft].value&255,Kt>Kt);else{var he=Kt-14,te,Jt,Dt=0;if(Kt===A&&(Dt=dt),st!==Dt&&(rt=0,st=Dt),te=rt,rt>0&&(rt-=2,rt<<=he),rt+=P.readBits(he)+3,Jt=rt-te,D+Jt>O)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var Qt=0;Qt0;++st){var Dt=bt[st],Qt=0,ee;P.fillBitWindow(),Qt+=P.val_>>>P.bit_pos_&15,P.bit_pos_+=Jt[Qt].bits,ee=Jt[Qt].value,Kt[Dt]=ee,ee!==0&&(he-=32>>ee,++te)}if(!(te===1||he===0))throw new Error("[ReadHuffmanCode] invalid num_codes or space");E(Kt,N,rt,P)}if(D=d(O,B,I,rt,N),D===0)throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return D}function ct(N,O,B){var P,D;return P=S(N,O,B),D=h.kBlockLengthPrefixCode[P].nbits,h.kBlockLengthPrefixCode[P].offset+B.readBits(D)}function at(N,O,B){var P;return N>>5]),this.htrees=new Uint32Array(O)}Ot.prototype.decode=function(N){var O,B,P=0;for(O=0;O=N)throw new Error("[DecodeContextMap] i >= context_map_size");wt[rt]=0,++rt}else wt[rt]=lt-D,++rt}return O.readBits(1)&&Wt(wt,N),B}function St(N,O,B,P,D,dt,rt){var st=B*2,wt=B,lt=S(O,B*H,rt),q;lt===0?q=D[st+(dt[wt]&1)]:lt===1?q=D[st+(dt[wt]-1&1)]+1:q=lt-2,q>=N&&(q-=N),P[B]=q,D[st+(dt[wt]&1)]=q,++dt[wt]}function At(N,O,B,P,D,dt){var rt=D+1,st=B&D,wt=dt.pos_&m.IBUF_MASK,lt;if(O<8||dt.bit_pos_+(O<<3)0;)dt.readMoreInput(),P[st++]=dt.readBits(8),st===rt&&(N.write(P,rt),st=0);return}if(dt.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;dt.bit_pos_<32;)P[st]=dt.val_>>>dt.bit_pos_,dt.bit_pos_+=8,++st,--O;if(lt=dt.bit_end_pos_-dt.bit_pos_>>3,wt+lt>m.IBUF_MASK){for(var q=m.IBUF_MASK+1-wt,Ft=0;Ft=rt){N.write(P,rt),st-=rt;for(var Ft=0;Ft=rt;){if(lt=rt-st,dt.input_.read(P,st,lt)O.buffer.length){var lr=new Uint8Array(P+Mt);lr.set(O.buffer),O.buffer=lr}if(D=ze.input_end,Co=ze.is_uncompressed,ze.is_metadata){for(xe(pt);Mt>0;--Mt)pt.readMoreInput(),pt.readBits(8);continue}if(Mt!==0){if(Co){pt.bit_pos_=pt.bit_pos_+7&-8,At(O,Mt,P,q,lt,pt),P+=Mt;continue}for(B=0;B<3;++B)ge[B]=K(pt)+1,ge[B]>=2&&(et(ge[B]+2,Qt,B*H,pt),et(b,ee,B*H,pt),Ce[B]=ct(ee,B*H,pt),M[B]=1);for(pt.readMoreInput(),i=pt.readBits(2),U=W+(pt.readBits(4)<0;){var Nt,se,ie,Or,Ss,le,ye,Me,Zr,Tr,Xr;for(pt.readMoreInput(),Ce[1]===0&&(St(ge[1],Qt,1,Ae,w,M,pt),Ce[1]=ct(ee,H,pt),Yt=Dt[1].htrees[Ae[1]]),--Ce[1],Nt=S(Dt[1].codes,Yt,pt),se=Nt>>6,se>=2?(se-=2,ye=-1):ye=0,ie=h.kInsertRangeLut[se]+(Nt>>3&7),Or=h.kCopyRangeLut[se]+(Nt&7),Ss=h.kInsertLengthPrefixCode[ie].offset+pt.readBits(h.kInsertLengthPrefixCode[ie].nbits),le=h.kCopyLengthPrefixCode[Or].offset+pt.readBits(h.kCopyLengthPrefixCode[Or].nbits),te=q[P-1<],Jt=q[P-2<],Tr=0;Tr4?3:le-2)&255,It=F[ir+Zr],ye=S(Dt[2].codes,Dt[2].htrees[It],pt),ye>=U){var xs,Qn,Kr;ye-=U,Qn=ye&Pt,ye>>=i,xs=(ye>>1)+1,Kr=(2+(ye&1)<st)if(le>=f.minDictionaryWordLength&&le<=f.maxDictionaryWordLength){var Kr=f.offsetsByLength[le],$n=Me-st-1,ta=f.sizeBitsByLength[le],qu=(1<>ta;if(Kr+=Zu*le,ea=Ft){O.write(q,wt);for(var Fo=0;Fo0&&(Kt[he&3]=Me,++he),le>Mt)throw new Error("Invalid backward reference. pos: "+P+" distance: "+Me+" len: "+le+" bytes left: "+Mt);for(Tr=0;Tr>=1;return(d&h-1)+h}function f(d,g,h,v,_){do v-=h,d[g+v]=new n(_.bits,_.value);while(v>0)}function c(d,g,h){for(var v=1<0;--y[x])k=new n(x&255,W[b++]&65535),f(d,g+T,Y,$,k),T=m(T,x);for(V=bt-1,I=-1,x=h+1,Y=2;x<=l;++x,Y<<=1)for(;y[x]>0;--y[x])(T&V)!==I&&(g+=$,H=c(y,x,h),$=1<>h),Y,$,k),T=m(T,x);return bt}},{}],8:[function(o,s,a){"use strict";a.byteLength=h,a.toByteArray=_,a.fromByteArray=x;for(var n=[],l=[],m=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,d=f.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var Y=b.indexOf("=");Y===-1&&(Y=T);var I=Y===T?0:4-Y%4;return[Y,I]}function h(b){var T=g(b),Y=T[0],I=T[1];return(Y+I)*3/4-I}function v(b,T,Y){return(T+Y)*3/4-Y}function _(b){for(var T,Y=g(b),I=Y[0],V=Y[1],H=new m(v(b,I,V)),$=0,bt=V>0?I-4:I,W=0;W>16&255,H[$++]=T>>8&255,H[$++]=T&255;return V===2&&(T=l[b.charCodeAt(W)]<<2|l[b.charCodeAt(W+1)]>>4,H[$++]=T&255),V===1&&(T=l[b.charCodeAt(W)]<<10|l[b.charCodeAt(W+1)]<<4|l[b.charCodeAt(W+2)]>>2,H[$++]=T>>8&255,H[$++]=T&255),H}function A(b){return n[b>>18&63]+n[b>>12&63]+n[b>>6&63]+n[b&63]}function k(b,T,Y){for(var I,V=[],H=T;Hbt?bt:$+H));return I===1?(T=b[Y-1],V.push(n[T>>2]+n[T<<4&63]+"==")):I===2&&(T=(b[Y-2]<<8)+b[Y-1],V.push(n[T>>10]+n[T>>4&63]+n[T<<2&63]+"=")),V.join("")}},{}],9:[function(o,s,a){function n(l,m){this.offset=l,this.nbits=m}a.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],a.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],a.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],a.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],a.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(o,s,a){function n(m){this.buffer=m,this.pos=0}n.prototype.read=function(m,f,c){this.pos+c>this.buffer.length&&(c=this.buffer.length-this.pos);for(var d=0;dthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(m.subarray(0,f),this.pos),this.pos+=f,f},a.BrotliOutput=l},{}],11:[function(o,s,a){var n=o("./dictionary"),l=0,m=1,f=2,c=3,d=4,g=5,h=6,v=7,_=8,A=9,k=10,x=11,b=12,T=13,Y=14,I=15,V=16,H=17,$=18,bt=19,W=20;function y(ot,K,gt){this.prefix=new Uint8Array(ot.length),this.transform=K,this.suffix=new Uint8Array(gt.length);for(var R=0;R'),new y("",l,` `),new y("",c,""),new y("",l,"]"),new y("",l," for "),new y("",Y,""),new y("",f,""),new y("",l," a "),new y("",l," that "),new y(" ",k,""),new y("",l,". "),new y(".",l,""),new y(" ",l,", "),new y("",I,""),new y("",l," with "),new y("",l,"'"),new y("",l," from "),new y("",l," by "),new y("",V,""),new y("",H,""),new y(" the ",l,""),new y("",d,""),new y("",l,". The "),new y("",x,""),new y("",l," on "),new y("",l," as "),new y("",l," is "),new y("",v,""),new y("",m,"ing "),new y("",l,` - `),new y("",l,":"),new y(" ",l,". "),new y("",l,"ed "),new y("",W,""),new y("",$,""),new y("",h,""),new y("",l,"("),new y("",k,", "),new y("",_,""),new y("",l," at "),new y("",l,"ly "),new y(" the ",l," of "),new y("",g,""),new y("",A,""),new y(" ",k,", "),new y("",k,'"'),new y(".",l,"("),new y("",x," "),new y("",k,'">'),new y("",l,'="'),new y(" ",l,"."),new y(".com/",l,""),new y(" the ",l," of the "),new y("",k,"'"),new y("",l,". This "),new y("",l,","),new y(".",l," "),new y("",k,"("),new y("",k,"."),new y("",l," not "),new y(" ",l,'="'),new y("",l,"er "),new y(" ",x," "),new y("",l,"al "),new y(" ",x,""),new y("",l,"='"),new y("",x,'"'),new y("",k,". "),new y(" ",l,"("),new y("",l,"ful "),new y(" ",k,". "),new y("",l,"ive "),new y("",l,"less "),new y("",x,"'"),new y("",l,"est "),new y(" ",k,"."),new y("",x,'">'),new y(" ",l,"='"),new y("",k,","),new y("",l,"ize "),new y("",x,"."),new y("\xC2\xA0",l,""),new y(" ",l,","),new y("",k,'="'),new y("",x,'="'),new y("",l,"ous "),new y("",x,", "),new y("",k,"='"),new y(" ",k,","),new y(" ",x,'="'),new y(" ",x,", "),new y("",x,","),new y("",x,"("),new y("",x,". "),new y(" ",x,"."),new y("",x,"='"),new y(" ",x,". "),new y(" ",k,'="'),new y(" ",x,"='"),new y(" ",k,"='")];a.kTransforms=L,a.kNumTransforms=L.length;function it(ot,K){return ot[K]<192?(ot[K]>=97&&ot[K]<=122&&(ot[K]^=32),1):ot[K]<224?(ot[K+1]^=32,2):(ot[K+2]^=5,3)}a.transformDictionaryWord=function(ot,K,gt,R,S){var E=L[S].prefix,et=L[S].suffix,ct=L[S].transform,at=ctR&&(at=R);for(var J=0;J0;){var St=it(ot,Ot);Ot+=St,R-=St}for(var At=0;Attypeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Rl=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof os=="function"&&os;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof os=="function"&&os,f=0;f=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;f[254]=f[254]=1,a.string2buf=function(g){var h,v,_,A,k,x=g.length,b=0;for(A=0;A>>6,h[k++]=128|v&63):v<65536?(h[k++]=224|v>>>12,h[k++]=128|v>>>6&63,h[k++]=128|v&63):(h[k++]=240|v>>>18,h[k++]=128|v>>>12&63,h[k++]=128|v>>>6&63,h[k++]=128|v&63);return h};function d(g,h){if(h<65534&&(g.subarray&&m||!g.subarray&&l))return String.fromCharCode.apply(null,n.shrinkBuf(g,h));for(var v="",_=0;_4){b[_++]=65533,v+=k-1;continue}for(A&=k===2?31:k===3?15:7;k>1&&v1){b[_++]=65533;continue}A<65536?b[_++]=A:(A-=65536,b[_++]=55296|A>>10&1023,b[_++]=56320|A&1023)}return d(b,_)},a.utf8border=function(g,h){var v;for(h=h||g.length,h>g.length&&(h=g.length),v=h-1;v>=0&&(g[v]&192)===128;)v--;return v<0||v===0?h:v+f[g[v]]>h?v:h}},{"./common":1}],3:[function(o,s,a){"use strict";function n(l,m,f,c){for(var d=l&65535|0,g=l>>>16&65535|0,h=0;f!==0;){h=f>2e3?2e3:f,f-=h;do d=d+m[c++]|0,g=g+d|0;while(--h);d%=65521,g%=65521}return d|g<<16|0}s.exports=n},{}],4:[function(o,s,a){"use strict";s.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,s,a){"use strict";function n(){for(var f,c=[],d=0;d<256;d++){f=d;for(var g=0;g<8;g++)f=f&1?3988292384^f>>>1:f>>>1;c[d]=f}return c}var l=n();function m(f,c,d,g){var h=l,v=g+d;f^=-1;for(var _=g;_>>8^h[(f^c[_])&255];return f^-1}s.exports=m},{}],6:[function(o,s,a){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}s.exports=n},{}],7:[function(o,s,a){"use strict";var n=30,l=12;s.exports=function(f,c){var d,g,h,v,_,A,k,x,b,T,Y,I,V,H,$,bt,W,y,L,it,ot,K,gt,R,S;d=f.state,g=f.next_in,R=f.input,h=g+(f.avail_in-5),v=f.next_out,S=f.output,_=v-(c-f.avail_out),A=v+(f.avail_out-257),k=d.dmax,x=d.wsize,b=d.whave,T=d.wnext,Y=d.window,I=d.hold,V=d.bits,H=d.lencode,$=d.distcode,bt=(1<>>24,I>>>=L,V-=L,L=y>>>16&255,L===0)S[v++]=y&65535;else if(L&16){it=y&65535,L&=15,L&&(V>>=L,V-=L),V<15&&(I+=R[g++]<>>24,I>>>=L,V-=L,L=y>>>16&255,L&16){if(ot=y&65535,L&=15,Vk){f.msg="invalid distance too far back",d.mode=n;break t}if(I>>>=L,V-=L,L=v-_,ot>L){if(L=ot-L,L>b&&d.sane){f.msg="invalid distance too far back",d.mode=n;break t}if(K=0,gt=Y,T===0){if(K+=x-L,L2;)S[v++]=gt[K++],S[v++]=gt[K++],S[v++]=gt[K++],it-=3;it&&(S[v++]=gt[K++],it>1&&(S[v++]=gt[K++]))}else{K=v-ot;do S[v++]=S[K++],S[v++]=S[K++],S[v++]=S[K++],it-=3;while(it>2);it&&(S[v++]=S[K++],it>1&&(S[v++]=S[K++]))}}else if((L&64)===0){y=$[(y&65535)+(I&(1<>3,g-=it,V-=it<<3,I&=(1<>>24&255)+(w>>>8&65280)+((w&65280)<<8)+((w&255)<<24)}function Kt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function he(w){var M;return!w||!w.state?T:(M=w.state,w.total_in=w.total_out=M.total=0,w.msg="",M.wrap&&(w.adler=M.wrap&1),M.mode=$,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new n.Buf32(st),M.distcode=M.distdyn=new n.Buf32(wt),M.sane=1,M.back=-1,k)}function te(w){var M;return!w||!w.state?T:(M=w.state,M.wsize=0,M.whave=0,M.wnext=0,he(w))}function Jt(w,M){var i,U;return!w||!w.state||(U=w.state,M<0?(i=0,M=-M):(i=(M>>4)+1,M<48&&(M&=15)),M&&(M<8||M>15))?T:(U.window!==null&&U.wbits!==M&&(U.window=null),U.wrap=i,U.wbits=M,te(w))}function Dt(w,M){var i,U;return w?(U=new Kt,w.state=U,U.window=null,i=Jt(w,M),i!==k&&(w.state=null),i):T}function Qt(w){return Dt(w,q)}var ee=!0,pt,qr;function kr(w){if(ee){var M;for(pt=new n.Buf32(512),qr=new n.Buf32(32),M=0;M<144;)w.lens[M++]=8;for(;M<256;)w.lens[M++]=9;for(;M<280;)w.lens[M++]=7;for(;M<288;)w.lens[M++]=8;for(c(g,w.lens,0,288,pt,0,w.work,{bits:9}),M=0;M<32;)w.lens[M++]=5;c(h,w.lens,0,32,qr,0,w.work,{bits:5}),ee=!1}w.lencode=pt,w.lenbits=9,w.distcode=qr,w.distbits=5}function Mt(w,M,i,U){var Pt,G=w.state;return G.window===null&&(G.wsize=1<=G.wsize?(n.arraySet(G.window,M,i-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(Pt=G.wsize-G.wnext,Pt>U&&(Pt=U),n.arraySet(G.window,M,i-U,Pt,G.wnext),U-=Pt,U?(n.arraySet(G.window,M,i-U,U,0),G.wnext=U,G.whave=G.wsize):(G.wnext+=Pt,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,i.check=m(i.check,Nt,2,0),F=0,C=0,i.mode=bt;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((F&255)<<8)+(F>>8))%31){w.msg="incorrect header check",i.mode=D;break}if((F&15)!==H){w.msg="unknown compression method",i.mode=D;break}if(F>>>=4,C-=4,Lt=(F&15)+8,i.wbits===0)i.wbits=Lt;else if(Lt>i.wbits){w.msg="invalid window size",i.mode=D;break}i.dmax=1<>8&1),i.flags&512&&(Nt[0]=F&255,Nt[1]=F>>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0,i.mode=W;case W:for(;C<32;){if(j===0)break t;j--,F+=U[G++]<>>8&255,Nt[2]=F>>>16&255,Nt[3]=F>>>24&255,i.check=m(i.check,Nt,4,0)),F=0,C=0,i.mode=y;case y:for(;C<16;){if(j===0)break t;j--,F+=U[G++]<>8),i.flags&512&&(Nt[0]=F&255,Nt[1]=F>>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0,i.mode=L;case L:if(i.flags&1024){for(;C<16;){if(j===0)break t;j--,F+=U[G++]<>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0}else i.head&&(i.head.extra=null);i.mode=it;case it:if(i.flags&1024&&(Q=i.length,Q>j&&(Q=j),Q&&(i.head&&(Lt=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,U,G,Q,Lt)),i.flags&512&&(i.check=m(i.check,U,Q,G)),j-=Q,G+=Q,i.length-=Q),i.length))break t;i.length=0,i.mode=ot;case ot:if(i.flags&2048){if(j===0)break t;Q=0;do Lt=U[G+Q++],i.head&&Lt&&i.length<65536&&(i.head.name+=String.fromCharCode(Lt));while(Lt&&Q>9&1,i.head.done=!0),w.adler=i.check=0,i.mode=E;break;case R:for(;C<32;){if(j===0)break t;j--,F+=U[G++]<>>=C&7,C-=C&7,i.mode=O;break}for(;C<3;){if(j===0)break t;j--,F+=U[G++]<>>=1,C-=1,F&3){case 0:i.mode=ct;break;case 1:if(kr(i),i.mode=St,M===A){F>>>=2,C-=2;break t}break;case 2:i.mode=Wt;break;case 3:w.msg="invalid block type",i.mode=D}F>>>=2,C-=2;break;case ct:for(F>>>=C&7,C-=C&7;C<32;){if(j===0)break t;j--,F+=U[G++]<>>16^65535)){w.msg="invalid stored block lengths",i.mode=D;break}if(i.length=F&65535,F=0,C=0,i.mode=at,M===A)break t;case at:i.mode=Ct;case Ct:if(Q=i.length,Q){if(Q>j&&(Q=j),Q>Vt&&(Q=Vt),Q===0)break t;n.arraySet(Pt,U,G,Q,re),j-=Q,G+=Q,Vt-=Q,re+=Q,i.length-=Q;break}i.mode=E;break;case Wt:for(;C<14;){if(j===0)break t;j--,F+=U[G++]<>>=5,C-=5,i.ndist=(F&31)+1,F>>>=5,C-=5,i.ncode=(F&15)+4,F>>>=4,C-=4,i.nlen>286||i.ndist>30){w.msg="too many length or distance symbols",i.mode=D;break}i.have=0,i.mode=Ot;case Ot:for(;i.have>>=3,C-=3}for(;i.have<19;)i.lens[Or[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,se={bits:i.lenbits},oe=c(d,i.lens,0,19,i.lencode,0,i.work,se),i.lenbits=se.bits,oe){w.msg="invalid code lengths set",i.mode=D;break}i.have=0,i.mode=J;case J:for(;i.have>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=xt,C-=xt,i.lens[i.have++]=jt;else{if(jt===16){for(ie=xt+2;C>>=xt,C-=xt,i.have===0){w.msg="invalid bit length repeat",i.mode=D;break}Lt=i.lens[i.have-1],Q=3+(F&3),F>>>=2,C-=2}else if(jt===17){for(ie=xt+3;C>>=xt,C-=xt,Lt=0,Q=3+(F&7),F>>>=3,C-=3}else{for(ie=xt+7;C>>=xt,C-=xt,Lt=0,Q=11+(F&127),F>>>=7,C-=7}if(i.have+Q>i.nlen+i.ndist){w.msg="invalid bit length repeat",i.mode=D;break}for(;Q--;)i.lens[i.have++]=Lt}}if(i.mode===D)break;if(i.lens[256]===0){w.msg="invalid code -- missing end-of-block",i.mode=D;break}if(i.lenbits=9,se={bits:i.lenbits},oe=c(g,i.lens,0,i.nlen,i.lencode,0,i.work,se),i.lenbits=se.bits,oe){w.msg="invalid literal/lengths set",i.mode=D;break}if(i.distbits=6,i.distcode=i.distdyn,se={bits:i.distbits},oe=c(h,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,se),i.distbits=se.bits,oe){w.msg="invalid distances set",i.mode=D;break}if(i.mode=St,M===A)break t;case St:i.mode=At;case At:if(j>=6&&Vt>=258){w.next_out=re,w.avail_out=Vt,w.next_in=G,w.avail_in=j,i.hold=F,i.bits=C,f(w,Tt),re=w.next_out,Pt=w.output,Vt=w.avail_out,G=w.next_in,U=w.input,j=w.avail_in,F=i.hold,C=i.bits,i.mode===E&&(i.back=-1);break}for(i.back=0;It=i.lencode[F&(1<>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>Yt)],xt=It>>>24,Gt=It>>>16&255,jt=It&65535,!(Yt+xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=Yt,C-=Yt,i.back+=Yt}if(F>>>=xt,C-=xt,i.back+=xt,i.length=jt,Gt===0){i.mode=N;break}if(Gt&32){i.back=-1,i.mode=E;break}if(Gt&64){w.msg="invalid literal/length code",i.mode=D;break}i.extra=Gt&15,i.mode=xe;case xe:if(i.extra){for(ie=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=zt;case zt:for(;It=i.distcode[F&(1<>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>Yt)],xt=It>>>24,Gt=It>>>16&255,jt=It&65535,!(Yt+xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=Yt,C-=Yt,i.back+=Yt}if(F>>>=xt,C-=xt,i.back+=xt,Gt&64){w.msg="invalid distance code",i.mode=D;break}i.offset=jt,i.extra=Gt&15,i.mode=sr;case sr:if(i.extra){for(ie=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){w.msg="invalid distance too far back",i.mode=D;break}i.mode=Xe;case Xe:if(Vt===0)break t;if(Q=Tt-Vt,i.offset>Q){if(Q=i.offset-Q,Q>i.whave&&i.sane){w.msg="invalid distance too far back",i.mode=D;break}Q>i.wnext?(Q-=i.wnext,ar=i.wsize-Q):ar=i.wnext-Q,Q>i.length&&(Q=i.length),ir=i.window}else ir=Pt,ar=re-i.offset,Q=i.length;Q>Vt&&(Q=Vt),Vt-=Q,i.length-=Q;do Pt[re++]=ir[ar++];while(--Q);i.length===0&&(i.mode=At);break;case N:if(Vt===0)break t;Pt[re++]=i.length,Vt--,i.mode=At;break;case O:if(i.wrap){for(;C<32;){if(j===0)break t;j--,F|=U[G++]<=1&&At[it]===0;it--);if(ot>it&&(ot=it),it===0)return I[V++]=1<<24|64<<16|0,I[V++]=1<<24|64<<16|0,$.bits=1,0;for(L=1;L0&&(x===c||it!==1))return-1;for(xe[1]=0,W=1;Wm||x===g&&S>f)return 1;for(;;){Xe=W-gt,H[y]St?(N=zt[sr+H[y]],O=Ot[J+H[y]]):(N=96,O=0),et=1<>gt)+ct]=Xe<<24|N<<16|O|0;while(ct!==0);for(et=1<>=1;if(et!==0?(E&=et-1,E+=et):E=0,y++,--At[W]===0){if(W===it)break;W=b[T+H[y]]}if(W>ot&&(E&Ct)!==at){for(gt===0&&(gt=ot),Wt+=L,K=W-gt,R=1<m||x===g&&S>f)return 1;at=E&Ct,I[at]=ot<<24|K<<16|Wt-V|0}}return E!==0&&(I[Wt+E]=W-gt<<24|64<<16|0),$.bits=ot,0}},{"../utils/common":1}],10:[function(o,s,a){"use strict";s.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,s,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}s.exports=n},{}],"/lib/inflate.js":[function(o,s,a){"use strict";var n=o("./zlib/inflate"),l=o("./utils/common"),m=o("./utils/strings"),f=o("./zlib/constants"),c=o("./zlib/messages"),d=o("./zlib/zstream"),g=o("./zlib/gzheader"),h=Object.prototype.toString;function v(k){if(!(this instanceof v))return new v(k);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},k||{});var x=this.options;x.raw&&x.windowBits>=0&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),x.windowBits>=0&&x.windowBits<16&&!(k&&k.windowBits)&&(x.windowBits+=32),x.windowBits>15&&x.windowBits<48&&(x.windowBits&15)===0&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=n.inflateInit2(this.strm,x.windowBits);if(b!==f.Z_OK)throw new Error(c[b]);if(this.header=new g,n.inflateGetHeader(this.strm,this.header),x.dictionary&&(typeof x.dictionary=="string"?x.dictionary=m.string2buf(x.dictionary):h.call(x.dictionary)==="[object ArrayBuffer]"&&(x.dictionary=new Uint8Array(x.dictionary)),x.raw&&(b=n.inflateSetDictionary(this.strm,x.dictionary),b!==f.Z_OK)))throw new Error(c[b])}v.prototype.push=function(k,x){var b=this.strm,T=this.options.chunkSize,Y=this.options.dictionary,I,V,H,$,bt,W=!1;if(this.ended)return!1;V=x===~~x?x:x===!0?f.Z_FINISH:f.Z_NO_FLUSH,typeof k=="string"?b.input=m.binstring2buf(k):h.call(k)==="[object ArrayBuffer]"?b.input=new Uint8Array(k):b.input=k,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new l.Buf8(T),b.next_out=0,b.avail_out=T),I=n.inflate(b,f.Z_NO_FLUSH),I===f.Z_NEED_DICT&&Y&&(I=n.inflateSetDictionary(this.strm,Y)),I===f.Z_BUF_ERROR&&W===!0&&(I=f.Z_OK,W=!1),I!==f.Z_STREAM_END&&I!==f.Z_OK)return this.onEnd(I),this.ended=!0,!1;b.next_out&&(b.avail_out===0||I===f.Z_STREAM_END||b.avail_in===0&&(V===f.Z_FINISH||V===f.Z_SYNC_FLUSH))&&(this.options.to==="string"?(H=m.utf8border(b.output,b.next_out),$=b.next_out-H,bt=m.buf2string(b.output,H),b.next_out=$,b.avail_out=T-$,$&&l.arraySet(b.output,b.output,H,$,0),this.onData(bt)):this.onData(l.shrinkBuf(b.output,b.next_out))),b.avail_in===0&&b.avail_out===0&&(W=!0)}while((b.avail_in>0||b.avail_out===0)&&I!==f.Z_STREAM_END);return I===f.Z_STREAM_END&&(V=f.Z_FINISH),V===f.Z_FINISH?(I=n.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,I===f.Z_OK):(V===f.Z_SYNC_FLUSH&&(this.onEnd(f.Z_OK),b.avail_out=0),!0)},v.prototype.onData=function(k){this.chunks.push(k)},v.prototype.onEnd=function(k){k===f.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg};function _(k,x){var b=new v(x);if(b.push(k,!0),b.err)throw b.msg||c[b.err];return b.result}function A(k,x){return x=x||{},x.raw=!0,_(k,x)}a.Inflate=v,a.inflate=_,a.inflateRaw=A,a.ungzip=_},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var nw=globalThis.fetch,ss=class{constructor(t,e={},r){this.type=t,this.detail=e,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},Kc=class{constructor(){this.listeners={}}addEventListener(t,e,r){let o=this.listeners[t]||[];r?o.unshift(e):o.push(e),this.listeners[t]=o}removeEventListener(t,e){let r=this.listeners[t]||[],o=r.findIndex(s=>s===e);o>-1&&(r.splice(o,1),this.listeners[t]=r)}dispatch(t){let e=this.listeners[t.type];if(e)for(let r=0,o=e.length;rString.fromCharCode(e)).join("")}var $c=class{constructor(t,e,r){this.name=(r||t.tag||"").trim(),this.length=t.length,this.start=t.offset,this.offset=0,this.data=e,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let s=o.replace(/get(Big)?/,"").toLowerCase(),a=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,s,{get:()=>this.getValue(o,a)})})}get currentPosition(){return this.start+this.offset}set currentPosition(t){this.start=t,this.offset=0}skip(t=0,e=8){this.offset+=t*e/8}getValue(t,e){let r=this.start+this.offset;this.offset+=e;try{return this.data[t](r)}catch(o){throw console.error("parser",t,e,this),console.error("parser",this.start,this.offset),o}}flags(t){if(t===8||t===16||t===32||t===64)return this[`uint${t}`].toString(2).padStart(t,0).split("").map(e=>e==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let t=this.uint32;return Qc([t>>24&255,t>>16&255,t>>8&255,t&255])}get fixed(){let t=this.int16,e=Math.round(1e3*this.uint16/65356);return t+e/1e3}get legacyFixed(){let t=this.uint16,e=this.uint16.toString(16).padStart(4,0);return parseFloat(`${t}.${e}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let t=0;for(let e=0;e<5;e++){let r=this.uint8;if(t=t*128+(r&127),r<128)break}return t}get longdatetime(){return new Date(Jc+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let t=p.uint16,e=[0,1,-2,-1][t>>14],r=t&16383;return e+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(t=0,e=0,r=8,o=!1){if(t=t||this.length,t===0)return[];e&&(this.currentPosition=e);let s=`${o?"":"u"}int${r}`,a=[];for(;t--;)a.push(this[s]);return a}},Bt=class{constructor(t){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>t});let r=t.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(t){Object.keys(t).forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);r.get?this[e]=r.get.bind(this):r.value!==void 0&&(this[e]=r.value)}),this.parser.length&&this.parser.verifyLength()}},mt=class extends Bt{constructor(t,e,r){let{parser:o,start:s}=super(new $c(t,e,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>s})}};function Z(t,e,r){let o;Object.defineProperty(t,e,{get:()=>o||(o=r(),o),enumerable:!0})}var td=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:12},e,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new ed(o)),this.tables={},this.directory.forEach(s=>{let a=()=>r(this.tables,{tag:s.tag,offset:s.offset,length:s.length},e);Z(this.tables,s.tag.trim(),a)})}},ed=class{constructor(t){this.tag=t.tag,this.checksum=t.uint32,this.offset=t.uint32,this.length=t.uint32}},El=Rl.inflate||void 0,Il=void 0,rd=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:44},e,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new od(o)),sd(this,e,r)}},od=class{constructor(t){this.tag=t.tag,this.offset=t.uint32,this.compLength=t.uint32,this.origLength=t.uint32,this.origChecksum=t.uint32}};function sd(t,e,r){t.tables={},t.directory.forEach(o=>{Z(t.tables,o.tag.trim(),()=>{let s=0,a=e;if(o.compLength!==o.origLength){let n=e.buffer.slice(o.offset,o.offset+o.compLength),l;if(El)l=El(new Uint8Array(n));else if(Il)l=Il(new Uint8Array(n));else{let m="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(m),new Error(m)}a=new DataView(l.buffer)}else s=o.offset;return r(t.tables,{tag:o.tag,offset:s,length:o.origLength},a)})})}var Ll=Al,Bl=void 0,nd=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:48},e,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new ad(o));let s=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,m)=>{let f=this.directory[m+1];f&&(f.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let a,n=e.buffer.slice(s);if(Ll)a=Ll(new Uint8Array(n));else if(Bl)a=new Uint8Array(Bl(n));else{let l="no brotli decoder available to decode WOFF2 font";throw t.onerror&&t.onerror(l),new Error(l)}id(this,a,r)}},ad=class{constructor(t){this.flags=t.uint8;let e=this.tagNumber=this.flags&63;e===63?this.tag=t.tag:this.tag=ld(e);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=t.uint128,o&&(this.transformLength=t.uint128)}};function id(t,e,r){t.tables={},t.directory.forEach(o=>{Z(t.tables,o.tag.trim(),()=>{let s=o.offset,a=s+(o.transformLength?o.transformLength:o.origLength),n=new DataView(e.slice(s,a).buffer);try{return r(t.tables,{tag:o.tag,offset:0,length:o.origLength},n)}catch(l){console.error(l)}})})}function ld(t){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][t&63]}var jl={},Ul=!1;Promise.all([Promise.resolve().then(function(){return Dd}),Promise.resolve().then(function(){return Nd}),Promise.resolve().then(function(){return Md}),Promise.resolve().then(function(){return Ud}),Promise.resolve().then(function(){return Wd}),Promise.resolve().then(function(){return Kd}),Promise.resolve().then(function(){return Qd}),Promise.resolve().then(function(){return tm}),Promise.resolve().then(function(){return fm}),Promise.resolve().then(function(){return Sm}),Promise.resolve().then(function(){return lp}),Promise.resolve().then(function(){return fp}),Promise.resolve().then(function(){return pp}),Promise.resolve().then(function(){return vp}),Promise.resolve().then(function(){return wp}),Promise.resolve().then(function(){return xp}),Promise.resolve().then(function(){return kp}),Promise.resolve().then(function(){return Tp}),Promise.resolve().then(function(){return Pp}),Promise.resolve().then(function(){return Rp}),Promise.resolve().then(function(){return Ip}),Promise.resolve().then(function(){return Bp}),Promise.resolve().then(function(){return Np}),Promise.resolve().then(function(){return Gp}),Promise.resolve().then(function(){return jp}),Promise.resolve().then(function(){return Hp}),Promise.resolve().then(function(){return Yp}),Promise.resolve().then(function(){return Zp}),Promise.resolve().then(function(){return Kp}),Promise.resolve().then(function(){return $p}),Promise.resolve().then(function(){return nh}),Promise.resolve().then(function(){return uh}),Promise.resolve().then(function(){return dh}),Promise.resolve().then(function(){return gh}),Promise.resolve().then(function(){return vh}),Promise.resolve().then(function(){return wh}),Promise.resolve().then(function(){return Ch}),Promise.resolve().then(function(){return kh}),Promise.resolve().then(function(){return Ah}),Promise.resolve().then(function(){return Eh}),Promise.resolve().then(function(){return Bh})]).then(t=>{t.forEach(e=>{let r=Object.keys(e)[0];jl[r]=e[r]}),Ul=!0});function ud(t,e,r){let o=e.tag.replace(/[^\w\d]/g,""),s=jl[o];return s?new s(e,r,t):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function fd(){let t=0;function e(r,o){if(!Ul)return t>10?o(new Error("loading took too long")):(t++,setTimeout(()=>e(r),250));r(ud)}return new Promise((r,o)=>e(r))}function cd(t,e){let r=t.lastIndexOf("."),o=(t.substring(r+1)||"").toLowerCase(),s={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(s)return s;let a={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(a||(a=`${t} is not a known webfont format.`),e)throw new Error(a);console.warn(`Could not load font: ${a}`)}async function dd(t,e,r={}){if(!globalThis.document)return;let o=cd(e,r.errorOnStyle);if(!o)return;let s=document.createElement("style");s.className="injected-by-Font-js";let a=[];return r.styleRules&&(a=Object.entries(r.styleRules).map(([n,l])=>`${n}: ${l};`)),s.textContent=` + `),new y("",l,":"),new y(" ",l,". "),new y("",l,"ed "),new y("",W,""),new y("",$,""),new y("",h,""),new y("",l,"("),new y("",k,", "),new y("",_,""),new y("",l," at "),new y("",l,"ly "),new y(" the ",l," of "),new y("",g,""),new y("",A,""),new y(" ",k,", "),new y("",k,'"'),new y(".",l,"("),new y("",x," "),new y("",k,'">'),new y("",l,'="'),new y(" ",l,"."),new y(".com/",l,""),new y(" the ",l," of the "),new y("",k,"'"),new y("",l,". This "),new y("",l,","),new y(".",l," "),new y("",k,"("),new y("",k,"."),new y("",l," not "),new y(" ",l,'="'),new y("",l,"er "),new y(" ",x," "),new y("",l,"al "),new y(" ",x,""),new y("",l,"='"),new y("",x,'"'),new y("",k,". "),new y(" ",l,"("),new y("",l,"ful "),new y(" ",k,". "),new y("",l,"ive "),new y("",l,"less "),new y("",x,"'"),new y("",l,"est "),new y(" ",k,"."),new y("",x,'">'),new y(" ",l,"='"),new y("",k,","),new y("",l,"ize "),new y("",x,"."),new y("\xC2\xA0",l,""),new y(" ",l,","),new y("",k,'="'),new y("",x,'="'),new y("",l,"ous "),new y("",x,", "),new y("",k,"='"),new y(" ",k,","),new y(" ",x,'="'),new y(" ",x,", "),new y("",x,","),new y("",x,"("),new y("",x,". "),new y(" ",x,"."),new y("",x,"='"),new y(" ",x,". "),new y(" ",k,'="'),new y(" ",x,"='"),new y(" ",k,"='")];a.kTransforms=L,a.kNumTransforms=L.length;function it(ot,K){return ot[K]<192?(ot[K]>=97&&ot[K]<=122&&(ot[K]^=32),1):ot[K]<224?(ot[K+1]^=32,2):(ot[K+2]^=5,3)}a.transformDictionaryWord=function(ot,K,gt,R,S){var E=L[S].prefix,et=L[S].suffix,ct=L[S].transform,at=ctR&&(at=R);for(var J=0;J0;){var St=it(ot,Ot);Ot+=St,R-=St}for(var At=0;Attypeof ue<"u"?ue:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ue<"u"?ue:e)[r]}):t)(function(t){if(typeof ue<"u")return ue.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Rl=(function(){var t,e,r;return(function(){function o(s,a,n){function l(c,d){if(!a[c]){if(!s[c]){var g=typeof os=="function"&&os;if(!d&&g)return g(c,!0);if(m)return m(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var v=a[c]={exports:{}};s[c][0].call(v.exports,function(_){var A=s[c][1][_];return l(A||_)},v,v.exports,o,s,a,n)}return a[c].exports}for(var m=typeof os=="function"&&os,f=0;f=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;f[254]=f[254]=1,a.string2buf=function(g){var h,v,_,A,k,x=g.length,b=0;for(A=0;A>>6,h[k++]=128|v&63):v<65536?(h[k++]=224|v>>>12,h[k++]=128|v>>>6&63,h[k++]=128|v&63):(h[k++]=240|v>>>18,h[k++]=128|v>>>12&63,h[k++]=128|v>>>6&63,h[k++]=128|v&63);return h};function d(g,h){if(h<65534&&(g.subarray&&m||!g.subarray&&l))return String.fromCharCode.apply(null,n.shrinkBuf(g,h));for(var v="",_=0;_4){b[_++]=65533,v+=k-1;continue}for(A&=k===2?31:k===3?15:7;k>1&&v1){b[_++]=65533;continue}A<65536?b[_++]=A:(A-=65536,b[_++]=55296|A>>10&1023,b[_++]=56320|A&1023)}return d(b,_)},a.utf8border=function(g,h){var v;for(h=h||g.length,h>g.length&&(h=g.length),v=h-1;v>=0&&(g[v]&192)===128;)v--;return v<0||v===0?h:v+f[g[v]]>h?v:h}},{"./common":1}],3:[function(o,s,a){"use strict";function n(l,m,f,c){for(var d=l&65535|0,g=l>>>16&65535|0,h=0;f!==0;){h=f>2e3?2e3:f,f-=h;do d=d+m[c++]|0,g=g+d|0;while(--h);d%=65521,g%=65521}return d|g<<16|0}s.exports=n},{}],4:[function(o,s,a){"use strict";s.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(o,s,a){"use strict";function n(){for(var f,c=[],d=0;d<256;d++){f=d;for(var g=0;g<8;g++)f=f&1?3988292384^f>>>1:f>>>1;c[d]=f}return c}var l=n();function m(f,c,d,g){var h=l,v=g+d;f^=-1;for(var _=g;_>>8^h[(f^c[_])&255];return f^-1}s.exports=m},{}],6:[function(o,s,a){"use strict";function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}s.exports=n},{}],7:[function(o,s,a){"use strict";var n=30,l=12;s.exports=function(f,c){var d,g,h,v,_,A,k,x,b,T,Y,I,V,H,$,bt,W,y,L,it,ot,K,gt,R,S;d=f.state,g=f.next_in,R=f.input,h=g+(f.avail_in-5),v=f.next_out,S=f.output,_=v-(c-f.avail_out),A=v+(f.avail_out-257),k=d.dmax,x=d.wsize,b=d.whave,T=d.wnext,Y=d.window,I=d.hold,V=d.bits,H=d.lencode,$=d.distcode,bt=(1<>>24,I>>>=L,V-=L,L=y>>>16&255,L===0)S[v++]=y&65535;else if(L&16){it=y&65535,L&=15,L&&(V>>=L,V-=L),V<15&&(I+=R[g++]<>>24,I>>>=L,V-=L,L=y>>>16&255,L&16){if(ot=y&65535,L&=15,Vk){f.msg="invalid distance too far back",d.mode=n;break t}if(I>>>=L,V-=L,L=v-_,ot>L){if(L=ot-L,L>b&&d.sane){f.msg="invalid distance too far back",d.mode=n;break t}if(K=0,gt=Y,T===0){if(K+=x-L,L2;)S[v++]=gt[K++],S[v++]=gt[K++],S[v++]=gt[K++],it-=3;it&&(S[v++]=gt[K++],it>1&&(S[v++]=gt[K++]))}else{K=v-ot;do S[v++]=S[K++],S[v++]=S[K++],S[v++]=S[K++],it-=3;while(it>2);it&&(S[v++]=S[K++],it>1&&(S[v++]=S[K++]))}}else if((L&64)===0){y=$[(y&65535)+(I&(1<>3,g-=it,V-=it<<3,I&=(1<>>24&255)+(w>>>8&65280)+((w&65280)<<8)+((w&255)<<24)}function Kt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function he(w){var M;return!w||!w.state?T:(M=w.state,w.total_in=w.total_out=M.total=0,w.msg="",M.wrap&&(w.adler=M.wrap&1),M.mode=$,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new n.Buf32(st),M.distcode=M.distdyn=new n.Buf32(wt),M.sane=1,M.back=-1,k)}function te(w){var M;return!w||!w.state?T:(M=w.state,M.wsize=0,M.whave=0,M.wnext=0,he(w))}function Jt(w,M){var i,U;return!w||!w.state||(U=w.state,M<0?(i=0,M=-M):(i=(M>>4)+1,M<48&&(M&=15)),M&&(M<8||M>15))?T:(U.window!==null&&U.wbits!==M&&(U.window=null),U.wrap=i,U.wbits=M,te(w))}function Dt(w,M){var i,U;return w?(U=new Kt,w.state=U,U.window=null,i=Jt(w,M),i!==k&&(w.state=null),i):T}function Qt(w){return Dt(w,q)}var ee=!0,pt,qr;function kr(w){if(ee){var M;for(pt=new n.Buf32(512),qr=new n.Buf32(32),M=0;M<144;)w.lens[M++]=8;for(;M<256;)w.lens[M++]=9;for(;M<280;)w.lens[M++]=7;for(;M<288;)w.lens[M++]=8;for(c(g,w.lens,0,288,pt,0,w.work,{bits:9}),M=0;M<32;)w.lens[M++]=5;c(h,w.lens,0,32,qr,0,w.work,{bits:5}),ee=!1}w.lencode=pt,w.lenbits=9,w.distcode=qr,w.distbits=5}function Mt(w,M,i,U){var Pt,G=w.state;return G.window===null&&(G.wsize=1<=G.wsize?(n.arraySet(G.window,M,i-G.wsize,G.wsize,0),G.wnext=0,G.whave=G.wsize):(Pt=G.wsize-G.wnext,Pt>U&&(Pt=U),n.arraySet(G.window,M,i-U,Pt,G.wnext),U-=Pt,U?(n.arraySet(G.window,M,i-U,U,0),G.wnext=U,G.whave=G.wsize):(G.wnext+=Pt,G.wnext===G.wsize&&(G.wnext=0),G.whave>>8&255,i.check=m(i.check,Nt,2,0),F=0,C=0,i.mode=bt;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((F&255)<<8)+(F>>8))%31){w.msg="incorrect header check",i.mode=D;break}if((F&15)!==H){w.msg="unknown compression method",i.mode=D;break}if(F>>>=4,C-=4,Lt=(F&15)+8,i.wbits===0)i.wbits=Lt;else if(Lt>i.wbits){w.msg="invalid window size",i.mode=D;break}i.dmax=1<>8&1),i.flags&512&&(Nt[0]=F&255,Nt[1]=F>>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0,i.mode=W;case W:for(;C<32;){if(j===0)break t;j--,F+=U[G++]<>>8&255,Nt[2]=F>>>16&255,Nt[3]=F>>>24&255,i.check=m(i.check,Nt,4,0)),F=0,C=0,i.mode=y;case y:for(;C<16;){if(j===0)break t;j--,F+=U[G++]<>8),i.flags&512&&(Nt[0]=F&255,Nt[1]=F>>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0,i.mode=L;case L:if(i.flags&1024){for(;C<16;){if(j===0)break t;j--,F+=U[G++]<>>8&255,i.check=m(i.check,Nt,2,0)),F=0,C=0}else i.head&&(i.head.extra=null);i.mode=it;case it:if(i.flags&1024&&(Q=i.length,Q>j&&(Q=j),Q&&(i.head&&(Lt=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),n.arraySet(i.head.extra,U,G,Q,Lt)),i.flags&512&&(i.check=m(i.check,U,Q,G)),j-=Q,G+=Q,i.length-=Q),i.length))break t;i.length=0,i.mode=ot;case ot:if(i.flags&2048){if(j===0)break t;Q=0;do Lt=U[G+Q++],i.head&&Lt&&i.length<65536&&(i.head.name+=String.fromCharCode(Lt));while(Lt&&Q>9&1,i.head.done=!0),w.adler=i.check=0,i.mode=E;break;case R:for(;C<32;){if(j===0)break t;j--,F+=U[G++]<>>=C&7,C-=C&7,i.mode=O;break}for(;C<3;){if(j===0)break t;j--,F+=U[G++]<>>=1,C-=1,F&3){case 0:i.mode=ct;break;case 1:if(kr(i),i.mode=St,M===A){F>>>=2,C-=2;break t}break;case 2:i.mode=Wt;break;case 3:w.msg="invalid block type",i.mode=D}F>>>=2,C-=2;break;case ct:for(F>>>=C&7,C-=C&7;C<32;){if(j===0)break t;j--,F+=U[G++]<>>16^65535)){w.msg="invalid stored block lengths",i.mode=D;break}if(i.length=F&65535,F=0,C=0,i.mode=at,M===A)break t;case at:i.mode=Ct;case Ct:if(Q=i.length,Q){if(Q>j&&(Q=j),Q>Vt&&(Q=Vt),Q===0)break t;n.arraySet(Pt,U,G,Q,re),j-=Q,G+=Q,Vt-=Q,re+=Q,i.length-=Q;break}i.mode=E;break;case Wt:for(;C<14;){if(j===0)break t;j--,F+=U[G++]<>>=5,C-=5,i.ndist=(F&31)+1,F>>>=5,C-=5,i.ncode=(F&15)+4,F>>>=4,C-=4,i.nlen>286||i.ndist>30){w.msg="too many length or distance symbols",i.mode=D;break}i.have=0,i.mode=Ot;case Ot:for(;i.have>>=3,C-=3}for(;i.have<19;)i.lens[Or[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,se={bits:i.lenbits},oe=c(d,i.lens,0,19,i.lencode,0,i.work,se),i.lenbits=se.bits,oe){w.msg="invalid code lengths set",i.mode=D;break}i.have=0,i.mode=J;case J:for(;i.have>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=xt,C-=xt,i.lens[i.have++]=jt;else{if(jt===16){for(ie=xt+2;C>>=xt,C-=xt,i.have===0){w.msg="invalid bit length repeat",i.mode=D;break}Lt=i.lens[i.have-1],Q=3+(F&3),F>>>=2,C-=2}else if(jt===17){for(ie=xt+3;C>>=xt,C-=xt,Lt=0,Q=3+(F&7),F>>>=3,C-=3}else{for(ie=xt+7;C>>=xt,C-=xt,Lt=0,Q=11+(F&127),F>>>=7,C-=7}if(i.have+Q>i.nlen+i.ndist){w.msg="invalid bit length repeat",i.mode=D;break}for(;Q--;)i.lens[i.have++]=Lt}}if(i.mode===D)break;if(i.lens[256]===0){w.msg="invalid code -- missing end-of-block",i.mode=D;break}if(i.lenbits=9,se={bits:i.lenbits},oe=c(g,i.lens,0,i.nlen,i.lencode,0,i.work,se),i.lenbits=se.bits,oe){w.msg="invalid literal/lengths set",i.mode=D;break}if(i.distbits=6,i.distcode=i.distdyn,se={bits:i.distbits},oe=c(h,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,se),i.distbits=se.bits,oe){w.msg="invalid distances set",i.mode=D;break}if(i.mode=St,M===A)break t;case St:i.mode=At;case At:if(j>=6&&Vt>=258){w.next_out=re,w.avail_out=Vt,w.next_in=G,w.avail_in=j,i.hold=F,i.bits=C,f(w,Tt),re=w.next_out,Pt=w.output,Vt=w.avail_out,G=w.next_in,U=w.input,j=w.avail_in,F=i.hold,C=i.bits,i.mode===E&&(i.back=-1);break}for(i.back=0;It=i.lencode[F&(1<>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>Yt)],xt=It>>>24,Gt=It>>>16&255,jt=It&65535,!(Yt+xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=Yt,C-=Yt,i.back+=Yt}if(F>>>=xt,C-=xt,i.back+=xt,i.length=jt,Gt===0){i.mode=N;break}if(Gt&32){i.back=-1,i.mode=E;break}if(Gt&64){w.msg="invalid literal/length code",i.mode=D;break}i.extra=Gt&15,i.mode=xe;case xe:if(i.extra){for(ie=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=zt;case zt:for(;It=i.distcode[F&(1<>>24,Gt=It>>>16&255,jt=It&65535,!(xt<=C);){if(j===0)break t;j--,F+=U[G++]<>Yt)],xt=It>>>24,Gt=It>>>16&255,jt=It&65535,!(Yt+xt<=C);){if(j===0)break t;j--,F+=U[G++]<>>=Yt,C-=Yt,i.back+=Yt}if(F>>>=xt,C-=xt,i.back+=xt,Gt&64){w.msg="invalid distance code",i.mode=D;break}i.offset=jt,i.extra=Gt&15,i.mode=sr;case sr:if(i.extra){for(ie=i.extra;C>>=i.extra,C-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){w.msg="invalid distance too far back",i.mode=D;break}i.mode=Xe;case Xe:if(Vt===0)break t;if(Q=Tt-Vt,i.offset>Q){if(Q=i.offset-Q,Q>i.whave&&i.sane){w.msg="invalid distance too far back",i.mode=D;break}Q>i.wnext?(Q-=i.wnext,ar=i.wsize-Q):ar=i.wnext-Q,Q>i.length&&(Q=i.length),ir=i.window}else ir=Pt,ar=re-i.offset,Q=i.length;Q>Vt&&(Q=Vt),Vt-=Q,i.length-=Q;do Pt[re++]=ir[ar++];while(--Q);i.length===0&&(i.mode=At);break;case N:if(Vt===0)break t;Pt[re++]=i.length,Vt--,i.mode=At;break;case O:if(i.wrap){for(;C<32;){if(j===0)break t;j--,F|=U[G++]<=1&&At[it]===0;it--);if(ot>it&&(ot=it),it===0)return I[V++]=1<<24|64<<16|0,I[V++]=1<<24|64<<16|0,$.bits=1,0;for(L=1;L0&&(x===c||it!==1))return-1;for(xe[1]=0,W=1;Wm||x===g&&S>f)return 1;for(;;){Xe=W-gt,H[y]St?(N=zt[sr+H[y]],O=Ot[J+H[y]]):(N=96,O=0),et=1<>gt)+ct]=Xe<<24|N<<16|O|0;while(ct!==0);for(et=1<>=1;if(et!==0?(E&=et-1,E+=et):E=0,y++,--At[W]===0){if(W===it)break;W=b[T+H[y]]}if(W>ot&&(E&Ct)!==at){for(gt===0&&(gt=ot),Wt+=L,K=W-gt,R=1<m||x===g&&S>f)return 1;at=E&Ct,I[at]=ot<<24|K<<16|Wt-V|0}}return E!==0&&(I[Wt+E]=W-gt<<24|64<<16|0),$.bits=ot,0}},{"../utils/common":1}],10:[function(o,s,a){"use strict";s.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(o,s,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}s.exports=n},{}],"/lib/inflate.js":[function(o,s,a){"use strict";var n=o("./zlib/inflate"),l=o("./utils/common"),m=o("./utils/strings"),f=o("./zlib/constants"),c=o("./zlib/messages"),d=o("./zlib/zstream"),g=o("./zlib/gzheader"),h=Object.prototype.toString;function v(k){if(!(this instanceof v))return new v(k);this.options=l.assign({chunkSize:16384,windowBits:0,to:""},k||{});var x=this.options;x.raw&&x.windowBits>=0&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),x.windowBits>=0&&x.windowBits<16&&!(k&&k.windowBits)&&(x.windowBits+=32),x.windowBits>15&&x.windowBits<48&&(x.windowBits&15)===0&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var b=n.inflateInit2(this.strm,x.windowBits);if(b!==f.Z_OK)throw new Error(c[b]);if(this.header=new g,n.inflateGetHeader(this.strm,this.header),x.dictionary&&(typeof x.dictionary=="string"?x.dictionary=m.string2buf(x.dictionary):h.call(x.dictionary)==="[object ArrayBuffer]"&&(x.dictionary=new Uint8Array(x.dictionary)),x.raw&&(b=n.inflateSetDictionary(this.strm,x.dictionary),b!==f.Z_OK)))throw new Error(c[b])}v.prototype.push=function(k,x){var b=this.strm,T=this.options.chunkSize,Y=this.options.dictionary,I,V,H,$,bt,W=!1;if(this.ended)return!1;V=x===~~x?x:x===!0?f.Z_FINISH:f.Z_NO_FLUSH,typeof k=="string"?b.input=m.binstring2buf(k):h.call(k)==="[object ArrayBuffer]"?b.input=new Uint8Array(k):b.input=k,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new l.Buf8(T),b.next_out=0,b.avail_out=T),I=n.inflate(b,f.Z_NO_FLUSH),I===f.Z_NEED_DICT&&Y&&(I=n.inflateSetDictionary(this.strm,Y)),I===f.Z_BUF_ERROR&&W===!0&&(I=f.Z_OK,W=!1),I!==f.Z_STREAM_END&&I!==f.Z_OK)return this.onEnd(I),this.ended=!0,!1;b.next_out&&(b.avail_out===0||I===f.Z_STREAM_END||b.avail_in===0&&(V===f.Z_FINISH||V===f.Z_SYNC_FLUSH))&&(this.options.to==="string"?(H=m.utf8border(b.output,b.next_out),$=b.next_out-H,bt=m.buf2string(b.output,H),b.next_out=$,b.avail_out=T-$,$&&l.arraySet(b.output,b.output,H,$,0),this.onData(bt)):this.onData(l.shrinkBuf(b.output,b.next_out))),b.avail_in===0&&b.avail_out===0&&(W=!0)}while((b.avail_in>0||b.avail_out===0)&&I!==f.Z_STREAM_END);return I===f.Z_STREAM_END&&(V=f.Z_FINISH),V===f.Z_FINISH?(I=n.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,I===f.Z_OK):(V===f.Z_SYNC_FLUSH&&(this.onEnd(f.Z_OK),b.avail_out=0),!0)},v.prototype.onData=function(k){this.chunks.push(k)},v.prototype.onEnd=function(k){k===f.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=l.flattenChunks(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg};function _(k,x){var b=new v(x);if(b.push(k,!0),b.err)throw b.msg||c[b.err];return b.result}function A(k,x){return x=x||{},x.raw=!0,_(k,x)}a.Inflate=v,a.inflate=_,a.inflateRaw=A,a.ungzip=_},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})();var nw=globalThis.fetch,ss=class{constructor(t,e={},r){this.type=t,this.detail=e,this.msg=r,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}},Kc=class{constructor(){this.listeners={}}addEventListener(t,e,r){let o=this.listeners[t]||[];r?o.unshift(e):o.push(e),this.listeners[t]=o}removeEventListener(t,e){let r=this.listeners[t]||[],o=r.findIndex(s=>s===e);o>-1&&(r.splice(o,1),this.listeners[t]=r)}dispatch(t){let e=this.listeners[t.type];if(e)for(let r=0,o=e.length;rString.fromCharCode(e)).join("")}var $c=class{constructor(t,e,r){this.name=(r||t.tag||"").trim(),this.length=t.length,this.start=t.offset,this.offset=0,this.data=e,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach(o=>{let s=o.replace(/get(Big)?/,"").toLowerCase(),a=parseInt(o.replace(/[^\d]/g,""))/8;Object.defineProperty(this,s,{get:()=>this.getValue(o,a)})})}get currentPosition(){return this.start+this.offset}set currentPosition(t){this.start=t,this.offset=0}skip(t=0,e=8){this.offset+=t*e/8}getValue(t,e){let r=this.start+this.offset;this.offset+=e;try{return this.data[t](r)}catch(o){throw console.error("parser",t,e,this),console.error("parser",this.start,this.offset),o}}flags(t){if(t===8||t===16||t===32||t===64)return this[`uint${t}`].toString(2).padStart(t,0).split("").map(e=>e==="1");console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){let t=this.uint32;return Qc([t>>24&255,t>>16&255,t>>8&255,t&255])}get fixed(){let t=this.int16,e=Math.round(1e3*this.uint16/65356);return t+e/1e3}get legacyFixed(){let t=this.uint16,e=this.uint16.toString(16).padStart(4,0);return parseFloat(`${t}.${e}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let t=0;for(let e=0;e<5;e++){let r=this.uint8;if(t=t*128+(r&127),r<128)break}return t}get longdatetime(){return new Date(Jc+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){let t=p.uint16,e=[0,1,-2,-1][t>>14],r=t&16383;return e+r/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(t=0,e=0,r=8,o=!1){if(t=t||this.length,t===0)return[];e&&(this.currentPosition=e);let s=`${o?"":"u"}int${r}`,a=[];for(;t--;)a.push(this[s]);return a}},Bt=class{constructor(t){Object.defineProperty(this,"parser",{enumerable:!1,get:()=>t});let r=t.currentPosition;Object.defineProperty(this,"start",{enumerable:!1,get:()=>r})}load(t){Object.keys(t).forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);r.get?this[e]=r.get.bind(this):r.value!==void 0&&(this[e]=r.value)}),this.parser.length&&this.parser.verifyLength()}},mt=class extends Bt{constructor(t,e,r){let{parser:o,start:s}=super(new $c(t,e,r));Object.defineProperty(this,"p",{enumerable:!1,get:()=>o}),Object.defineProperty(this,"tableStart",{enumerable:!1,get:()=>s})}};function Z(t,e,r){let o;Object.defineProperty(t,e,{get:()=>o||(o=r(),o),enumerable:!0})}var td=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:12},e,"sfnt");this.version=o.uint32,this.numTables=o.uint16,this.searchRange=o.uint16,this.entrySelector=o.uint16,this.rangeShift=o.uint16,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new ed(o)),this.tables={},this.directory.forEach(s=>{let a=()=>r(this.tables,{tag:s.tag,offset:s.offset,length:s.length},e);Z(this.tables,s.tag.trim(),a)})}},ed=class{constructor(t){this.tag=t.tag,this.checksum=t.uint32,this.offset=t.uint32,this.length=t.uint32}},El=Rl.inflate||void 0,Il=void 0,rd=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:44},e,"woff");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(s=>new od(o)),sd(this,e,r)}},od=class{constructor(t){this.tag=t.tag,this.offset=t.uint32,this.compLength=t.uint32,this.origLength=t.uint32,this.origChecksum=t.uint32}};function sd(t,e,r){t.tables={},t.directory.forEach(o=>{Z(t.tables,o.tag.trim(),()=>{let s=0,a=e;if(o.compLength!==o.origLength){let n=e.buffer.slice(o.offset,o.offset+o.compLength),l;if(El)l=El(new Uint8Array(n));else if(Il)l=Il(new Uint8Array(n));else{let m="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(m),new Error(m)}a=new DataView(l.buffer)}else s=o.offset;return r(t.tables,{tag:o.tag,offset:s,length:o.origLength},a)})})}var Ll=Al,Bl=void 0,nd=class extends mt{constructor(t,e,r){let{p:o}=super({offset:0,length:48},e,"woff2");this.signature=o.tag,this.flavor=o.uint32,this.length=o.uint32,this.numTables=o.uint16,o.uint16,this.totalSfntSize=o.uint32,this.totalCompressedSize=o.uint32,this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.metaOffset=o.uint32,this.metaLength=o.uint32,this.metaOrigLength=o.uint32,this.privOffset=o.uint32,this.privLength=o.uint32,o.verifyLength(),this.directory=[...new Array(this.numTables)].map(l=>new ad(o));let s=o.currentPosition;this.directory[0].offset=0,this.directory.forEach((l,m)=>{let f=this.directory[m+1];f&&(f.offset=l.offset+(l.transformLength!==void 0?l.transformLength:l.origLength))});let a,n=e.buffer.slice(s);if(Ll)a=Ll(new Uint8Array(n));else if(Bl)a=new Uint8Array(Bl(n));else{let l="no brotli decoder available to decode WOFF2 font";throw t.onerror&&t.onerror(l),new Error(l)}id(this,a,r)}},ad=class{constructor(t){this.flags=t.uint8;let e=this.tagNumber=this.flags&63;e===63?this.tag=t.tag:this.tag=ld(e);let o=(this.transformVersion=(this.flags&192)>>6)!==0;(this.tag==="glyf"||this.tag==="loca")&&(o=this.transformVersion!==3),this.origLength=t.uint128,o&&(this.transformLength=t.uint128)}};function id(t,e,r){t.tables={},t.directory.forEach(o=>{Z(t.tables,o.tag.trim(),()=>{let s=o.offset,a=s+(o.transformLength?o.transformLength:o.origLength),n=new DataView(e.slice(s,a).buffer);try{return r(t.tables,{tag:o.tag,offset:0,length:o.origLength},n)}catch(l){console.error(l)}})})}function ld(t){return["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][t&63]}var jl={},Ul=!1;Promise.all([Promise.resolve().then(function(){return Dd}),Promise.resolve().then(function(){return Nd}),Promise.resolve().then(function(){return Md}),Promise.resolve().then(function(){return Ud}),Promise.resolve().then(function(){return Wd}),Promise.resolve().then(function(){return Kd}),Promise.resolve().then(function(){return Qd}),Promise.resolve().then(function(){return tm}),Promise.resolve().then(function(){return fm}),Promise.resolve().then(function(){return Sm}),Promise.resolve().then(function(){return lp}),Promise.resolve().then(function(){return fp}),Promise.resolve().then(function(){return pp}),Promise.resolve().then(function(){return vp}),Promise.resolve().then(function(){return wp}),Promise.resolve().then(function(){return xp}),Promise.resolve().then(function(){return kp}),Promise.resolve().then(function(){return Tp}),Promise.resolve().then(function(){return Pp}),Promise.resolve().then(function(){return Rp}),Promise.resolve().then(function(){return Ip}),Promise.resolve().then(function(){return Bp}),Promise.resolve().then(function(){return Np}),Promise.resolve().then(function(){return Gp}),Promise.resolve().then(function(){return jp}),Promise.resolve().then(function(){return Hp}),Promise.resolve().then(function(){return Yp}),Promise.resolve().then(function(){return Zp}),Promise.resolve().then(function(){return Kp}),Promise.resolve().then(function(){return $p}),Promise.resolve().then(function(){return nh}),Promise.resolve().then(function(){return uh}),Promise.resolve().then(function(){return dh}),Promise.resolve().then(function(){return gh}),Promise.resolve().then(function(){return vh}),Promise.resolve().then(function(){return wh}),Promise.resolve().then(function(){return Ch}),Promise.resolve().then(function(){return kh}),Promise.resolve().then(function(){return Ah}),Promise.resolve().then(function(){return Eh}),Promise.resolve().then(function(){return Bh})]).then(t=>{t.forEach(e=>{let r=Object.keys(e)[0];jl[r]=e[r]}),Ul=!0});function ud(t,e,r){let o=e.tag.replace(/[^\w\d]/g,""),s=jl[o];return s?new s(e,r,t):(console.warn(`lib-font has no definition for ${o}. The table was skipped.`),{})}function fd(){let t=0;function e(r,o){if(!Ul)return t>10?o(new Error("loading took too long")):(t++,setTimeout(()=>e(r),250));r(ud)}return new Promise((r,o)=>e(r))}function cd(t,e){let r=t.lastIndexOf("."),o=(t.substring(r+1)||"").toLowerCase(),s={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[o];if(s)return s;let a={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[o];if(a||(a=`${t} is not a known webfont format.`),e)throw new Error(a);console.warn(`Could not load font: ${a}`)}async function dd(t,e,r={}){if(!globalThis.document)return;let o=cd(e,r.errorOnStyle);if(!o)return;let s=document.createElement("style");s.className="injected-by-Font-js";let a=[];return r.styleRules&&(a=Object.entries(r.styleRules).map(([n,l])=>`${n}: ${l};`)),s.textContent=` @font-face { font-family: "${t}"; ${a.join(` `)} src: url("${e}") format("${o}"); -}`,globalThis.document.head.appendChild(s),s}var md=[0,1,0,0],pd=[79,84,84,79],hd=[119,79,70,70],gd=[119,79,70,50];function ns(t,e){if(t.length===e.length){for(let r=0;r(globalThis.document&&!this.options.skipStyleSheet&&await dd(this.name,t,this.options),this.loadFont(t)))()}async loadFont(t,e){fetch(t).then(r=>vd(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,e||t)).catch(r=>{let o=new ss("error",r,`Failed to load font at ${e||t}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(t,e){this.fontData=new DataView(t);let r=yd(this.fontData);if(!r)throw new Error(`${e} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new ss("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(t){return fd().then(e=>(t==="SFNT"&&(this.opentype=new td(this,this.fontData,e)),t==="WOFF"&&(this.opentype=new rd(this,this.fontData,e)),t==="WOFF2"&&(this.opentype=new nd(this,this.fontData,e)),this.opentype))}getGlyphId(t){return this.opentype.tables.cmap.getGlyphId(t)}reverse(t){return this.opentype.tables.cmap.reverse(t)}supports(t){return this.getGlyphId(t)!==0}supportsVariation(t){return this.opentype.tables.cmap.supportsVariation(t)!==!1}measureText(t,e=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=t,r.style.fontFamily=this.name,r.style.fontSize=`${e}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let s=this.opentype.tables["OS/2"];return o.fontSize=e,o.ascender=s.sTypoAscender,o.descender=s.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let t=new ss("unload",{font:this});this.dispatch(t),this.onunload&&this.onunload(t)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let t=new ss("load",{font:this});this.dispatch(t),this.onload&&this.onload(t)}}};globalThis.Font=is;var We=class extends Bt{constructor(t,e,r){super(t),this.plaformID=e,this.encodingID=r}},bd=class extends We{constructor(t,e,r){super(t,e,r),this.format=0,this.length=t.uint16,this.language=t.uint16,this.glyphIdArray=[...new Array(256)].map(o=>t.uint8)}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=t&&t<=255}reverse(t){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},wd=class extends We{constructor(t,e,r){super(t,e,r),this.format=2,this.length=t.uint16,this.language=t.uint16,this.subHeaderKeys=[...new Array(256)].map(n=>t.uint16);let o=Math.max(...this.subHeaderKeys),s=t.currentPosition;Z(this,"subHeaders",()=>(t.currentPosition=s,[...new Array(o)].map(n=>new Sd(t))));let a=s+o*8;Z(this,"glyphIndexArray",()=>(t.currentPosition=a,[...new Array(o)].map(n=>t.uint16)))}supports(t){t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let e=t&&255,r=t&&65280,o=this.subHeaders[r],s=this.subHeaders[o],a=s.firstCode,n=a+s.entryCount;return a<=e&&e<=n}reverse(t){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(t=!1){return t?this.subHeaders.map(e=>({firstCode:e.firstCode,lastCode:e.lastCode})):this.subHeaders.map(e=>({start:e.firstCode,end:e.lastCode}))}},Sd=class{constructor(t){this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=t.int16,this.idRangeOffset=t.uint16}},xd=class extends We{constructor(t,e,r){super(t,e,r),this.format=4,this.length=t.uint16,this.language=t.uint16,this.segCountX2=t.uint16,this.segCount=this.segCountX2/2,this.searchRange=t.uint16,this.entrySelector=t.uint16,this.rangeShift=t.uint16;let o=t.currentPosition;Z(this,"endCode",()=>t.readBytes(this.segCount,o,16));let s=o+2+this.segCountX2;Z(this,"startCode",()=>t.readBytes(this.segCount,s,16));let a=s+this.segCountX2;Z(this,"idDelta",()=>t.readBytes(this.segCount,a,16,!0));let n=a+this.segCountX2;Z(this,"idRangeOffset",()=>t.readBytes(this.segCount,n,16));let l=n+this.segCountX2,m=this.length-(l-this.tableStart);Z(this,"glyphIdArray",()=>t.readBytes(m,l,16)),Z(this,"segments",()=>this.buildSegments(n,l,t))}buildSegments(t,e,r){let o=(s,a)=>{let n=this.startCode[a],l=this.endCode[a],m=this.idDelta[a],f=this.idRangeOffset[a],c=t+2*a,d=[];if(f===0)for(let g=n+m,h=l+m;g<=h;g++)d.push(g);else for(let g=0,h=l-n;g<=h;g++)r.currentPosition=c+f+g*2,d.push(r.uint16);return{startCode:n,endCode:l,idDelta:m,idRangeOffset:f,glyphIDs:d}};return[...new Array(this.segCount)].map(o)}reverse(t){let e=this.segments.find(o=>o.glyphIDs.includes(t));if(!e)return{};let r=e.startCode+e.glyphIDs.indexOf(t);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(t){if(t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535)return 0;let e=this.segments.find(r=>r.startCode<=t&&t<=r.endCode);return e?e.glyphIDs[t-e.startCode]:0}supports(t){return this.getGlyphId(t)!==0}getSupportedCharCodes(t=!1){return t?this.segments:this.segments.map(e=>({start:e.startCode,end:e.endCode}))}},Cd=class extends We{constructor(t,e,r){super(t,e,r),this.format=6,this.length=t.uint16,this.language=t.uint16,this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.firstCode+this.entryCount-1,Z(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(s=>t.uint16))}supports(t){if(t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),tthis.firstCode+this.entryCount)return{};let e=t-this.firstCode;return{code:e,unicode:String.fromCodePoint(e)}}reverse(t){let e=this.glyphIdArray.indexOf(t);if(e>-1)return this.firstCode+e}getSupportedCharCodes(t=!1){return t?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},Fd=class extends We{constructor(t,e,r){super(t,e,r),this.format=8,t.uint16,this.length=t.uint32,this.language=t.uint32,this.is32=[...new Array(8192)].map(s=>t.uint8),this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new kd(t)))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(e=>e.startcharCode<=t&&t<=e.endcharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startcharCode,end:e.endcharCode}))}},kd=class{constructor(t){this.startcharCode=t.uint32,this.endcharCode=t.uint32,this.startGlyphID=t.uint32}},Od=class extends We{constructor(t,e,r){super(t,e,r),this.format=10,t.uint16,this.length=t.uint32,this.language=t.uint32,this.startCharCode=t.uint32,this.numChars=t.uint32,this.endCharCode=this.startCharCode+this.numChars,Z(this,"glyphs",()=>[...new Array(this.numChars)].map(s=>t.uint16))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),tthis.startCharCode+this.numChars?!1:t-this.startCharCode}reverse(t){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(t=!1){return t?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Td=class extends We{constructor(t,e,r){super(t,e,r),this.format=12,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new _d(t)))}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535?0:this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){for(let e of this.groups){let r=e.startGlyphID;if(r>t)continue;if(r===t)return e.startCharCode;if(r+(e.endCharCode-e.startCharCode)({start:e.startCharCode,end:e.endCharCode}))}},_d=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.startGlyphID=t.uint32}},Pd=class extends We{constructor(t,e,r){super(t,e,r),this.format=13,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32;let o=[...new Array(this.numGroups)].map(s=>new Ad(t));Z(this,"groups",o)}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startCharCode,end:e.endCharCode}))}},Ad=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.glyphID=t.uint32}},Rd=class extends We{constructor(t,e,r){super(t,e,r),this.subTableStart=t.currentPosition,this.format=14,this.length=t.uint32,this.numVarSelectorRecords=t.uint32,Z(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Ed(t)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(t){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(t){let e=this.varSelector.find(r=>r.varSelector===t);return e||!1}getSupportedVariations(){return this.varSelectors.map(t=>t.varSelector)}},Ed=class{constructor(t){this.varSelector=t.uint24,this.defaultUVSOffset=t.Offset32,this.nonDefaultUVSOffset=t.Offset32}};function Id(t,e,r){let o=t.uint16;return o===0?new bd(t,e,r):o===2?new wd(t,e,r):o===4?new xd(t,e,r):o===6?new Cd(t,e,r):o===8?new Fd(t,e,r):o===10?new Od(t,e,r):o===12?new Td(t,e,r):o===13?new Pd(t,e,r):o===14?new Rd(t,e,r):{}}var Ld=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Bd(r,this.tableStart))}getSubTable(t){return this.encodingRecords[t].table}getSupportedEncodings(){return this.encodingRecords.map(t=>({platformID:t.platformID,encodingId:t.encodingID}))}getSupportedCharCodes(t,e){let r=this.encodingRecords.findIndex(s=>s.platformID===t&&s.encodingID===e);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(t){for(let e=0;e{let s=this.getSubTable(o);return s.getGlyphId?(e=s.getGlyphId(t),e!==0):!1}),e}supports(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(t)!==!1})}supportsVariation(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(t)!==!1})}},Bd=class{constructor(t,e){let r=this.platformID=t.uint16,o=this.encodingID=t.uint16,s=this.offset=t.Offset32;Z(this,"table",()=>(t.currentPosition=e+s,Id(t,r,o)))}},Dd=Object.freeze({__proto__:null,cmap:Ld}),Vd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Nd=Object.freeze({__proto__:null,head:Vd}),zd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Md=Object.freeze({__proto__:null,hhea:zd}),Gd=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hhea.numberOfHMetrics,a=r.maxp.numGlyphs,n=o.currentPosition;if(Z(this,"hMetrics",()=>(o.currentPosition=n,[...new Array(s)].map(l=>new jd(o.uint16,o.int16)))),s(o.currentPosition=l,[...new Array(a-s)].map(m=>o.int16)))}}},jd=class{constructor(t,e){this.advanceWidth=t,this.lsb=e}},Ud=Object.freeze({__proto__:null,hmtx:Gd}),Hd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Wd=Object.freeze({__proto__:null,maxp:Hd}),Yd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Zd(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new qd(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(t){let e=this.nameRecords.find(r=>r.nameID===t);if(e)return e.string}},qd=class{constructor(t,e){this.length=t,this.offset=e}},Zd=class{constructor(t,e){this.platformID=t.uint16,this.encodingID=t.uint16,this.languageID=t.uint16,this.nameID=t.uint16,this.length=t.uint16,this.offset=t.Offset16,Z(this,"string",()=>(t.currentPosition=e.stringStart+this.offset,Xd(t,this)))}};function Xd(t,e){let{platformID:r,length:o}=e;if(o===0)return"";if(r===0||r===3){let n=[];for(let l=0,m=o/2;lr.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Qd=Object.freeze({__proto__:null,OS2:Jd}),$d=class extends mt{constructor(t,e){let{p:r}=super(t,e);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;or.int8))}getGlyphName(t){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let e=this.glyphNameIndex[t];if(e<258)return Dl[e];let r=this.glyphNameOffsets[t],s=this.glyphNameOffsets[t+1]-r-1;return s===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(s,this.namesOffset+r,8,!0).map(n=>String.fromCharCode(n)).join(""))}},Dl=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],tm=Object.freeze({__proto__:null,post:$d}),em=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Z(this,"horizAxis",()=>new vn({offset:t.offset+this.horizAxisOffset},e)),Z(this,"vertAxis",()=>new vn({offset:t.offset+this.vertAxisOffset},e)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>new vn({offset:t.offset+this.itemVarStoreOffset},e)))}},vn=class extends mt{constructor(t,e){let{p:r}=super(t,e,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Z(this,"baseTagList",()=>new rm({offset:t.offset+this.baseTagListOffset},e)),Z(this,"baseScriptList",()=>new om({offset:t.offset+this.baseScriptListOffset},e))}},rm=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},om=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Z(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(s=>new sm(this.start,r))))}},sm=class{constructor(t,e){this.baseScriptTag=e.tag,this.baseScriptOffset=e.Offset16,Z(this,"baseScriptTable",()=>(e.currentPosition=t+this.baseScriptOffset,new nm(e)))}},nm=class{constructor(t){this.start=t.currentPosition,this.baseValuesOffset=t.Offset16,this.defaultMinMaxOffset=t.Offset16,this.baseLangSysCount=t.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(e=>new am(this.start,t)),Z(this,"baseValues",()=>(t.currentPosition=this.start+this.baseValuesOffset,new im(t))),Z(this,"defaultMinMax",()=>(t.currentPosition=this.start+this.defaultMinMaxOffset,new Hl(t)))}},am=class{constructor(t,e){this.baseLangSysTag=e.tag,this.minMaxOffset=e.Offset16,Z(this,"minMax",()=>(e.currentPosition=t+this.minMaxOffset,new Hl(e)))}},im=class{constructor(t){this.parser=t,this.start=t.currentPosition,this.defaultBaselineIndex=t.uint16,this.baseCoordCount=t.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(e=>t.Offset16)}getTable(t){return this.parser.currentPosition=this.start+this.baseCoords[t],new um(this.parser)}},Hl=class{constructor(t){this.minCoord=t.Offset16,this.maxCoord=t.Offset16,this.featMinMaxCount=t.uint16;let e=t.currentPosition;Z(this,"featMinMaxRecords",()=>(t.currentPosition=e,[...new Array(this.featMinMaxCount)].map(r=>new lm(t))))}},lm=class{constructor(t){this.featureTableTag=t.tag,this.minCoord=t.Offset16,this.maxCoord=t.Offset16}},um=class{constructor(t){this.baseCoordFormat=t.uint16,this.coordinate=t.int16,this.baseCoordFormat===2&&(this.referenceGlyph=t.uint16,this.baseCoordPoint=t.uint16),this.baseCoordFormat===3&&(this.deviceTable=t.Offset16)}},fm=Object.freeze({__proto__:null,BASE:em}),Vl=class{constructor(t){this.classFormat=t.uint16,this.classFormat===1&&(this.startGlyphID=t.uint16,this.glyphCount=t.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.classFormat===2&&(this.classRangeCount=t.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(e=>new cm(t)))}},cm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.class=t.uint16}},ho=class extends Bt{constructor(t){super(t),this.coverageFormat=t.uint16,this.coverageFormat===1&&(this.glyphCount=t.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.coverageFormat===2&&(this.rangeCount=t.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(e=>new dm(t)))}},dm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.startCoverageIndex=t.uint16}},mm=class{constructor(t,e){this.table=t,this.parser=e,this.start=e.currentPosition,this.format=e.uint16,this.variationRegionListOffset=e.Offset32,this.itemVariationDataCount=e.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>e.Offset32)}},pm=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Z(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new Vl(r)}),this.attachListOffset=r.Offset16,Z(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new hm(r)}),this.ligCaretListOffset=r.Offset16,Z(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new ym(r)}),this.markAttachClassDefOffset=r.Offset16,Z(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Vl(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Z(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new wm(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new mm(r)}))}},hm=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,this.glyphCount=t.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16)}getPoint(t){return this.parser.currentPosition=this.start+this.attachPointOffsets[t],new gm(this.parser)}},gm=class{constructor(t){this.pointCount=t.uint16,this.pointIndices=[...new Array(this.pointCount)].map(e=>t.uint16)}},ym=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,Z(this,"coverage",()=>(t.currentPosition=this.start+this.coverageOffset,new ho(t))),this.ligGlyphCount=t.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(e=>t.Offset16)}getLigGlyph(t){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[t],new vm(this.parser)}},vm=class extends Bt{constructor(t){super(t),this.caretCount=t.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(e=>t.Offset16)}getCaretValue(t){return this.parser.currentPosition=this.start+this.caretValueOffsets[t],new bm(this.parser)}},bm=class{constructor(t){this.caretValueFormat=t.uint16,this.caretValueFormat===1&&(this.coordinate=t.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=t.uint16),this.caretValueFormat===3&&(this.coordinate=t.int16,this.deviceOffset=t.Offset16)}},wm=class extends Bt{constructor(t){super(t),this.markGlyphSetTableFormat=t.uint16,this.markGlyphSetCount=t.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(e=>t.Offset32)}getMarkGlyphSet(t){return this.parser.currentPosition=this.start+this.coverageOffsets[t],new ho(this.parser)}},Sm=Object.freeze({__proto__:null,GDEF:pm}),Nl=class extends Bt{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(t){super(t),this.scriptCount=t.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(e=>new xm(t))}},xm=class{constructor(t){this.scriptTag=t.tag,this.scriptOffset=t.Offset16}},Cm=class extends Bt{constructor(t){super(t),this.defaultLangSys=t.Offset16,this.langSysCount=t.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(e=>new Fm(t))}},Fm=class{constructor(t){this.langSysTag=t.tag,this.langSysOffset=t.Offset16}},zl=class{constructor(t){this.lookupOrder=t.Offset16,this.requiredFeatureIndex=t.uint16,this.featureIndexCount=t.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(e=>t.uint16)}},Ml=class extends Bt{static EMPTY={featureCount:0,featureRecords:[]};constructor(t){super(t),this.featureCount=t.uint16,this.featureRecords=[...new Array(this.featureCount)].map(e=>new km(t))}},km=class{constructor(t){this.featureTag=t.tag,this.featureOffset=t.Offset16}},Om=class extends Bt{constructor(t){super(t),this.featureParams=t.Offset16,this.lookupIndexCount=t.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(e=>t.uint16)}getFeatureParams(){if(this.featureParams>0){let t=this.parser;t.currentPosition=this.start+this.featureParams;let e=this.featureTag;if(e==="size")return new _m(t);if(e.startsWith("cc"))return new Tm(t);if(e.startsWith("ss"))return new Pm(t)}}},Tm=class{constructor(t){this.format=t.uint16,this.featUiLabelNameId=t.uint16,this.featUiTooltipTextNameId=t.uint16,this.sampleTextNameId=t.uint16,this.numNamedParameters=t.uint16,this.firstParamUiLabelNameId=t.uint16,this.charCount=t.uint16,this.character=[...new Array(this.charCount)].map(e=>t.uint24)}},_m=class{constructor(t){this.designSize=t.uint16,this.subfamilyIdentifier=t.uint16,this.subfamilyNameID=t.uint16,this.smallEnd=t.uint16,this.largeEnd=t.uint16}},Pm=class{constructor(t){this.version=t.uint16,this.UINameID=t.uint16}};function Wl(t){t.parser.currentPosition-=2,delete t.coverageOffset,delete t.getCoverageTable}var xr=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.coverageOffset=t.Offset16}getCoverageTable(){let t=this.parser;return t.currentPosition=this.start+this.coverageOffset,new ho(t)}},wn=class{constructor(t){this.glyphSequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},Am=class extends xr{constructor(t){super(t),this.deltaGlyphID=t.int16}},Rm=class extends xr{constructor(t){super(t),this.sequenceCount=t.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(e=>t.Offset16)}getSequence(t){let e=this.parser;return e.currentPosition=this.start+this.sequenceOffsets[t],new Em(e)}},Em=class{constructor(t){this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Im=class extends xr{constructor(t){super(t),this.alternateSetCount=t.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(e=>t.Offset16)}getAlternateSet(t){let e=this.parser;return e.currentPosition=this.start+this.alternateSetOffsets[t],new Lm(e)}},Lm=class{constructor(t){this.glyphCount=t.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Bm=class extends xr{constructor(t){super(t),this.ligatureSetCount=t.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(e=>t.Offset16)}getLigatureSet(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureSetOffsets[t],new Dm(e)}},Dm=class extends Bt{constructor(t){super(t),this.ligatureCount=t.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(e=>t.Offset16)}getLigature(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureOffsets[t],new Vm(e)}},Vm=class{constructor(t){this.ligatureGlyph=t.uint16,this.componentCount=t.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(e=>t.uint16)}},Nm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.subRuleSetCount=t.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.classDefOffset=t.Offset16,this.subClassSetCount=t.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t)))}getSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.subRuleSetOffsets[t],new zm(e)}getSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.subClassSetOffsets[t],new Mm(e)}getCoverageTable(t){if(this.substFormat!==3&&!t)return super.getCoverageTable();if(!t)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let e=this.parser;return e.currentPosition=this.start+this.coverageOffsets[t],new ho(e)}},zm=class extends Bt{constructor(t){super(t),this.subRuleCount=t.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.subRuleOffsets[t],new Yl(e)}},Yl=class{constructor(t){this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(e=>t.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t))}},Mm=class extends Bt{constructor(t){super(t),this.subClassRuleCount=t.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.subClassRuleOffsets[t],new Gm(e)}},Gm=class extends Yl{constructor(t){super(t)}},jm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.chainSubRuleSetCount=t.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=t.Offset16,this.inputClassDefOffset=t.Offset16,this.lookaheadClassDefOffset=t.Offset16,this.chainSubClassSetCount=t.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.inputGlyphCount=t.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.seqLookupCount=t.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t)))}getChainSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleSetOffsets[t],new Um(e)}getChainSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubClassSetOffsets[t],new Wm(e)}getCoverageFromOffset(t){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let e=this.parser;return e.currentPosition=this.start+t,new ho(e)}},Um=class extends Bt{constructor(t){super(t),this.chainSubRuleCount=t.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Hm(e)}},Hm=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(e=>new wn(t))}},Wm=class extends Bt{constructor(t){super(t),this.chainSubClassRuleCount=t.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Ym(e)}},Ym=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t))}},ql=class extends Bt{constructor(t){super(t),this.sequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},qm=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.extensionLookupType=t.uint16,this.extensionOffset=t.Offset32}},Zm=class extends xr{constructor(t){super(t),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Xm={buildSubtable:function(t,e){let r=new[void 0,Am,Rm,Im,Bm,Nm,jm,qm,Zm][t](e);return r.type=t,r}},Ye=class extends Bt{constructor(t){super(t)}},Km=class extends Ye{constructor(t){super(t),console.log("lookup type 1")}},Jm=class extends Ye{constructor(t){super(t),console.log("lookup type 2")}},Qm=class extends Ye{constructor(t){super(t),console.log("lookup type 3")}},$m=class extends Ye{constructor(t){super(t),console.log("lookup type 4")}},tp=class extends Ye{constructor(t){super(t),console.log("lookup type 5")}},ep=class extends Ye{constructor(t){super(t),console.log("lookup type 6")}},rp=class extends Ye{constructor(t){super(t),console.log("lookup type 7")}},op=class extends Ye{constructor(t){super(t),console.log("lookup type 8")}},sp=class extends Ye{constructor(t){super(t),console.log("lookup type 9")}},np={buildSubtable:function(t,e){let r=new[void 0,Km,Jm,Qm,$m,tp,ep,rp,op,sp][t](e);return r.type=t,r}},Gl=class extends Bt{static EMPTY={lookupCount:0,lookups:[]};constructor(t){super(t),this.lookupCount=t.uint16,this.lookups=[...new Array(this.lookupCount)].map(e=>t.Offset16)}},ap=class extends Bt{constructor(t,e){super(t),this.ctType=e,this.lookupType=t.uint16,this.lookupFlag=t.uint16,this.subTableCount=t.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>t.Offset16),this.markFilteringSet=t.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(t){let e=this.ctType==="GSUB"?Xm:np;return this.parser.currentPosition=this.start+this.subtableOffsets[t],e.buildSubtable(this.lookupType,this.parser)}},Zl=class extends mt{constructor(t,e,r){let{p:o,tableStart:s}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let a=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Z(this,"scriptList",()=>a?Nl.EMPTY:(o.currentPosition=s+this.scriptListOffset,new Nl(o))),Z(this,"featureList",()=>a?Ml.EMPTY:(o.currentPosition=s+this.featureListOffset,new Ml(o))),Z(this,"lookupList",()=>a?Gl.EMPTY:(o.currentPosition=s+this.lookupListOffset,new Gl(o))),this.featureVariationsOffset&&Z(this,"featureVariations",()=>a?FeatureVariations.EMPTY:(o.currentPosition=s+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(t=>t.scriptTag)}getScriptTable(t){let e=this.scriptList.scriptRecords.find(o=>o.scriptTag===t);this.parser.currentPosition=this.scriptList.start+e.scriptOffset;let r=new Cm(this.parser);return r.scriptTag=t,r}ensureScriptTable(t){return typeof t=="string"?this.getScriptTable(t):t}getSupportedLangSys(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys!==0,r=t.langSysRecords.map(o=>o.langSysTag);return e&&r.unshift("dflt"),r}getDefaultLangSysTable(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys;if(e!==0){this.parser.currentPosition=t.start+e;let r=new zl(this.parser);return r.langSysTag="",r.defaultForScript=t.scriptTag,r}}getLangSysTable(t,e="dflt"){if(e==="dflt")return this.getDefaultLangSysTable(t);t=this.ensureScriptTable(t);let r=t.langSysRecords.find(s=>s.langSysTag===e);this.parser.currentPosition=t.start+r.langSysOffset;let o=new zl(this.parser);return o.langSysTag=e,o}getFeatures(t){return t.featureIndices.map(e=>this.getFeature(e))}getFeature(t){let e;if(parseInt(t)==t?e=this.featureList.featureRecords[t]:e=this.featureList.featureRecords.find(o=>o.featureTag===t),!e)return;this.parser.currentPosition=this.featureList.start+e.featureOffset;let r=new Om(this.parser);return r.featureTag=e.featureTag,r}getLookups(t){return t.lookupListIndices.map(e=>this.getLookup(e))}getLookup(t,e){let r=this.lookupList.lookups[t];return this.parser.currentPosition=this.lookupList.start+r,new ap(this.parser,e)}},ip=class extends Zl{constructor(t,e){super(t,e,"GSUB")}getLookup(t){return super.getLookup(t,"GSUB")}},lp=Object.freeze({__proto__:null,GSUB:ip}),up=class extends Zl{constructor(t,e){super(t,e,"GPOS")}getLookup(t){return super.getLookup(t,"GPOS")}},fp=Object.freeze({__proto__:null,GPOS:up}),cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new dp(r)}},dp=class extends Bt{constructor(t){super(t),this.numEntries=t.uint16,this.documentRecords=[...new Array(this.numEntries)].map(e=>new mp(t))}getDocument(t){let e=this.documentRecords[t];if(!e)return"";let r=this.start+e.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(e.svgDocLength)}getDocumentForGlyph(t){let e=this.documentRecords.findIndex(r=>r.startGlyphID<=t&&t<=r.endGlyphID);return e===-1?"":this.getDocument(e)}},mp=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.svgDocOffset=t.Offset32,this.svgDocLength=t.uint32}},pp=Object.freeze({__proto__:null,SVG:cp}),hp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Z(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(a=>new gp(r))));let s=o+this.axisCount*this.axisSize;Z(this,"instances",()=>{let a=[];for(let n=0;nt.tag)}getAxis(t){return this.axes.find(e=>e.tag===t)}},gp=class{constructor(t){this.tag=t.tag,this.minValue=t.fixed,this.defaultValue=t.fixed,this.maxValue=t.fixed,this.flags=t.flags(16),this.axisNameID=t.uint16}},yp=class{constructor(t,e,r){let o=t.currentPosition;this.subfamilyNameID=t.uint16,t.uint16,this.coordinates=[...new Array(e)].map(s=>t.fixed),t.currentPosition-o[...new Array(o)].map(s=>r.fword))}},wp=Object.freeze({__proto__:null,cvt:bp}),Sp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},xp=Object.freeze({__proto__:null,fpgm:Sp}),Cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRanges=r.uint16,Z(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(s=>new Fp(r)))}},Fp=class{constructor(t){this.rangeMaxPPEM=t.uint16,this.rangeGaspBehavior=t.uint16}},kp=Object.freeze({__proto__:null,gasp:Cp}),Op=class extends mt{constructor(t,e){super(t,e)}getGlyphData(t,e){return this.parser.currentPosition=this.tableStart+t,this.parser.readBytes(e)}},Tp=Object.freeze({__proto__:null,glyf:Op}),_p=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset16))):Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset32))}getGlyphDataOffsetAndLength(t){let e=this.offsets[t]*this.x2?2:1,r=this.offsets[t+1]*this.x2?2:1;return{offset:e,length:r-e}}},Pp=Object.freeze({__proto__:null,loca:_p}),Ap=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},Rp=Object.freeze({__proto__:null,prep:Ap}),Ep=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Ip=Object.freeze({__proto__:null,CFF:Ep}),Lp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Bp=Object.freeze({__proto__:null,CFF2:Lp}),Dp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Z(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new Vp(r)))}},Vp=class{constructor(t){this.glyphIndex=t.uint16,this.vertOriginY=t.int16}},Np=Object.freeze({__proto__:null,VORG:Dp}),zp=class{constructor(t){this.indexSubTableArrayOffset=t.Offset32,this.indexTablesSize=t.uint32,this.numberofIndexSubTables=t.uint32,this.colorRef=t.uint32,this.hori=new as(t),this.vert=new as(t),this.startGlyphIndex=t.uint16,this.endGlyphIndex=t.uint16,this.ppemX=t.uint8,this.ppemY=t.uint8,this.bitDepth=t.uint8,this.flags=t.int8}},Mp=class{constructor(t){this.hori=new as(t),this.vert=new as(t),this.ppemX=t.uint8,this.ppemY=t.uint8,this.substitutePpemX=t.uint8,this.substitutePpemY=t.uint8}},as=class{constructor(t){this.ascender=t.int8,this.descender=t.int8,this.widthMax=t.uint8,this.caretSlopeNumerator=t.int8,this.caretSlopeDenominator=t.int8,this.caretOffset=t.int8,this.minOriginSB=t.int8,this.minAdvanceSB=t.int8,this.maxBeforeBL=t.int8,this.minAfterBL=t.int8,this.pad1=t.int8,this.pad2=t.int8}},Xl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Z(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(s=>new zp(o)))}},Gp=Object.freeze({__proto__:null,EBLC:Xl}),Kl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},jp=Object.freeze({__proto__:null,EBDT:Kl}),Up=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Z(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new Mp(r)))}},Hp=Object.freeze({__proto__:null,EBSC:Up}),Wp=class extends Xl{constructor(t,e){super(t,e,"CBLC")}},Yp=Object.freeze({__proto__:null,CBLC:Wp}),qp=class extends Kl{constructor(t,e){super(t,e,"CBDT")}},Zp=Object.freeze({__proto__:null,CBDT:qp}),Xp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Z(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},Kp=Object.freeze({__proto__:null,sbix:Xp}),Jp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(t){let e=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=e;let r=new bn(this.parser),o=r.gID,s=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=s;let a=new bn(this.parser),n=a.gID;if(o===t)return r;if(n===t)return a;for(;e!==s;){let l=e+(s-e)/12;this.parser.currentPosition=l;let m=new bn(this.parser),f=m.gID;if(f===t)return m;f>t?s=l:fnew Qp(p))}},bn=class{constructor(t){this.gID=t.uint16,this.firstLayerIndex=t.uint16,this.numLayers=t.uint16}},Qp=class{constructor(t){this.gID=t.uint16,this.paletteIndex=t.uint16}},$p=Object.freeze({__proto__:null,COLR:Jp}),th=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(s=>r.uint16),Z(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(s=>new eh(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Z(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new rh(r,o))),Z(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new oh(r,o))),Z(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new sh(r,o))))}},eh=class{constructor(t){this.blue=t.uint8,this.green=t.uint8,this.red=t.uint8,this.alpha=t.uint8}},rh=class{constructor(t,e){this.paletteTypes=[...new Array(e)].map(r=>t.uint32)}},oh=class{constructor(t,e){this.paletteLabels=[...new Array(e)].map(r=>t.uint16)}},sh=class{constructor(t,e){this.paletteEntryLabels=[...new Array(e)].map(r=>t.uint16)}},nh=Object.freeze({__proto__:null,CPAL:th}),ah=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new ih(r))}getData(t){let e=this.signatureRecords[t];return this.parser.currentPosition=this.tableStart+e.offset,new lh(this.parser)}},ih=class{constructor(t){this.format=t.uint32,this.length=t.uint32,this.offset=t.Offset32}},lh=class{constructor(t){t.uint16,t.uint16,this.signatureLength=t.uint32,this.signature=t.readBytes(this.signatureLength)}},uh=Object.freeze({__proto__:null,DSIG:ah}),fh=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(a=>new ch(o,s))}},ch=class{constructor(t,e){this.pixelSize=t.uint8,this.maxWidth=t.uint8,this.widths=t.readBytes(e)}},dh=Object.freeze({__proto__:null,hdmx:fh}),mh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.nTables=r.uint16,Z(this,"tables",()=>{let o=this.tableStart+4,s=[];for(let a=0;a[...new Array(this.nPairs)].map(e=>new hh(t)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},hh=class{constructor(t){this.left=t.uint16,this.right=t.uint16,this.value=t.fword}},gh=Object.freeze({__proto__:null,kern:mh}),yh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},vh=Object.freeze({__proto__:null,LTSH:yh}),bh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Z(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wh=Object.freeze({__proto__:null,MERG:bh}),Sh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new xh(this.tableStart,r))}},xh=class{constructor(t,e){this.tableStart=t,this.parser=e,this.tag=e.tag,this.dataOffset=e.Offset32,this.dataLength=e.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},Ch=Object.freeze({__proto__:null,meta:Sh}),Fh=class extends mt{constructor(t,e){super(t,e),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},kh=Object.freeze({__proto__:null,PCLT:Fh}),Oh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new Th(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new _h(r))}},Th=class{constructor(t){this.bCharSet=t.uint8,this.xRatio=t.uint8,this.yStartRatio=t.uint8,this.yEndRatio=t.uint8}},_h=class{constructor(t){this.recs=t.uint16,this.startsz=t.uint8,this.endsz=t.uint8,this.records=[...new Array(this.recs)].map(e=>new Ph(t))}},Ph=class{constructor(t){this.yPelHeight=t.uint16,this.yMax=t.int16,this.yMin=t.int16}},Ah=Object.freeze({__proto__:null,VDMX:Oh}),Rh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},Eh=Object.freeze({__proto__:null,vhea:Rh}),Ih=class extends mt{constructor(t,e,r){super(t,e);let o=r.vhea.numOfLongVerMetrics,s=r.maxp.numGlyphs,a=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=a,[...new Array(o)].map(n=>new Lh(p.uint16,p.int16)))),o(p.currentPosition=n,[...new Array(s-o)].map(l=>p.int16)))}}},Lh=class{constructor(t,e){this.advanceHeight=t,this.topSideBearing=e}},Bh=Object.freeze({__proto__:null,vmtx:Ih});var Jl=u(X(),1);var{kebabCase:Dh}=vt(Jl.privateApis);function Ql(t){let e=t.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:Dh(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(e)}var pe=u(z(),1);function Vh(){let{installFonts:t}=(0,go.useContext)(ne),[e,r]=(0,go.useState)(!1),[o,s]=(0,go.useState)(null),a=h=>{l(h)},n=h=>{l(h.target.files)},l=async h=>{if(!h)return;s(null),r(!0);let v=new Set,_=[...h],A=!1,k=_.map(async b=>{if(!await f(b))return A=!0,null;if(v.has(b.name))return null;let Y=(((b.name??"").split(".")??[]).pop()??"").toLowerCase();return pn.includes(Y)?(v.add(b.name),b):null}),x=(await Promise.all(k)).filter(b=>b!==null);if(x.length>0)m(x);else{let b=A?(0,Ur.__)("Sorry, you are not allowed to upload this file type."):(0,Ur.__)("No fonts found to install.");s({type:"error",message:b}),r(!1)}},m=async h=>{let v=await Promise.all(h.map(async _=>{let A=await d(_);return await er(A,A.file,"all"),A}));g(v)};async function f(h){let v=new is("Uploaded Font");try{let _=await c(h);return await v.fromDataBuffer(_,"font"),!0}catch{return!1}}async function c(h){return new Promise((v,_)=>{let A=new window.FileReader;A.readAsArrayBuffer(h),A.onload=()=>v(A.result),A.onerror=_})}let d=async h=>{let v=await c(h),_=new is("Uploaded Font");_.fromDataBuffer(v,h.name);let k=(await new Promise($=>_.onload=$)).detail.font,{name:x}=k.opentype.tables,b=x.get(16)||x.get(1),T=x.get(2).toLowerCase().includes("italic"),Y=k.opentype.tables["OS/2"].usWeightClass||"normal",V=!!k.opentype.tables.fvar&&k.opentype.tables.fvar.axes.find(({tag:$})=>$==="wght"),H=V?`${V.minValue} ${V.maxValue}`:null;return{file:h,fontFamily:b,fontStyle:T?"italic":"normal",fontWeight:H||Y}},g=async h=>{let v=Ql(h);try{await t(v),s({type:"success",message:(0,Ur.__)("Fonts were installed successfully.")})}catch(_){let A=_;s({type:"error",message:A.message,errors:A?.installationErrors})}r(!1)};return(0,pe.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,pe.jsx)($t.DropZone,{onFilesDrop:a}),(0,pe.jsxs)($t.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,pe.jsxs)($t.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>s(null),children:[o.message,o.errors&&(0,pe.jsx)("ul",{children:o.errors.map((h,v)=>(0,pe.jsx)("li",{children:h},v))})]}),e&&(0,pe.jsx)($t.FlexItem,{children:(0,pe.jsx)("div",{className:"font-library__upload-area",children:(0,pe.jsx)($t.ProgressBar,{})})}),!e&&(0,pe.jsx)($t.FormFileUpload,{accept:pn.map(h=>`.${h}`).join(","),multiple:!0,onChange:n,render:({openFileDialog:h})=>(0,pe.jsx)($t.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,Ur.__)("Upload font")})}),(0,pe.jsx)($t.__experimentalText,{className:"font-library__upload-area__text",children:(0,Ur.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var ls=Vh;var tu=u(z(),1),{Tabs:x2}=vt(Sn.privateApis),C2={id:"installed-fonts",title:(0,us._x)("Library","Font library")},F2={id:"upload-fonts",title:(0,us._x)("Upload","noun")};var eu=u(ut(),1),xn=u(X(),1),zh=u(yt(),1);var ru=u(z(),1);var Cn=u(z(),1);var ou=u(ut(),1),fs=u(X(),1);var su=u(z(),1);var kn=u(z(),1);var _e=u(ut(),1),On=u(X(),1),qh=u(yt(),1);var nu=u(ce(),1);var Wh=u(z(),1),{useSettingsForBlockElement:t6,TypographyPanel:e6}=vt(nu.privateApis);var Yh=u(z(),1);var Tn=u(z(),1),f6={text:{description:(0,_e.__)("Manage the fonts used on the site."),title:(0,_e.__)("Text")},link:{description:(0,_e.__)("Manage the fonts and typography used on the links."),title:(0,_e.__)("Links")},heading:{description:(0,_e.__)("Manage the fonts and typography used on headings."),title:(0,_e.__)("Headings")},caption:{description:(0,_e.__)("Manage the fonts and typography used on captions."),title:(0,_e.__)("Captions")},button:{description:(0,_e.__)("Manage the fonts and typography used on buttons."),title:(0,_e.__)("Buttons")}};var Jh=u(ut(),1),Qh=u(X(),1),iu=u(ce(),1);var Hr=u(X(),1),au=u(ut(),1);var Kh=u(yt(),1);var Zh=u(X(),1),Xh=u(z(),1);var _n=u(z(),1);var Pn=u(z(),1),{useSettingsForBlockElement:O6,ColorPanel:T6}=vt(iu.privateApis);var ng=u(ut(),1),pu=u(X(),1);var eg=u(cr(),1),An=u(X(),1),rg=u(ut(),1);var ds=u(X(),1);var cs=u(X(),1);var lu=u(z(),1);function uu(){let{paletteColors:t}=Lr();return t.slice(0,4).map(({slug:e,color:r},o)=>(0,lu.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${e}-${o}`))}var vo=u(z(),1),$h={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},tg=({label:t,isFocused:e,withHoverView:r})=>(0,vo.jsx)(Vr,{label:t,isFocused:e,withHoverView:r,children:({key:o})=>(0,vo.jsx)(cs.__unstableMotion.div,{variants:$h,style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(cs.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(uu,{})})},o)}),fu=tg;var Cr=u(z(),1),cu=["color"];function ms({title:t,gap:e=2}){let r=No(cu);return r?.length<=1?null:(0,Cr.jsxs)(ds.__experimentalVStack,{spacing:3,children:[t&&(0,Cr.jsx)(Se,{level:3,children:t}),(0,Cr.jsx)(ds.__experimentalGrid,{gap:e,children:r.map((o,s)=>(0,Cr.jsx)(zr,{variation:o,isPill:!0,properties:cu,showTooltip:!0,children:()=>(0,Cr.jsx)(fu,{})},s))})]})}var du=u(z(),1);var og=u(cr(),1),ps=u(X(),1),sg=u(ut(),1);var mu=u(z(),1);var Rn=u(z(),1),{Tabs:Q6}=vt(pu.privateApis);var ig=u(ut(),1),gu=u(ce(),1),lg=u(X(),1);var hu=u(ce(),1);var ag=u(z(),1);var{BackgroundPanel:rC}=vt(hu.privateApis);var En=u(z(),1),{useHasBackgroundPanel:uC}=vt(gu.privateApis);var Fr=u(X(),1),In=u(ut(),1);var mg=u(yt(),1);var ug=u(X(),1),fg=u(ut(),1),cg=u(z(),1);var Ln=u(z(),1),{Menu:SC}=vt(Fr.privateApis);var Ut=u(X(),1),bo=u(ut(),1);var hs=u(yt(),1);var Bn=u(z(),1),{Menu:DC}=vt(Ut.privateApis),VC=[{label:(0,bo.__)("Rename"),action:"rename"},{label:(0,bo.__)("Delete"),action:"delete"}],NC=[{label:(0,bo.__)("Reset"),action:"reset"}];var pg=u(z(),1);var yg=u(ut(),1),vu=u(ce(),1);var yu=u(ce(),1),hg=u(yt(),1);var gg=u(z(),1),{useSettingsForBlockElement:qC,DimensionsPanel:ZC}=vt(yu.privateApis);var Dn=u(z(),1),{useHasDimensionsPanel:eF,useSettingsForBlockElement:rF}=vt(vu.privateApis);var Fu=u(X(),1),Sg=u(ut(),1);var bg=u(ut(),1),wg=u(X(),1);var bu=u(be(),1),wu=u(fe(),1),ys=u(yt(),1),Su=u(X(),1),xu=u(ut(),1);var gs=u(z(),1);function vg({gap:t=2}){let{user:e}=(0,ys.useContext)(Xt),r=e?.styles,s=(0,wu.useSelect)(n=>{let l=n(bu.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(n=>!io(n,["color"])&&!io(n,["typography","spacing"])),a=(0,ys.useMemo)(()=>[...[{title:(0,xu.__)("Default"),settings:{},styles:{}},...s??[]].map(l=>{let m=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(g=>{if(r.blocks?.[g]?.css){let h=m[g]||{},v={css:`${m[g]?.css||""} ${r.blocks?.[g]?.css?.trim()||""}`};m[g]={...h,...v}}});let f=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},c=Object.keys(m).length>0?{blocks:m}:{},d={...l.styles,...f,...c};return{...l,settings:l.settings??{},styles:d}})],[s,r?.blocks,r?.css]);return!s||s.length<1?null:(0,gs.jsx)(Su.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:t,children:a.map((n,l)=>(0,gs.jsx)(zr,{variation:n,children:m=>(0,gs.jsx)(nn,{label:n?.title,withHoverView:!0,isFocused:m,variation:n})},l))})}var Vn=vg;var Cu=u(z(),1);var Nn=u(z(),1);var xg=u(ut(),1),Cg=u(X(),1),ku=u(ce(),1);var zn=u(z(),1),{AdvancedPanel:wF}=vt(ku.privateApis);var Lu=u(ut(),1),Gn=u(X(),1),jn=u(yt(),1);var Fg=u(fe(),1),kg=u(be(),1),Ou=u(yt(),1);var Pu=u(ut(),1),Au=u(X(),1),vs=u(_u(),1),Og=u(be(),1),Tg=u(fe(),1);var Ru=u(dn(),1),Eu=u(z(),1),kF=3600*1e3*24;var Mn=u(X(),1),wo=u(ut(),1);var Iu=u(z(),1);var Un=u(z(),1);var Hn=u(ut(),1),qe=u(X(),1);var Eg=u(yt(),1);var Pg=u(X(),1),Ag=u(ut(),1),Rg=u(z(),1);var Wn=u(z(),1),{Menu:YF}=vt(qe.privateApis);var Nu=u(ut(),1),ze=u(X(),1);var zu=u(yt(),1);var Ig=u(ce(),1),Lg=u(ut(),1);var Bg=u(z(),1);var Dg=u(X(),1),Bu=u(ut(),1),Vg=u(z(),1);var So=u(X(),1),Ng=u(ut(),1),zg=u(yt(),1),Du=u(z(),1);var Ze=u(X(),1),Vu=u(z(),1);var Yn=u(z(),1),{Menu:f3}=vt(ze.privateApis);var Zn=u(z(),1);var Xn=u(z(),1);function Wr(t){return function({value:r,baseValue:o,onChange:s,...a}){return(0,Xn.jsx)(ao,{value:r,baseValue:o,onChange:s,children:(0,Xn.jsx)(t,{...a})})}}var Ug=Wr(Vn);var Hg=Wr(ms);var Wg=Wr(Wo);var Yr=u(z(),1);function Kn({value:t,baseValue:e,onChange:r,activeTab:o="installed-fonts"}){let s;switch(o){case"upload-fonts":s=(0,Yr.jsx)(ls,{});break;case"installed-fonts":s=(0,Yr.jsx)($o,{});break;default:s=(0,Yr.jsx)(es,{slug:o})}return(0,Yr.jsx)(ao,{value:t,baseValue:e,onChange:r,children:(0,Yr.jsx)(Zo,{children:s})})}var ju=u(Vs()),{unlock:Jn}=(0,ju.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/font-list-route");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='89af99528f']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","89af99528f"),t.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')),document.head.appendChild(t)}var{Tabs:bs}=Jn(Uu.privateApis),{useGlobalStyles:Yg}=Jn(Hu.privateApis);function qg(){let{records:t=[]}=(0,ws.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),[e,r]=(0,Yu.useState)("installed-fonts"),{base:o,user:s,setUser:a,isReady:n}=Yg(),l=(0,Wu.useSelect)(f=>f(ws.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]);if(!n)return null;let m=[{id:"installed-fonts",title:(0,xo.__)("Library")}];return l&&(m.push({id:"upload-fonts",title:(0,xo.__)("Upload")}),m.push(...(t||[]).map(({slug:f,name:c})=>({id:f,title:t&&t.length===1&&f==="google-fonts"?(0,xo.__)("Install Fonts"):c})))),React.createElement(Ns,{title:(0,xo.__)("Fonts")},React.createElement(bs,{selectedTabId:e,onSelect:f=>r(f)},React.createElement("div",{className:"font-library-page__tablist"},React.createElement(bs.TabList,null,m.map(({id:f,title:c})=>React.createElement(bs.Tab,{key:f,tabId:f},c)))),m.map(({id:f})=>React.createElement(bs.TabPanel,{key:f,tabId:f,focusable:!1,className:"font-library-page__tab-panel"},React.createElement(Kn,{value:s,baseValue:o,onChange:a,activeTab:f})))))}function Zg(){return React.createElement(qg,null)}var Xg=Zg;export{Xg as stage}; +}`,globalThis.document.head.appendChild(s),s}var md=[0,1,0,0],pd=[79,84,84,79],hd=[119,79,70,70],gd=[119,79,70,50];function ns(t,e){if(t.length===e.length){for(let r=0;r(globalThis.document&&!this.options.skipStyleSheet&&await dd(this.name,t,this.options),this.loadFont(t)))()}async loadFont(t,e){fetch(t).then(r=>vd(r)&&r.arrayBuffer()).then(r=>this.fromDataBuffer(r,e||t)).catch(r=>{let o=new ss("error",r,`Failed to load font at ${e||t}`);this.dispatch(o),this.onerror&&this.onerror(o)})}async fromDataBuffer(t,e){this.fontData=new DataView(t);let r=yd(this.fontData);if(!r)throw new Error(`${e} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(r);let o=new ss("load",{font:this});this.dispatch(o),this.onload&&this.onload(o)}async parseBasicData(t){return fd().then(e=>(t==="SFNT"&&(this.opentype=new td(this,this.fontData,e)),t==="WOFF"&&(this.opentype=new rd(this,this.fontData,e)),t==="WOFF2"&&(this.opentype=new nd(this,this.fontData,e)),this.opentype))}getGlyphId(t){return this.opentype.tables.cmap.getGlyphId(t)}reverse(t){return this.opentype.tables.cmap.reverse(t)}supports(t){return this.getGlyphId(t)!==0}supportsVariation(t){return this.opentype.tables.cmap.supportsVariation(t)!==!1}measureText(t,e=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let r=document.createElement("div");r.textContent=t,r.style.fontFamily=this.name,r.style.fontSize=`${e}px`,r.style.color="transparent",r.style.background="transparent",r.style.top="0",r.style.left="0",r.style.position="absolute",document.body.appendChild(r);let o=r.getBoundingClientRect();document.body.removeChild(r);let s=this.opentype.tables["OS/2"];return o.fontSize=e,o.ascender=s.sTypoAscender,o.descender=s.sTypoDescender,o}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);let t=new ss("unload",{font:this});this.dispatch(t),this.onunload&&this.onunload(t)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);let t=new ss("load",{font:this});this.dispatch(t),this.onload&&this.onload(t)}}};globalThis.Font=is;var We=class extends Bt{constructor(t,e,r){super(t),this.plaformID=e,this.encodingID=r}},bd=class extends We{constructor(t,e,r){super(t,e,r),this.format=0,this.length=t.uint16,this.language=t.uint16,this.glyphIdArray=[...new Array(256)].map(o=>t.uint8)}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=t&&t<=255}reverse(t){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}},wd=class extends We{constructor(t,e,r){super(t,e,r),this.format=2,this.length=t.uint16,this.language=t.uint16,this.subHeaderKeys=[...new Array(256)].map(n=>t.uint16);let o=Math.max(...this.subHeaderKeys),s=t.currentPosition;Z(this,"subHeaders",()=>(t.currentPosition=s,[...new Array(o)].map(n=>new Sd(t))));let a=s+o*8;Z(this,"glyphIndexArray",()=>(t.currentPosition=a,[...new Array(o)].map(n=>t.uint16)))}supports(t){t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));let e=t&&255,r=t&&65280,o=this.subHeaders[r],s=this.subHeaders[o],a=s.firstCode,n=a+s.entryCount;return a<=e&&e<=n}reverse(t){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(t=!1){return t?this.subHeaders.map(e=>({firstCode:e.firstCode,lastCode:e.lastCode})):this.subHeaders.map(e=>({start:e.firstCode,end:e.lastCode}))}},Sd=class{constructor(t){this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=t.int16,this.idRangeOffset=t.uint16}},xd=class extends We{constructor(t,e,r){super(t,e,r),this.format=4,this.length=t.uint16,this.language=t.uint16,this.segCountX2=t.uint16,this.segCount=this.segCountX2/2,this.searchRange=t.uint16,this.entrySelector=t.uint16,this.rangeShift=t.uint16;let o=t.currentPosition;Z(this,"endCode",()=>t.readBytes(this.segCount,o,16));let s=o+2+this.segCountX2;Z(this,"startCode",()=>t.readBytes(this.segCount,s,16));let a=s+this.segCountX2;Z(this,"idDelta",()=>t.readBytes(this.segCount,a,16,!0));let n=a+this.segCountX2;Z(this,"idRangeOffset",()=>t.readBytes(this.segCount,n,16));let l=n+this.segCountX2,m=this.length-(l-this.tableStart);Z(this,"glyphIdArray",()=>t.readBytes(m,l,16)),Z(this,"segments",()=>this.buildSegments(n,l,t))}buildSegments(t,e,r){let o=(s,a)=>{let n=this.startCode[a],l=this.endCode[a],m=this.idDelta[a],f=this.idRangeOffset[a],c=t+2*a,d=[];if(f===0)for(let g=n+m,h=l+m;g<=h;g++)d.push(g);else for(let g=0,h=l-n;g<=h;g++)r.currentPosition=c+f+g*2,d.push(r.uint16);return{startCode:n,endCode:l,idDelta:m,idRangeOffset:f,glyphIDs:d}};return[...new Array(this.segCount)].map(o)}reverse(t){let e=this.segments.find(o=>o.glyphIDs.includes(t));if(!e)return{};let r=e.startCode+e.glyphIDs.indexOf(t);return{code:r,unicode:String.fromCodePoint(r)}}getGlyphId(t){if(t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535)return 0;let e=this.segments.find(r=>r.startCode<=t&&t<=r.endCode);return e?e.glyphIDs[t-e.startCode]:0}supports(t){return this.getGlyphId(t)!==0}getSupportedCharCodes(t=!1){return t?this.segments:this.segments.map(e=>({start:e.startCode,end:e.endCode}))}},Cd=class extends We{constructor(t,e,r){super(t,e,r),this.format=6,this.length=t.uint16,this.language=t.uint16,this.firstCode=t.uint16,this.entryCount=t.uint16,this.lastCode=this.firstCode+this.entryCount-1,Z(this,"glyphIdArray",()=>[...new Array(this.entryCount)].map(s=>t.uint16))}supports(t){if(t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),tthis.firstCode+this.entryCount)return{};let e=t-this.firstCode;return{code:e,unicode:String.fromCodePoint(e)}}reverse(t){let e=this.glyphIdArray.indexOf(t);if(e>-1)return this.firstCode+e}getSupportedCharCodes(t=!1){return t?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}},Fd=class extends We{constructor(t,e,r){super(t,e,r),this.format=8,t.uint16,this.length=t.uint32,this.language=t.uint32,this.is32=[...new Array(8192)].map(s=>t.uint8),this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new kd(t)))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),this.groups.findIndex(e=>e.startcharCode<=t&&t<=e.endcharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startcharCode,end:e.endcharCode}))}},kd=class{constructor(t){this.startcharCode=t.uint32,this.endcharCode=t.uint32,this.startGlyphID=t.uint32}},Od=class extends We{constructor(t,e,r){super(t,e,r),this.format=10,t.uint16,this.length=t.uint32,this.language=t.uint32,this.startCharCode=t.uint32,this.numChars=t.uint32,this.endCharCode=this.startCharCode+this.numChars,Z(this,"glyphs",()=>[...new Array(this.numChars)].map(s=>t.uint16))}supports(t){return t.charCodeAt&&(t=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),tthis.startCharCode+this.numChars?!1:t-this.startCharCode}reverse(t){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(t=!1){return t?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}},Td=class extends We{constructor(t,e,r){super(t,e,r),this.format=12,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32,Z(this,"groups",()=>[...new Array(this.numGroups)].map(s=>new _d(t)))}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),55296<=t&&t<=57343||(t&65534)===65534||(t&65535)===65535?0:this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){for(let e of this.groups){let r=e.startGlyphID;if(r>t)continue;if(r===t)return e.startCharCode;if(r+(e.endCharCode-e.startCharCode)({start:e.startCharCode,end:e.endCharCode}))}},_d=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.startGlyphID=t.uint32}},Pd=class extends We{constructor(t,e,r){super(t,e,r),this.format=13,t.uint16,this.length=t.uint32,this.language=t.uint32,this.numGroups=t.uint32;let o=[...new Array(this.numGroups)].map(s=>new Ad(t));Z(this,"groups",o)}supports(t){return t.charCodeAt&&(t=t.charCodeAt(0)),this.groups.findIndex(e=>e.startCharCode<=t&&t<=e.endCharCode)!==-1}reverse(t){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(t=!1){return t?this.groups:this.groups.map(e=>({start:e.startCharCode,end:e.endCharCode}))}},Ad=class{constructor(t){this.startCharCode=t.uint32,this.endCharCode=t.uint32,this.glyphID=t.uint32}},Rd=class extends We{constructor(t,e,r){super(t,e,r),this.subTableStart=t.currentPosition,this.format=14,this.length=t.uint32,this.numVarSelectorRecords=t.uint32,Z(this,"varSelectors",()=>[...new Array(this.numVarSelectorRecords)].map(o=>new Ed(t)))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(t){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(t){let e=this.varSelector.find(r=>r.varSelector===t);return e||!1}getSupportedVariations(){return this.varSelectors.map(t=>t.varSelector)}},Ed=class{constructor(t){this.varSelector=t.uint24,this.defaultUVSOffset=t.Offset32,this.nonDefaultUVSOffset=t.Offset32}};function Id(t,e,r){let o=t.uint16;return o===0?new bd(t,e,r):o===2?new wd(t,e,r):o===4?new xd(t,e,r):o===6?new Cd(t,e,r):o===8?new Fd(t,e,r):o===10?new Od(t,e,r):o===12?new Td(t,e,r):o===13?new Pd(t,e,r):o===14?new Rd(t,e,r):{}}var Ld=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numTables=r.uint16,this.encodingRecords=[...new Array(this.numTables)].map(o=>new Bd(r,this.tableStart))}getSubTable(t){return this.encodingRecords[t].table}getSupportedEncodings(){return this.encodingRecords.map(t=>({platformID:t.platformID,encodingId:t.encodingID}))}getSupportedCharCodes(t,e){let r=this.encodingRecords.findIndex(s=>s.platformID===t&&s.encodingID===e);return r===-1?!1:this.getSubTable(r).getSupportedCharCodes()}reverse(t){for(let e=0;e{let s=this.getSubTable(o);return s.getGlyphId?(e=s.getGlyphId(t),e!==0):!1}),e}supports(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supports&&o.supports(t)!==!1})}supportsVariation(t){return this.encodingRecords.some((e,r)=>{let o=this.getSubTable(r);return o.supportsVariation&&o.supportsVariation(t)!==!1})}},Bd=class{constructor(t,e){let r=this.platformID=t.uint16,o=this.encodingID=t.uint16,s=this.offset=t.Offset32;Z(this,"table",()=>(t.currentPosition=e+s,Id(t,r,o)))}},Dd=Object.freeze({__proto__:null,cmap:Ld}),Vd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.load({majorVersion:r.uint16,minorVersion:r.uint16,fontRevision:r.fixed,checkSumAdjustment:r.uint32,magicNumber:r.uint32,flags:r.flags(16),unitsPerEm:r.uint16,created:r.longdatetime,modified:r.longdatetime,xMin:r.int16,yMin:r.int16,xMax:r.int16,yMax:r.int16,macStyle:r.flags(16),lowestRecPPEM:r.uint16,fontDirectionHint:r.uint16,indexToLocFormat:r.uint16,glyphDataFormat:r.uint16})}},Nd=Object.freeze({__proto__:null,head:Vd}),zd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.ascender=r.fword,this.descender=r.fword,this.lineGap=r.fword,this.advanceWidthMax=r.ufword,this.minLeftSideBearing=r.fword,this.minRightSideBearing=r.fword,this.xMaxExtent=r.fword,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,r.int16,r.int16,r.int16,r.int16,this.metricDataFormat=r.int16,this.numberOfHMetrics=r.uint16,r.verifyLength()}},Md=Object.freeze({__proto__:null,hhea:zd}),Gd=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hhea.numberOfHMetrics,a=r.maxp.numGlyphs,n=o.currentPosition;if(Z(this,"hMetrics",()=>(o.currentPosition=n,[...new Array(s)].map(l=>new jd(o.uint16,o.int16)))),s(o.currentPosition=l,[...new Array(a-s)].map(m=>o.int16)))}}},jd=class{constructor(t,e){this.advanceWidth=t,this.lsb=e}},Ud=Object.freeze({__proto__:null,hmtx:Gd}),Hd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.legacyFixed,this.numGlyphs=r.uint16,this.version===1&&(this.maxPoints=r.uint16,this.maxContours=r.uint16,this.maxCompositePoints=r.uint16,this.maxCompositeContours=r.uint16,this.maxZones=r.uint16,this.maxTwilightPoints=r.uint16,this.maxStorage=r.uint16,this.maxFunctionDefs=r.uint16,this.maxInstructionDefs=r.uint16,this.maxStackElements=r.uint16,this.maxSizeOfInstructions=r.uint16,this.maxComponentElements=r.uint16,this.maxComponentDepth=r.uint16),r.verifyLength()}},Wd=Object.freeze({__proto__:null,maxp:Hd}),Yd=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.format=r.uint16,this.count=r.uint16,this.stringOffset=r.Offset16,this.nameRecords=[...new Array(this.count)].map(o=>new Zd(r,this)),this.format===1&&(this.langTagCount=r.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map(o=>new qd(r.uint16,r.Offset16))),this.stringStart=this.tableStart+this.stringOffset}get(t){let e=this.nameRecords.find(r=>r.nameID===t);if(e)return e.string}},qd=class{constructor(t,e){this.length=t,this.offset=e}},Zd=class{constructor(t,e){this.platformID=t.uint16,this.encodingID=t.uint16,this.languageID=t.uint16,this.nameID=t.uint16,this.length=t.uint16,this.offset=t.Offset16,Z(this,"string",()=>(t.currentPosition=e.stringStart+this.offset,Xd(t,this)))}};function Xd(t,e){let{platformID:r,length:o}=e;if(o===0)return"";if(r===0||r===3){let n=[];for(let l=0,m=o/2;lr.uint8),this.ulUnicodeRange1=r.flags(32),this.ulUnicodeRange2=r.flags(32),this.ulUnicodeRange3=r.flags(32),this.ulUnicodeRange4=r.flags(32),this.achVendID=r.tag,this.fsSelection=r.uint16,this.usFirstCharIndex=r.uint16,this.usLastCharIndex=r.uint16,this.sTypoAscender=r.int16,this.sTypoDescender=r.int16,this.sTypoLineGap=r.int16,this.usWinAscent=r.uint16,this.usWinDescent=r.uint16,this.version===0||(this.ulCodePageRange1=r.flags(32),this.ulCodePageRange2=r.flags(32),this.version===1)||(this.sxHeight=r.int16,this.sCapHeight=r.int16,this.usDefaultChar=r.uint16,this.usBreakChar=r.uint16,this.usMaxContext=r.uint16,this.version<=4)||(this.usLowerOpticalPointSize=r.uint16,this.usUpperOpticalPointSize=r.uint16,this.version===5))return r.verifyLength()}},Qd=Object.freeze({__proto__:null,OS2:Jd}),$d=class extends mt{constructor(t,e){let{p:r}=super(t,e);if(this.version=r.legacyFixed,this.italicAngle=r.fixed,this.underlinePosition=r.fword,this.underlineThickness=r.fword,this.isFixedPitch=r.uint32,this.minMemType42=r.uint32,this.maxMemType42=r.uint32,this.minMemType1=r.uint32,this.maxMemType1=r.uint32,this.version===1||this.version===3)return r.verifyLength();if(this.numGlyphs=r.uint16,this.version===2){this.glyphNameIndex=[...new Array(this.numGlyphs)].map(o=>r.uint16),this.namesOffset=r.currentPosition,this.glyphNameOffsets=[1];for(let o=0;or.int8))}getGlyphName(t){if(this.version!==2)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let e=this.glyphNameIndex[t];if(e<258)return Dl[e];let r=this.glyphNameOffsets[t],s=this.glyphNameOffsets[t+1]-r-1;return s===0?".notdef.":(this.parser.currentPosition=this.namesOffset+r,this.parser.readBytes(s,this.namesOffset+r,8,!0).map(n=>String.fromCharCode(n)).join(""))}},Dl=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],tm=Object.freeze({__proto__:null,post:$d}),em=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.horizAxisOffset=r.Offset16,this.vertAxisOffset=r.Offset16,Z(this,"horizAxis",()=>new vn({offset:t.offset+this.horizAxisOffset},e)),Z(this,"vertAxis",()=>new vn({offset:t.offset+this.vertAxisOffset},e)),this.majorVersion===1&&this.minorVersion===1&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>new vn({offset:t.offset+this.itemVarStoreOffset},e)))}},vn=class extends mt{constructor(t,e){let{p:r}=super(t,e,"AxisTable");this.baseTagListOffset=r.Offset16,this.baseScriptListOffset=r.Offset16,Z(this,"baseTagList",()=>new rm({offset:t.offset+this.baseTagListOffset},e)),Z(this,"baseScriptList",()=>new om({offset:t.offset+this.baseScriptListOffset},e))}},rm=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseTagListTable");this.baseTagCount=r.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map(o=>r.tag)}},om=class extends mt{constructor(t,e){let{p:r}=super(t,e,"BaseScriptListTable");this.baseScriptCount=r.uint16;let o=r.currentPosition;Z(this,"baseScriptRecords",()=>(r.currentPosition=o,[...new Array(this.baseScriptCount)].map(s=>new sm(this.start,r))))}},sm=class{constructor(t,e){this.baseScriptTag=e.tag,this.baseScriptOffset=e.Offset16,Z(this,"baseScriptTable",()=>(e.currentPosition=t+this.baseScriptOffset,new nm(e)))}},nm=class{constructor(t){this.start=t.currentPosition,this.baseValuesOffset=t.Offset16,this.defaultMinMaxOffset=t.Offset16,this.baseLangSysCount=t.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map(e=>new am(this.start,t)),Z(this,"baseValues",()=>(t.currentPosition=this.start+this.baseValuesOffset,new im(t))),Z(this,"defaultMinMax",()=>(t.currentPosition=this.start+this.defaultMinMaxOffset,new Hl(t)))}},am=class{constructor(t,e){this.baseLangSysTag=e.tag,this.minMaxOffset=e.Offset16,Z(this,"minMax",()=>(e.currentPosition=t+this.minMaxOffset,new Hl(e)))}},im=class{constructor(t){this.parser=t,this.start=t.currentPosition,this.defaultBaselineIndex=t.uint16,this.baseCoordCount=t.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map(e=>t.Offset16)}getTable(t){return this.parser.currentPosition=this.start+this.baseCoords[t],new um(this.parser)}},Hl=class{constructor(t){this.minCoord=t.Offset16,this.maxCoord=t.Offset16,this.featMinMaxCount=t.uint16;let e=t.currentPosition;Z(this,"featMinMaxRecords",()=>(t.currentPosition=e,[...new Array(this.featMinMaxCount)].map(r=>new lm(t))))}},lm=class{constructor(t){this.featureTableTag=t.tag,this.minCoord=t.Offset16,this.maxCoord=t.Offset16}},um=class{constructor(t){this.baseCoordFormat=t.uint16,this.coordinate=t.int16,this.baseCoordFormat===2&&(this.referenceGlyph=t.uint16,this.baseCoordPoint=t.uint16),this.baseCoordFormat===3&&(this.deviceTable=t.Offset16)}},fm=Object.freeze({__proto__:null,BASE:em}),Vl=class{constructor(t){this.classFormat=t.uint16,this.classFormat===1&&(this.startGlyphID=t.uint16,this.glyphCount=t.uint16,this.classValueArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.classFormat===2&&(this.classRangeCount=t.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map(e=>new cm(t)))}},cm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.class=t.uint16}},ho=class extends Bt{constructor(t){super(t),this.coverageFormat=t.uint16,this.coverageFormat===1&&(this.glyphCount=t.uint16,this.glyphArray=[...new Array(this.glyphCount)].map(e=>t.uint16)),this.coverageFormat===2&&(this.rangeCount=t.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map(e=>new dm(t)))}},dm=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.startCoverageIndex=t.uint16}},mm=class{constructor(t,e){this.table=t,this.parser=e,this.start=e.currentPosition,this.format=e.uint16,this.variationRegionListOffset=e.Offset32,this.itemVariationDataCount=e.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map(r=>e.Offset32)}},pm=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.glyphClassDefOffset=r.Offset16,Z(this,"glyphClassDefs",()=>{if(this.glyphClassDefOffset!==0)return r.currentPosition=this.tableStart+this.glyphClassDefOffset,new Vl(r)}),this.attachListOffset=r.Offset16,Z(this,"attachList",()=>{if(this.attachListOffset!==0)return r.currentPosition=this.tableStart+this.attachListOffset,new hm(r)}),this.ligCaretListOffset=r.Offset16,Z(this,"ligCaretList",()=>{if(this.ligCaretListOffset!==0)return r.currentPosition=this.tableStart+this.ligCaretListOffset,new ym(r)}),this.markAttachClassDefOffset=r.Offset16,Z(this,"markAttachClassDef",()=>{if(this.markAttachClassDefOffset!==0)return r.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Vl(r)}),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=r.Offset16,Z(this,"markGlyphSetsDef",()=>{if(this.markGlyphSetsDefOffset!==0)return r.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new wm(r)})),this.minorVersion===3&&(this.itemVarStoreOffset=r.Offset32,Z(this,"itemVarStore",()=>{if(this.itemVarStoreOffset!==0)return r.currentPosition=this.tableStart+this.itemVarStoreOffset,new mm(r)}))}},hm=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,this.glyphCount=t.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16)}getPoint(t){return this.parser.currentPosition=this.start+this.attachPointOffsets[t],new gm(this.parser)}},gm=class{constructor(t){this.pointCount=t.uint16,this.pointIndices=[...new Array(this.pointCount)].map(e=>t.uint16)}},ym=class extends Bt{constructor(t){super(t),this.coverageOffset=t.Offset16,Z(this,"coverage",()=>(t.currentPosition=this.start+this.coverageOffset,new ho(t))),this.ligGlyphCount=t.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map(e=>t.Offset16)}getLigGlyph(t){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[t],new vm(this.parser)}},vm=class extends Bt{constructor(t){super(t),this.caretCount=t.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map(e=>t.Offset16)}getCaretValue(t){return this.parser.currentPosition=this.start+this.caretValueOffsets[t],new bm(this.parser)}},bm=class{constructor(t){this.caretValueFormat=t.uint16,this.caretValueFormat===1&&(this.coordinate=t.int16),this.caretValueFormat===2&&(this.caretValuePointIndex=t.uint16),this.caretValueFormat===3&&(this.coordinate=t.int16,this.deviceOffset=t.Offset16)}},wm=class extends Bt{constructor(t){super(t),this.markGlyphSetTableFormat=t.uint16,this.markGlyphSetCount=t.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map(e=>t.Offset32)}getMarkGlyphSet(t){return this.parser.currentPosition=this.start+this.coverageOffsets[t],new ho(this.parser)}},Sm=Object.freeze({__proto__:null,GDEF:pm}),Nl=class extends Bt{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(t){super(t),this.scriptCount=t.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map(e=>new xm(t))}},xm=class{constructor(t){this.scriptTag=t.tag,this.scriptOffset=t.Offset16}},Cm=class extends Bt{constructor(t){super(t),this.defaultLangSys=t.Offset16,this.langSysCount=t.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map(e=>new Fm(t))}},Fm=class{constructor(t){this.langSysTag=t.tag,this.langSysOffset=t.Offset16}},zl=class{constructor(t){this.lookupOrder=t.Offset16,this.requiredFeatureIndex=t.uint16,this.featureIndexCount=t.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map(e=>t.uint16)}},Ml=class extends Bt{static EMPTY={featureCount:0,featureRecords:[]};constructor(t){super(t),this.featureCount=t.uint16,this.featureRecords=[...new Array(this.featureCount)].map(e=>new km(t))}},km=class{constructor(t){this.featureTag=t.tag,this.featureOffset=t.Offset16}},Om=class extends Bt{constructor(t){super(t),this.featureParams=t.Offset16,this.lookupIndexCount=t.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map(e=>t.uint16)}getFeatureParams(){if(this.featureParams>0){let t=this.parser;t.currentPosition=this.start+this.featureParams;let e=this.featureTag;if(e==="size")return new _m(t);if(e.startsWith("cc"))return new Tm(t);if(e.startsWith("ss"))return new Pm(t)}}},Tm=class{constructor(t){this.format=t.uint16,this.featUiLabelNameId=t.uint16,this.featUiTooltipTextNameId=t.uint16,this.sampleTextNameId=t.uint16,this.numNamedParameters=t.uint16,this.firstParamUiLabelNameId=t.uint16,this.charCount=t.uint16,this.character=[...new Array(this.charCount)].map(e=>t.uint24)}},_m=class{constructor(t){this.designSize=t.uint16,this.subfamilyIdentifier=t.uint16,this.subfamilyNameID=t.uint16,this.smallEnd=t.uint16,this.largeEnd=t.uint16}},Pm=class{constructor(t){this.version=t.uint16,this.UINameID=t.uint16}};function Wl(t){t.parser.currentPosition-=2,delete t.coverageOffset,delete t.getCoverageTable}var xr=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.coverageOffset=t.Offset16}getCoverageTable(){let t=this.parser;return t.currentPosition=this.start+this.coverageOffset,new ho(t)}},wn=class{constructor(t){this.glyphSequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},Am=class extends xr{constructor(t){super(t),this.deltaGlyphID=t.int16}},Rm=class extends xr{constructor(t){super(t),this.sequenceCount=t.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map(e=>t.Offset16)}getSequence(t){let e=this.parser;return e.currentPosition=this.start+this.sequenceOffsets[t],new Em(e)}},Em=class{constructor(t){this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Im=class extends xr{constructor(t){super(t),this.alternateSetCount=t.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map(e=>t.Offset16)}getAlternateSet(t){let e=this.parser;return e.currentPosition=this.start+this.alternateSetOffsets[t],new Lm(e)}},Lm=class{constructor(t){this.glyphCount=t.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Bm=class extends xr{constructor(t){super(t),this.ligatureSetCount=t.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map(e=>t.Offset16)}getLigatureSet(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureSetOffsets[t],new Dm(e)}},Dm=class extends Bt{constructor(t){super(t),this.ligatureCount=t.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map(e=>t.Offset16)}getLigature(t){let e=this.parser;return e.currentPosition=this.start+this.ligatureOffsets[t],new Vm(e)}},Vm=class{constructor(t){this.ligatureGlyph=t.uint16,this.componentCount=t.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map(e=>t.uint16)}},Nm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.subRuleSetCount=t.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.classDefOffset=t.Offset16,this.subClassSetCount=t.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map(e=>t.Offset16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t)))}getSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.subRuleSetOffsets[t],new zm(e)}getSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.subClassSetOffsets[t],new Mm(e)}getCoverageTable(t){if(this.substFormat!==3&&!t)return super.getCoverageTable();if(!t)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let e=this.parser;return e.currentPosition=this.start+this.coverageOffsets[t],new ho(e)}},zm=class extends Bt{constructor(t){super(t),this.subRuleCount=t.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.subRuleOffsets[t],new Yl(e)}},Yl=class{constructor(t){this.glyphCount=t.uint16,this.substitutionCount=t.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map(e=>t.uint16),this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new wn(t))}},Mm=class extends Bt{constructor(t){super(t),this.subClassRuleCount=t.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.subClassRuleOffsets[t],new Gm(e)}},Gm=class extends Yl{constructor(t){super(t)}},jm=class extends xr{constructor(t){super(t),this.substFormat===1&&(this.chainSubRuleSetCount=t.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map(e=>t.Offset16)),this.substFormat===2&&(this.backtrackClassDefOffset=t.Offset16,this.inputClassDefOffset=t.Offset16,this.lookaheadClassDefOffset=t.Offset16,this.chainSubClassSetCount=t.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map(e=>t.Offset16)),this.substFormat===3&&(Wl(this),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.inputGlyphCount=t.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.seqLookupCount=t.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t)))}getChainSubRuleSet(t){if(this.substFormat!==1)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleSetOffsets[t],new Um(e)}getChainSubClassSet(t){if(this.substFormat!==2)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let e=this.parser;return e.currentPosition=this.start+this.chainSubClassSetOffsets[t],new Wm(e)}getCoverageFromOffset(t){if(this.substFormat!==3)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let e=this.parser;return e.currentPosition=this.start+t,new ho(e)}},Um=class extends Bt{constructor(t){super(t),this.chainSubRuleCount=t.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map(e=>t.Offset16)}getSubRule(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Hm(e)}},Hm=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map(e=>new wn(t))}},Wm=class extends Bt{constructor(t){super(t),this.chainSubClassRuleCount=t.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map(e=>t.Offset16)}getSubClass(t){let e=this.parser;return e.currentPosition=this.start+this.chainSubRuleOffsets[t],new Ym(e)}},Ym=class{constructor(t){this.backtrackGlyphCount=t.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map(e=>t.uint16),this.inputGlyphCount=t.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map(e=>t.uint16),this.lookaheadGlyphCount=t.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map(e=>t.uint16),this.substitutionCount=t.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map(e=>new ql(t))}},ql=class extends Bt{constructor(t){super(t),this.sequenceIndex=t.uint16,this.lookupListIndex=t.uint16}},qm=class extends Bt{constructor(t){super(t),this.substFormat=t.uint16,this.extensionLookupType=t.uint16,this.extensionOffset=t.Offset32}},Zm=class extends xr{constructor(t){super(t),this.backtrackGlyphCount=t.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map(e=>t.Offset16),this.lookaheadGlyphCount=t.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map(e=>t.Offset16),this.glyphCount=t.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map(e=>t.uint16)}},Xm={buildSubtable:function(t,e){let r=new[void 0,Am,Rm,Im,Bm,Nm,jm,qm,Zm][t](e);return r.type=t,r}},Ye=class extends Bt{constructor(t){super(t)}},Km=class extends Ye{constructor(t){super(t),console.log("lookup type 1")}},Jm=class extends Ye{constructor(t){super(t),console.log("lookup type 2")}},Qm=class extends Ye{constructor(t){super(t),console.log("lookup type 3")}},$m=class extends Ye{constructor(t){super(t),console.log("lookup type 4")}},tp=class extends Ye{constructor(t){super(t),console.log("lookup type 5")}},ep=class extends Ye{constructor(t){super(t),console.log("lookup type 6")}},rp=class extends Ye{constructor(t){super(t),console.log("lookup type 7")}},op=class extends Ye{constructor(t){super(t),console.log("lookup type 8")}},sp=class extends Ye{constructor(t){super(t),console.log("lookup type 9")}},np={buildSubtable:function(t,e){let r=new[void 0,Km,Jm,Qm,$m,tp,ep,rp,op,sp][t](e);return r.type=t,r}},Gl=class extends Bt{static EMPTY={lookupCount:0,lookups:[]};constructor(t){super(t),this.lookupCount=t.uint16,this.lookups=[...new Array(this.lookupCount)].map(e=>t.Offset16)}},ap=class extends Bt{constructor(t,e){super(t),this.ctType=e,this.lookupType=t.uint16,this.lookupFlag=t.uint16,this.subTableCount=t.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map(r=>t.Offset16),this.markFilteringSet=t.uint16}get rightToLeft(){return this.lookupFlag&!0}get ignoreBaseGlyphs(){return this.lookupFlag&!0}get ignoreLigatures(){return this.lookupFlag&!0}get ignoreMarks(){return this.lookupFlag&!0}get useMarkFilteringSet(){return this.lookupFlag&!0}get markAttachmentType(){return this.lookupFlag&!0}getSubTable(t){let e=this.ctType==="GSUB"?Xm:np;return this.parser.currentPosition=this.start+this.subtableOffsets[t],e.buildSubtable(this.lookupType,this.parser)}},Zl=class extends mt{constructor(t,e,r){let{p:o,tableStart:s}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.scriptListOffset=o.Offset16,this.featureListOffset=o.Offset16,this.lookupListOffset=o.Offset16,this.majorVersion===1&&this.minorVersion===1&&(this.featureVariationsOffset=o.Offset32);let a=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);Z(this,"scriptList",()=>a?Nl.EMPTY:(o.currentPosition=s+this.scriptListOffset,new Nl(o))),Z(this,"featureList",()=>a?Ml.EMPTY:(o.currentPosition=s+this.featureListOffset,new Ml(o))),Z(this,"lookupList",()=>a?Gl.EMPTY:(o.currentPosition=s+this.lookupListOffset,new Gl(o))),this.featureVariationsOffset&&Z(this,"featureVariations",()=>a?FeatureVariations.EMPTY:(o.currentPosition=s+this.featureVariationsOffset,new FeatureVariations(o)))}getSupportedScripts(){return this.scriptList.scriptRecords.map(t=>t.scriptTag)}getScriptTable(t){let e=this.scriptList.scriptRecords.find(o=>o.scriptTag===t);this.parser.currentPosition=this.scriptList.start+e.scriptOffset;let r=new Cm(this.parser);return r.scriptTag=t,r}ensureScriptTable(t){return typeof t=="string"?this.getScriptTable(t):t}getSupportedLangSys(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys!==0,r=t.langSysRecords.map(o=>o.langSysTag);return e&&r.unshift("dflt"),r}getDefaultLangSysTable(t){t=this.ensureScriptTable(t);let e=t.defaultLangSys;if(e!==0){this.parser.currentPosition=t.start+e;let r=new zl(this.parser);return r.langSysTag="",r.defaultForScript=t.scriptTag,r}}getLangSysTable(t,e="dflt"){if(e==="dflt")return this.getDefaultLangSysTable(t);t=this.ensureScriptTable(t);let r=t.langSysRecords.find(s=>s.langSysTag===e);this.parser.currentPosition=t.start+r.langSysOffset;let o=new zl(this.parser);return o.langSysTag=e,o}getFeatures(t){return t.featureIndices.map(e=>this.getFeature(e))}getFeature(t){let e;if(parseInt(t)==t?e=this.featureList.featureRecords[t]:e=this.featureList.featureRecords.find(o=>o.featureTag===t),!e)return;this.parser.currentPosition=this.featureList.start+e.featureOffset;let r=new Om(this.parser);return r.featureTag=e.featureTag,r}getLookups(t){return t.lookupListIndices.map(e=>this.getLookup(e))}getLookup(t,e){let r=this.lookupList.lookups[t];return this.parser.currentPosition=this.lookupList.start+r,new ap(this.parser,e)}},ip=class extends Zl{constructor(t,e){super(t,e,"GSUB")}getLookup(t){return super.getLookup(t,"GSUB")}},lp=Object.freeze({__proto__:null,GSUB:ip}),up=class extends Zl{constructor(t,e){super(t,e,"GPOS")}getLookup(t){return super.getLookup(t,"GPOS")}},fp=Object.freeze({__proto__:null,GPOS:up}),cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.offsetToSVGDocumentList=r.Offset32,r.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new dp(r)}},dp=class extends Bt{constructor(t){super(t),this.numEntries=t.uint16,this.documentRecords=[...new Array(this.numEntries)].map(e=>new mp(t))}getDocument(t){let e=this.documentRecords[t];if(!e)return"";let r=this.start+e.svgDocOffset;return this.parser.currentPosition=r,this.parser.readBytes(e.svgDocLength)}getDocumentForGlyph(t){let e=this.documentRecords.findIndex(r=>r.startGlyphID<=t&&t<=r.endGlyphID);return e===-1?"":this.getDocument(e)}},mp=class{constructor(t){this.startGlyphID=t.uint16,this.endGlyphID=t.uint16,this.svgDocOffset=t.Offset32,this.svgDocLength=t.uint32}},pp=Object.freeze({__proto__:null,SVG:cp}),hp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.axesArrayOffset=r.Offset16,r.uint16,this.axisCount=r.uint16,this.axisSize=r.uint16,this.instanceCount=r.uint16,this.instanceSize=r.uint16;let o=this.tableStart+this.axesArrayOffset;Z(this,"axes",()=>(r.currentPosition=o,[...new Array(this.axisCount)].map(a=>new gp(r))));let s=o+this.axisCount*this.axisSize;Z(this,"instances",()=>{let a=[];for(let n=0;nt.tag)}getAxis(t){return this.axes.find(e=>e.tag===t)}},gp=class{constructor(t){this.tag=t.tag,this.minValue=t.fixed,this.defaultValue=t.fixed,this.maxValue=t.fixed,this.flags=t.flags(16),this.axisNameID=t.uint16}},yp=class{constructor(t,e,r){let o=t.currentPosition;this.subfamilyNameID=t.uint16,t.uint16,this.coordinates=[...new Array(e)].map(s=>t.fixed),t.currentPosition-o[...new Array(o)].map(s=>r.fword))}},wp=Object.freeze({__proto__:null,cvt:bp}),Sp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},xp=Object.freeze({__proto__:null,fpgm:Sp}),Cp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRanges=r.uint16,Z(this,"gaspRanges",()=>[...new Array(this.numRanges)].map(s=>new Fp(r)))}},Fp=class{constructor(t){this.rangeMaxPPEM=t.uint16,this.rangeGaspBehavior=t.uint16}},kp=Object.freeze({__proto__:null,gasp:Cp}),Op=class extends mt{constructor(t,e){super(t,e)}getGlyphData(t,e){return this.parser.currentPosition=this.tableStart+t,this.parser.readBytes(e)}},Tp=Object.freeze({__proto__:null,glyf:Op}),_p=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.maxp.numGlyphs+1;r.head.indexToLocFormat===0?(this.x2=!0,Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset16))):Z(this,"offsets",()=>[...new Array(s)].map(a=>o.Offset32))}getGlyphDataOffsetAndLength(t){let e=this.offsets[t]*this.x2?2:1,r=this.offsets[t+1]*this.x2?2:1;return{offset:e,length:r-e}}},Pp=Object.freeze({__proto__:null,loca:_p}),Ap=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"instructions",()=>[...new Array(t.length)].map(o=>r.uint8))}},Rp=Object.freeze({__proto__:null,prep:Ap}),Ep=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Ip=Object.freeze({__proto__:null,CFF:Ep}),Lp=class extends mt{constructor(t,e){let{p:r}=super(t,e);Z(this,"data",()=>r.readBytes())}},Bp=Object.freeze({__proto__:null,CFF2:Lp}),Dp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.defaultVertOriginY=r.int16,this.numVertOriginYMetrics=r.uint16,Z(this,"vertORiginYMetrics",()=>[...new Array(this.numVertOriginYMetrics)].map(o=>new Vp(r)))}},Vp=class{constructor(t){this.glyphIndex=t.uint16,this.vertOriginY=t.int16}},Np=Object.freeze({__proto__:null,VORG:Dp}),zp=class{constructor(t){this.indexSubTableArrayOffset=t.Offset32,this.indexTablesSize=t.uint32,this.numberofIndexSubTables=t.uint32,this.colorRef=t.uint32,this.hori=new as(t),this.vert=new as(t),this.startGlyphIndex=t.uint16,this.endGlyphIndex=t.uint16,this.ppemX=t.uint8,this.ppemY=t.uint8,this.bitDepth=t.uint8,this.flags=t.int8}},Mp=class{constructor(t){this.hori=new as(t),this.vert=new as(t),this.ppemX=t.uint8,this.ppemY=t.uint8,this.substitutePpemX=t.uint8,this.substitutePpemY=t.uint8}},as=class{constructor(t){this.ascender=t.int8,this.descender=t.int8,this.widthMax=t.uint8,this.caretSlopeNumerator=t.int8,this.caretSlopeDenominator=t.int8,this.caretOffset=t.int8,this.minOriginSB=t.int8,this.minAdvanceSB=t.int8,this.maxBeforeBL=t.int8,this.minAfterBL=t.int8,this.pad1=t.int8,this.pad2=t.int8}},Xl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16,this.numSizes=o.uint32,Z(this,"bitMapSizes",()=>[...new Array(this.numSizes)].map(s=>new zp(o)))}},Gp=Object.freeze({__proto__:null,EBLC:Xl}),Kl=class extends mt{constructor(t,e,r){let{p:o}=super(t,e,r);this.majorVersion=o.uint16,this.minorVersion=o.uint16}},jp=Object.freeze({__proto__:null,EBDT:Kl}),Up=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.majorVersion=r.uint16,this.minorVersion=r.uint16,this.numSizes=r.uint32,Z(this,"bitmapScales",()=>[...new Array(this.numSizes)].map(o=>new Mp(r)))}},Hp=Object.freeze({__proto__:null,EBSC:Up}),Wp=class extends Xl{constructor(t,e){super(t,e,"CBLC")}},Yp=Object.freeze({__proto__:null,CBLC:Wp}),qp=class extends Kl{constructor(t,e){super(t,e,"CBDT")}},Zp=Object.freeze({__proto__:null,CBDT:qp}),Xp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.flags=r.flags(16),this.numStrikes=r.uint32,Z(this,"strikeOffsets",()=>[...new Array(this.numStrikes)].map(o=>r.Offset32))}},Kp=Object.freeze({__proto__:null,sbix:Xp}),Jp=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numBaseGlyphRecords=r.uint16,this.baseGlyphRecordsOffset=r.Offset32,this.layerRecordsOffset=r.Offset32,this.numLayerRecords=r.uint16}getBaseGlyphRecord(t){let e=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=e;let r=new bn(this.parser),o=r.gID,s=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=s;let a=new bn(this.parser),n=a.gID;if(o===t)return r;if(n===t)return a;for(;e!==s;){let l=e+(s-e)/12;this.parser.currentPosition=l;let m=new bn(this.parser),f=m.gID;if(f===t)return m;f>t?s=l:fnew Qp(p))}},bn=class{constructor(t){this.gID=t.uint16,this.firstLayerIndex=t.uint16,this.numLayers=t.uint16}},Qp=class{constructor(t){this.gID=t.uint16,this.paletteIndex=t.uint16}},$p=Object.freeze({__proto__:null,COLR:Jp}),th=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numPaletteEntries=r.uint16;let o=this.numPalettes=r.uint16;this.numColorRecords=r.uint16,this.offsetFirstColorRecord=r.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map(s=>r.uint16),Z(this,"colorRecords",()=>(r.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map(s=>new eh(r)))),this.version===1&&(this.offsetPaletteTypeArray=r.Offset32,this.offsetPaletteLabelArray=r.Offset32,this.offsetPaletteEntryLabelArray=r.Offset32,Z(this,"paletteTypeArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new rh(r,o))),Z(this,"paletteLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new oh(r,o))),Z(this,"paletteEntryLabelArray",()=>(r.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new sh(r,o))))}},eh=class{constructor(t){this.blue=t.uint8,this.green=t.uint8,this.red=t.uint8,this.alpha=t.uint8}},rh=class{constructor(t,e){this.paletteTypes=[...new Array(e)].map(r=>t.uint32)}},oh=class{constructor(t,e){this.paletteLabels=[...new Array(e)].map(r=>t.uint16)}},sh=class{constructor(t,e){this.paletteEntryLabels=[...new Array(e)].map(r=>t.uint16)}},nh=Object.freeze({__proto__:null,CPAL:th}),ah=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.numSignatures=r.uint16,this.flags=r.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map(o=>new ih(r))}getData(t){let e=this.signatureRecords[t];return this.parser.currentPosition=this.tableStart+e.offset,new lh(this.parser)}},ih=class{constructor(t){this.format=t.uint32,this.length=t.uint32,this.offset=t.Offset32}},lh=class{constructor(t){t.uint16,t.uint16,this.signatureLength=t.uint32,this.signature=t.readBytes(this.signatureLength)}},uh=Object.freeze({__proto__:null,DSIG:ah}),fh=class extends mt{constructor(t,e,r){let{p:o}=super(t,e),s=r.hmtx.numGlyphs;this.version=o.uint16,this.numRecords=o.int16,this.sizeDeviceRecord=o.int32,this.records=[...new Array(numRecords)].map(a=>new ch(o,s))}},ch=class{constructor(t,e){this.pixelSize=t.uint8,this.maxWidth=t.uint8,this.widths=t.readBytes(e)}},dh=Object.freeze({__proto__:null,hdmx:fh}),mh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.nTables=r.uint16,Z(this,"tables",()=>{let o=this.tableStart+4,s=[];for(let a=0;a[...new Array(this.nPairs)].map(e=>new hh(t)))),this.format===2&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}},hh=class{constructor(t){this.left=t.uint16,this.right=t.uint16,this.value=t.fword}},gh=Object.freeze({__proto__:null,kern:mh}),yh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numGlyphs=r.uint16,this.yPels=r.readBytes(this.numGlyphs)}},vh=Object.freeze({__proto__:null,LTSH:yh}),bh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.mergeClassCount=r.uint16,this.mergeDataOffset=r.Offset16,this.classDefCount=r.uint16,this.offsetToClassDefOffsets=r.Offset16,Z(this,"mergeEntryMatrix",()=>[...new Array(this.mergeClassCount)].map(o=>r.readBytes(this.mergeClassCount))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},wh=Object.freeze({__proto__:null,MERG:bh}),Sh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint32,this.flags=r.uint32,r.uint32,this.dataMapsCount=r.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map(o=>new xh(this.tableStart,r))}},xh=class{constructor(t,e){this.tableStart=t,this.parser=e,this.tag=e.tag,this.dataOffset=e.Offset32,this.dataLength=e.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}},Ch=Object.freeze({__proto__:null,meta:Sh}),Fh=class extends mt{constructor(t,e){super(t,e),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}},kh=Object.freeze({__proto__:null,PCLT:Fh}),Oh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.uint16,this.numRecs=r.uint16,this.numRatios=r.uint16,this.ratRanges=[...new Array(this.numRatios)].map(o=>new Th(r)),this.offsets=[...new Array(this.numRatios)].map(o=>r.Offset16),this.VDMXGroups=[...new Array(this.numRecs)].map(o=>new _h(r))}},Th=class{constructor(t){this.bCharSet=t.uint8,this.xRatio=t.uint8,this.yStartRatio=t.uint8,this.yEndRatio=t.uint8}},_h=class{constructor(t){this.recs=t.uint16,this.startsz=t.uint8,this.endsz=t.uint8,this.records=[...new Array(this.recs)].map(e=>new Ph(t))}},Ph=class{constructor(t){this.yPelHeight=t.uint16,this.yMax=t.int16,this.yMin=t.int16}},Ah=Object.freeze({__proto__:null,VDMX:Oh}),Rh=class extends mt{constructor(t,e){let{p:r}=super(t,e);this.version=r.fixed,this.ascent=this.vertTypoAscender=r.int16,this.descent=this.vertTypoDescender=r.int16,this.lineGap=this.vertTypoLineGap=r.int16,this.advanceHeightMax=r.int16,this.minTopSideBearing=r.int16,this.minBottomSideBearing=r.int16,this.yMaxExtent=r.int16,this.caretSlopeRise=r.int16,this.caretSlopeRun=r.int16,this.caretOffset=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.reserved=r.int16,this.metricDataFormat=r.int16,this.numOfLongVerMetrics=r.uint16,r.verifyLength()}},Eh=Object.freeze({__proto__:null,vhea:Rh}),Ih=class extends mt{constructor(t,e,r){super(t,e);let o=r.vhea.numOfLongVerMetrics,s=r.maxp.numGlyphs,a=p.currentPosition;if(lazy(this,"vMetrics",()=>(p.currentPosition=a,[...new Array(o)].map(n=>new Lh(p.uint16,p.int16)))),o(p.currentPosition=n,[...new Array(s-o)].map(l=>p.int16)))}}},Lh=class{constructor(t,e){this.advanceHeight=t,this.topSideBearing=e}},Bh=Object.freeze({__proto__:null,vmtx:Ih});var Jl=u(X(),1);var{kebabCase:Dh}=vt(Jl.privateApis);function Ql(t){let e=t.reduce((r,o)=>(r[o.fontFamily]||(r[o.fontFamily]={name:o.fontFamily,fontFamily:o.fontFamily,slug:Dh(o.fontFamily.toLowerCase()),fontFace:[]}),r[o.fontFamily].fontFace.push(o),r),{});return Object.values(e)}var pe=u(z(),1);function Vh(){let{installFonts:t}=(0,go.useContext)(ne),[e,r]=(0,go.useState)(!1),[o,s]=(0,go.useState)(null),a=h=>{l(h)},n=h=>{l(h.target.files)},l=async h=>{if(!h)return;s(null),r(!0);let v=new Set,_=[...h],A=!1,k=_.map(async b=>{if(!await f(b))return A=!0,null;if(v.has(b.name))return null;let Y=(((b.name??"").split(".")??[]).pop()??"").toLowerCase();return pn.includes(Y)?(v.add(b.name),b):null}),x=(await Promise.all(k)).filter(b=>b!==null);if(x.length>0)m(x);else{let b=A?(0,Ur.__)("Sorry, you are not allowed to upload this file type."):(0,Ur.__)("No fonts found to install.");s({type:"error",message:b}),r(!1)}},m=async h=>{let v=await Promise.all(h.map(async _=>{let A=await d(_);return await er(A,A.file,"all"),A}));g(v)};async function f(h){let v=new is("Uploaded Font");try{let _=await c(h);return await v.fromDataBuffer(_,"font"),!0}catch{return!1}}async function c(h){return new Promise((v,_)=>{let A=new window.FileReader;A.readAsArrayBuffer(h),A.onload=()=>v(A.result),A.onerror=_})}let d=async h=>{let v=await c(h),_=new is("Uploaded Font");_.fromDataBuffer(v,h.name);let k=(await new Promise($=>_.onload=$)).detail.font,{name:x}=k.opentype.tables,b=x.get(16)||x.get(1),T=x.get(2).toLowerCase().includes("italic"),Y=k.opentype.tables["OS/2"].usWeightClass||"normal",V=!!k.opentype.tables.fvar&&k.opentype.tables.fvar.axes.find(({tag:$})=>$==="wght"),H=V?`${V.minValue} ${V.maxValue}`:null;return{file:h,fontFamily:b,fontStyle:T?"italic":"normal",fontWeight:H||Y}},g=async h=>{let v=Ql(h);try{await t(v),s({type:"success",message:(0,Ur.__)("Fonts were installed successfully.")})}catch(_){let A=_;s({type:"error",message:A.message,errors:A?.installationErrors})}r(!1)};return(0,pe.jsxs)("div",{className:"font-library__tabpanel-layout",children:[(0,pe.jsx)($t.DropZone,{onFilesDrop:a}),(0,pe.jsxs)($t.__experimentalVStack,{className:"font-library__local-fonts",justify:"start",children:[o&&(0,pe.jsxs)($t.Notice,{status:o.type,__unstableHTML:!0,onRemove:()=>s(null),children:[o.message,o.errors&&(0,pe.jsx)("ul",{children:o.errors.map((h,v)=>(0,pe.jsx)("li",{children:h},v))})]}),e&&(0,pe.jsx)($t.FlexItem,{children:(0,pe.jsx)("div",{className:"font-library__upload-area",children:(0,pe.jsx)($t.ProgressBar,{})})}),!e&&(0,pe.jsx)($t.FormFileUpload,{accept:pn.map(h=>`.${h}`).join(","),multiple:!0,onChange:n,render:({openFileDialog:h})=>(0,pe.jsx)($t.Button,{__next40pxDefaultSize:!0,className:"font-library__upload-area",onClick:h,children:(0,Ur.__)("Upload font")})}),(0,pe.jsx)($t.__experimentalText,{className:"font-library__upload-area__text",children:(0,Ur.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})}var ls=Vh;var tu=u(z(),1),{Tabs:x2}=vt(Sn.privateApis),C2={id:"installed-fonts",title:(0,us._x)("Library","Font library")},F2={id:"upload-fonts",title:(0,us._x)("Upload","noun")};var eu=u(ut(),1),xn=u(X(),1),zh=u(yt(),1);var ru=u(z(),1);var Cn=u(z(),1);var ou=u(ut(),1),fs=u(X(),1);var su=u(z(),1);var kn=u(z(),1);var _e=u(ut(),1),On=u(X(),1),qh=u(yt(),1);var nu=u(ce(),1);var Wh=u(z(),1),{useSettingsForBlockElement:t6,TypographyPanel:e6}=vt(nu.privateApis);var Yh=u(z(),1);var Tn=u(z(),1),f6={text:{description:(0,_e.__)("Manage the fonts used on the site."),title:(0,_e.__)("Text")},link:{description:(0,_e.__)("Manage the fonts and typography used on the links."),title:(0,_e.__)("Links")},heading:{description:(0,_e.__)("Manage the fonts and typography used on headings."),title:(0,_e.__)("Headings")},caption:{description:(0,_e.__)("Manage the fonts and typography used on captions."),title:(0,_e.__)("Captions")},button:{description:(0,_e.__)("Manage the fonts and typography used on buttons."),title:(0,_e.__)("Buttons")}};var Jh=u(ut(),1),Qh=u(X(),1),iu=u(ce(),1);var Hr=u(X(),1),au=u(ut(),1);var Kh=u(yt(),1);var Zh=u(X(),1),Xh=u(z(),1);var _n=u(z(),1);var Pn=u(z(),1),{useSettingsForBlockElement:O6,ColorPanel:T6}=vt(iu.privateApis);var ng=u(ut(),1),pu=u(X(),1);var eg=u(cr(),1),An=u(X(),1),rg=u(ut(),1);var ds=u(X(),1);var cs=u(X(),1);var lu=u(z(),1);function uu(){let{paletteColors:t}=Lr();return t.slice(0,4).map(({slug:e,color:r},o)=>(0,lu.jsx)("div",{style:{flexGrow:1,height:"100%",background:r}},`${e}-${o}`))}var vo=u(z(),1),$h={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},tg=({label:t,isFocused:e,withHoverView:r})=>(0,vo.jsx)(Vr,{label:t,isFocused:e,withHoverView:r,children:({key:o})=>(0,vo.jsx)(cs.__unstableMotion.div,{variants:$h,style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(cs.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,vo.jsx)(uu,{})})},o)}),fu=tg;var Cr=u(z(),1),cu=["color"];function ms({title:t,gap:e=2}){let r=No(cu);return r?.length<=1?null:(0,Cr.jsxs)(ds.__experimentalVStack,{spacing:3,children:[t&&(0,Cr.jsx)(Se,{level:3,children:t}),(0,Cr.jsx)(ds.__experimentalGrid,{gap:e,children:r.map((o,s)=>(0,Cr.jsx)(zr,{variation:o,isPill:!0,properties:cu,showTooltip:!0,children:()=>(0,Cr.jsx)(fu,{})},s))})]})}var du=u(z(),1);var og=u(cr(),1),ps=u(X(),1),sg=u(ut(),1);var mu=u(z(),1);var Rn=u(z(),1),{Tabs:Q6}=vt(pu.privateApis);var ig=u(ut(),1),gu=u(ce(),1),lg=u(X(),1);var hu=u(ce(),1);var ag=u(z(),1);var{BackgroundPanel:rC}=vt(hu.privateApis);var En=u(z(),1),{useHasBackgroundPanel:uC}=vt(gu.privateApis);var Fr=u(X(),1),In=u(ut(),1);var mg=u(yt(),1);var ug=u(X(),1),fg=u(ut(),1),cg=u(z(),1);var Ln=u(z(),1),{Menu:SC}=vt(Fr.privateApis);var Ut=u(X(),1),bo=u(ut(),1);var hs=u(yt(),1);var Bn=u(z(),1),{Menu:DC}=vt(Ut.privateApis),VC=[{label:(0,bo.__)("Rename"),action:"rename"},{label:(0,bo.__)("Delete"),action:"delete"}],NC=[{label:(0,bo.__)("Reset"),action:"reset"}];var pg=u(z(),1);var yg=u(ut(),1),vu=u(ce(),1);var yu=u(ce(),1),hg=u(yt(),1);var gg=u(z(),1),{useSettingsForBlockElement:qC,DimensionsPanel:ZC}=vt(yu.privateApis);var Dn=u(z(),1),{useHasDimensionsPanel:eF,useSettingsForBlockElement:rF}=vt(vu.privateApis);var Fu=u(X(),1),Sg=u(ut(),1);var bg=u(ut(),1),wg=u(X(),1);var bu=u(be(),1),wu=u(fe(),1),ys=u(yt(),1),Su=u(X(),1),xu=u(ut(),1);var gs=u(z(),1);function vg({gap:t=2}){let{user:e}=(0,ys.useContext)(Xt),r=e?.styles,s=(0,wu.useSelect)(n=>{let l=n(bu.store).__experimentalGetCurrentThemeGlobalStylesVariations();return Array.isArray(l)?l:void 0},[])?.filter(n=>!io(n,["color"])&&!io(n,["typography","spacing"])),a=(0,ys.useMemo)(()=>[...[{title:(0,xu.__)("Default"),settings:{},styles:{}},...s??[]].map(l=>{let m=l?.styles?.blocks?{...l.styles.blocks}:{};r?.blocks&&Object.keys(r.blocks).forEach(g=>{if(r.blocks?.[g]?.css){let h=m[g]||{},v={css:`${m[g]?.css||""} ${r.blocks?.[g]?.css?.trim()||""}`};m[g]={...h,...v}}});let f=r?.css||l.styles?.css?{css:`${l.styles?.css||""} ${r?.css||""}`}:{},c=Object.keys(m).length>0?{blocks:m}:{},d={...l.styles,...f,...c};return{...l,settings:l.settings??{},styles:d}})],[s,r?.blocks,r?.css]);return!s||s.length<1?null:(0,gs.jsx)(Su.__experimentalGrid,{columns:2,className:"global-styles-ui-style-variations-container",gap:t,children:a.map((n,l)=>(0,gs.jsx)(zr,{variation:n,children:m=>(0,gs.jsx)(nn,{label:n?.title,withHoverView:!0,isFocused:m,variation:n})},l))})}var Vn=vg;var Cu=u(z(),1);var Nn=u(z(),1);var xg=u(ut(),1),Cg=u(X(),1),ku=u(ce(),1);var zn=u(z(),1),{AdvancedPanel:wF}=vt(ku.privateApis);var Lu=u(ut(),1),Gn=u(X(),1),jn=u(yt(),1);var Fg=u(fe(),1),kg=u(be(),1),Ou=u(yt(),1);var Pu=u(ut(),1),Au=u(X(),1),vs=u(_u(),1),Og=u(be(),1),Tg=u(fe(),1);var Ru=u(dn(),1),Eu=u(z(),1),kF=3600*1e3*24;var Mn=u(X(),1),wo=u(ut(),1);var Iu=u(z(),1);var Un=u(z(),1);var Hn=u(ut(),1),qe=u(X(),1);var Eg=u(yt(),1);var Pg=u(X(),1),Ag=u(ut(),1),Rg=u(z(),1);var Wn=u(z(),1),{Menu:YF}=vt(qe.privateApis);var Nu=u(ut(),1),Ne=u(X(),1);var zu=u(yt(),1);var Ig=u(ce(),1),Lg=u(ut(),1);var Bg=u(z(),1);var Dg=u(X(),1),Bu=u(ut(),1),Vg=u(z(),1);var So=u(X(),1),Ng=u(ut(),1),zg=u(yt(),1),Du=u(z(),1);var Ze=u(X(),1),Vu=u(z(),1);var Yn=u(z(),1),{Menu:f3}=vt(Ne.privateApis);var Zn=u(z(),1);var Xn=u(z(),1);function Wr(t){return function({value:r,baseValue:o,onChange:s,...a}){return(0,Xn.jsx)(ao,{value:r,baseValue:o,onChange:s,children:(0,Xn.jsx)(t,{...a})})}}var Ug=Wr(Vn);var Hg=Wr(ms);var Wg=Wr(Wo);var Yr=u(z(),1);function Kn({value:t,baseValue:e,onChange:r,activeTab:o="installed-fonts"}){let s;switch(o){case"upload-fonts":s=(0,Yr.jsx)(ls,{});break;case"installed-fonts":s=(0,Yr.jsx)($o,{});break;default:s=(0,Yr.jsx)(es,{slug:o})}return(0,Yr.jsx)(ao,{value:t,baseValue:e,onChange:r,children:(0,Yr.jsx)(Zo,{children:s})})}var ju=u(Vs()),{unlock:Jn}=(0,ju.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/font-list-route");if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='4bbd4c3e39']")){let t=document.createElement("style");t.setAttribute("data-wp-hash","4bbd4c3e39"),t.appendChild(document.createTextNode('@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:499;text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:499;text-transform:uppercase}@media (min-width:600px){.font-library__page-selection .font-library__page-selection-trigger{font-size:11px!important;font-weight:499}}.font-library__fonts-title{font-size:11px;font-weight:600;margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-card{border:1px solid #ddd;box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:#757575}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:#757575}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-pagination .components-button.is-tertiary{height:32px;justify-content:center;width:32px}.global-styles-ui-screen-revisions__revisions-list{flex-grow:1;list-style:none;margin:0 16px 16px}.global-styles-ui-screen-revisions__revisions-list li{margin-bottom:0}.global-styles-ui-screen-revisions__revision-item{cursor:pointer;display:flex;flex-direction:column;position:relative}.global-styles-ui-screen-revisions__revision-item[role=option]:active,.global-styles-ui-screen-revisions__revision-item[role=option]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.global-styles-ui-screen-revisions__revision-item:hover{background:rgba(var(--wp-admin-theme-color--rgb),.04)}.global-styles-ui-screen-revisions__revision-item:hover .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item:after,.global-styles-ui-screen-revisions__revision-item:before{content:"\\a";display:block;position:absolute}.global-styles-ui-screen-revisions__revision-item:before{background:#ddd;border:4px solid #0000;border-radius:50%;height:8px;left:17px;top:18px;transform:translate(-50%,-50%);width:8px;z-index:1}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]{background:rgba(var(--wp-admin-theme-color--rgb),.04);border-radius:2px;color:var(--wp-admin-theme-color);outline:3px solid #0000;outline-offset:-2px}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__date{color:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true]:before{background:var(--wp-admin-theme-color)}.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__changes>li,.global-styles-ui-screen-revisions__revision-item[aria-selected=true] .global-styles-ui-screen-revisions__meta{color:#1e1e1e}.global-styles-ui-screen-revisions__revision-item:after{border:.5px solid #ddd;height:100%;left:16px;top:0;width:0}.global-styles-ui-screen-revisions__revision-item:first-child:after{top:18px}.global-styles-ui-screen-revisions__revision-item:last-child:after{height:18px}.global-styles-ui-screen-revisions__revision-item-wrapper{display:block;padding:12px 12px 4px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__apply-button.is-primary{align-self:flex-start;margin:4px 12px 12px 40px}.global-styles-ui-screen-revisions__applied-text,.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#757575;font-size:12px}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__description .global-styles-ui-screen-revisions__date{font-size:12px;font-weight:600;text-transform:uppercase}.global-styles-ui-screen-revisions__meta{align-items:flex-start;display:flex;justify-content:start;margin-bottom:4px;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__loading{margin:24px auto!important}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin-left:12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination{gap:2px;justify-content:space-between}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .edit-site-pagination__total{height:1px;left:-1000px;margin:-1px;overflow:hidden;position:absolute}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-text{font-size:12px;will-change:opacity}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary{color:#1e1e1e}.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary:disabled,.global-styles-ui-screen-revisions__pagination.global-styles-ui-screen-revisions__pagination .components-button.is-tertiary[aria-disabled=true]{color:#949494}.global-styles-ui-screen-revisions__footer{background:#fff;border-top:1px solid #ddd;bottom:0;box-sizing:border-box;height:56px;min-width:100%;padding:12px;position:sticky;z-index:1}.global-styles-ui-variations_item{box-sizing:border-box;cursor:pointer}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid #0000001a;outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:#0000004d}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview{align-items:center;cursor:pointer;display:flex;justify-content:center;line-height:1}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-search{margin-bottom:10px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:499!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:600;line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{flex-shrink:0;height:24px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,#0000 0,#0000 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-panel .global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__remove-button.global-styles-ui__shadow-editor__remove-button{border:none}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .components-v-stack{flex:1 1 auto}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .components-v-stack .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field .components-textarea-control__input{direction:ltr;flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;max-height:calc(100% - 110px);overflow:auto}.admin-ui-page:has(.font-library__footer) .font-library-page__tab-panel{max-height:calc(100% - 198px)}')),document.head.appendChild(t)}var{Tabs:bs}=Jn(Uu.privateApis),{useGlobalStyles:Yg}=Jn(Hu.privateApis);function qg(){let{records:t=[]}=(0,ws.useEntityRecords)("root","fontCollection",{_fields:"slug,name,description"}),[e,r]=(0,Yu.useState)("installed-fonts"),{base:o,user:s,setUser:a,isReady:n}=Yg(),l=(0,Wu.useSelect)(f=>f(ws.store).canUser("create",{kind:"postType",name:"wp_font_family"}),[]);if(!n)return null;let m=[{id:"installed-fonts",title:(0,xo.__)("Library")}];return l&&(m.push({id:"upload-fonts",title:(0,xo.__)("Upload")}),m.push(...(t||[]).map(({slug:f,name:c})=>({id:f,title:t&&t.length===1&&f==="google-fonts"?(0,xo.__)("Install Fonts"):c})))),React.createElement(Ns,{title:(0,xo.__)("Fonts")},React.createElement(bs,{selectedTabId:e,onSelect:f=>r(f)},React.createElement("div",{className:"font-library-page__tablist"},React.createElement(bs.TabList,null,m.map(({id:f,title:c})=>React.createElement(bs.Tab,{key:f,tabId:f},c)))),m.map(({id:f})=>React.createElement(bs.TabPanel,{key:f,tabId:f,focusable:!1,className:"font-library-page__tab-panel"},React.createElement(Kn,{value:s,baseValue:o,onChange:a,activeTab:f})))))}function Zg(){return React.createElement(qg,null)}var Xg=Zg;export{Xg as stage}; /*! Bundled license information: is-plain-object/dist/is-plain-object.mjs: diff --git a/src/wp-includes/certificates/ca-bundle.crt b/src/wp-includes/certificates/ca-bundle.crt index 65be891eea878..a78e1dd471fa9 100644 --- a/src/wp-includes/certificates/ca-bundle.crt +++ b/src/wp-includes/certificates/ca-bundle.crt @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Tue Dec 2 04:12:02 2025 GMT +## Certificate data from Mozilla last updated on: Wed Feb 11 18:26:30 2026 GMT ## ## Find updated versions here: https://curl.se/docs/caextract.html ## @@ -15,8 +15,8 @@ ## an Apache+mod_ssl webserver for SSL client authentication. ## Just configure this file as the SSLCACertificateFile. ## -## Conversion done with mk-ca-bundle.pl version 1.30. -## SHA256: a903b3cd05231e39332515ef7ebe37e697262f39515a52015c23c62805b73cd0 +## Conversion done with mk-ca-bundle.pl version 1.32. +## SHA256: 3b98d4e3ff57a326d9587c33633039c8c3a9cf0b55f7ca581d7598ff329eb1f3 ## @@ -3480,8 +3480,8 @@ SM49BAMDA2kAMGYCMQCpKjAd0MKfkFFRQD6VVCHNFmb3U2wIFjnQEnx/Yxvf4zgAOdktUyBFCxxg ZzFDJe0CMQCSia7pXGKDYmH5LVerVrkR3SW+ak5KGoJr3M/TvEqzPNcum9v4KGm8ay3sMaE641c= -----END CERTIFICATE----- - OISTE Server Root RSA G1 -========================= +OISTE Server Root RSA G1 +======================== -----BEGIN CERTIFICATE----- MIIFgzCCA2ugAwIBAgIQVaXZZ5Qoxu0M+ifdWwFNGDANBgkqhkiG9w0BAQwFADBLMQswCQYDVQQG EwJDSDEZMBcGA1UECgwQT0lTVEUgRm91bmRhdGlvbjEhMB8GA1UEAwwYT0lTVEUgU2VydmVyIFJv @@ -3509,3 +3509,21 @@ msuY33OhkKCgxeDoAaijFJzIwZqsFVAzje18KotzlUBDJvyBpCpfOZC3J8tRd/iWkx7P8nd9H0aT olkelUTFLXVksNb54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vTXK9Z3hBC9xdIoaDQCQTV2WnXzkoYI9bIeCvZlC9p2x1L/Cx6AcCIw +wzPbGO2E14vs7dOoY4G1VnxHx1YwlGhza9IuqbnZLBwpvQy6uWWL +-----END CERTIFICATE----- diff --git a/src/wp-includes/class-wp-connector-registry.php b/src/wp-includes/class-wp-connector-registry.php index 9fe51be96aa8e..77e9a0df87d13 100644 --- a/src/wp-includes/class-wp-connector-registry.php +++ b/src/wp-includes/class-wp-connector-registry.php @@ -29,7 +29,7 @@ * * @phpstan-type Connector array{ * name: non-empty-string, - * description: non-empty-string, + * description: string, * logo_url?: non-empty-string, * type: non-empty-string, * authentication: array{ @@ -39,8 +39,9 @@ * constant_name?: non-empty-string, * env_var_name?: non-empty-string * }, - * plugin?: array{ - * file: non-empty-string + * plugin: array{ + * file?: non-empty-string, + * is_active: callable(): bool * } * } */ @@ -109,13 +110,33 @@ final class WP_Connector_Registry { * @type array $plugin { * Optional. Plugin data for install/activate UI. * - * @type string $file The plugin's main file path relative to the plugins - * directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php'). + * @type string $file Optional. The plugin's main file path relative to the + * plugins directory (e.g. 'my-plugin/my-plugin.php' or + * 'hello.php'). + * @type callable $is_active Optional callback to determine whether the plugin + * is active. Receives no arguments and must return bool. + * Defaults to `__return_true`. * } * } * @return array|null The registered connector data on success, null on failure. * - * @phpstan-param Connector $args + * @phpstan-param array{ + * name: non-empty-string, + * description?: string, + * logo_url?: non-empty-string, + * type: non-empty-string, + * authentication: array{ + * method: 'api_key'|'none', + * credentials_url?: non-empty-string, + * setting_name?: non-empty-string, + * constant_name?: non-empty-string, + * env_var_name?: non-empty-string + * }, + * plugin?: array{ + * file?: non-empty-string, + * is_active?: callable(): bool + * } + * } $args * @phpstan-return Connector|null */ public function register( string $id, array $args ): ?array { @@ -243,8 +264,30 @@ public function register( string $id, array $args ): ?array { } } - if ( ! empty( $args['plugin'] ) && is_array( $args['plugin'] ) && ! empty( $args['plugin']['file'] ) ) { - $connector['plugin'] = array( 'file' => $args['plugin']['file'] ); + $connector['plugin'] = array(); + + if ( ! empty( $args['plugin'] ) && is_array( $args['plugin'] ) ) { + if ( ! empty( $args['plugin']['file'] ) ) { + $connector['plugin']['file'] = $args['plugin']['file']; + } + + if ( isset( $args['plugin']['is_active'] ) ) { + if ( ! is_callable( $args['plugin']['is_active'] ) ) { + _doing_it_wrong( + __METHOD__, + /* translators: %s: Connector ID. */ + sprintf( __( 'Connector "%s" plugin is_active must be callable.' ), esc_html( $id ) ), + '7.0.0' + ); + return null; + } + + $connector['plugin']['is_active'] = $args['plugin']['is_active']; + } + } + + if ( ! isset( $connector['plugin']['is_active'] ) ) { + $connector['plugin']['is_active'] = '__return_true'; } $this->registered_connectors[ $id ] = $connector; diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 961910e011d12..381d1db600c0e 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -4333,7 +4333,7 @@ public function render_control_templates() { <# if ( data.returnUrl !== data.previewUrl ) { #> <# } #> - + <# if ( data.allowOverride ) { #> <# } #> diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 7ddd60fe871b4..16884bdd4b02a 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -1252,7 +1252,7 @@ private static function get_translation() { 'Nonbreaking space' => __( 'Nonbreaking space' ), 'Page break' => __( 'Page break' ), 'Paste as text' => __( 'Paste as text' ), - 'Preview' => __( 'Preview' ), + 'Preview' => _x( 'Preview', 'verb' ), 'Print' => __( 'Print' ), 'Save' => __( 'Save' ), 'Fullscreen' => __( 'Fullscreen' ), diff --git a/src/wp-includes/class-wp-script-modules.php b/src/wp-includes/class-wp-script-modules.php index 058e5f0eef0e6..154c951513047 100644 --- a/src/wp-includes/class-wp-script-modules.php +++ b/src/wp-includes/class-wp-script-modules.php @@ -12,6 +12,16 @@ * Core class used to register script modules. * * @since 6.5.0 + * + * @phpstan-type ScriptModule array{ + * src: string, + * version: string|false|null, + * dependencies: array, + * in_footer: bool, + * fetchpriority: 'auto'|'low'|'high', + * textdomain?: string, + * translations_path?: string, + * } */ class WP_Script_Modules { /** @@ -19,6 +29,7 @@ class WP_Script_Modules { * * @since 6.5.0 * @var array> + * @phpstan-var array */ private $registered = array(); @@ -328,6 +339,87 @@ public function deregister( string $id ) { unset( $this->registered[ $id ] ); } + /** + * Overrides the text domain and path used to load translations for a script module. + * + * This is only needed for modules whose text domain differs from 'default' + * or whose translation files live outside the standard locations, for + * example plugin modules that register their own text domain. Translations + * for modules that use the default domain are loaded automatically by + * {@see WP_Script_Modules::print_script_module_translations()}. + * + * @since 7.0.0 + * + * @param string $id The identifier of the script module. + * @param string $domain Optional. Text domain. Default 'default'. + * @param string $path Optional. The full file path to the directory containing translation files. + * @return bool True if the text domain was registered, false if the module is not registered. + */ + public function set_translations( string $id, string $domain = 'default', string $path = '' ): bool { + if ( ! isset( $this->registered[ $id ] ) ) { + return false; + } + + $this->registered[ $id ]['textdomain'] = $domain; + $this->registered[ $id ]['translations_path'] = $path; + + return true; + } + + /** + * Prints translations for all enqueued script modules. + * + * Outputs inline `', + 'expected' => '' ) . '">', + ), + ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpCheckPhpVersion_Test.php b/tests/phpunit/tests/admin/includes/misc/WpCheckPhpVersion_Test.php new file mode 100644 index 0000000000000..8089b6abaf64e --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpCheckPhpVersion_Test.php @@ -0,0 +1,158 @@ +assertFalse( $result, 'wp_check_php_version() should return false on API failure.' ); + } + + /** + * @ticket 65203 + */ + public function test_wp_check_php_version_successful_response() { + add_filter( 'pre_http_request', array( $this, 'mock_api_success' ), 10, 3 ); + + $result = wp_check_php_version(); + + remove_filter( 'pre_http_request', array( $this, 'mock_api_success' ) ); + + $this->assertIsArray( $result, 'wp_check_php_version() should return an array on successful API response.' ); + $this->assertSame( '8.2', $result['recommended_version'] ); + $this->assertSame( '7.4', $result['minimum_version'] ); + $this->assertTrue( $result['is_supported'] ); + $this->assertTrue( $result['is_secure'] ); + } + + /** + * @ticket 65203 + */ + public function test_wp_check_php_version_caches_result_in_transient() { + add_filter( 'pre_http_request', array( $this, 'mock_api_success' ), 10, 3 ); + + wp_check_php_version(); + + remove_filter( 'pre_http_request', array( $this, 'mock_api_success' ) ); + + $key = md5( PHP_VERSION ); + $cached = get_site_transient( 'php_check_' . $key ); + + $this->assertIsArray( $cached, 'Result should be cached in a site transient.' ); + $this->assertSame( '8.2', $cached['recommended_version'] ); + } + + /** + * @ticket 65203 + */ + public function test_wp_check_php_version_uses_cached_result() { + $key = md5( PHP_VERSION ); + $cached = array( + 'recommended_version' => '8.3', + 'minimum_version' => '7.4', + 'is_supported' => true, + 'is_secure' => true, + 'is_acceptable' => true, + ); + set_site_transient( 'php_check_' . $key, $cached ); + + // If it hits the API, it will return the mocked success version (8.2) instead of 8.3. + add_filter( 'pre_http_request', array( $this, 'mock_api_success' ), 10, 3 ); + + $result = wp_check_php_version(); + + remove_filter( 'pre_http_request', array( $this, 'mock_api_success' ) ); + + $this->assertSame( '8.3', $result['recommended_version'], 'wp_check_php_version() should use the cached result if available.' ); + } + + /** + * @ticket 65203 + * + * @requires PHP >= 8.0 + */ + public function test_wp_is_php_version_acceptable_filter() { + add_filter( 'pre_http_request', array( $this, 'mock_api_success' ), 10, 3 ); + add_filter( 'wp_is_php_version_acceptable', '__return_false' ); + + $result = wp_check_php_version(); + + remove_filter( 'pre_http_request', array( $this, 'mock_api_success' ) ); + remove_filter( 'wp_is_php_version_acceptable', '__return_false' ); + + $this->assertFalse( $result['is_acceptable'], 'The wp_is_php_version_acceptable filter should be respected.' ); + } + + /** + * @ticket 65203 + * + * @requires PHP < 8.0 + */ + public function test_wp_check_php_version_future_minimum_logic() { + add_filter( 'pre_http_request', array( $this, 'mock_api_success' ), 10, 3 ); + + $result = wp_check_php_version(); + + remove_filter( 'pre_http_request', array( $this, 'mock_api_success' ) ); + + $this->assertTrue( $result['is_lower_than_future_minimum'], 'is_lower_than_future_minimum should be true for PHP < 8.0.' ); + $this->assertFalse( $result['is_acceptable'], 'is_acceptable should be false for PHP < 8.0 regardless of API response.' ); + } + + /** + * Mock HTTP request for API success. + * + * @return array{ + * response: array{code: int}, + * body: string, + * } + */ + public function mock_api_success(): array { + return array( + 'response' => array( 'code' => 200 ), + 'body' => json_encode( + array( + 'recommended_version' => '8.2', + 'minimum_version' => '7.4', + 'is_supported' => true, + 'is_secure' => true, + 'is_acceptable' => true, + ) + ), + ); + } + + /** + * Mock HTTP request for API failure. + * + * @return array{ + * response: array{code: int}, + * } + */ + public function mock_api_failure(): array { + return array( + 'response' => array( 'code' => 500 ), + ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpDocLinkParse_Test.php b/tests/phpunit/tests/admin/includes/misc/WpDocLinkParse_Test.php new file mode 100644 index 0000000000000..298cd3d77cbac --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpDocLinkParse_Test.php @@ -0,0 +1,103 @@ +assertSame( $expected, wp_doc_link_parse( $content ) ); + } + + /** + * Data provider for test_wp_doc_link_parse(). + * + * @return array + */ + public function data_wp_doc_link_parse(): array { + return array( + 'empty string' => array( + 'content' => '', + 'expected' => array(), + ), + 'null (invalid type)' => array( + 'content' => null, + 'expected' => array(), + ), + 'simple function call' => array( + 'content' => '', + 'expected' => array( 'get_header' ), + ), + 'multiple unique functions' => array( + 'content' => '', + 'expected' => array( 'get_header', 'wp_footer' ), + ), + 'duplicate functions' => array( + 'content' => '', + 'expected' => array( '_e' ), + ), + 'function call with space' => array( + 'content' => '', + 'expected' => array( 'is_array' ), + ), + 'sorted output' => array( + 'content' => '', + 'expected' => array( 'alpha', 'zeta' ), + ), + 'local function definition' => array( + 'content' => '', + 'expected' => array(), + ), + 'class method call' => array( + 'content' => 'my_method(); ?>', + 'expected' => array(), + ), + 'static class method call' => array( + 'content' => '', + 'expected' => array( 'my_static_method' ), // token_get_all() handles :: differently. + ), + 'mixed content' => array( + 'content' => 'method(); + esc_html( "test" ); + ?>', + 'expected' => array( 'esc_html', 'wp_remote_get' ), + ), + ); + } + + /** + * Tests the `documentation_ignore_functions` filter. + * + * @ticket 65182 + */ + public function test_wp_doc_link_parse_filter() { + $filter = function ( $ignore ) { + $ignore[] = 'wp_remote_get'; + return $ignore; + }; + + add_filter( 'documentation_ignore_functions', $filter ); + $result = wp_doc_link_parse( '' ); + remove_filter( 'documentation_ignore_functions', $filter ); + + $this->assertSame( array( 'esc_html' ), $result ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpHeartbeatSetSuspension_Test.php b/tests/phpunit/tests/admin/includes/misc/WpHeartbeatSetSuspension_Test.php new file mode 100644 index 0000000000000..e799efda53353 --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpHeartbeatSetSuspension_Test.php @@ -0,0 +1,82 @@ +orig_pagenow = $pagenow; + } + + public function tear_down() { + global $pagenow; + + $pagenow = $this->orig_pagenow; + + parent::tear_down(); + } + + /** + * Tests that wp_heartbeat_set_suspension() disables suspension on post screens. + * + * @dataProvider data_wp_heartbeat_set_suspension + * + * @ticket 65200 + * + * @param string $pagenow_value The value for the $pagenow global. + * @param string $expected The expected value of 'suspension' in settings. + */ + public function test_wp_heartbeat_set_suspension( $pagenow_value, $expected ) { + global $pagenow; + + $pagenow = $pagenow_value; + + $settings = array( 'suspension' => 'initial' ); + $result = wp_heartbeat_set_suspension( $settings ); + + $this->assertSame( $expected, $result['suspension'], "Suspension should be '{$expected}' when \$pagenow is {$pagenow_value}." ); + } + + /** + * Data provider for test_wp_heartbeat_set_suspension(). + * + * @return array + */ + public function data_wp_heartbeat_set_suspension(): array { + return array( + 'post.php' => array( + 'pagenow_value' => 'post.php', + 'expected' => 'disable', + ), + 'post-new.php' => array( + 'pagenow_value' => 'post-new.php', + 'expected' => 'disable', + ), + 'index.php' => array( + 'pagenow_value' => 'index.php', + 'expected' => 'initial', + ), + 'edit.php' => array( + 'pagenow_value' => 'edit.php', + 'expected' => 'initial', + ), + ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpMakeThemeFileTree_Test.php b/tests/phpunit/tests/admin/includes/misc/WpMakeThemeFileTree_Test.php new file mode 100644 index 0000000000000..151cb9e8bdc85 --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpMakeThemeFileTree_Test.php @@ -0,0 +1,97 @@ +assertSame( $expected, wp_make_theme_file_tree( $allowed_files ) ); + } + + /** + * Data provider for test_wp_make_theme_file_tree(). + * + * @return array, + * expected: array, + * }> + */ + public function data_wp_make_theme_file_tree(): array { + return array( + 'empty list' => array( + 'allowed_files' => array(), + 'expected' => array(), + ), + 'flat list' => array( + 'allowed_files' => array( + 'style.css' => '/path/to/theme/style.css', + 'index.php' => '/path/to/theme/index.php', + ), + 'expected' => array( + 'style.css' => 'style.css', + 'index.php' => 'index.php', + ), + ), + 'nested list' => array( + 'allowed_files' => array( + 'style.css' => '/path/to/theme/style.css', + 'inc/header.php' => '/path/to/theme/inc/header.php', + 'inc/footer.php' => '/path/to/theme/inc/footer.php', + 'templates/a.php' => '/path/to/theme/templates/a.php', + ), + 'expected' => array( + 'style.css' => 'style.css', + 'inc' => array( + 'header.php' => 'inc/header.php', + 'footer.php' => 'inc/footer.php', + ), + 'templates' => array( + 'a.php' => 'templates/a.php', + ), + ), + ), + 'deeply nested list' => array( + 'allowed_files' => array( + 'a/b/c/d.php' => '/path/to/theme/a/b/c/d.php', + ), + 'expected' => array( + 'a' => array( + 'b' => array( + 'c' => array( + 'd.php' => 'a/b/c/d.php', + ), + ), + ), + ), + ), + 'mixed nesting' => array( + 'allowed_files' => array( + 'index.php' => '/path/to/theme/index.php', + 'inc/header.php' => '/path/to/theme/inc/header.php', + 'inc/utils/a.php' => '/path/to/theme/inc/utils/a.php', + ), + 'expected' => array( + 'index.php' => 'index.php', + 'inc' => array( + 'header.php' => 'inc/header.php', + 'utils' => array( + 'a.php' => 'inc/utils/a.php', + ), + ), + ), + ), + ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpPageReloadOnBackButtonJs_Test.php b/tests/phpunit/tests/admin/includes/misc/WpPageReloadOnBackButtonJs_Test.php new file mode 100644 index 0000000000000..2f66a52d09361 --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpPageReloadOnBackButtonJs_Test.php @@ -0,0 +1,25 @@ +assertStringContainsString( '', $output ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpPrivacySettingsFilterDraftPageTitles_Test.php b/tests/phpunit/tests/admin/includes/misc/WpPrivacySettingsFilterDraftPageTitles_Test.php new file mode 100644 index 0000000000000..9726833d667f5 --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpPrivacySettingsFilterDraftPageTitles_Test.php @@ -0,0 +1,71 @@ +post->create_and_get( array( 'post_status' => $post_status ) ); + + $actual = _wp_privacy_settings_filter_draft_page_titles( $title, $page ); + + $this->assertSame( $expected, $actual ); + } + + /** + * Data provider for test_wp_privacy_settings_filter_draft_page_titles(). + * + * @return array + */ + public function data_wp_privacy_settings_filter_draft_page_titles(): array { + return array( + 'draft page on privacy screen' => array( + 'expected' => 'Privacy Policy (Draft)', + 'title' => 'Privacy Policy', + 'post_status' => 'draft', + 'screen_id' => 'privacy', + ), + 'published page on privacy screen' => array( + 'expected' => 'Privacy Policy', + 'title' => 'Privacy Policy', + 'post_status' => 'publish', + 'screen_id' => 'privacy', + ), + 'draft page on other screen' => array( + 'expected' => 'About Us', + 'title' => 'About Us', + 'post_status' => 'draft', + 'screen_id' => 'edit-page', + ), + 'pending page on privacy screen' => array( + 'expected' => 'Privacy Policy', + 'title' => 'Privacy Policy', + 'post_status' => 'pending', + 'screen_id' => 'privacy', + ), + ); + } +} diff --git a/tests/phpunit/tests/admin/includes/misc/WpRefreshHeartbeatNonces_Test.php b/tests/phpunit/tests/admin/includes/misc/WpRefreshHeartbeatNonces_Test.php new file mode 100644 index 0000000000000..785c14a16d4be --- /dev/null +++ b/tests/phpunit/tests/admin/includes/misc/WpRefreshHeartbeatNonces_Test.php @@ -0,0 +1,47 @@ + 'value' ); + + $result = wp_refresh_heartbeat_nonces( $response ); + + $this->assertArrayHasKey( 'rest_nonce', $result, 'The response should contain the rest_nonce.' ); + $this->assertArrayHasKey( 'heartbeat_nonce', $result, 'The response should contain the heartbeat_nonce.' ); + $this->assertSame( 'value', $result['some_data'], 'Existing data in the response should be preserved.' ); + + $this->assertNotFalse( wp_verify_nonce( $result['rest_nonce'], 'wp_rest' ), 'The rest_nonce should be valid for "wp_rest".' ); + $this->assertNotFalse( wp_verify_nonce( $result['heartbeat_nonce'], 'heartbeat-nonce' ), 'The heartbeat_nonce should be valid for "heartbeat-nonce".' ); + } + + /** + * Tests that wp_refresh_heartbeat_nonces() overwrites existing nonces if they are already present. + * + * @ticket 65199 + */ + public function test_wp_refresh_heartbeat_nonces_overwrites_existing() { + $response = array( + 'rest_nonce' => 'old_rest_nonce', + 'heartbeat_nonce' => 'old_heartbeat_nonce', + ); + + $result = wp_refresh_heartbeat_nonces( $response ); + + $this->assertNotEquals( 'old_rest_nonce', $result['rest_nonce'], 'The rest_nonce should be updated.' ); + $this->assertNotEquals( 'old_heartbeat_nonce', $result['heartbeat_nonce'], 'The heartbeat_nonce should be updated.' ); + + $this->assertNotFalse( wp_verify_nonce( $result['rest_nonce'], 'wp_rest' ), 'The rest_nonce should be valid for "wp_rest".' ); + $this->assertNotFalse( wp_verify_nonce( $result['heartbeat_nonce'], 'heartbeat-nonce' ), 'The heartbeat_nonce should be valid for "heartbeat-nonce".' ); + } +} diff --git a/tests/phpunit/tests/admin/includes/wpGetPluginActionButton.php b/tests/phpunit/tests/admin/includes/plugin-install/WpGetPluginActionButton_Test.php similarity index 97% rename from tests/phpunit/tests/admin/includes/wpGetPluginActionButton.php rename to tests/phpunit/tests/admin/includes/plugin-install/WpGetPluginActionButton_Test.php index 7ad69ae87ab3b..ce358850dd2d0 100644 --- a/tests/phpunit/tests/admin/includes/wpGetPluginActionButton.php +++ b/tests/phpunit/tests/admin/includes/plugin-install/WpGetPluginActionButton_Test.php @@ -8,7 +8,7 @@ * * @covers ::wp_get_plugin_action_button */ -class Tests_Admin_Includes_WpGetPluginActionButton extends WP_UnitTestCase { +class Admin_Includes_Plugin_Install_WpGetPluginActionButton_Test extends WP_UnitTestCase { /** * User role. diff --git a/tests/phpunit/tests/admin/Admin_Includes_User_WpIsAuthorizeApplicationPasswordRequestValid_Test.php b/tests/phpunit/tests/admin/includes/user/WpIsAuthorizeApplicationPasswordRequestValid_Test.php similarity index 100% rename from tests/phpunit/tests/admin/Admin_Includes_User_WpIsAuthorizeApplicationPasswordRequestValid_Test.php rename to tests/phpunit/tests/admin/includes/user/WpIsAuthorizeApplicationPasswordRequestValid_Test.php diff --git a/tests/phpunit/tests/admin/Admin_Includes_User_WpIsAuthorizeApplicationRedirectUrlValid_Test.php b/tests/phpunit/tests/admin/includes/user/WpIsAuthorizeApplicationRedirectUrlValid_Test.php similarity index 100% rename from tests/phpunit/tests/admin/Admin_Includes_User_WpIsAuthorizeApplicationRedirectUrlValid_Test.php rename to tests/phpunit/tests/admin/includes/user/WpIsAuthorizeApplicationRedirectUrlValid_Test.php diff --git a/tests/phpunit/tests/admin/includesTheme.php b/tests/phpunit/tests/admin/includesTheme.php index ed90cf9514ae5..446c048bcf18e 100644 --- a/tests/phpunit/tests/admin/includesTheme.php +++ b/tests/phpunit/tests/admin/includesTheme.php @@ -241,7 +241,6 @@ public function test_get_theme_featured_list_api() { * * Differences in the structure can also trigger failure by causing PHP notices/warnings. * - * @group external-http * @ticket 28121 */ public function test_get_theme_featured_list_hardcoded() { diff --git a/tests/phpunit/tests/ai-client/wpAiClientPromptBuilder.php b/tests/phpunit/tests/ai-client/wpAiClientPromptBuilder.php index 3630b0bab403a..e758a6868aa42 100644 --- a/tests/phpunit/tests/ai-client/wpAiClientPromptBuilder.php +++ b/tests/phpunit/tests/ai-client/wpAiClientPromptBuilder.php @@ -188,19 +188,25 @@ public function test_constructor_sets_default_request_timeout() { $request_options = $this->get_wrapped_prompt_builder_property_value( $builder, 'requestOptions' ); $this->assertInstanceOf( RequestOptions::class, $request_options ); - $this->assertEquals( 30, $request_options->getTimeout() ); + $this->assertSame( 30.0, $request_options->getTimeout() ); } /** - * Test that the constructor allows overriding the default request timeout. + * Test that the constructor allows overriding the default request timeout with a valid value. * * @ticket 64591 + * @ticket 65094 + * + * @dataProvider data_valid_request_timeout_overrides + * + * @param mixed $input The timeout value returned by the filter. + * @param float $expected The expected timeout stored on the request options. */ - public function test_constructor_allows_overriding_request_timeout() { + public function test_constructor_allows_overriding_request_timeout_with_valid_timeout( $input, float $expected ) { add_filter( 'wp_ai_client_default_request_timeout', - static function () { - return 45; + static function () use ( $input ) { + return $input; } ); @@ -210,7 +216,63 @@ static function () { $request_options = $this->get_wrapped_prompt_builder_property_value( $builder, 'requestOptions' ); $this->assertInstanceOf( RequestOptions::class, $request_options ); - $this->assertEquals( 45, $request_options->getTimeout() ); + $this->assertSame( $expected, $request_options->getTimeout() ); + } + + /** + * Data provider for {@see self::test_constructor_allows_overriding_request_timeout_with_valid_timeout()}. + * + * @return array + */ + public function data_valid_request_timeout_overrides(): array { + return array( + 'float' => array( 45.5, 45.5 ), + 'integer' => array( 67, 67.0 ), + 'string' => array( '20', 20.0 ), + 'infinity' => array( INF, INF ), + 'zero' => array( 0.0, 0.0 ), + ); + } + + /** + * Test that the constructor disallows overriding the default request timeout with an invalid value. + * + * @ticket 65094 + * + * @dataProvider data_invalid_request_timeouts + * + * @expectedIncorrectUsage WP_AI_Client_Prompt_Builder::__construct + * + * @param mixed $timeout The invalid timeout value returned by the filter. + */ + public function test_constructor_disallows_overriding_with_invalid_request_timeout( $timeout ) { + add_filter( + 'wp_ai_client_default_request_timeout', + static function () use ( $timeout ) { + return $timeout; + } + ); + + $builder = new WP_AI_Client_Prompt_Builder( AiClient::defaultRegistry() ); + + /** @var RequestOptions $request_options */ + $request_options = $this->get_wrapped_prompt_builder_property_value( $builder, 'requestOptions' ); + + $this->assertInstanceOf( RequestOptions::class, $request_options ); + $this->assertSame( 30.0, $request_options->getTimeout() ); + } + + /** + * Data provider for {@see self::test_constructor_disallows_overriding_with_invalid_request_timeout()}. + * + * @return array + */ + public function data_invalid_request_timeouts(): array { + return array( + 'negative number' => array( -1 ), + 'array' => array( array() ), + 'null' => array( null ), + ); } /** @@ -401,7 +463,7 @@ public function test_constructor_with_string_prompt() { $this->assertCount( 1, $messages ); $this->assertInstanceOf( Message::class, $messages[0] ); - $this->assertEquals( 'Hello, world!', $messages[0]->getParts()[0]->getText() ); + $this->assertSame( 'Hello, world!', $messages[0]->getParts()[0]->getText() ); } /** @@ -418,7 +480,7 @@ public function test_constructor_with_message_part_prompt() { $this->assertCount( 1, $messages ); $this->assertInstanceOf( Message::class, $messages[0] ); - $this->assertEquals( 'Test message', $messages[0]->getParts()[0]->getText() ); + $this->assertSame( 'Test message', $messages[0]->getParts()[0]->getText() ); } /** @@ -479,7 +541,7 @@ public function test_constructor_with_message_array_shape() { $this->assertCount( 1, $messages ); $this->assertInstanceOf( Message::class, $messages[0] ); - $this->assertEquals( 'Hello from array', $messages[0]->getParts()[0]->getText() ); + $this->assertSame( 'Hello from array', $messages[0]->getParts()[0]->getText() ); } /** @@ -497,7 +559,7 @@ public function test_with_text() { $messages = $this->get_wrapped_prompt_builder_property_value( $builder, 'messages' ); $this->assertCount( 1, $messages ); - $this->assertEquals( 'Some text', $messages[0]->getParts()[0]->getText() ); + $this->assertSame( 'Some text', $messages[0]->getParts()[0]->getText() ); } /** @@ -515,8 +577,8 @@ public function test_with_text_appends_to_existing_user_message() { $this->assertCount( 1, $messages ); $parts = $messages[0]->getParts(); $this->assertCount( 2, $parts ); - $this->assertEquals( 'Initial text', $parts[0]->getText() ); - $this->assertEquals( ' Additional text', $parts[1]->getText() ); + $this->assertSame( 'Initial text', $parts[0]->getText() ); + $this->assertSame( ' Additional text', $parts[1]->getText() ); } /** @@ -537,8 +599,8 @@ public function test_with_inline_file() { $this->assertCount( 1, $messages ); $file = $messages[0]->getParts()[0]->getFile(); $this->assertInstanceOf( File::class, $file ); - $this->assertEquals( 'data:image/png;base64,' . $base64, $file->getDataUri() ); - $this->assertEquals( 'image/png', $file->getMimeType() ); + $this->assertSame( 'data:image/png;base64,' . $base64, $file->getDataUri() ); + $this->assertSame( 'image/png', $file->getMimeType() ); } /** @@ -558,8 +620,8 @@ public function test_with_remote_file() { $this->assertCount( 1, $messages ); $file = $messages[0]->getParts()[0]->getFile(); $this->assertInstanceOf( File::class, $file ); - $this->assertEquals( 'https://example.com/image.jpg', $file->getUrl() ); - $this->assertEquals( 'image/jpeg', $file->getMimeType() ); + $this->assertSame( 'https://example.com/image.jpg', $file->getUrl() ); + $this->assertSame( 'image/jpeg', $file->getMimeType() ); } /** @@ -580,7 +642,7 @@ public function test_with_inline_file_data_uri() { $this->assertCount( 1, $messages ); $file = $messages[0]->getParts()[0]->getFile(); $this->assertInstanceOf( File::class, $file ); - $this->assertEquals( 'image/jpeg', $file->getMimeType() ); + $this->assertSame( 'image/jpeg', $file->getMimeType() ); } /** @@ -600,8 +662,8 @@ public function test_with_remote_file_without_mime_type() { $this->assertCount( 1, $messages ); $file = $messages[0]->getParts()[0]->getFile(); $this->assertInstanceOf( File::class, $file ); - $this->assertEquals( 'https://example.com/audio.mp3', $file->getUrl() ); - $this->assertEquals( 'audio/mpeg', $file->getMimeType() ); + $this->assertSame( 'https://example.com/audio.mp3', $file->getUrl() ); + $this->assertSame( 'audio/mpeg', $file->getMimeType() ); } /** @@ -644,9 +706,9 @@ public function test_with_message_parts() { $this->assertCount( 1, $messages ); $parts = $messages[0]->getParts(); $this->assertCount( 3, $parts ); - $this->assertEquals( 'Part 1', $parts[0]->getText() ); - $this->assertEquals( 'Part 2', $parts[1]->getText() ); - $this->assertEquals( 'Part 3', $parts[2]->getText() ); + $this->assertSame( 'Part 1', $parts[0]->getText() ); + $this->assertSame( 'Part 2', $parts[1]->getText() ); + $this->assertSame( 'Part 3', $parts[2]->getText() ); } /** @@ -670,9 +732,9 @@ public function test_with_history() { $messages = $this->get_wrapped_prompt_builder_property_value( $builder, 'messages' ); $this->assertCount( 3, $messages ); - $this->assertEquals( 'User 1', $messages[0]->getParts()[0]->getText() ); - $this->assertEquals( 'Model 1', $messages[1]->getParts()[0]->getText() ); - $this->assertEquals( 'User 2', $messages[2]->getParts()[0]->getText() ); + $this->assertSame( 'User 1', $messages[0]->getParts()[0]->getText() ); + $this->assertSame( 'Model 1', $messages[1]->getParts()[0]->getText() ); + $this->assertSame( 'User 2', $messages[2]->getParts()[0]->getText() ); } /** @@ -710,9 +772,9 @@ public function test_constructor_with_string_parts_list() { $this->assertInstanceOf( Message::class, $messages[0] ); $parts = $messages[0]->getParts(); $this->assertCount( 3, $parts ); - $this->assertEquals( 'Part 1', $parts[0]->getText() ); - $this->assertEquals( 'Part 2', $parts[1]->getText() ); - $this->assertEquals( 'Part 3', $parts[2]->getText() ); + $this->assertSame( 'Part 1', $parts[0]->getText() ); + $this->assertSame( 'Part 2', $parts[1]->getText() ); + $this->assertSame( 'Part 3', $parts[2]->getText() ); } /** @@ -735,9 +797,9 @@ public function test_constructor_with_mixed_parts_list() { $this->assertCount( 1, $messages ); $parts = $messages[0]->getParts(); $this->assertCount( 3, $parts ); - $this->assertEquals( 'String part', $parts[0]->getText() ); - $this->assertEquals( 'Part 1', $parts[1]->getText() ); - $this->assertEquals( 'Part 2', $parts[2]->getText() ); + $this->assertSame( 'String part', $parts[0]->getText() ); + $this->assertSame( 'Part 1', $parts[1]->getText() ); + $this->assertSame( 'Part 2', $parts[2]->getText() ); } /** @@ -775,13 +837,13 @@ public function test_method_chaining() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'Be helpful', $config->getSystemInstruction() ); - $this->assertEquals( 500, $config->getMaxTokens() ); - $this->assertEquals( 0.8, $config->getTemperature() ); - $this->assertEquals( 0.95, $config->getTopP() ); - $this->assertEquals( 50, $config->getTopK() ); - $this->assertEquals( 2, $config->getCandidateCount() ); - $this->assertEquals( 'application/json', $config->getOutputMimeType() ); + $this->assertSame( 'Be helpful', $config->getSystemInstruction() ); + $this->assertSame( 500, $config->getMaxTokens() ); + $this->assertSame( 0.8, $config->getTemperature() ); + $this->assertSame( 0.95, $config->getTopP() ); + $this->assertSame( 50, $config->getTopK() ); + $this->assertSame( 2, $config->getCandidateCount() ); + $this->assertSame( 'application/json', $config->getOutputMimeType() ); } /** @@ -1001,11 +1063,11 @@ public function test_using_model_config() { /** @var ModelConfig $merged_config */ $merged_config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'Builder instruction', $merged_config->getSystemInstruction() ); - $this->assertEquals( 500, $merged_config->getMaxTokens() ); - $this->assertEquals( 0.5, $merged_config->getTemperature() ); - $this->assertEquals( 0.9, $merged_config->getTopP() ); - $this->assertEquals( 40, $merged_config->getTopK() ); + $this->assertSame( 'Builder instruction', $merged_config->getSystemInstruction() ); + $this->assertSame( 500, $merged_config->getMaxTokens() ); + $this->assertSame( 0.5, $merged_config->getTemperature() ); + $this->assertSame( 0.9, $merged_config->getTopP() ); + $this->assertSame( 40, $merged_config->getTopK() ); } /** @@ -1028,22 +1090,22 @@ public function test_using_model_config_with_custom_options() { $this->assertArrayHasKey( 'stopSequences', $custom_options ); $this->assertIsArray( $custom_options['stopSequences'] ); - $this->assertEquals( array( 'CONFIG_STOP' ), $custom_options['stopSequences'] ); + $this->assertSame( array( 'CONFIG_STOP' ), $custom_options['stopSequences'] ); $this->assertArrayHasKey( 'otherOption', $custom_options ); - $this->assertEquals( 'value', $custom_options['otherOption'] ); + $this->assertSame( 'value', $custom_options['otherOption'] ); $builder->using_stop_sequences( 'STOP' ); /** @var ModelConfig $merged_config */ $merged_config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( array( 'STOP' ), $merged_config->getStopSequences() ); + $this->assertSame( array( 'STOP' ), $merged_config->getStopSequences() ); $custom_options = $merged_config->getCustomOptions(); $this->assertArrayHasKey( 'stopSequences', $custom_options ); - $this->assertEquals( array( 'CONFIG_STOP' ), $custom_options['stopSequences'] ); + $this->assertSame( array( 'CONFIG_STOP' ), $custom_options['stopSequences'] ); $this->assertArrayHasKey( 'otherOption', $custom_options ); - $this->assertEquals( 'value', $custom_options['otherOption'] ); + $this->assertSame( 'value', $custom_options['otherOption'] ); } /** @@ -1058,7 +1120,7 @@ public function test_using_provider() { $this->assertSame( $builder, $result ); $actual_provider = $this->get_wrapped_prompt_builder_property_value( $builder, 'providerIdOrClassName' ); - $this->assertEquals( 'test-provider', $actual_provider ); + $this->assertSame( 'test-provider', $actual_provider ); } /** @@ -1075,7 +1137,7 @@ public function test_using_system_instruction() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'You are a helpful assistant.', $config->getSystemInstruction() ); + $this->assertSame( 'You are a helpful assistant.', $config->getSystemInstruction() ); } /** @@ -1092,7 +1154,7 @@ public function test_using_max_tokens() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 1000, $config->getMaxTokens() ); + $this->assertSame( 1000, $config->getMaxTokens() ); } /** @@ -1109,7 +1171,7 @@ public function test_using_temperature() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 0.7, $config->getTemperature() ); + $this->assertSame( 0.7, $config->getTemperature() ); } /** @@ -1126,7 +1188,7 @@ public function test_using_top_p() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 0.9, $config->getTopP() ); + $this->assertSame( 0.9, $config->getTopP() ); } /** @@ -1143,7 +1205,7 @@ public function test_using_top_k() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 40, $config->getTopK() ); + $this->assertSame( 40, $config->getTopK() ); } /** @@ -1160,7 +1222,7 @@ public function test_using_stop_sequences() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( array( 'STOP', 'END', '###' ), $config->getStopSequences() ); + $this->assertSame( array( 'STOP', 'END', '###' ), $config->getStopSequences() ); } /** @@ -1177,7 +1239,7 @@ public function test_using_candidate_count() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 3, $config->getCandidateCount() ); + $this->assertSame( 3, $config->getCandidateCount() ); } /** @@ -1194,7 +1256,7 @@ public function test_using_output_mime() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'application/json', $config->getOutputMimeType() ); + $this->assertSame( 'application/json', $config->getOutputMimeType() ); } /** @@ -1218,7 +1280,7 @@ public function test_using_output_schema() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( $schema, $config->getOutputSchema() ); + $this->assertSame( $schema, $config->getOutputSchema() ); } /** @@ -1258,7 +1320,7 @@ public function test_as_json_response() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'application/json', $config->getOutputMimeType() ); + $this->assertSame( 'application/json', $config->getOutputMimeType() ); } /** @@ -1276,8 +1338,8 @@ public function test_as_json_response_with_schema() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'application/json', $config->getOutputMimeType() ); - $this->assertEquals( $schema, $config->getOutputSchema() ); + $this->assertSame( 'application/json', $config->getOutputMimeType() ); + $this->assertSame( $schema, $config->getOutputSchema() ); } /** @@ -1824,14 +1886,14 @@ public function test_generate_texts() { $texts = $builder->generate_texts( 3 ); $this->assertCount( 3, $texts ); - $this->assertEquals( 'Text 1', $texts[0] ); - $this->assertEquals( 'Text 2', $texts[1] ); - $this->assertEquals( 'Text 3', $texts[2] ); + $this->assertSame( 'Text 1', $texts[0] ); + $this->assertSame( 'Text 2', $texts[1] ); + $this->assertSame( 'Text 3', $texts[2] ); /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 3, $config->getCandidateCount() ); + $this->assertSame( 3, $config->getCandidateCount() ); } /** @@ -2255,7 +2317,7 @@ public function test_as_output_media_aspect_ratio() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( '16:9', $config->getOutputMediaAspectRatio() ); + $this->assertSame( '16:9', $config->getOutputMediaAspectRatio() ); } /** @@ -2272,7 +2334,7 @@ public function test_as_output_speech_voice() { /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'alloy', $config->getOutputSpeechVoice() ); + $this->assertSame( 'alloy', $config->getOutputSpeechVoice() ); } /** @@ -2290,8 +2352,8 @@ public function test_using_ability_with_string() { $this->assertNotNull( $declarations ); $this->assertCount( 1, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); - $this->assertEquals( 'A simple test ability with no parameters.', $declarations[0]->getDescription() ); + $this->assertSame( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); + $this->assertSame( 'A simple test ability with no parameters.', $declarations[0]->getDescription() ); } /** @@ -2311,8 +2373,8 @@ public function test_using_ability_with_wp_ability_object() { $this->assertNotNull( $declarations ); $this->assertCount( 1, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__with-params', $declarations[0]->getName() ); - $this->assertEquals( 'A test ability that accepts parameters.', $declarations[0]->getDescription() ); + $this->assertSame( 'wpab__wpaiclienttests__with-params', $declarations[0]->getName() ); + $this->assertSame( 'A test ability that accepts parameters.', $declarations[0]->getDescription() ); $params = $declarations[0]->getParameters(); $this->assertNotNull( $params ); @@ -2339,9 +2401,9 @@ public function test_using_ability_with_multiple_abilities() { $this->assertNotNull( $declarations ); $this->assertCount( 3, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); - $this->assertEquals( 'wpab__wpaiclienttests__with-params', $declarations[1]->getName() ); - $this->assertEquals( 'wpab__wpaiclienttests__returns-error', $declarations[2]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__with-params', $declarations[1]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__returns-error', $declarations[2]->getName() ); } /** @@ -2367,8 +2429,8 @@ public function test_using_ability_skips_nonexistent_abilities() { $this->assertNotNull( $declarations ); $this->assertCount( 2, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); - $this->assertEquals( 'wpab__wpaiclienttests__with-params', $declarations[1]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__with-params', $declarations[1]->getName() ); } /** @@ -2407,8 +2469,8 @@ public function test_using_ability_with_mixed_types() { $this->assertNotNull( $declarations ); $this->assertCount( 2, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); - $this->assertEquals( 'wpab__wpaiclienttests__with-params', $declarations[1]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__with-params', $declarations[1]->getName() ); } /** @@ -2426,7 +2488,7 @@ public function test_using_ability_with_hyphenated_name() { $this->assertNotNull( $declarations ); $this->assertCount( 1, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__hyphen-test', $declarations[0]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__hyphen-test', $declarations[0]->getName() ); } /** @@ -2448,13 +2510,13 @@ public function test_using_ability_method_chaining() { $this->assertNotNull( $declarations ); $this->assertCount( 1, $declarations ); - $this->assertEquals( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); + $this->assertSame( 'wpab__wpaiclienttests__simple', $declarations[0]->getName() ); /** @var ModelConfig $config */ $config = $this->get_wrapped_prompt_builder_property_value( $builder, 'modelConfig' ); - $this->assertEquals( 'You are a helpful assistant', $config->getSystemInstruction() ); - $this->assertEquals( 500, $config->getMaxTokens() ); + $this->assertSame( 'You are a helpful assistant', $config->getSystemInstruction() ); + $this->assertSame( 500, $config->getMaxTokens() ); } /** diff --git a/tests/phpunit/tests/block-supports/wpRenderCustomCssClassName.php b/tests/phpunit/tests/block-supports/wpRenderCustomCssClassName.php index 0bcbc6c708468..1247ca65a1a33 100644 --- a/tests/phpunit/tests/block-supports/wpRenderCustomCssClassName.php +++ b/tests/phpunit/tests/block-supports/wpRenderCustomCssClassName.php @@ -29,9 +29,18 @@ public function test_adds_class_to_content( $block_content, $block, $expected_cl /** * Data provider. * - * @return array + * @return array */ - public function data_adds_class_to_content() { + public function data_adds_class_to_content(): array { return array( 'class is added to block content' => array( 'block_content' => '
Test content
', @@ -53,6 +62,16 @@ public function data_adds_class_to_content() { ), 'expected_class' => 'wp-custom-css-mixed123', ), + 'class between whitespace is added' => array( + 'block_content' => '
Test content
', + 'block' => array( + 'blockName' => 'core/paragraph', + 'attrs' => array( + 'className' => "\twp-custom-css-123abc\t", + ), + ), + 'expected_class' => 'wp-custom-css-123abc', + ), ); } @@ -113,6 +132,15 @@ public function data_returns_unchanged_content() { ), ), ), + 'prefixed custom CSS class' => array( + 'block_content' => '
Test content
', + 'block' => array( + 'blockName' => 'core/paragraph', + 'attrs' => array( + 'className' => 'my-wp-custom-css-456def', + ), + ), + ), 'className is not set in attrs' => array( 'block_content' => '
Test content
', 'block' => array( diff --git a/tests/phpunit/tests/block-supports/wpStripCustomCssFromBlocks.php b/tests/phpunit/tests/block-supports/wpStripCustomCssFromBlocks.php new file mode 100644 index 0000000000000..1b6076ee185a4 --- /dev/null +++ b/tests/phpunit/tests/block-supports/wpStripCustomCssFromBlocks.php @@ -0,0 +1,238 @@ +assertArrayNotHasKey( 'css', $blocks[0]['attrs']['style'] ?? array(), $message ); + $this->assertArrayNotHasKey( 'style', $blocks[0]['attrs'] ?? array(), 'style key should be fully removed when css was the only property.' ); + } + + /** + * Data provider. + * + * @return array + */ + public function data_strips_css_from_blocks() { + return array( + 'single block' => array( + 'content' => '

Hello

', + 'message' => 'style.css should be stripped from block attributes.', + ), + ); + } + + /** + * Tests that style.css is stripped from nested inner blocks. + * + * @covers ::wp_strip_custom_css_from_blocks + * @ticket 64771 + */ + public function test_strips_css_from_inner_blocks() { + $content = '

Hello

'; + + $result = wp_unslash( wp_strip_custom_css_from_blocks( $content ) ); + $blocks = parse_blocks( $result ); + + $inner_block = $blocks[0]['innerBlocks'][0]; + $this->assertArrayNotHasKey( 'css', $inner_block['attrs']['style'] ?? array(), 'style.css should be stripped from inner block attributes.' ); + } + + /** + * Tests that content without blocks is returned unchanged. + * + * @covers ::wp_strip_custom_css_from_blocks + * @ticket 64771 + */ + public function test_returns_non_block_content_unchanged() { + $content = '

This is plain HTML content with no blocks.

'; + + $result = wp_strip_custom_css_from_blocks( $content ); + + $this->assertSame( $content, $result, 'Non-block content should be returned unchanged.' ); + } + + /** + * Tests that content without style.css attributes is returned unchanged. + * + * @covers ::wp_strip_custom_css_from_blocks + * @ticket 64771 + */ + public function test_returns_unchanged_when_no_css_attributes() { + $content = '

Hello

'; + + $result = wp_strip_custom_css_from_blocks( $content ); + + $this->assertSame( $content, $result, 'Content without style.css attributes should be returned unchanged.' ); + } + + /** + * Tests that other style properties are preserved when css is stripped. + * + * @covers ::wp_strip_custom_css_from_blocks + * @ticket 64771 + */ + public function test_preserves_other_style_properties() { + $content = '

Hello

'; + + $result = wp_unslash( wp_strip_custom_css_from_blocks( $content ) ); + $blocks = parse_blocks( $result ); + + $this->assertArrayNotHasKey( 'css', $blocks[0]['attrs']['style'], 'style.css should be stripped.' ); + $this->assertSame( '#ff0000', $blocks[0]['attrs']['style']['color']['text'], 'Other style properties should be preserved.' ); + } + + /** + * Tests that empty style object is cleaned up after stripping css. + * + * @covers ::wp_strip_custom_css_from_blocks + * @ticket 64771 + */ + public function test_cleans_up_empty_style_object() { + $content = '

Hello

'; + + $result = wp_unslash( wp_strip_custom_css_from_blocks( $content ) ); + $blocks = parse_blocks( $result ); + + $this->assertArrayNotHasKey( 'style', $blocks[0]['attrs'], 'Empty style object should be cleaned up after stripping css.' ); + } + + /** + * Tests that slashed content is handled correctly. + * + * @covers ::wp_strip_custom_css_from_blocks + * @ticket 64771 + */ + public function test_handles_slashed_content() { + $content = '

Hello

'; + $slashed = wp_slash( $content ); + + $result = wp_strip_custom_css_from_blocks( $slashed ); + $blocks = parse_blocks( wp_unslash( $result ) ); + + $this->assertArrayNotHasKey( 'css', $blocks[0]['attrs']['style'] ?? array(), 'style.css should be stripped even from slashed content.' ); + } + + /** + * Tests that the content_save_pre filter is added for a user without edit_css. + * + * @ticket 64771 + * + * @covers ::wp_custom_css_kses_init + * @covers ::wp_custom_css_kses_init_filters + */ + public function test_filter_added_for_user_without_edit_css() { + $author_id = self::factory()->user->create( array( 'role' => 'author' ) ); + wp_set_current_user( $author_id ); + wp_custom_css_kses_init(); + + $this->assertSame( 8, has_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks' ), 'content_save_pre filter should be added at priority 8 for users without edit_css.' ); + $this->assertSame( 8, has_filter( 'content_filtered_save_pre', 'wp_strip_custom_css_from_blocks' ), 'content_filtered_save_pre filter should be added at priority 8 for users without edit_css.' ); + + wp_set_current_user( 0 ); + wp_custom_css_remove_filters(); + } + + /** + * Tests that the content_save_pre filter is not added for a user with edit_css. + * + * @ticket 64771 + * + * @covers ::wp_custom_css_kses_init + * @covers ::wp_custom_css_remove_filters + */ + public function test_filter_not_added_for_user_with_edit_css() { + $admin_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); + if ( is_multisite() ) { + grant_super_admin( $admin_id ); + } + wp_set_current_user( $admin_id ); + wp_custom_css_kses_init(); + + $this->assertFalse( has_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks' ), 'content_save_pre filter should not be added for users with edit_css.' ); + $this->assertFalse( has_filter( 'content_filtered_save_pre', 'wp_strip_custom_css_from_blocks' ), 'content_filtered_save_pre filter should not be added for users with edit_css.' ); + + if ( is_multisite() ) { + revoke_super_admin( $admin_id ); + } + wp_set_current_user( 0 ); + wp_custom_css_remove_filters(); + } + + /** + * Tests that switching to a user with edit_css removes the filter via the set_current_user action. + * + * wp_custom_css_kses_init() is hooked to set_current_user, so wp_set_current_user() + * alone should update the filter state without a manual call. + * + * @ticket 64771 + * + * @covers ::wp_custom_css_kses_init + */ + public function test_set_current_user_action_triggers_reinit() { + $admin_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); + $author_id = self::factory()->user->create( array( 'role' => 'author' ) ); + if ( is_multisite() ) { + grant_super_admin( $admin_id ); + } + + // Switching to a user without edit_css should add the filter via the set_current_user action. + wp_set_current_user( $author_id ); + $this->assertNotFalse( has_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks' ), 'Filter should be active for user without edit_css.' ); + + // Switching to a user with edit_css should remove the filter via the set_current_user action. + wp_set_current_user( $admin_id ); + $this->assertFalse( has_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks' ), 'Filter should be removed after switching to a user with edit_css.' ); + + if ( is_multisite() ) { + revoke_super_admin( $admin_id ); + } + wp_set_current_user( 0 ); + wp_custom_css_remove_filters(); + } + + /** + * Tests that the filter is enabled during import regardless of user capability. + * + * @ticket 64771 + * + * @covers ::wp_custom_css_force_filtered_html_on_import_filter + */ + public function test_force_filtered_html_on_import_enables_filter_for_privileged_user() { + $admin_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); + if ( is_multisite() ) { + grant_super_admin( $admin_id ); + } + wp_set_current_user( $admin_id ); + wp_custom_css_kses_init(); + + $this->assertFalse( has_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks' ), 'Filter should not be active for admin before import.' ); + + apply_filters( 'force_filtered_html_on_import', true ); + + $this->assertNotFalse( has_filter( 'content_save_pre', 'wp_strip_custom_css_from_blocks' ), 'Filter should be enabled during import regardless of user capability.' ); + + if ( is_multisite() ) { + revoke_super_admin( $admin_id ); + } + wp_set_current_user( 0 ); + wp_custom_css_remove_filters(); + } +} diff --git a/tests/phpunit/tests/blocks/applyBlockHooksToContentFromPostObject.php b/tests/phpunit/tests/blocks/applyBlockHooksToContentFromPostObject.php index 5ff9f7323e0f3..4f95727524c8c 100644 --- a/tests/phpunit/tests/blocks/applyBlockHooksToContentFromPostObject.php +++ b/tests/phpunit/tests/blocks/applyBlockHooksToContentFromPostObject.php @@ -130,21 +130,59 @@ public function test_apply_block_hooks_to_content_from_post_object_inserts_hooke $this->assertSame( $expected, $actual ); } + /** + * @ticket 65008 + */ + public function test_apply_block_hooks_to_content_from_post_object_sets_ignored_hooked_blocks() { + $ignored_hooked_blocks_at_root = array(); + + $expected = '' . + '' . + '

Hello World!

' . + '' . + ''; + $actual = apply_block_hooks_to_content_from_post_object( + self::$post->post_content, + self::$post, + 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata', + $ignored_hooked_blocks_at_root + ); + $this->assertSame( $expected, $actual, "Markup wasn't updated correctly." ); + $this->assertSame( + array( 'tests/hooked-block-first-child' ), + $ignored_hooked_blocks_at_root, + "Hooked block added at 'first_child' position wasn't added to ignoredHookedBlocks metadata." + ); + } + /** * @ticket 62716 + * @ticket 65008 */ public function test_apply_block_hooks_to_content_from_post_object_respects_ignored_hooked_blocks_post_meta() { - $expected = self::$post_with_ignored_hooked_block->post_content . ''; + $ignored_hooked_blocks_at_root = array(); + + $expected = '' . + '

Hello World!

' . + '' . + ''; $actual = apply_block_hooks_to_content_from_post_object( self::$post_with_ignored_hooked_block->post_content, self::$post_with_ignored_hooked_block, - 'insert_hooked_blocks' + 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata', + $ignored_hooked_blocks_at_root ); $this->assertSame( $expected, $actual ); + $this->assertSame( + array( 'tests/hooked-block-first-child' ), + $ignored_hooked_blocks_at_root, + "Pre-existing ignored hooked block at root level wasn't reflected in metadata." + ); } /** * @ticket 63287 + * @ticket 65008 */ public function test_apply_block_hooks_to_content_from_post_object_does_not_insert_hooked_block_before_container_block() { $filter = function ( $hooked_block_types, $relative_position, $anchor_block_type ) { @@ -155,31 +193,50 @@ public function test_apply_block_hooks_to_content_from_post_object_does_not_inse return $hooked_block_types; }; + $ignored_hooked_blocks_at_root = array(); + $expected = '' . - self::$post->post_content . + '' . + '

Hello World!

' . + '' . ''; add_filter( 'hooked_block_types', $filter, 10, 3 ); $actual = apply_block_hooks_to_content_from_post_object( self::$post->post_content, self::$post, - 'insert_hooked_blocks' + 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata', + $ignored_hooked_blocks_at_root ); remove_filter( 'hooked_block_types', $filter, 10 ); - $this->assertSame( $expected, $actual ); + $this->assertSame( $expected, $actual, "Hooked block added before 'core/post-content' block shouldn't be inserted." ); + $this->assertSame( + array( 'tests/hooked-block-first-child' ), + $ignored_hooked_blocks_at_root, + "ignoredHookedBlocks metadata wasn't set correctly." + ); } /** * @ticket 62716 + * @ticket 65008 */ public function test_apply_block_hooks_to_content_from_post_object_inserts_hooked_block_if_content_contains_no_blocks() { + $ignored_hooked_blocks_at_root = array(); + $expected = '' . self::$post_with_non_block_content->post_content; $actual = apply_block_hooks_to_content_from_post_object( self::$post_with_non_block_content->post_content, self::$post_with_non_block_content, - 'insert_hooked_blocks' + 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata', + $ignored_hooked_blocks_at_root + ); + $this->assertSame( $expected, $actual, "Markup wasn't updated correctly." ); + $this->assertSame( + array( 'tests/hooked-block-first-child' ), + $ignored_hooked_blocks_at_root, + "Hooked block added at 'first_child' position wasn't added to ignoredHookedBlocks metadata." ); - $this->assertSame( $expected, $actual ); } } diff --git a/tests/phpunit/tests/blocks/getHookedBlocks.php b/tests/phpunit/tests/blocks/getHookedBlocks.php index 8301aed0e3a09..83a741b4d0771 100644 --- a/tests/phpunit/tests/blocks/getHookedBlocks.php +++ b/tests/phpunit/tests/blocks/getHookedBlocks.php @@ -9,6 +9,8 @@ * * @group blocks * @group block-hooks + * + * @covers ::get_hooked_blocks */ class Tests_Blocks_GetHookedBlocks extends WP_UnitTestCase { @@ -58,8 +60,6 @@ private function switch_to_block_theme_hooked_blocks() { /** * @ticket 59383 - * - * @covers ::get_hooked_blocks */ public function test_get_hooked_blocks_no_match_found() { $result = get_hooked_blocks(); @@ -69,8 +69,6 @@ public function test_get_hooked_blocks_no_match_found() { /** * @ticket 59383 - * - * @covers ::get_hooked_blocks */ public function test_get_hooked_blocks_matches_found() { register_block_type( @@ -138,7 +136,6 @@ public function test_get_hooked_blocks_matches_found() { * @ticket 60008 * @ticket 60506 * - * @covers ::get_hooked_blocks * @covers ::get_block_file_template */ public function test_loading_template_with_hooked_blocks() { @@ -170,7 +167,6 @@ public function test_loading_template_with_hooked_blocks() { * @ticket 60008 * @ticket 60506 * - * @covers ::get_hooked_blocks * @covers ::get_block_file_template */ public function test_loading_template_part_with_hooked_blocks() { @@ -202,7 +198,6 @@ public function test_loading_template_part_with_hooked_blocks() { * @ticket 60008 * @ticket 60506 * - * @covers ::get_hooked_blocks * @covers WP_Block_Patterns_Registry::get_registered */ public function test_loading_pattern_with_hooked_blocks() { diff --git a/tests/phpunit/tests/blocks/insertHookedBlocks.php b/tests/phpunit/tests/blocks/insertHookedBlocks.php index cf99b213e518c..552e04f86102d 100644 --- a/tests/phpunit/tests/blocks/insertHookedBlocks.php +++ b/tests/phpunit/tests/blocks/insertHookedBlocks.php @@ -9,6 +9,8 @@ * * @group blocks * @group block-hooks + * + * @covers ::insert_hooked_blocks */ class Tests_Blocks_InsertHookedBlocks extends WP_UnitTestCase { const ANCHOR_BLOCK_TYPE = 'tests/anchor-block'; @@ -26,8 +28,6 @@ class Tests_Blocks_InsertHookedBlocks extends WP_UnitTestCase { * @ticket 59572 * @ticket 60126 * @ticket 60506 - * - * @covers ::insert_hooked_blocks */ public function test_insert_hooked_blocks_returns_correct_markup() { $anchor_block = array( @@ -46,8 +46,6 @@ public function test_insert_hooked_blocks_returns_correct_markup() { * @ticket 59572 * @ticket 60126 * @ticket 60506 - * - * @covers ::insert_hooked_blocks */ public function test_insert_hooked_blocks_if_block_is_ignored() { $anchor_block = array( @@ -71,8 +69,6 @@ public function test_insert_hooked_blocks_if_block_is_ignored() { * @ticket 59572 * @ticket 60126 * @ticket 60506 - * - * @covers ::insert_hooked_blocks */ public function test_insert_hooked_blocks_if_other_block_is_ignored() { $anchor_block = array( @@ -96,8 +92,6 @@ public function test_insert_hooked_blocks_if_other_block_is_ignored() { * @ticket 59572 * @ticket 60126 * @ticket 60506 - * - * @covers ::insert_hooked_blocks */ public function test_insert_hooked_blocks_filter_can_set_attributes() { $anchor_block = array( @@ -139,8 +133,6 @@ public function test_insert_hooked_blocks_filter_can_set_attributes() { * @ticket 59572 * @ticket 60126 * @ticket 60506 - * - * @covers ::insert_hooked_blocks */ public function test_insert_hooked_blocks_filter_can_wrap_block() { $anchor_block = array( @@ -184,7 +176,6 @@ public function test_insert_hooked_blocks_filter_can_wrap_block() { /** * @ticket 60580 * - * @covers ::insert_hooked_blocks */ public function test_insert_hooked_blocks_filter_can_suppress_hooked_block() { $anchor_block = array( diff --git a/tests/phpunit/tests/blocks/insertHookedBlocksAndSetIgnoredHookedBlocksMetadata.php b/tests/phpunit/tests/blocks/insertHookedBlocksAndSetIgnoredHookedBlocksMetadata.php index 8e88719fee262..ee3d8eb469d2f 100644 --- a/tests/phpunit/tests/blocks/insertHookedBlocksAndSetIgnoredHookedBlocksMetadata.php +++ b/tests/phpunit/tests/blocks/insertHookedBlocksAndSetIgnoredHookedBlocksMetadata.php @@ -9,6 +9,7 @@ * * @group blocks * @group block-hooks + * * @covers ::insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata */ class Tests_Blocks_InsertHookedBlocksAndSetIgnoredHookedBlocksMetadata extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/blocks/registerBlockTypeFromMetadataWithRegistry.php b/tests/phpunit/tests/blocks/registerBlockTypeFromMetadataWithRegistry.php index 4cadfa91a33bd..b77c16660b0d9 100644 --- a/tests/phpunit/tests/blocks/registerBlockTypeFromMetadataWithRegistry.php +++ b/tests/phpunit/tests/blocks/registerBlockTypeFromMetadataWithRegistry.php @@ -3,6 +3,8 @@ * Tests for WP_Block_Metadata_Registry integration with register_block_type_from_metadata(). * * @group blocks + * + * @covers ::register_block_type_from_metadata */ class Tests_Blocks_RegisterBlockTypeFromMetadataWithRegistry extends WP_UnitTestCase { private $temp_manifest_file; diff --git a/tests/phpunit/tests/blocks/resolvePatternBlocks.php b/tests/phpunit/tests/blocks/resolvePatternBlocks.php index 4b28db4613f00..72471eaa05289 100644 --- a/tests/phpunit/tests/blocks/resolvePatternBlocks.php +++ b/tests/phpunit/tests/blocks/resolvePatternBlocks.php @@ -8,7 +8,7 @@ * @since 6.6.0 * * @group blocks - * @covers resolve_pattern_blocks + * @covers ::resolve_pattern_blocks */ class Tests_Blocks_ResolvePatternBlocks extends WP_UnitTestCase { public function set_up() { diff --git a/tests/phpunit/tests/blocks/wpBlockParser.php b/tests/phpunit/tests/blocks/wpBlockParser.php index d88849d956dd6..4523f0ec4ed04 100644 --- a/tests/phpunit/tests/blocks/wpBlockParser.php +++ b/tests/phpunit/tests/blocks/wpBlockParser.php @@ -7,6 +7,8 @@ * @since 5.0.0 * * @group blocks + * + * @coversDefaultClass WP_Block_Parser */ class Tests_Blocks_wpBlockParser extends WP_UnitTestCase { /** @@ -17,35 +19,11 @@ class Tests_Blocks_wpBlockParser extends WP_UnitTestCase { */ protected static $fixtures_dir; - /** - * @ticket 45109 - */ - public function data_parsing_test_filenames() { - self::$fixtures_dir = DIR_TESTDATA . '/blocks/fixtures'; - - $fixture_filenames = array_merge( - glob( self::$fixtures_dir . '/*.json' ), - glob( self::$fixtures_dir . '/*.html' ) - ); - - $fixture_filenames = array_values( - array_unique( - array_map( - array( $this, 'clean_fixture_filename' ), - $fixture_filenames - ) - ) - ); - - return array_map( - array( $this, 'pass_parser_fixture_filenames' ), - $fixture_filenames - ); - } - /** * @dataProvider data_parsing_test_filenames * @ticket 45109 + * + * @covers ::parse */ public function test_default_parser_output( $html_filename, $parsed_json_filename ) { $html_path = self::$fixtures_dir . '/' . $html_filename; @@ -70,6 +48,32 @@ public function test_default_parser_output( $html_filename, $parsed_json_filenam ); } + /** + * @ticket 45109 + */ + public function data_parsing_test_filenames() { + self::$fixtures_dir = DIR_TESTDATA . '/blocks/fixtures'; + + $fixture_filenames = array_merge( + glob( self::$fixtures_dir . '/*.json' ), + glob( self::$fixtures_dir . '/*.html' ) + ); + + $fixture_filenames = array_values( + array_unique( + array_map( + array( $this, 'clean_fixture_filename' ), + $fixture_filenames + ) + ) + ); + + return array_map( + array( $this, 'pass_parser_fixture_filenames' ), + $fixture_filenames + ); + } + /** * Helper function to remove relative paths and extension from a filename, leaving just the fixture name. * diff --git a/tests/phpunit/tests/blocks/wpBlockTypeRegistry.php b/tests/phpunit/tests/blocks/wpBlockTypeRegistry.php index c97bdc95d43a1..97f35f2e8ac7a 100644 --- a/tests/phpunit/tests/blocks/wpBlockTypeRegistry.php +++ b/tests/phpunit/tests/blocks/wpBlockTypeRegistry.php @@ -7,6 +7,8 @@ * @since 5.0.0 * * @group blocks + * + * @coversDefaultClass WP_Block_Type_Registry */ class Tests_Blocks_wpBlockTypeRegistry extends WP_UnitTestCase { @@ -41,57 +43,42 @@ public function tear_down() { } /** - * Should reject numbers + * Should reject invalid block names. * * @ticket 45097 * - * @expectedIncorrectUsage WP_Block_Type_Registry::register - */ - public function test_invalid_non_string_names() { - $result = $this->registry->register( 1, array() ); - $this->assertFalse( $result ); - } - - /** - * Should reject blocks without a namespace + * @covers ::register * - * @ticket 45097 + * @dataProvider data_invalid_block_names * * @expectedIncorrectUsage WP_Block_Type_Registry::register */ - public function test_invalid_names_without_namespace() { - $result = $this->registry->register( 'paragraph', array() ); + public function test_invalid_block_names( $name ) { + $result = $this->registry->register( $name, array() ); $this->assertFalse( $result ); } /** - * Should reject blocks with invalid characters - * - * @ticket 45097 + * Data provider for test_invalid_block_names(). * - * @expectedIncorrectUsage WP_Block_Type_Registry::register + * @return array */ - public function test_invalid_characters() { - $result = $this->registry->register( 'still/_doing_it_wrong', array() ); - $this->assertFalse( $result ); + public function data_invalid_block_names(): array { + return array( + 'non-string name' => array( 1 ), + 'no namespace' => array( 'paragraph' ), + 'invalid characters' => array( 'still/_doing_it_wrong' ), + 'uppercase characters' => array( 'Core/Paragraph' ), + ); } /** - * Should reject blocks with uppercase characters + * Should accept valid block names. * * @ticket 45097 * - * @expectedIncorrectUsage WP_Block_Type_Registry::register - */ - public function test_uppercase_characters() { - $result = $this->registry->register( 'Core/Paragraph', array() ); - $this->assertFalse( $result ); - } - - /** - * Should accept valid block names - * - * @ticket 45097 + * @covers ::register + * @covers ::get_registered */ public function test_register_block_type() { $name = 'core/paragraph'; @@ -106,10 +93,12 @@ public function test_register_block_type() { } /** - * Should fail to re-register the same block + * Should fail to re-register the same block. * * @ticket 45097 * + * @covers ::register + * * @expectedIncorrectUsage WP_Block_Type_Registry::register */ public function test_register_block_type_twice() { @@ -125,9 +114,11 @@ public function test_register_block_type_twice() { } /** - * Should accept a WP_Block_Type instance + * Should accept a WP_Block_Type instance. * * @ticket 45097 + * + * @covers ::register */ public function test_register_block_type_instance() { $block_type = new WP_Fake_Block_Type( 'core/fake' ); @@ -137,10 +128,12 @@ public function test_register_block_type_instance() { } /** - * Unregistering should fail if a block is not registered + * Unregistering should fail if a block is not registered. * * @ticket 45097 * + * @covers ::unregister + * * @expectedIncorrectUsage WP_Block_Type_Registry::unregister */ public function test_unregister_not_registered_block() { @@ -149,9 +142,12 @@ public function test_unregister_not_registered_block() { } /** - * Should unregister existing blocks + * Should unregister existing blocks. * * @ticket 45097 + * + * @covers ::unregister + * @covers ::is_registered */ public function test_unregister_block_type() { $name = 'core/paragraph'; @@ -168,6 +164,8 @@ public function test_unregister_block_type() { /** * @ticket 45097 + * + * @covers ::get_all_registered */ public function test_get_all_registered() { $names = array( 'core/paragraph', 'core/image', 'core/blockquote' ); diff --git a/tests/phpunit/tests/collaboration/wpSyncPostMetaStorage.php b/tests/phpunit/tests/collaboration/wpSyncPostMetaStorage.php deleted file mode 100644 index 8286fa643b45e..0000000000000 --- a/tests/phpunit/tests/collaboration/wpSyncPostMetaStorage.php +++ /dev/null @@ -1,707 +0,0 @@ -user->create( array( 'role' => 'editor' ) ); - self::$post_id = $factory->post->create( array( 'post_author' => self::$editor_id ) ); - update_option( 'wp_collaboration_enabled', 1 ); - } - - public static function wpTearDownAfterClass() { - self::delete_user( self::$editor_id ); - delete_option( 'wp_collaboration_enabled' ); - wp_delete_post( self::$post_id, true ); - } - - public function set_up() { - parent::set_up(); - update_option( 'wp_collaboration_enabled', 1 ); - - // Reset storage post ID cache to ensure clean state after transaction rollback. - $reflection = new ReflectionProperty( 'WP_Sync_Post_Meta_Storage', 'storage_post_ids' ); - if ( PHP_VERSION_ID < 80100 ) { - $reflection->setAccessible( true ); - } - $reflection->setValue( null, array() ); - } - - /** - * Returns the room identifier for the test post. - * - * @return string Room identifier. - */ - private function get_room(): string { - return 'postType/post:' . self::$post_id; - } - - /** - * Creates the storage post for the room and returns its ID. - * - * Adds a seed update to trigger storage post creation, then looks up - * the resulting post ID. - * - * @param WP_Sync_Post_Meta_Storage $storage Storage instance. - * @param string $room Room identifier. - * @return int Storage post ID. - */ - private function create_storage_post( WP_Sync_Post_Meta_Storage $storage, string $room ): int { - $storage->add_update( - $room, - array( - 'type' => 'update', - 'data' => 'seed', - ) - ); - - $posts = get_posts( - array( - 'post_type' => 'wp_sync_storage', - 'posts_per_page' => 1, - 'post_status' => 'publish', - 'name' => md5( $room ), - 'fields' => 'ids', - ) - ); - - $storage_post_id = array_first( $posts ); - $this->assertIsInt( $storage_post_id ); - - return $storage_post_id; - } - - /** - * Primes the post meta object cache for a given post and returns the cached value. - * - * @param int $post_id Post ID. - * @return array Cached meta data. - */ - private function prime_and_get_meta_cache( int $post_id ): array { - update_meta_cache( 'post', array( $post_id ) ); - - $cached = wp_cache_get( $post_id, 'post_meta' ); - $this->assertNotFalse( $cached, 'Post meta cache should be primed.' ); - - return $cached; - } - - /** - * Adding a sync update must not invalidate the post meta cache for the storage - * post. - * - * @ticket 64916 - */ - public function test_add_update_does_not_invalidate_post_meta_cache() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - $cached_before = $this->prime_and_get_meta_cache( $storage_post_id ); - - $storage->add_update( - $room, - array( - 'type' => 'update', - 'data' => 'new', - ) - ); - - $cached_after = wp_cache_get( $storage_post_id, 'post_meta' ); - $this->assertSame( - $cached_before, - $cached_after, - 'add_update() must not invalidate the post meta cache.' - ); - } - - /** - * Setting awareness state must not invalidate the post meta cache for the - * storage post. - * - * @ticket 64916 - */ - public function test_set_awareness_state_insert_does_not_invalidate_post_meta_cache() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - $cached_before = $this->prime_and_get_meta_cache( $storage_post_id ); - - // First call triggers an INSERT (no existing awareness row). - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Test' ) ) ); - - $cached_after = wp_cache_get( $storage_post_id, 'post_meta' ); - $this->assertSame( - $cached_before, - $cached_after, - 'set_awareness_state() INSERT path must not invalidate the post meta cache.' - ); - } - - /** - * Updating awareness state must not invalidate the post meta cache for the - * storage post. - * - * @ticket 64916 - */ - public function test_set_awareness_state_update_does_not_invalidate_post_meta_cache() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Create initial awareness row (INSERT path). - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Initial' ) ) ); - - // Prime cache after the insert. - $cached_before = $this->prime_and_get_meta_cache( $storage_post_id ); - - // Second call triggers an UPDATE (existing awareness row). - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Updated' ) ) ); - - $cached_after = wp_cache_get( $storage_post_id, 'post_meta' ); - $this->assertSame( - $cached_before, - $cached_after, - 'set_awareness_state() UPDATE path must not invalidate the post meta cache.' - ); - } - - /** - * Removing updates / compaction must not invalidate the post meta cache for - * the storage post. - * - * @ticket 64916 - */ - public function test_remove_updates_before_cursor_does_not_invalidate_post_meta_cache() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Get a cursor after the seed update. - $storage->get_updates_after_cursor( $room, 0 ); - $cursor = $storage->get_cursor( $room ); - - $cached_before = $this->prime_and_get_meta_cache( $storage_post_id ); - - $storage->remove_updates_before_cursor( $room, $cursor ); - - $cached_after = wp_cache_get( $storage_post_id, 'post_meta' ); - $this->assertSame( - $cached_before, - $cached_after, - 'remove_updates_before_cursor() must not invalidate the post meta cache.' - ); - } - - /** - * Adding a sync update must not update the posts last_changed value. - * - * @ticket 64696 - */ - public function test_add_update_does_not_update_posts_last_changed() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $this->create_storage_post( $storage, $room ); - - $last_changed_before = wp_cache_get_last_changed( 'posts' ); - - $storage->add_update( - $room, - array( - 'type' => 'update', - 'data' => 'new', - ) - ); - - $this->assertSame( - $last_changed_before, - wp_cache_get_last_changed( 'posts' ), - 'add_update() must not update posts last_changed.' - ); - } - - /** - * Setting awareness state must not update the posts last_changed value. - * - * @ticket 64696 - */ - public function test_set_awareness_state_does_not_update_posts_last_changed() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $this->create_storage_post( $storage, $room ); - - $last_changed_before = wp_cache_get_last_changed( 'posts' ); - - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Test' ) ) ); - - $this->assertSame( - $last_changed_before, - wp_cache_get_last_changed( 'posts' ), - 'set_awareness_state() must not update posts last_changed.' - ); - } - - /** - * Updating awareness state must not update the posts last_changed value. - * - * @ticket 64916 - */ - public function test_set_awareness_state_update_does_not_update_posts_last_changed() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $this->create_storage_post( $storage, $room ); - - $last_changed_before = wp_cache_get_last_changed( 'posts' ); - - // Create initial awareness row (INSERT path). - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Initial' ) ) ); - - $this->assertSame( - $last_changed_before, - wp_cache_get_last_changed( 'posts' ), - 'set_awareness_state() must not update posts last_changed.' - ); - - // Second call triggers an UPDATE (existing awareness row). - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Updated' ) ) ); - - $this->assertSame( - $last_changed_before, - wp_cache_get_last_changed( 'posts' ), - 'set_awareness_state() must not update posts last_changed.' - ); - } - - /** - * Removing sync updates / compaction must not update the posts last_changed - * value. - * - * @ticket 64916 - */ - public function test_remove_updates_before_cursor_does_not_update_posts_last_changed() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $this->create_storage_post( $storage, $room ); - - $storage->get_updates_after_cursor( $room, 0 ); - $cursor = $storage->get_cursor( $room ); - - $last_changed_before = wp_cache_get_last_changed( 'posts' ); - - $storage->remove_updates_before_cursor( $room, $cursor ); - - $this->assertSame( - $last_changed_before, - wp_cache_get_last_changed( 'posts' ), - 'remove_updates_before_cursor() must not update posts last_changed.' - ); - } - - /** - * Getting awareness state must not prime the post meta cache for the storage - * post. - * - * @ticket 64916 - */ - public function test_get_awareness_state_does_not_prime_post_meta_cache() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Populate awareness so there is data to read. - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Test' ) ) ); - - // Clear any existing cache. - wp_cache_delete( $storage_post_id, 'post_meta' ); - $this->assertFalse( - wp_cache_get( $storage_post_id, 'post_meta' ), - 'Post meta cache should be empty before read.' - ); - - $storage->get_awareness_state( $room ); - - $this->assertFalse( - wp_cache_get( $storage_post_id, 'post_meta' ), - 'get_awareness_state() must not prime the post meta cache.' - ); - } - - /** - * Getting sync updates must not prime the post meta cache for the storage - * post. - * - * @ticket 64916 - */ - public function test_get_updates_after_cursor_does_not_prime_post_meta_cache() { - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Clear any existing cache. - wp_cache_delete( $storage_post_id, 'post_meta' ); - $this->assertFalse( - wp_cache_get( $storage_post_id, 'post_meta' ), - 'Post meta cache should be empty before read.' - ); - - $storage->get_updates_after_cursor( $room, 0 ); - - $this->assertFalse( - wp_cache_get( $storage_post_id, 'post_meta' ), - 'get_updates_after_cursor() must not prime the post meta cache.' - ); - } - - /* - * Data integrity tests. - */ - - public function test_get_updates_after_cursor_drops_malformed_json() { - global $wpdb; - - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Advance cursor past the seed update from create_storage_post(). - $storage->get_updates_after_cursor( $room, 0 ); - $cursor = $storage->get_cursor( $room ); - - // Insert a valid update. - $valid_update = array( - 'type' => 'update', - 'data' => 'dGVzdA==', - ); - $this->assertTrue( $storage->add_update( $room, $valid_update ) ); - - // Insert a malformed JSON row directly into the database. - $wpdb->insert( - $wpdb->postmeta, - array( - 'post_id' => $storage_post_id, - 'meta_key' => WP_Sync_Post_Meta_Storage::SYNC_UPDATE_META_KEY, - 'meta_value' => '{invalid json', - ), - array( '%d', '%s', '%s' ) - ); - - // Insert another valid update after the malformed one. - $valid_update_2 = array( - 'type' => 'sync_step1', - 'data' => 'c3RlcDE=', - ); - $this->assertTrue( $storage->add_update( $room, $valid_update_2 ) ); - - $updates = $storage->get_updates_after_cursor( $room, $cursor ); - - // The malformed row should be dropped; only the valid updates should appear. - $this->assertCount( 2, $updates ); - $this->assertSame( $valid_update, $updates[0] ); - $this->assertSame( $valid_update_2, $updates[1] ); - } - - public function test_duplicate_awareness_rows_coalesces_obn_latest_row() { - global $wpdb; - - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Simulate a race: insert two awareness rows directly. - $wpdb->insert( - $wpdb->postmeta, - array( - 'post_id' => $storage_post_id, - 'meta_key' => WP_Sync_Post_Meta_Storage::AWARENESS_META_KEY, - 'meta_value' => wp_json_encode( array( 1 => array( 'name' => 'Stale' ) ) ), - ), - array( '%d', '%s', '%s' ) - ); - - $wpdb->insert( - $wpdb->postmeta, - array( - 'post_id' => $storage_post_id, - 'meta_key' => WP_Sync_Post_Meta_Storage::AWARENESS_META_KEY, - 'meta_value' => wp_json_encode( array( 1 => array( 'name' => 'Latest' ) ) ), - ), - array( '%d', '%s', '%s' ) - ); - - // get_awareness_state and set_awareness_state should target the latest row. - $awareness = $storage->get_awareness_state( $room ); - $this->assertSame( array( 'name' => 'Latest' ), $awareness[0] ); - $storage->set_awareness_state( $room, array( 1 => array( 'name' => 'Current' ) ) ); - $awareness = $storage->get_awareness_state( $room ); - $this->assertSame( array( 'name' => 'Current' ), $awareness[0] ); - } - - /* - * Race-condition tests. - * - * These use a $wpdb proxy to inject concurrent writes between internal - * query steps, verifying that the cursor-bounded query window prevents - * data loss. - */ - - public function test_cursor_does_not_skip_update_inserted_during_fetch_window() { - global $wpdb; - - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - $seed_update = array( - 'client_id' => 1, - 'type' => 'update', - 'data' => 'c2VlZA==', - ); - - $this->assertTrue( $storage->add_update( $room, $seed_update ) ); - - $initial_updates = $storage->get_updates_after_cursor( $room, 0 ); - $baseline_cursor = $storage->get_cursor( $room ); - - // The seed from create_storage_post() plus the one we just added. - $this->assertGreaterThan( 0, $baseline_cursor ); - - $injected_update = array( - 'client_id' => 9999, - 'type' => 'update', - 'data' => base64_encode( 'injected-during-fetch' ), - ); - - $original_wpdb = $wpdb; - $proxy_wpdb = new class( $original_wpdb, $storage_post_id, $injected_update ) { - private $wpdb; - private $storage_post_id; - private $injected_update; - public $postmeta; - public $did_inject = false; - - public function __construct( $wpdb, int $storage_post_id, array $injected_update ) { - $this->wpdb = $wpdb; - $this->storage_post_id = $storage_post_id; - $this->injected_update = $injected_update; - $this->postmeta = $wpdb->postmeta; - } - - // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- Proxy forwards fully prepared core queries. - public function prepare( ...$args ) { - return $this->wpdb->prepare( ...$args ); - } - - public function get_row( $query = null, $output = OBJECT, $y = 0 ) { - $result = $this->wpdb->get_row( $query, $output, $y ); - - $this->maybe_inject_after_sync_query( $query ); - - return $result; - } - - public function get_var( $query = null, $x = 0, $y = 0 ) { - $result = $this->wpdb->get_var( $query, $x, $y ); - - $this->maybe_inject_after_sync_query( $query ); - - return $result; - } - - public function get_results( $query = null, $output = OBJECT ) { - return $this->wpdb->get_results( $query, $output ); - } - // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared - - public function __call( $name, $arguments ) { - return $this->wpdb->$name( ...$arguments ); - } - - public function __get( $name ) { - return $this->wpdb->$name; - } - - public function __set( $name, $value ) { - $this->wpdb->$name = $value; - } - - private function inject_update(): void { - if ( $this->did_inject ) { - return; - } - - $this->did_inject = true; - - $this->wpdb->insert( - $this->wpdb->postmeta, - array( - 'post_id' => $this->storage_post_id, - 'meta_key' => WP_Sync_Post_Meta_Storage::SYNC_UPDATE_META_KEY, - 'meta_value' => wp_json_encode( $this->injected_update ), - ), - array( '%d', '%s', '%s' ) - ); - } - - private function maybe_inject_after_sync_query( $query ): void { - if ( $this->did_inject || ! is_string( $query ) ) { - return; - } - - $targets_postmeta = false !== strpos( $query, $this->postmeta ); - $targets_post_id = 1 === preg_match( '/\bpost_id\s*=\s*' . (int) $this->storage_post_id . '\b/', $query ); - $targets_meta_key = 1 === preg_match( - "/\bmeta_key\s*=\s*'" . preg_quote( WP_Sync_Post_Meta_Storage::SYNC_UPDATE_META_KEY, '/' ) . "'/", - $query - ); - - if ( $targets_postmeta && $targets_post_id && $targets_meta_key ) { - $this->inject_update(); - } - } - }; - - $wpdb = $proxy_wpdb; - try { - $race_updates = $storage->get_updates_after_cursor( $room, $baseline_cursor ); - $race_cursor = $storage->get_cursor( $room ); - } finally { - $wpdb = $original_wpdb; - } - - $this->assertTrue( $proxy_wpdb->did_inject, 'Expected race-window update injection to occur.' ); - $this->assertEmpty( $race_updates ); - $this->assertSame( $baseline_cursor, $race_cursor ); - - $follow_up_updates = $storage->get_updates_after_cursor( $room, $race_cursor ); - $follow_up_cursor = $storage->get_cursor( $room ); - - $this->assertCount( 1, $follow_up_updates ); - $this->assertSame( $injected_update, $follow_up_updates[0] ); - $this->assertGreaterThan( $race_cursor, $follow_up_cursor ); - } - - public function test_compaction_does_not_delete_update_inserted_during_delete() { - global $wpdb; - - $storage = new WP_Sync_Post_Meta_Storage(); - $room = $this->get_room(); - $storage_post_id = $this->create_storage_post( $storage, $room ); - - // Seed three updates so there's something to compact. - for ( $i = 1; $i <= 3; $i++ ) { - $this->assertTrue( - $storage->add_update( - $room, - array( - 'client_id' => $i, - 'type' => 'update', - 'data' => base64_encode( "seed-$i" ), - ) - ) - ); - } - - // Capture the cursor after all seeds are in place. - $storage->get_updates_after_cursor( $room, 0 ); - $compaction_cursor = $storage->get_cursor( $room ); - $this->assertGreaterThan( 0, $compaction_cursor ); - - $concurrent_update = array( - 'client_id' => 9999, - 'type' => 'update', - 'data' => base64_encode( 'arrived-during-compaction' ), - ); - - $original_wpdb = $wpdb; - $proxy_wpdb = new class( $original_wpdb, $storage_post_id, $concurrent_update ) { - private $wpdb; - private $storage_post_id; - private $concurrent_update; - public $did_inject = false; - - public function __construct( $wpdb, int $storage_post_id, array $concurrent_update ) { - $this->wpdb = $wpdb; - $this->storage_post_id = $storage_post_id; - $this->concurrent_update = $concurrent_update; - } - - // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- Proxy forwards fully prepared core queries. - public function prepare( ...$args ) { - return $this->wpdb->prepare( ...$args ); - } - - public function query( $query ) { - $result = $this->wpdb->query( $query ); - - // After the DELETE executes, inject a concurrent update via - // raw SQL through the real $wpdb to avoid metadata cache - // interactions while the proxy is active. - if ( ! $this->did_inject - && is_string( $query ) - && 0 === strpos( $query, "DELETE FROM {$this->wpdb->postmeta}" ) - && false !== strpos( $query, "post_id = {$this->storage_post_id}" ) - ) { - $this->did_inject = true; - $this->wpdb->insert( - $this->wpdb->postmeta, - array( - 'post_id' => $this->storage_post_id, - 'meta_key' => WP_Sync_Post_Meta_Storage::SYNC_UPDATE_META_KEY, - 'meta_value' => wp_json_encode( $this->concurrent_update ), - ), - array( '%d', '%s', '%s' ) - ); - } - - return $result; - } - // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared - - public function __call( $name, $arguments ) { - return $this->wpdb->$name( ...$arguments ); - } - - public function __get( $name ) { - return $this->wpdb->$name; - } - - public function __set( $name, $value ) { - $this->wpdb->$name = $value; - } - }; - - // Run compaction through the proxy so the concurrent update - // is injected immediately after the DELETE executes. - $wpdb = $proxy_wpdb; - try { - $result = $storage->remove_updates_before_cursor( $room, $compaction_cursor ); - } finally { - $wpdb = $original_wpdb; - } - - $this->assertTrue( $result ); - $this->assertTrue( $proxy_wpdb->did_inject, 'Expected concurrent update injection to occur.' ); - - // The concurrent update must survive the compaction delete. - $updates = $storage->get_updates_after_cursor( $room, 0 ); - - $update_data = wp_list_pluck( $updates, 'data' ); - $this->assertContains( - $concurrent_update['data'], - $update_data, - 'Concurrent update should survive compaction.' - ); - } -} diff --git a/tests/phpunit/tests/connectors/wpConnectorRegistry.php b/tests/phpunit/tests/connectors/wpConnectorRegistry.php index d1a46dc0981fe..47e12eb7fd6fd 100644 --- a/tests/phpunit/tests/connectors/wpConnectorRegistry.php +++ b/tests/phpunit/tests/connectors/wpConnectorRegistry.php @@ -299,16 +299,66 @@ public function test_register_includes_plugin_data() { $result = $this->registry->register( 'with-plugin', $args ); $this->assertArrayHasKey( 'plugin', $result ); - $this->assertSame( array( 'file' => 'my-plugin/my-plugin.php' ), $result['plugin'] ); + $this->assertSame( 'my-plugin/my-plugin.php', $result['plugin']['file'] ); + } + + /** + * @ticket 65020 + */ + public function test_register_stores_plugin_is_active_callback() { + $args = self::$default_args; + $args['plugin'] = array( + 'file' => 'my-plugin/my-plugin.php', + 'is_active' => '__return_true', + ); + + $result = $this->registry->register( 'with-callback', $args ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'is_active', $result['plugin'] ); + $this->assertIsCallable( $result['plugin']['is_active'] ); + } + + /** + * @ticket 65020 + */ + public function test_register_rejects_non_callable_plugin_is_active() { + $this->setExpectedIncorrectUsage( 'WP_Connector_Registry::register' ); + + $args = self::$default_args; + $args['plugin'] = array( + 'file' => 'my-plugin/my-plugin.php', + 'is_active' => 'not_a_real_function_name', + ); + + $result = $this->registry->register( 'bad-callback', $args ); + + $this->assertNull( $result ); + } + + /** + * @ticket 65020 + */ + public function test_register_defaults_plugin_is_active_to_return_true() { + $args = self::$default_args; + $args['plugin'] = array( 'file' => 'my-plugin/my-plugin.php' ); + + $result = $this->registry->register( 'default-callback', $args ); + + $this->assertIsArray( $result ); + $this->assertArrayHasKey( 'is_active', $result['plugin'] ); + $this->assertSame( '__return_true', $result['plugin']['is_active'] ); } /** * @ticket 64791 */ - public function test_register_omits_plugin_when_not_provided() { + public function test_register_defaults_plugin_when_not_provided() { $result = $this->registry->register( 'no-plugin', self::$default_args ); - $this->assertArrayNotHasKey( 'plugin', $result ); + $this->assertArrayHasKey( 'plugin', $result ); + $this->assertArrayNotHasKey( 'file', $result['plugin'] ); + $this->assertSame( '__return_true', $result['plugin']['is_active'] ); } /** diff --git a/tests/phpunit/tests/connectors/wpConnectorsGetConnectorSettings.php b/tests/phpunit/tests/connectors/wpConnectorsGetConnectorSettings.php index cedac90111101..0f03487480d2f 100644 --- a/tests/phpunit/tests/connectors/wpConnectorsGetConnectorSettings.php +++ b/tests/phpunit/tests/connectors/wpConnectorsGetConnectorSettings.php @@ -37,8 +37,9 @@ public function test_returns_expected_connector_keys(): void { $this->assertArrayHasKey( 'google', $connectors ); $this->assertArrayHasKey( 'openai', $connectors ); $this->assertArrayHasKey( 'anthropic', $connectors ); + $this->assertArrayHasKey( 'akismet', $connectors ); $this->assertArrayHasKey( 'mock-connectors-test', $connectors ); - $this->assertCount( 4, $connectors ); + $this->assertCount( 5, $connectors ); } /** @@ -56,7 +57,7 @@ public function test_each_connector_has_required_fields(): void { $this->assertArrayHasKey( 'description', $connector_data, "Connector '{$connector_id}' is missing 'description'." ); $this->assertIsString( $connector_data['description'], "Connector '{$connector_id}' description should be a string." ); $this->assertArrayHasKey( 'type', $connector_data, "Connector '{$connector_id}' is missing 'type'." ); - $this->assertContains( $connector_data['type'], array( 'ai_provider' ), "Connector '{$connector_id}' has unexpected type '{$connector_data['type']}'." ); + $this->assertContains( $connector_data['type'], array( 'ai_provider', 'spam_filtering' ), "Connector '{$connector_id}' has unexpected type '{$connector_data['type']}'." ); $this->assertArrayHasKey( 'authentication', $connector_data, "Connector '{$connector_id}' is missing 'authentication'." ); $this->assertIsArray( $connector_data['authentication'], "Connector '{$connector_id}' authentication should be an array." ); $this->assertArrayHasKey( 'method', $connector_data['authentication'], "Connector '{$connector_id}' authentication is missing 'method'." ); @@ -79,10 +80,16 @@ public function test_api_key_connectors_have_setting_name_and_credentials_url(): ++$api_key_count; $this->assertArrayHasKey( 'setting_name', $connector_data['authentication'], "Connector '{$connector_id}' authentication is missing 'setting_name'." ); + $this->assertNotEmpty( $connector_data['authentication']['setting_name'], "Connector '{$connector_id}' setting_name should not be empty." ); + + if ( 'ai_provider' !== $connector_data['type'] ) { + continue; + } + $this->assertSame( 'connectors_ai_' . str_replace( '-', '_', $connector_id ) . '_api_key', - $connector_data['authentication']['setting_name'] ?? null, - "Connector '{$connector_id}' setting_name does not match expected format." + $connector_data['authentication']['setting_name'], + "Connector '{$connector_id}' setting_name does not match expected AI provider format." ); } diff --git a/tests/phpunit/tests/connectors/wpRegisterDefaultConnectorSettings.php b/tests/phpunit/tests/connectors/wpRegisterDefaultConnectorSettings.php new file mode 100644 index 0000000000000..ba16fed864aed --- /dev/null +++ b/tests/phpunit/tests/connectors/wpRegisterDefaultConnectorSettings.php @@ -0,0 +1,101 @@ +original_registered_settings = $wp_registered_settings; + } + + /** + * Removes the test connector and restores registered settings. + */ + public function tear_down(): void { + $registry = WP_Connector_Registry::get_instance(); + if ( null !== $registry && $registry->is_registered( self::CONNECTOR_ID ) ) { + $registry->unregister( self::CONNECTOR_ID ); + } + + global $wp_registered_settings; + $wp_registered_settings = $this->original_registered_settings; + + parent::tear_down(); + } + + /** + * @ticket 65099 + */ + public function test_non_ai_connector_skipped_when_is_active_returns_false(): void { + WP_Connector_Registry::get_instance()->register( + self::CONNECTOR_ID, + array( + 'name' => 'Test Non-AI Connector', + 'description' => '', + 'type' => 'spam_filtering', + 'authentication' => array( + 'method' => 'api_key', + 'setting_name' => self::SETTING_NAME, + ), + 'plugin' => array( + 'file' => 'test/test.php', + 'is_active' => static function (): bool { + return false; + }, + ), + ) + ); + + _wp_register_default_connector_settings(); + + $this->assertArrayNotHasKey( self::SETTING_NAME, get_registered_settings() ); + } + + /** + * @ticket 65099 + */ + public function test_non_ai_connector_registers_setting_when_is_active_returns_true(): void { + WP_Connector_Registry::get_instance()->register( + self::CONNECTOR_ID, + array( + 'name' => 'Test Non-AI Connector', + 'description' => '', + 'type' => 'spam_filtering', + 'authentication' => array( + 'method' => 'api_key', + 'setting_name' => self::SETTING_NAME, + ), + 'plugin' => array( + 'file' => 'test/test.php', + 'is_active' => static function (): bool { + return true; + }, + ), + ) + ); + + _wp_register_default_connector_settings(); + + $this->assertArrayHasKey( self::SETTING_NAME, get_registered_settings() ); + } +} diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php index 5f1c30fe4cf47..41c9673915b93 100644 --- a/tests/phpunit/tests/dependencies/scripts.php +++ b/tests/phpunit/tests/dependencies/scripts.php @@ -8,6 +8,20 @@ * @covers ::wp_script_add_data * @covers ::wp_add_inline_script * @covers ::wp_set_script_translations + * + * @phpstan-type ScriptArgs array{ + * in_footer?: bool, + * strategy?: 'async'|'defer', + * fetchpriority?: 'low'|'auto'|'high', + * module_dependencies?: array, + * } + * @phpstan-type WpEnqueueScriptArgs array{ + * 0: non-empty-string, // $handle + * 1?: non-empty-string, // $src + * 2?: non-empty-string[], // $deps + * 3?: null|bool|string, // $version + * 4?: ScriptArgs, + * } */ class Tests_Dependencies_Scripts extends WP_UnitTestCase { @@ -1396,6 +1410,223 @@ public function data_add_data_module_dependencies_validation(): array { ); } + /** + * Tests that registering a script with `module_dependencies` triggers `_doing_it_wrong` + * when the script is not printed in the footer and does not use the `defer` strategy. + * + * @ticket 65165 + * + * @covers ::wp_register_script + * @covers ::wp_enqueue_script + * @covers ::_wp_scripts_add_args_data + * + * @dataProvider data_module_dependencies_require_footer_or_defer + * + * @param callable-string $function_name Function name to call. + * @param array $args Arguments to pass to the function. + * @param bool $should_warn Whether the call is expected to trigger a `_doing_it_wrong` warning. + * + * @phpstan-param WpEnqueueScriptArgs $args + */ + public function test_module_dependencies_require_footer_or_defer( string $function_name, array $args, bool $should_warn ): void { + if ( $should_warn ) { + $this->setExpectedIncorrectUsage( $function_name ); + } + + call_user_func_array( $function_name, $args ); + + if ( $should_warn ) { + $this->assertStringContainsString( + 'module_dependencies', + $this->caught_doing_it_wrong[ $function_name ], + 'The _doing_it_wrong message should reference module_dependencies.' + ); + $this->assertStringContainsString( + 'in_footer', + $this->caught_doing_it_wrong[ $function_name ], + 'The _doing_it_wrong message should reference the in_footer requirement.' + ); + $this->assertStringContainsString( + 'defer', + $this->caught_doing_it_wrong[ $function_name ], + 'The _doing_it_wrong message should reference the defer strategy.' + ); + } else { + $this->assertArrayNotHasKey( + $function_name, + $this->caught_doing_it_wrong, + 'No _doing_it_wrong warning should be triggered when in_footer is true or strategy is defer.' + ); + } + } + + /** + * Data provider for {@see self::test_module_dependencies_require_footer_or_defer()}. + * + * @phpstan-return array + */ + public function data_module_dependencies_require_footer_or_defer(): array { + $base_args = array( + '/script.js', + array(), + null, + ); + + return array( + 'register_blocking_warns' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'module-deps-blocking-register' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + ), + ) + ), + 'should_warn' => true, + ), + 'enqueue_blocking_warns' => array( + 'function_name' => 'wp_enqueue_script', + 'args' => array_merge( + array( 'module-deps-blocking-enqueue' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + ), + ) + ), + 'should_warn' => true, + ), + 'register_async_warns' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'module-deps-async-register' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'strategy' => 'async', + ), + ) + ), + 'should_warn' => true, + ), + 'enqueue_async_warns' => array( + 'function_name' => 'wp_enqueue_script', + 'args' => array_merge( + array( 'module-deps-async-enqueue' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'strategy' => 'async', + ), + ) + ), + 'should_warn' => true, + ), + 'register_in_footer_does_not_warn' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'module-deps-footer-register' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'in_footer' => true, + ), + ) + ), + 'should_warn' => false, + ), + 'enqueue_in_footer_does_not_warn' => array( + 'function_name' => 'wp_enqueue_script', + 'args' => array_merge( + array( 'module-deps-footer-enqueue' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'in_footer' => true, + ), + ) + ), + 'should_warn' => false, + ), + 'register_defer_does_not_warn' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'module-deps-defer-register' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'strategy' => 'defer', + ), + ) + ), + 'should_warn' => false, + ), + 'enqueue_defer_does_not_warn' => array( + 'function_name' => 'wp_enqueue_script', + 'args' => array_merge( + array( 'module-deps-defer-enqueue' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'strategy' => 'defer', + ), + ) + ), + 'should_warn' => false, + ), + 'register_footer_and_defer_no_warn' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'module-deps-footer-defer-register' ), + $base_args, + array( + array( + 'module_dependencies' => array( 'foo' ), + 'in_footer' => true, + 'strategy' => 'defer', + ), + ) + ), + 'should_warn' => false, + ), + 'register_no_module_deps_no_warn' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'no-module-deps-register' ), + $base_args, + array( array() ) + ), + 'should_warn' => false, + ), + 'register_empty_module_deps_no_warn' => array( + 'function_name' => 'wp_register_script', + 'args' => array_merge( + array( 'empty-module-deps-register' ), + $base_args, + array( + array( + 'module_dependencies' => array(), + ), + ) + ), + 'should_warn' => false, + ), + ); + } + /** * Data provider. * @@ -3169,6 +3400,7 @@ public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { 'unused', 'browser', 'globals', + 'espreeModuleUrl', ), array_keys( $wp_enqueue_code_editor['jshint'] ) ); @@ -3252,6 +3484,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will 'unused', 'browser', 'globals', + 'espreeModuleUrl', ), array_keys( $wp_enqueue_code_editor['jshint'] ) ); @@ -3349,6 +3582,7 @@ public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_ 'unused', 'browser', 'globals', + 'espreeModuleUrl', ), array_keys( $wp_enqueue_code_editor['jshint'] ) ); @@ -3443,6 +3677,7 @@ public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() { 'unused', 'browser', 'globals', + 'espreeModuleUrl', ), array_keys( $wp_enqueue_code_editor['jshint'] ) ); diff --git a/tests/phpunit/tests/dependencies/wpStyleLoaderSrc.php b/tests/phpunit/tests/dependencies/wpStyleLoaderSrc.php index 170129580a3e7..6155ab0d178c3 100644 --- a/tests/phpunit/tests/dependencies/wpStyleLoaderSrc.php +++ b/tests/phpunit/tests/dependencies/wpStyleLoaderSrc.php @@ -12,20 +12,15 @@ class Tests_Dependencies_wpStyleLoaderSrc extends WP_UnitTestCase { /** * Tests that PHP warnings are not thrown when wp_style_loader_src() is called - * before the `$_wp_admin_css_colors` global is set within the admin. + * before the `$_wp_admin_css_colors` global is set. * * The warnings that we should not see: * `Warning: Trying to access array offset on null`. * `Warning: Attempt to read property "url" on null`. * * @ticket 61302 - * @ticket 64762 */ public function test_without_wp_admin_css_colors_global() { - if ( is_admin() ) { - $this->assertFalse( wp_style_loader_src( '', 'colors' ) ); - } else { - $this->assertStringContainsString( '/colors.css', wp_style_loader_src( '', 'colors' ) ); - } + $this->assertFalse( wp_style_loader_src( '', 'colors' ) ); } } diff --git a/tests/phpunit/tests/formatting/antispambot.php b/tests/phpunit/tests/formatting/antispambot.php new file mode 100644 index 0000000000000..159d907ada9b0 --- /dev/null +++ b/tests/phpunit/tests/formatting/antispambot.php @@ -0,0 +1,73 @@ +assertTrue( wp_is_valid_utf8( antispambot( $email ) ) ); + } + + /** + * Data provider. + * + * return array[] + */ + public function data_returns_valid_utf8() { + return array( + 'plain' => array( 'bob@example.com' ), + 'plain with ip' => array( 'ace@204.32.222.14' ), + 'deep subdomain' => array( 'kevin@many.subdomains.make.a.happy.man.edu' ), + 'short address' => array( 'a@b.co' ), + 'weird but legal dots' => array( '..@example.com' ), + ); + } + + /** + * This tests that antispambot performs some sort of obfuscation + * and that the obfuscation maps back to the original value. + * + * @ticket 31992 + * + * @dataProvider data_antispambot_obfuscates + * + * @param string $provided The email address to obfuscate. + */ + public function test_antispambot_obfuscates( $provided ) { + // The only token should be the email address, so advance once and treat as a text node. + $obfuscated = antispambot( $provided ); + $p = new WP_HTML_Tag_Processor( $obfuscated ); + $p->next_token(); + $decoded = rawurldecode( $p->get_modifiable_text() ); + + $this->assertNotSame( $provided, $obfuscated, 'Should have produced an obfuscated representation.' ); + $this->assertSame( $provided, $decoded, 'Should have decoded to the original email after restoring.' ); + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_antispambot_obfuscates() { + return array( + array( 'example@example.com' ), + array( '#@example.com' ), + ); + } +} diff --git a/tests/phpunit/tests/formatting/isEmail.php b/tests/phpunit/tests/formatting/isEmail.php index eb5a0379b8515..b793af2c4a70d 100644 --- a/tests/phpunit/tests/formatting/isEmail.php +++ b/tests/phpunit/tests/formatting/isEmail.php @@ -1,32 +1,44 @@ assertSame( $email, is_email( $email ), "is_email() should return the email address for $email." ); + $this->assertSame( + $email, + is_email( $email ), + 'Should return the given email address unchanged when valid.' + ); } /** - * Data provider for valid email addresses. + * Data provider. * - * @return array + * @return Generator */ - public static function valid_email_provider() { + public static function data_valid_email_provider() { $valid_emails = array( 'bob@example.com', 'phil@example.info', + 'phil@TLA.example', 'ace@204.32.222.14', 'kevin@many.subdomains.make.a.happy.man.edu', 'a@b.co', 'bill+ted@example.com', + '..@example.com', ); foreach ( $valid_emails as $email ) { @@ -35,18 +47,27 @@ public static function valid_email_provider() { } /** - * @dataProvider invalid_email_provider + * Ensures that unrecognized email addresses are rejected. + * + * @ticket 31992 + * + * @dataProvider data_invalid_email_provider + * + * @param string $email Invalid or unrecognized-to-WordPress email address. */ public function test_returns_false_if_given_an_invalid_email_address( $email ) { - $this->assertFalse( is_email( $email ), "is_email() should return false for $email." ); + $this->assertFalse( + is_email( $email ), + 'Should have rejected the email as invalid.' + ); } /** - * Data provider for invalid email addresses. + * Data provider. * - * @return array + * @return Generator */ - public static function invalid_email_provider() { + public static function data_invalid_email_provider() { $invalid_emails = array( 'khaaaaaaaaaaaaaaan!', 'http://bob.example.com/', @@ -54,10 +75,107 @@ public static function invalid_email_provider() { 'com.exampleNOSPAMbob', 'bob@your mom', 'a@b.c', + '" "@b.c', + '"@"@b.c', + 'a@route.org@b.c', + 'h(aj@couc.ou', // bad comment. + 'hi@', + 'hi@hi@couc.ou', // double @. + + /* + * The next address is not deliverable as described, + * SMTP servers should strip the (ab), so it is very + * likely a source of confusion or a typo. + * Best rejected. + */ + '(ab)cd@couc.ou', + + /* + * The next address is not globally deliverable, + * so it may work with PHPMailer and break with + * mail sending services. Best not allow users + * to paint themselves into that corner. This also + * avoids security problems like those that were + * used to probe the WordPress server's local + * network. + */ + 'toto@to', + + /* + * Several addresses are best rejected because + * we don't want to allow sending to fe80::, 192.168 + * and other special addresses; that too might + * be used to probe the WordPress server's local + * network. + */ + 'to@[2001:db8::1]', + 'to@[IPv6:2001:db8::1]', + 'to@[192.168.1.1]', + + /* + * Ill-formed UTF-8 byte sequences must be rejected. + * A lone continuation byte (0x80) is not valid UTF-8 + * whether it appears in the local part or the domain. + */ + "a\x80b@example.com", // invalid UTF-8 in local part. + "abc@\x80.org", // invalid UTF-8 in domain subdomain. ); foreach ( $invalid_emails as $email ) { - yield $email => array( $email ); + yield self::invalid_utf8_as_ascii( $email ) => array( $email ); } } + + /** + * Transforms invalid byte sequences in UTF-8 into representations of + * each byte value, according to the maximal subpart rule. + * + * Example: + * + * // For valid UTF-8 the output is the input. + * 'test' === invalid_utf8_as_ascii( 'test' ); + * + * // Invalid bytes are represented with their hex value. + * 'a(0x80)b' === invalid_utf8_as_ascii( "a\x80b" ); + * + * // Invalid byte sequences form maximal subparts. + * '(0xC2)(0xEF 0xBF)' === invalid_utf8_as_ascii( "\xC2\xEF\xBF" ); + * + * @param string $text + * @return string + */ + private static function invalid_utf8_as_ascii( string $text ): string { + $output = ''; + $at = 0; + $was_at = 0; + $end = strlen( $text ); + $invalid_bytes = 0; + + while ( $at < $end ) { + if ( 0 === _wp_scan_utf8( $text, $at, $invalid_bytes ) && 0 === $invalid_bytes ) { + break; + } + + if ( $at > $was_at ) { + $output .= substr( $text, $was_at, $at - $was_at ); + } + + if ( $invalid_bytes > 0 ) { + $output .= '('; + + for ( $i = 0; $i < $invalid_bytes; $i++ ) { + $space = $i > 0 ? ' ' : ''; + $as_hex = bin2hex( $text[ $at + $i ] ); + $output .= "{$space}0x{$as_hex}"; + } + + $output .= ')'; + } + + $at += $invalid_bytes; + $was_at = $at; + } + + return $output; + } } diff --git a/tests/phpunit/tests/formatting/sanitizeEmail.php b/tests/phpunit/tests/formatting/sanitizeEmail.php new file mode 100644 index 0000000000000..5490374d0a5e7 --- /dev/null +++ b/tests/phpunit/tests/formatting/sanitizeEmail.php @@ -0,0 +1,105 @@ +assertSame( + $expected, + $sanitized, + 'Should have produced the known sanitized form of the email.' + ); + } else { + $this->assertSame( + $expected, + self::invalid_utf8_as_ascii( $sanitized ), + 'Should have produced the known sanitized form of the email.' + ); + } + } + + /** + * Data provider. + * + * @return array[] + */ + public function data_sanitized_email_pairs() { + return array( + 'shorter than 6 characters' => array( 'a@b', '' ), + 'contains no @' => array( 'ab', '' ), + 'just a TLD' => array( 'abc@com', '' ), + 'plain' => array( 'abc@example.com', 'abc@example.com' ), + 'invalid utf8 subdomain dropped' => array( "abc@sub.\x80.org", 'abc@sub.org' ), + 'all subdomains invalid utf8' => array( "abc@\x80.org", '' ), + ); + } + + /** + * Transforms invalid byte sequences in UTF-8 into representations of + * each byte value, according to the maximal subpart rule. + * + * Example: + * + * // For valid UTF-8 the output is the input. + * 'test' === invalid_utf8_as_ascii( 'test' ); + * + * // Invalid bytes are represented with their hex value. + * 'a(0x80)b' === invalid_utf8_as_ascii( "a\x80b" ); + * + * // Invalid byte sequences form maximal subparts. + * '(0xC2)(0xEF 0xBF)' === invalid_utf8_as_ascii( "\xC2\xEF\xBF" ); + * + * @param string $text + * @return string + */ + private static function invalid_utf8_as_ascii( string $text ): string { + $output = ''; + $at = 0; + $was_at = 0; + $end = strlen( $text ); + $invalid_bytes = 0; + + while ( $at < $end ) { + if ( 0 === _wp_scan_utf8( $text, $at, $invalid_bytes ) && 0 === $invalid_bytes ) { + break; + } + + if ( $at > $was_at ) { + $output .= substr( $text, $was_at, $at - $was_at ); + } + + if ( $invalid_bytes > 0 ) { + $output .= '('; + + for ( $i = 0; $i < $invalid_bytes; $i++ ) { + $space = $i > 0 ? ' ' : ''; + $as_hex = bin2hex( $text[ $at + $i ] ); + $output .= "{$space}0x{$as_hex}"; + } + + $output .= ')'; + } + + $at += $invalid_bytes; + $was_at = $at; + } + + return $output; + } +} diff --git a/tests/phpunit/tests/general/wpError.php b/tests/phpunit/tests/general/wpError.php index fee4233d6ab2d..cae5b2593f2cb 100644 --- a/tests/phpunit/tests/general/wpError.php +++ b/tests/phpunit/tests/general/wpError.php @@ -5,7 +5,6 @@ * @group general * @group errors * - * @covers WP_Error * @coversDefaultClass WP_Error */ class Tests_General_wpError extends WP_UnitTestCase { @@ -42,7 +41,6 @@ public function test_WP_Error_with_default_empty_parameters_should_add_no_errors /** * @covers ::__construct - * @covers ::get_error_code */ public function test_WP_Error_with_empty_code_should_add_no_code() { $this->assertSame( '', $this->wp_error->get_error_code() ); @@ -50,7 +48,6 @@ public function test_WP_Error_with_empty_code_should_add_no_code() { /** * @covers ::__construct - * @covers ::get_error_message */ public function test_WP_Error_with_empty_code_should_add_no_message() { $this->assertSame( '', $this->wp_error->get_error_message() ); @@ -65,7 +62,6 @@ public function test_WP_Error_with_empty_code_should_add_no_error_data() { /** * @covers ::__construct - * @covers ::get_error_code */ public function test_WP_Error_with_code_and_empty_message_should_add_error_with_that_code() { $wp_error = new WP_Error( 'code' ); @@ -75,7 +71,6 @@ public function test_WP_Error_with_code_and_empty_message_should_add_error_with_ /** * @covers ::__construct - * @covers ::get_error_message */ public function test_WP_Error_with_code_and_empty_message_should_add_error_with_that_code_and_empty_message() { $wp_error = new WP_Error( 'code' ); @@ -85,7 +80,6 @@ public function test_WP_Error_with_code_and_empty_message_should_add_error_with_ /** * @covers ::__construct - * @covers ::get_error_data */ public function test_WP_Error_with_code_and_empty_message_and_empty_data_should_add_error_but_not_associated_data() { $wp_error = new WP_Error( 'code' ); @@ -95,7 +89,6 @@ public function test_WP_Error_with_code_and_empty_message_and_empty_data_should_ /** * @covers ::__construct - * @covers ::get_error_data */ public function test_WP_Error_with_code_and_empty_message_and_non_empty_data_should_add_error_with_empty_message_and_that_stored_data() { $wp_error = new WP_Error( 'code', '', 'data' ); @@ -105,7 +98,6 @@ public function test_WP_Error_with_code_and_empty_message_and_non_empty_data_sho /** * @covers ::__construct - * @covers ::get_error_code */ public function test_WP_Error_with_code_and_message_should_add_error_with_that_code() { $wp_error = new WP_Error( 'code', 'message' ); @@ -115,7 +107,6 @@ public function test_WP_Error_with_code_and_message_should_add_error_with_that_c /** * @covers ::__construct - * @covers ::get_error_message */ public function test_WP_Error_with_code_and_message_should_add_error_with_that_message() { $wp_error = new WP_Error( 'code', 'message' ); @@ -125,7 +116,6 @@ public function test_WP_Error_with_code_and_message_should_add_error_with_that_m /** * @covers ::__construct - * @covers ::get_error_code */ public function test_WP_Error_with_code_and_message_and_data_should_add_error_with_that_code() { $wp_error = new WP_Error( 'code', 'message', 'data' ); @@ -135,7 +125,6 @@ public function test_WP_Error_with_code_and_message_and_data_should_add_error_wi /** * @covers ::__construct - * @covers ::get_error_message */ public function test_WP_Error_with_code_and_message_and_data_should_add_error_with_that_message() { $wp_error = new WP_Error( 'code', 'message', 'data' ); @@ -145,7 +134,6 @@ public function test_WP_Error_with_code_and_message_and_data_should_add_error_wi /** * @covers ::__construct - * @covers ::get_error_data */ public function test_WP_Error_with_code_and_message_and_data_should_add_error_with_that_data() { $wp_error = new WP_Error( 'code', 'message', 'data' ); @@ -154,7 +142,6 @@ public function test_WP_Error_with_code_and_message_and_data_should_add_error_wi } /** - * @covers ::__construct * @covers ::get_error_codes */ public function test_get_error_codes_with_no_errors_should_return_empty_array() { @@ -162,7 +149,6 @@ public function test_get_error_codes_with_no_errors_should_return_empty_array() } /** - * @covers ::add * @covers ::get_error_codes */ public function test_get_error_codes_with_one_error_should_return_an_array_with_only_that_code() { @@ -172,7 +158,6 @@ public function test_get_error_codes_with_one_error_should_return_an_array_with_ } /** - * @covers ::add * @covers ::get_error_codes */ public function test_get_error_codes_with_multiple_errors_should_return_an_array_of_those_codes() { @@ -185,7 +170,6 @@ public function test_get_error_codes_with_multiple_errors_should_return_an_array } /** - * @covers ::__construct * @covers ::get_error_code */ public function test_get_error_code_with_no_errors_should_return_an_empty_string() { @@ -193,7 +177,6 @@ public function test_get_error_code_with_no_errors_should_return_an_empty_string } /** - * @covers ::add * @covers ::get_error_code */ public function test_get_error_code_with_one_error_should_return_that_error_code() { @@ -203,7 +186,6 @@ public function test_get_error_code_with_one_error_should_return_that_error_code } /** - * @covers ::add * @covers ::get_error_code */ public function test_get_error_code_with_multiple_errors_should_return_only_the_first_error_code() { @@ -214,7 +196,6 @@ public function test_get_error_code_with_multiple_errors_should_return_only_the_ } /** - * @covers ::__construct * @covers ::get_error_messages */ public function test_get_error_messages_with_empty_code_and_no_errors_should_return_an_empty_array() { @@ -222,7 +203,6 @@ public function test_get_error_messages_with_empty_code_and_no_errors_should_ret } /** - * @covers ::add * @covers ::get_error_messages */ public function test_get_error_messages_with_empty_code_one_error_should_return_an_array_with_that_message() { @@ -232,7 +212,6 @@ public function test_get_error_messages_with_empty_code_one_error_should_return_ } /** - * @covers ::add * @covers ::get_error_messages */ public function test_get_error_messages_with_empty_code_multiple_errors_should_return_an_array_of_messages() { @@ -243,7 +222,6 @@ public function test_get_error_messages_with_empty_code_multiple_errors_should_r } /** - * @covers ::__construct * @covers ::get_error_messages */ public function test_get_error_messages_with_an_invalid_code_should_return_an_empty_array() { @@ -251,7 +229,6 @@ public function test_get_error_messages_with_an_invalid_code_should_return_an_em } /** - * @covers ::add * @covers ::get_error_messages */ public function test_get_error_messages_with_one_error_should_return_an_array_with_that_message() { @@ -261,7 +238,6 @@ public function test_get_error_messages_with_one_error_should_return_an_array_wi } /** - * @covers ::add * @covers ::get_error_messages */ public function test_get_error_messages_with_multiple_errors_same_code_should_return_an_array_with_all_messages() { @@ -272,7 +248,6 @@ public function test_get_error_messages_with_multiple_errors_same_code_should_re } /** - * @covers ::__construct * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_no_errors_should_return_an_empty_string() { @@ -280,7 +255,6 @@ public function test_get_error_message_with_empty_code_and_no_errors_should_retu } /** - * @covers ::add * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_one_error_should_return_that_message() { @@ -290,7 +264,6 @@ public function test_get_error_message_with_empty_code_and_one_error_should_retu } /** - * @covers ::add * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_multiple_errors_should_return_the_first_message() { @@ -301,7 +274,6 @@ public function test_get_error_message_with_empty_code_and_multiple_errors_shoul } /** - * @covers ::add * @covers ::get_error_message */ public function test_get_error_message_with_empty_code_and_multiple_errors_multiple_codes_should_return_the_first_message() { @@ -313,7 +285,6 @@ public function test_get_error_message_with_empty_code_and_multiple_errors_multi } /** - * @covers ::__construct * @covers ::get_error_message */ public function test_get_error_message_with_invalid_code_and_no_errors_should_return_empty_string() { @@ -321,7 +292,6 @@ public function test_get_error_message_with_invalid_code_and_no_errors_should_re } /** - * @covers ::add * @covers ::get_error_message */ public function test_get_error_message_with_invalid_code_and_one_error_should_return_an_empty_string() { @@ -331,7 +301,6 @@ public function test_get_error_message_with_invalid_code_and_one_error_should_re } /** - * @covers ::add * @covers ::get_error_message */ public function test_get_error_message_with_invalid_code_and_multiple_errors_should_return_an_empty_string() { @@ -342,7 +311,6 @@ public function test_get_error_message_with_invalid_code_and_multiple_errors_sho } /** - * @covers ::__construct * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_no_errors_should_evaluate_as_null() { @@ -350,7 +318,6 @@ public function test_get_error_data_with_empty_code_and_no_errors_should_evaluat } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_one_error_no_data_should_evaluate_as_null() { @@ -360,7 +327,6 @@ public function test_get_error_data_with_empty_code_one_error_no_data_should_eva } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_multiple_errors_no_data_should_evaluate_as_null() { @@ -371,7 +337,6 @@ public function test_get_error_data_with_empty_code_multiple_errors_no_data_shou } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_one_error_with_data_should_return_that_data() { @@ -382,7 +347,6 @@ public function test_get_error_data_with_empty_code_and_one_error_with_data_shou } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_multiple_errors_different_codes_should_return_the_last_data_of_the_first_code() { @@ -394,7 +358,6 @@ public function test_get_error_data_with_empty_code_and_multiple_errors_differen } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_empty_code_and_multiple_errors_same_code_should_return_the_last_data_of_the_first_code() { @@ -406,7 +369,6 @@ public function test_get_error_data_with_empty_code_and_multiple_errors_same_cod } /** - * @covers ::__construct * @covers ::get_error_data */ public function test_get_error_data_with_code_and_no_errors_should_evaluate_as_null() { @@ -414,7 +376,6 @@ public function test_get_error_data_with_code_and_no_errors_should_evaluate_as_n } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_null() { @@ -424,7 +385,6 @@ public function test_get_error_data_with_code_and_one_error_with_no_data_should_ } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_code_and_one_error_with_data_should_return_that_data() { @@ -435,7 +395,6 @@ public function test_get_error_data_with_code_and_one_error_with_data_should_ret } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_code_and_multiple_errors_different_codes_should_return_the_last_stored_data_of_the_code() { @@ -448,7 +407,6 @@ public function test_get_error_data_with_code_and_multiple_errors_different_code } /** - * @covers ::add * @covers ::get_error_data */ public function test_get_error_data_with_code_and_multiple_errors_same_code_should_return_the_last_stored_data() { @@ -460,7 +418,6 @@ public function test_get_error_data_with_code_and_multiple_errors_same_code_shou } /** - * @covers ::__construct * @covers ::get_all_error_data */ public function test_get_all_error_data_with_code_and_no_errors_should_evaluate_as_empty_array() { @@ -468,7 +425,6 @@ public function test_get_all_error_data_with_code_and_no_errors_should_evaluate_ } /** - * @covers ::add * @covers ::get_all_error_data */ public function test_get_all_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_empty_array() { @@ -478,7 +434,6 @@ public function test_get_all_error_data_with_code_and_one_error_with_no_data_sho } /** - * @covers ::add * @covers ::get_all_error_data */ public function test_get_all_error_data_with_code_and_one_error_with_data_should_return_that_data() { @@ -491,7 +446,6 @@ public function test_get_all_error_data_with_code_and_one_error_with_data_should } /** - * @covers ::add * @covers ::get_all_error_data */ public function test_get_all_error_data_with_code_and_multiple_errors_same_code_should_return_all_data() { @@ -503,7 +457,6 @@ public function test_get_all_error_data_with_code_and_multiple_errors_same_code_ } /** - * @covers ::add * @covers ::get_all_error_data */ public function test_get_all_error_data_should_handle_manipulation_of_error_data_property() { @@ -517,7 +470,6 @@ public function test_get_all_error_data_should_handle_manipulation_of_error_data } /** - * @covers ::__construct * @covers ::has_errors */ public function test_has_errors_with_no_errors_returns_false() { @@ -525,7 +477,6 @@ public function test_has_errors_with_no_errors_returns_false() { } /** - * @covers ::add * @covers ::has_errors */ public function test_has_errors_with_errors_returns_true() { @@ -571,7 +522,6 @@ public function test_add_with_empty_code_empty_message_non_empty_data_should_sto /** * @covers ::add - * @covers ::get_error_code */ public function test_add_with_code_empty_message_empty_data_should_add_error_with_code() { $this->wp_error->add( 'code', '' ); @@ -581,7 +531,6 @@ public function test_add_with_code_empty_message_empty_data_should_add_error_wit /** * @covers ::add - * @covers ::get_error_message */ public function test_add_with_code_empty_message_empty_data_should_add_error_with_empty_message() { $this->wp_error->add( 'code', '' ); @@ -591,7 +540,6 @@ public function test_add_with_code_empty_message_empty_data_should_add_error_wit /** * @covers ::add - * @covers ::get_error_data */ public function test_add_with_code_empty_message_empty_data_should_not_add_error_data() { $this->wp_error->add( 'code', '' ); @@ -601,7 +549,6 @@ public function test_add_with_code_empty_message_empty_data_should_not_add_error /** * @covers ::add - * @covers ::get_error_message */ public function test_add_with_code_and_message_and_empty_data_should_should_add_error_with_that_message() { $this->wp_error->add( 'code', 'message' ); @@ -611,7 +558,6 @@ public function test_add_with_code_and_message_and_empty_data_should_should_add_ /** * @covers ::add - * @covers ::get_error_data */ public function test_add_with_code_and_message_and_empty_data_should_not_alter_stored_data() { $this->wp_error->add( 'code', 'message' ); @@ -621,7 +567,6 @@ public function test_add_with_code_and_message_and_empty_data_should_not_alter_s /** * @covers ::add - * @covers ::get_error_code */ public function test_add_with_code_and_empty_message_and_data_should_add_error_with_that_code() { $this->wp_error->add( 'code', '', 'data' ); @@ -631,7 +576,6 @@ public function test_add_with_code_and_empty_message_and_data_should_add_error_w /** * @covers ::add - * @covers ::get_error_data */ public function test_add_with_code_and_empty_message_and_data_should_store_that_data() { $this->wp_error->add( 'code', '', 'data' ); @@ -641,7 +585,6 @@ public function test_add_with_code_and_empty_message_and_data_should_store_that_ /** * @covers ::add - * @covers ::get_error_code */ public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_code() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -651,7 +594,6 @@ public function test_add_with_code_and_message_and_data_should_add_an_error_with /** * @covers ::add - * @covers ::get_error_message */ public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_message() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -661,7 +603,6 @@ public function test_add_with_code_and_message_and_data_should_add_an_error_with /** * @covers ::add - * @covers ::get_error_data */ public function test_add_with_code_and_message_and_data_should_store_that_data() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -671,7 +612,6 @@ public function test_add_with_code_and_message_and_data_should_store_that_data() /** * @covers ::add - * @covers ::get_error_messages */ public function test_add_multiple_times_with_the_same_code_should_add_additional_messages_for_that_code() { $this->wp_error->add( 'code', 'message' ); @@ -684,7 +624,6 @@ public function test_add_multiple_times_with_the_same_code_should_add_additional /** * @covers ::add - * @covers ::get_error_data */ public function test_add_multiple_times_with_the_same_code_and_different_data_should_store_only_the_last_added_data() { $this->wp_error->add( 'code', 'message', 'data-bar' ); @@ -713,7 +652,6 @@ public function test_add_data_with_empty_data_empty_code_no_errors_should_create /** * @covers ::add_data - * @covers ::get_error_data */ public function test_add_data_with_data_empty_code_and_one_error_should_store_the_data_under_that_code() { $this->wp_error->add( 'code', 'message' ); @@ -724,7 +662,6 @@ public function test_add_data_with_data_empty_code_and_one_error_should_store_th /** * @covers ::add_data - * @covers ::get_error_data */ public function test_add_data_with_data_empty_code_and_multiple_errors_with_different_codes_should_store_it_under_the_first_code() { $this->wp_error->add( 'code', 'message' ); @@ -737,7 +674,6 @@ public function test_add_data_with_data_empty_code_and_multiple_errors_with_diff /** * @covers ::add_data - * @covers ::get_error_data */ public function test_add_data_with_data_empty_code_and_multiple_errors_with_same_code_should_store_it_under_the_first_code() { $this->wp_error->add( 'code', 'message' ); @@ -791,7 +727,6 @@ public function test_add_data_with_data_and_code_one_error_different_code_should /** * @covers ::add_data - * @covers ::get_error_data */ public function test_add_data_with_data_and_code_should_add_data() { $this->wp_error->add( 'code', 'message' ); @@ -868,8 +803,6 @@ public function test_remove_should_remove_the_error_with_the_given_code() { /** * @covers ::remove - * @covers ::get_error_data - * @covers ::get_all_error_data */ public function test_remove_should_remove_the_error_data_associated_with_the_given_code() { $this->wp_error->add( 'code', 'message', 'data' ); @@ -884,10 +817,6 @@ public function test_remove_should_remove_the_error_data_associated_with_the_giv /** * @covers ::merge_from - * @covers ::get_error_messages - * @covers ::get_error_data - * @covers ::get_all_error_data - * @covers ::get_error_message */ public function test_merge_from_should_copy_other_error_into_instance() { $this->wp_error->add( 'code1', 'message1', 'data1' ); @@ -904,7 +833,6 @@ public function test_merge_from_should_copy_other_error_into_instance() { /** * @covers ::merge_from - * @covers ::has_errors */ public function test_merge_from_with_no_errors_should_not_add_to_instance() { $other = new WP_Error(); @@ -916,10 +844,6 @@ public function test_merge_from_with_no_errors_should_not_add_to_instance() { /** * @covers ::export_to - * @covers ::get_error_messages - * @covers ::get_error_data - * @covers ::get_all_error_data - * @covers ::get_error_message */ public function test_export_to_should_copy_instance_into_other_error() { $other = new WP_Error(); @@ -938,7 +862,6 @@ public function test_export_to_should_copy_instance_into_other_error() { /** * @covers ::export_to - * @covers ::has_errors */ public function test_export_to_with_no_errors_should_not_add_to_other_error() { $other = new WP_Error(); diff --git a/tests/phpunit/tests/l10n/loadScriptTextdomain.php b/tests/phpunit/tests/l10n/loadScriptTextdomain.php index 7aedd92cc666c..b84527e1f1757 100644 --- a/tests/phpunit/tests/l10n/loadScriptTextdomain.php +++ b/tests/phpunit/tests/l10n/loadScriptTextdomain.php @@ -172,4 +172,102 @@ public function test_does_not_throw_deprecation_notice_for_rtrim_with_default_pa $expected = file_get_contents( DIR_TESTDATA . '/languages/en_US-813e104eb47e13dd4cc5af844c618754.json' ); $this->assertSame( $expected, load_script_textdomain( $handle ) ); } + + /** + * Tests that an unparseable script source URL short-circuits to + * `load_script_translations( false, ... )` instead of falling through + * to the relative-path computation. + * + * @ticket 65015 + */ + public function test_unparseable_src_returns_false(): void { + $handle = 'test-unparseable-src'; + $src = 'http:///example'; + + $this->assertFalse( wp_parse_url( $src ), 'Test prerequisite failed: the test src should be unparseable.' ); + + wp_enqueue_script( $handle, $src, array(), null ); + + $this->assertFalse( load_script_textdomain( $handle, 'default', DIR_TESTDATA . '/languages' ) ); + } + + /** + * Tests that an unparseable `content_url()` return value short-circuits + * to `load_script_translations( false, ... )` instead of computing + * `$relative` from a corrupted parsed-URL array. + * + * The `MockAction` spy on `pre_load_script_translations` is necessary + * here because the function's tail end also calls `load_script_translations( false, ... )`, + * so a regression that bypasses the early return would still return false + * via the fallback path. Asserting on the recorded `$file` arguments pins + * the test to the intended branch. + * + * @ticket 65015 + */ + public function test_unparseable_content_url_returns_false(): void { + $handle = 'test-unparseable-content-url'; + $src = '/wp-includes/js/script.js'; + + add_filter( + 'content_url', + static function () { + return 'http:///example'; + } + ); + + $mock = new MockAction(); + add_filter( 'pre_load_script_translations', array( $mock, 'filter' ), 10, 4 ); + + wp_enqueue_script( $handle, $src, array(), null ); + + $this->assertFalse( load_script_textdomain( $handle, 'default', DIR_TESTDATA . '/languages' ) ); + $this->assertSame( + array( + DIR_TESTDATA . '/languages/en_US-' . $handle . '.json', + false, + ), + array_column( $mock->get_args(), 1 ), + 'Expected the unparseable content_url branch to short-circuit before any relative-path lookup.' + ); + } + + /** + * Tests that the `load_script_textdomain_relative_path` filter returning + * a non-string, non-false value (e.g., a callback that forgets to return) + * short-circuits via the `! is_string( $relative )` guard rather than + * falling through to string functions like `str_ends_with()` and `md5()`. + * + * @ticket 65015 + */ + public function test_non_string_relative_path_filter_returns_false(): void { + $handle = 'test-non-string-relative-path'; + $src = '/wp-includes/js/script.js'; + + add_filter( 'load_script_textdomain_relative_path', '__return_null' ); + + wp_enqueue_script( $handle, $src, array(), null ); + + $this->assertFalse( load_script_textdomain( $handle, 'default', DIR_TESTDATA . '/languages' ) ); + } + + /** + * Tests that a script source URL with no path component does not trigger + * an undefined index warning when the path is read further down in the + * function. The result is reached via the regular fallback path + * (no host/path match) rather than an early return. + * + * @ticket 65015 + */ + public function test_src_without_path_component_does_not_warn(): void { + $handle = 'test-src-without-path'; + $src = 'https://example.com'; + + $parsed = wp_parse_url( $src ); + $this->assertIsArray( $parsed, 'Test prerequisite failed: the test src should parse.' ); + $this->assertArrayNotHasKey( 'path', $parsed, 'Test prerequisite failed: the test src should have no path component.' ); + + wp_enqueue_script( $handle, $src, array(), null ); + + $this->assertFalse( load_script_textdomain( $handle, 'default', DIR_TESTDATA . '/languages' ) ); + } } diff --git a/tests/phpunit/tests/link/getAdjacentPost.php b/tests/phpunit/tests/link/getAdjacentPost.php index 7fdd06ec75ead..e10ff82c099dc 100644 --- a/tests/phpunit/tests/link/getAdjacentPost.php +++ b/tests/phpunit/tests/link/getAdjacentPost.php @@ -477,14 +477,14 @@ public function test_get_adjacent_post_term_array_processing_order() { // Should find post_one (previous post that shares term1). $this->assertInstanceOf( WP_Post::class, $result ); - $this->assertEquals( $post1_id, $result->ID ); + $this->assertSame( $post1_id, $result->ID ); // Test next post. $result = get_adjacent_post( true, array( $term2_id ), false, 'wptests_tax' ); // Should find post_three (next post that shares term1). $this->assertInstanceOf( WP_Post::class, $result ); - $this->assertEquals( $post3_id, $result->ID ); + $this->assertSame( $post3_id, $result->ID ); } /** @@ -614,12 +614,12 @@ public function test_get_adjacent_post_with_identical_dates() { // Previous post should be the 2nd post (lower ID, same date). $previous = get_adjacent_post( false, '', true ); $this->assertInstanceOf( 'WP_Post', $previous ); - $this->assertEquals( $post_ids[1], $previous->ID ); + $this->assertSame( $post_ids[1], $previous->ID ); // Next post should be the 4th post (higher ID, same date). $next = get_adjacent_post( false, '', false ); $this->assertInstanceOf( 'WP_Post', $next ); - $this->assertEquals( $post_ids[3], $next->ID ); + $this->assertSame( $post_ids[3], $next->ID ); } /** @@ -661,12 +661,12 @@ public function test_get_adjacent_post_mixed_dates_with_identical_groups() { // Previous should be the early post (different date). $previous = get_adjacent_post( false, '', true ); $this->assertInstanceOf( 'WP_Post', $previous ); - $this->assertEquals( $post_early, $previous->ID ); + $this->assertSame( $post_early, $previous->ID ); // Next should be the second identical post (same date, higher ID). $next = get_adjacent_post( false, '', false ); $this->assertInstanceOf( 'WP_Post', $next ); - $this->assertEquals( $post_ids[1], $next->ID ); + $this->assertSame( $post_ids[1], $next->ID ); // Test from middle identical post. $this->go_to( get_permalink( $post_ids[1] ) ); @@ -674,12 +674,12 @@ public function test_get_adjacent_post_mixed_dates_with_identical_groups() { // Previous should be the first identical post (same date, lower ID). $previous = get_adjacent_post( false, '', true ); $this->assertInstanceOf( 'WP_Post', $previous ); - $this->assertEquals( $post_ids[0], $previous->ID ); + $this->assertSame( $post_ids[0], $previous->ID ); // Next should be the third identical post (same date, higher ID). $next = get_adjacent_post( false, '', false ); $this->assertInstanceOf( 'WP_Post', $next ); - $this->assertEquals( $post_ids[2], $next->ID ); + $this->assertSame( $post_ids[2], $next->ID ); // Test from last identical post. $this->go_to( get_permalink( $post_ids[2] ) ); @@ -687,12 +687,12 @@ public function test_get_adjacent_post_mixed_dates_with_identical_groups() { // Previous should be the second identical post (same date, lower ID). $previous = get_adjacent_post( false, '', true ); $this->assertInstanceOf( 'WP_Post', $previous ); - $this->assertEquals( $post_ids[1], $previous->ID ); + $this->assertSame( $post_ids[1], $previous->ID ); // Next should be the late post (different date). $next = get_adjacent_post( false, '', false ); $this->assertInstanceOf( 'WP_Post', $next ); - $this->assertEquals( $post_late, $next->ID ); + $this->assertSame( $post_late, $next->ID ); } /** @@ -719,26 +719,26 @@ public function test_get_adjacent_post_navigation_through_identical_dates() { // From post 1, next should be post 2. $next = get_adjacent_post( false, '', false ); - $this->assertEquals( $post_ids[1], $next->ID ); + $this->assertSame( $post_ids[1], $next->ID ); // From post 2, previous should be post 1, next should be post 3. $this->go_to( get_permalink( $post_ids[1] ) ); $previous = get_adjacent_post( false, '', true ); - $this->assertEquals( $post_ids[0], $previous->ID ); + $this->assertSame( $post_ids[0], $previous->ID ); $next = get_adjacent_post( false, '', false ); - $this->assertEquals( $post_ids[2], $next->ID ); + $this->assertSame( $post_ids[2], $next->ID ); // From post 3, previous should be post 2, next should be post 4. $this->go_to( get_permalink( $post_ids[2] ) ); $previous = get_adjacent_post( false, '', true ); - $this->assertEquals( $post_ids[1], $previous->ID ); + $this->assertSame( $post_ids[1], $previous->ID ); $next = get_adjacent_post( false, '', false ); - $this->assertEquals( $post_ids[3], $next->ID ); + $this->assertSame( $post_ids[3], $next->ID ); // From post 4, previous should be post 3. $this->go_to( get_permalink( $post_ids[3] ) ); $previous = get_adjacent_post( false, '', true ); - $this->assertEquals( $post_ids[2], $previous->ID ); + $this->assertSame( $post_ids[2], $previous->ID ); } /** @@ -777,6 +777,6 @@ public function test_get_adjacent_post_identical_dates_with_category() { $next = get_adjacent_post( true, '', false, 'category' ); $this->assertInstanceOf( 'WP_Post', $next ); - $this->assertEquals( $post_ids[3], $next->ID ); // Post 4 (in category) + $this->assertSame( $post_ids[3], $next->ID ); // Post 4 (in category) } } diff --git a/tests/phpunit/tests/multisite/getBlogDetails.php b/tests/phpunit/tests/multisite/getBlogDetails.php index 5a374d43dc69a..19a8520c2c887 100644 --- a/tests/phpunit/tests/multisite/getBlogDetails.php +++ b/tests/phpunit/tests/multisite/getBlogDetails.php @@ -5,6 +5,8 @@ * @group ms-required * @group ms-site * @group multisite + * + * @covers ::get_blog_details */ class Tests_Multisite_GetBlogDetails extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/multisite/isEmailAddressUnsafe.php b/tests/phpunit/tests/multisite/isEmailAddressUnsafe.php index 38d17d9ed0719..862086f0ebb85 100644 --- a/tests/phpunit/tests/multisite/isEmailAddressUnsafe.php +++ b/tests/phpunit/tests/multisite/isEmailAddressUnsafe.php @@ -3,6 +3,8 @@ /** * @group ms-required * @group multisite + * + * @covers ::is_email_address_unsafe */ class Tests_Multisite_IsEmailAddressUnsafe extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/multisite/isUploadSpaceAvailable.php b/tests/phpunit/tests/multisite/isUploadSpaceAvailable.php index 62c9dc6c97e31..57fee4056334c 100644 --- a/tests/phpunit/tests/multisite/isUploadSpaceAvailable.php +++ b/tests/phpunit/tests/multisite/isUploadSpaceAvailable.php @@ -8,6 +8,8 @@ * * @group ms-required * @group multisite + * + * @covers ::is_upload_space_available */ class Tests_Multisite_IsUploadSpaceAvailable extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/multisite/updateBlogDetails.php b/tests/phpunit/tests/multisite/updateBlogDetails.php index 8800e66818684..62c0f7b355cd7 100644 --- a/tests/phpunit/tests/multisite/updateBlogDetails.php +++ b/tests/phpunit/tests/multisite/updateBlogDetails.php @@ -4,6 +4,8 @@ * @group ms-required * @group ms-site * @group multisite + * + * @covers ::update_blog_details */ class Tests_Multisite_UpdateBlogDetails extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/multisite/updateBlogStatus.php b/tests/phpunit/tests/multisite/updateBlogStatus.php index 069eddd984abb..20cd90307fd34 100644 --- a/tests/phpunit/tests/multisite/updateBlogStatus.php +++ b/tests/phpunit/tests/multisite/updateBlogStatus.php @@ -4,6 +4,8 @@ * @group ms-required * @group ms-site * @group multisite + * + * @covers ::update_blog_status */ class Tests_Multisite_UpdateBlogStatus extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/oembed/WpEmbed.php b/tests/phpunit/tests/oembed/WpEmbed.php index c7b0649867d97..42d9c9e0f4ed9 100644 --- a/tests/phpunit/tests/oembed/WpEmbed.php +++ b/tests/phpunit/tests/oembed/WpEmbed.php @@ -2,8 +2,10 @@ /** * @group oembed + * + * @coversDefaultClass WP_Embed */ -class Tests_WP_Embed extends WP_UnitTestCase { +class Tests_oEmbed_WpEmbed extends WP_UnitTestCase { /** * @var WP_Embed */ @@ -22,11 +24,17 @@ public function _pre_oembed_result_callback() { return 'Embedded content'; } + /** + * @covers ::maybe_run_ajax_cache + */ public function test_maybe_run_ajax_cache_should_return_nothing_if_there_is_no_post() { $this->expectOutputString( '' ); $this->wp_embed->maybe_run_ajax_cache(); } + /** + * @covers ::maybe_run_ajax_cache + */ public function test_maybe_run_ajax_cache_should_return_nothing_if_there_is_no_message() { $GLOBALS['post'] = self::factory()->post->create_and_get( array( @@ -40,6 +48,9 @@ public function test_maybe_run_ajax_cache_should_return_nothing_if_there_is_no_m unset( $GLOBALS['post'] ); } + /** + * @covers ::maybe_run_ajax_cache + */ public function test_maybe_run_ajax_cache_should_return_javascript() { $GLOBALS['post'] = self::factory()->post->create_and_get( array( @@ -57,6 +68,9 @@ public function test_maybe_run_ajax_cache_should_return_javascript() { $this->assertStringContainsString( $url, $actual ); } + /** + * @covers ::wp_maybe_load_embeds + */ public function test_wp_maybe_load_embeds() { $this->assertSameSets( array( 10, 9999 ), array_keys( $GLOBALS['wp_embed']->handlers ) ); $this->assertSameSets( @@ -74,6 +88,9 @@ public function test_wp_maybe_load_embeds() { ); } + /** + * @covers ::wp_embed_register_handler + */ public function test_wp_embed_register_handler() { $handle = __FUNCTION__; $regex = '#https?://example\.com/embed/([^/]+)#i'; @@ -92,6 +109,9 @@ public function test_wp_embed_register_handler() { $this->assertContains( $expected, $actual ); } + /** + * @covers ::wp_embed_unregister_handler + */ public function test_wp_embed_unregister_handler() { $this->assertArrayHasKey( 'youtube_embed_url', $GLOBALS['wp_embed']->handlers[10] ); @@ -107,6 +127,8 @@ public function test_wp_embed_unregister_handler() { /** * @group external-http + * + * @covers ::autoembed */ public function test_autoembed_should_do_nothing_without_matching_handler() { $content = "\nhttp://example.com/embed/foo\n"; @@ -117,6 +139,8 @@ public function test_autoembed_should_do_nothing_without_matching_handler() { /** * @group external-http + * + * @covers ::autoembed */ public function test_autoembed_should_return_modified_content() { $handle = __FUNCTION__; @@ -133,6 +157,9 @@ public function test_autoembed_should_return_modified_content() { $this->assertSame( "\nEmbedded http://example.com/embed/foo\n", $actual ); } + /** + * @covers ::delete_oembed_caches + */ public function test_delete_oembed_caches() { $post_id = self::factory()->post->create(); @@ -146,6 +173,9 @@ public function test_delete_oembed_caches() { $this->assertSame( array(), get_post_meta( $post_id, '_oembed_baz' ) ); } + /** + * @covers ::cache_oembed + */ public function test_cache_oembed_invalid_post_type() { $post_id = self::factory()->post->create( array( 'post_type' => 'nav_menu_item' ) ); @@ -153,6 +183,9 @@ public function test_cache_oembed_invalid_post_type() { $this->assertNotSame( $post_id, $this->wp_embed->post_ID ); } + /** + * @covers ::cache_oembed + */ public function test_cache_oembed_empty_content() { $post_id = self::factory()->post->create( array( 'post_content' => '' ) ); @@ -160,6 +193,9 @@ public function test_cache_oembed_empty_content() { $this->assertNotSame( $post_id, $this->wp_embed->post_ID ); } + /** + * @covers ::cache_oembed + */ public function test_cache_oembed_for_post() { $url = 'https://example.com/'; $expected = 'Embedded content'; @@ -178,6 +214,9 @@ public function test_cache_oembed_for_post() { $this->assertNotEmpty( get_post_meta( $post_id, $cachekey_time, true ) ); } + /** + * @covers ::shortcode + */ public function test_shortcode_should_get_cached_data_from_post_meta_for_known_post() { global $post; @@ -205,6 +244,9 @@ public function test_shortcode_should_get_cached_data_from_post_meta_for_known_p $this->assertSame( $expected, $cached ); } + /** + * @covers ::shortcode + */ public function test_shortcode_should_get_cached_failure_from_post_meta_for_known_post() { global $post; @@ -239,6 +281,8 @@ public function test_shortcode_should_get_cached_failure_from_post_meta_for_know /** * @ticket 34115 + * + * @covers ::shortcode */ public function test_shortcode_should_cache_data_in_custom_post() { $url = 'https://example.com/'; @@ -265,6 +309,8 @@ public function test_shortcode_should_cache_data_in_custom_post() { /** * @ticket 34115 + * + * @covers ::shortcode */ public function test_shortcode_should_cache_failure_in_custom_post() { $url = 'https://example.com/'; @@ -293,6 +339,8 @@ public function test_shortcode_should_cache_failure_in_custom_post() { * Test that parsing an embed shortcode should cause oembed_cache to be updated. * * @ticket 42310 + * + * @covers ::shortcode */ public function test_shortcode_should_update_custom_post() { add_filter( 'oembed_ttl', '__return_zero' ); @@ -325,6 +373,8 @@ public function test_shortcode_should_update_custom_post() { /** * @group external-http + * + * @covers ::shortcode */ public function test_shortcode_should_get_url_from_src_attribute() { $url = 'http://example.com/embed/foo'; @@ -335,6 +385,8 @@ public function test_shortcode_should_get_url_from_src_attribute() { /** * @group external-http + * + * @covers ::shortcode */ public function test_shortcode_should_return_empty_string_for_missing_url() { $this->assertEmpty( $this->wp_embed->shortcode( array() ) ); @@ -342,6 +394,8 @@ public function test_shortcode_should_return_empty_string_for_missing_url() { /** * @group external-http + * + * @covers ::shortcode */ public function test_shortcode_should_make_link_for_unknown_url() { $url = 'http://example.com/embed/foo'; @@ -351,7 +405,7 @@ public function test_shortcode_should_make_link_for_unknown_url() { } /** - * @group external-http + * @covers ::run_shortcode */ public function test_run_shortcode_url_only() { $url = 'http://example.com/embed/foo'; @@ -359,6 +413,9 @@ public function test_run_shortcode_url_only() { $this->assertSame( '' . esc_html( $url ) . '', $actual ); } + /** + * @covers ::maybe_make_link + */ public function test_maybe_make_link() { $url = 'http://example.com/embed/foo'; $actual = $this->wp_embed->maybe_make_link( $url ); @@ -366,11 +423,17 @@ public function test_maybe_make_link() { $this->assertSame( '' . esc_html( $url ) . '', $actual ); } + /** + * @covers ::maybe_make_link + */ public function test_maybe_make_link_return_false_on_fail() { $this->wp_embed->return_false_on_fail = true; $this->assertFalse( $this->wp_embed->maybe_make_link( 'http://example.com/' ) ); } + /** + * @covers ::maybe_make_link + */ public function test_maybe_make_link_do_not_link_if_unknown() { $url = 'http://example.com/'; diff --git a/tests/phpunit/tests/oembed/getResponseData.php b/tests/phpunit/tests/oembed/getOembedResponseData.php similarity index 99% rename from tests/phpunit/tests/oembed/getResponseData.php rename to tests/phpunit/tests/oembed/getOembedResponseData.php index 09a0f3142b319..695c4f6c5f889 100644 --- a/tests/phpunit/tests/oembed/getResponseData.php +++ b/tests/phpunit/tests/oembed/getOembedResponseData.php @@ -2,9 +2,10 @@ /** * @group oembed + * * @covers ::get_oembed_response_data */ -class Tests_oEmbed_Response_Data extends WP_UnitTestCase { +class Tests_oEmbed_GetOembedResponseData extends WP_UnitTestCase { public function set_up() { parent::set_up(); diff --git a/tests/phpunit/tests/oembed/postEmbedUrl.php b/tests/phpunit/tests/oembed/getPostEmbedUrl.php similarity index 97% rename from tests/phpunit/tests/oembed/postEmbedUrl.php rename to tests/phpunit/tests/oembed/getPostEmbedUrl.php index ed674b8429c38..3f2cd23399126 100644 --- a/tests/phpunit/tests/oembed/postEmbedUrl.php +++ b/tests/phpunit/tests/oembed/getPostEmbedUrl.php @@ -2,8 +2,10 @@ /** * @group oembed + * + * @covers ::get_post_embed_url */ -class Tests_Post_Embed_URL extends WP_UnitTestCase { +class Tests_oEmbed_GetPostEmbedUrl extends WP_UnitTestCase { public function test_non_existent_post() { $embed_url = get_post_embed_url( 0 ); $this->assertFalse( $embed_url ); diff --git a/tests/phpunit/tests/oembed/filterTitleAttributes.php b/tests/phpunit/tests/oembed/wpFilterOembedIframeTitleAttributes.php similarity index 92% rename from tests/phpunit/tests/oembed/filterTitleAttributes.php rename to tests/phpunit/tests/oembed/wpFilterOembedIframeTitleAttributes.php index 29d22f838af79..83cc4b5f3ca38 100644 --- a/tests/phpunit/tests/oembed/filterTitleAttributes.php +++ b/tests/phpunit/tests/oembed/wpFilterOembedIframeTitleAttributes.php @@ -2,9 +2,21 @@ /** * @group oembed + * + * @covers ::wp_filter_oembed_iframe_title_attribute */ -class Tests_Filter_oEmbed_Iframe_Title_Attribute extends WP_UnitTestCase { - public function data_filter_oembed_iframe_title_attribute() { +class Tests_oEmbed_wpFilterOembedIframeTitleAttribute extends WP_UnitTestCase { + + /** + * @dataProvider data_oembed_iframe_title_attribute + */ + public function test_oembed_iframe_title_attribute( $html, $oembed_data, $url, $expected ) { + $actual = wp_filter_oembed_iframe_title_attribute( $html, (object) $oembed_data, $url ); + + $this->assertEqualHTML( $expected, $actual ); + } + + public function data_oembed_iframe_title_attribute() { return array( array( '

Foo

Bar', @@ -61,15 +73,6 @@ public function data_filter_oembed_iframe_title_attribute() { ); } - /** - * @dataProvider data_filter_oembed_iframe_title_attribute - */ - public function test_oembed_iframe_title_attribute( $html, $oembed_data, $url, $expected ) { - $actual = wp_filter_oembed_iframe_title_attribute( $html, (object) $oembed_data, $url ); - - $this->assertEqualHTML( $expected, $actual ); - } - public function test_filter_oembed_iframe_title_attribute() { add_filter( 'oembed_iframe_title_attribute', array( $this, '_filter_oembed_iframe_title_attribute' ) ); diff --git a/tests/phpunit/tests/oembed/filterResult.php b/tests/phpunit/tests/oembed/wpFilterOembedResult.php similarity index 98% rename from tests/phpunit/tests/oembed/filterResult.php rename to tests/phpunit/tests/oembed/wpFilterOembedResult.php index 10dbe0e4ea017..3649d7210b58a 100644 --- a/tests/phpunit/tests/oembed/filterResult.php +++ b/tests/phpunit/tests/oembed/wpFilterOembedResult.php @@ -2,8 +2,11 @@ /** * @group oembed + * + * @covers ::wp_filter_oembed_result */ -class Tests_Filter_oEmbed_Result extends WP_UnitTestCase { +class Tests_oEmbed_wpFilterOembedResult extends WP_UnitTestCase { + public function test_filter_oembed_result_trusted_malicious_iframe() { $html = '

'; @@ -154,6 +157,19 @@ public function test_filter_oembed_result_allowed_html() { $this->assertEqualHTML( '
', $actual ); } + /** + * @dataProvider data_wp_filter_pre_oembed_custom_result + */ + public function test_wp_filter_pre_oembed_custom_result( $html, $expected ) { + $data = (object) array( + 'type' => 'rich', + 'title' => 'Hola', + 'html' => $html, + ); + $actual = _wp_oembed_get_object()->data2html( $data, 'https://untrusted.localhost' ); + $this->assertEqualHTML( $expected, $actual ); + } + public function data_wp_filter_pre_oembed_custom_result() { return array( array( @@ -175,19 +191,6 @@ public function data_wp_filter_pre_oembed_custom_result() { ); } - /** - * @dataProvider data_wp_filter_pre_oembed_custom_result - */ - public function test_wp_filter_pre_oembed_custom_result( $html, $expected ) { - $data = (object) array( - 'type' => 'rich', - 'title' => 'Hola', - 'html' => $html, - ); - $actual = _wp_oembed_get_object()->data2html( $data, 'https://untrusted.localhost' ); - $this->assertEqualHTML( $expected, $actual ); - } - /** * @group feed */ diff --git a/tests/phpunit/tests/oembed/wpOembed.php b/tests/phpunit/tests/oembed/wpOembed.php index 76d733dbce2e0..bc10c2a10a7eb 100644 --- a/tests/phpunit/tests/oembed/wpOembed.php +++ b/tests/phpunit/tests/oembed/wpOembed.php @@ -2,8 +2,10 @@ /** * @group oembed + * + * @coversDefaultClass WP_oEmbed */ -class Tests_WP_oEmbed extends WP_UnitTestCase { +class Tests_oEmbed_wpOembed extends WP_UnitTestCase { /** * @var WP_oEmbed */ @@ -47,6 +49,9 @@ public function _filter_pre_oembed_result( $result ) { return $result ? $result : false; } + /** + * @covers ::get_html + */ public function test_wp_filter_pre_oembed_result_prevents_http_request_for_internal_permalinks() { $post_id = self::factory()->post->create(); $permalink = get_permalink( $post_id ); @@ -59,6 +64,9 @@ public function test_wp_filter_pre_oembed_result_prevents_http_request_for_inter $this->assertSame( $this->pre_oembed_result_filtered, $actual ); } + /** + * @covers ::get_html + */ public function test_wp_filter_pre_oembed_result_prevents_http_request_when_viewing_the_post() { $post_id = self::factory()->post->create(); $permalink = get_permalink( $post_id ); @@ -74,6 +82,9 @@ public function test_wp_filter_pre_oembed_result_prevents_http_request_when_view $this->assertSame( $this->pre_oembed_result_filtered, $actual ); } + /** + * @covers ::get_html + */ public function test_wp_filter_pre_oembed_result_non_existent_post() { $post_id = self::factory()->post->create(); $permalink = get_permalink( $post_id ); @@ -93,6 +104,8 @@ public function test_wp_filter_pre_oembed_result_non_existent_post() { * @ticket 40673 * @group multisite * @group ms-required + * + * @covers ::get_html */ public function test_wp_filter_pre_oembed_result_multisite_root_root() { $post_id = self::factory()->post->create(); @@ -110,6 +123,8 @@ public function test_wp_filter_pre_oembed_result_multisite_root_root() { * @ticket 40673 * @group multisite * @group ms-required + * + * @covers ::get_html */ public function test_wp_filter_pre_oembed_result_multisite_sub_samesub() { $user_id = self::$user_id; @@ -139,6 +154,8 @@ public function test_wp_filter_pre_oembed_result_multisite_sub_samesub() { * @ticket 40673 * @group multisite * @group ms-required + * + * @covers ::get_html */ public function test_wp_filter_pre_oembed_result_multisite_sub_othersub() { $user_id = self::$user_id; @@ -176,6 +193,8 @@ public function test_wp_filter_pre_oembed_result_multisite_sub_othersub() { * @ticket 40673 * @group multisite * @group ms-required + * + * @covers ::get_html */ public function test_wp_filter_pre_oembed_result_multisite_sub_main() { $post_id = self::factory()->post->create(); @@ -203,6 +222,8 @@ public function test_wp_filter_pre_oembed_result_multisite_sub_main() { * @ticket 40673 * @group multisite * @group ms-required + * + * @covers ::get_html */ public function test_wp_filter_pre_oembed_result_multisite_preserves_switched_state() { $user_id = self::$user_id; @@ -232,6 +253,8 @@ public function test_wp_filter_pre_oembed_result_multisite_preserves_switched_st * @ticket 40673 * @group multisite * @group ms-required + * + * @covers ::get_html */ public function test_wp_filter_pre_oembed_result_multisite_restores_state_if_no_post_is_found() { $current_blog_id = get_current_blog_id(); diff --git a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php index 986f620e97810..7815f8ced23c9 100644 --- a/tests/phpunit/tests/rest-api/rest-autosaves-controller.php +++ b/tests/phpunit/tests/rest-api/rest-autosaves-controller.php @@ -570,8 +570,6 @@ public function test_rest_autosave_published_post() { } public function test_rest_autosave_draft_post_same_author() { - add_filter( 'pre_option_wp_collaboration_enabled', '__return_zero' ); // Zero as false doesn't work for pre-flight options. - wp_set_current_user( self::$editor_id ); $post_data = array( @@ -746,8 +744,6 @@ public function test_get_item_sets_up_postdata() { } public function test_update_item_draft_page_with_parent() { - add_filter( 'pre_option_wp_collaboration_enabled', '__return_zero' ); // Zero as false doesn't work for pre-flight options. - wp_set_current_user( self::$editor_id ); $request = new WP_REST_Request( 'POST', '/wp/v2/pages/' . self::$child_draft_page_id . '/autosaves' ); $request->add_header( 'Content-Type', 'application/x-www-form-urlencoded' ); @@ -924,77 +920,4 @@ public static function data_head_request_with_specified_fields_returns_success_r 'get_items request' => array( '/wp/v2/posts/%d' ), ); } - - /** - * When real-time collaboration is enabled, autosaving a draft post by the - * same author should create a revision instead of updating the post directly. - */ - public function test_rest_autosave_draft_post_same_author_with_rtc() { - add_filter( 'pre_option_wp_collaboration_enabled', '__return_true' ); - - wp_set_current_user( self::$editor_id ); - - $post_data = array( - 'post_content' => 'Test post content', - 'post_title' => 'Test post title', - 'post_excerpt' => 'Test post excerpt', - ); - $post_id = wp_insert_post( $post_data ); - - $autosave_data = array( - 'id' => $post_id, - 'content' => 'Updated post \ content', - 'title' => 'Updated post title', - ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'Content-Type', 'application/json' ); - $request->set_body( wp_json_encode( $autosave_data ) ); - - $response = rest_get_server()->dispatch( $request ); - $new_data = $response->get_data(); - $post = get_post( $post_id ); - - // With RTC enabled, a revision is created instead of updating the post. - $this->assertNotSame( $post_id, $new_data['id'] ); - $this->assertSame( $post_id, $new_data['parent'] ); - - // The autosave revision should have the updated content. - $this->assertSame( $autosave_data['content'], $new_data['content']['raw'] ); - $this->assertSame( $autosave_data['title'], $new_data['title']['raw'] ); - - // The draft post should not be updated. - $this->assertSame( $post_data['post_content'], $post->post_content ); - $this->assertSame( $post_data['post_title'], $post->post_title ); - $this->assertSame( $post_data['post_excerpt'], $post->post_excerpt ); - - wp_delete_post( $post_id ); - } - - /** - * When real-time collaboration is enabled, autosaving a draft page with - * a parent should create a revision instead of updating the page directly. - */ - public function test_update_item_draft_page_with_parent_with_rtc() { - add_filter( 'pre_option_wp_collaboration_enabled', '__return_true' ); - - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'POST', '/wp/v2/pages/' . self::$child_draft_page_id . '/autosaves' ); - $request->add_header( 'Content-Type', 'application/x-www-form-urlencoded' ); - - $params = $this->set_post_data( - array( - 'id' => self::$child_draft_page_id, - 'author' => self::$editor_id, - ) - ); - - $request->set_body_params( $params ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - - // With RTC enabled, a revision is created instead of updating the page. - $this->assertNotSame( self::$child_draft_page_id, $data['id'] ); - $this->assertSame( self::$child_draft_page_id, $data['parent'] ); - } } diff --git a/tests/phpunit/tests/rest-api/rest-settings-controller.php b/tests/phpunit/tests/rest-api/rest-settings-controller.php index b83cef41d2cf3..e8f90b53f20f1 100644 --- a/tests/phpunit/tests/rest-api/rest-settings-controller.php +++ b/tests/phpunit/tests/rest-api/rest-settings-controller.php @@ -119,7 +119,6 @@ public function test_get_items() { 'default_ping_status', 'default_comment_status', 'site_icon', // Registered in wp-includes/blocks/site-logo.php - 'wp_collaboration_enabled', ); if ( ! is_multisite() ) { diff --git a/tests/phpunit/tests/rest-api/rest-sync-server.php b/tests/phpunit/tests/rest-api/rest-sync-server.php deleted file mode 100644 index 7ded16bd3b033..0000000000000 --- a/tests/phpunit/tests/rest-api/rest-sync-server.php +++ /dev/null @@ -1,1155 +0,0 @@ -user->create( array( 'role' => 'editor' ) ); - self::$subscriber_id = $factory->user->create( array( 'role' => 'subscriber' ) ); - self::$post_id = $factory->post->create( array( 'post_author' => self::$editor_id ) ); - self::$category_id = $factory->category->create(); - self::$tag_id = $factory->tag->create(); - self::$comment_id = $factory->comment->create( array( 'comment_post_ID' => self::$post_id ) ); - - // Enable option in setUpBeforeClass to ensure REST routes are registered. - update_option( 'wp_collaboration_enabled', 1 ); - } - - public static function wpTearDownAfterClass() { - self::delete_user( self::$editor_id ); - self::delete_user( self::$subscriber_id ); - delete_option( 'wp_collaboration_enabled' ); - wp_delete_post( self::$post_id, true ); - wp_delete_term( self::$category_id, 'category' ); - wp_delete_term( self::$tag_id, 'post_tag' ); - wp_delete_comment( self::$comment_id, true ); - } - - public function set_up() { - parent::set_up(); - - // Enable option for tests. - update_option( 'wp_collaboration_enabled', 1 ); - - // Reset storage post ID cache to ensure clean state after transaction rollback. - $reflection = new ReflectionProperty( 'WP_Sync_Post_Meta_Storage', 'storage_post_ids' ); - if ( PHP_VERSION_ID < 80100 ) { - $reflection->setAccessible( true ); - } - $reflection->setValue( null, array() ); - } - - /** - * Builds a room request array for the sync endpoint. - * - * @param string $room Room identifier. - * @param int $client_id Client ID. - * @param int $cursor Cursor value for the 'after' parameter. - * @param array $awareness Awareness state. - * @param array $updates Array of updates. - * @return array Room request data. - */ - private function build_room( $room, $client_id = 1, $cursor = 0, $awareness = array(), $updates = array() ) { - if ( empty( $awareness ) ) { - $awareness = array( 'user' => 'test' ); - } - - return array( - 'after' => $cursor, - 'awareness' => $awareness, - 'client_id' => $client_id, - 'room' => $room, - 'updates' => $updates, - ); - } - - /** - * Dispatches a sync request with the given rooms. - * - * @param array $rooms Array of room request data. - * @return WP_REST_Response Response object. - */ - private function dispatch_sync( $rooms ) { - $request = new WP_REST_Request( 'POST', '/wp-sync/v1/updates' ); - $request->set_body_params( array( 'rooms' => $rooms ) ); - return rest_get_server()->dispatch( $request ); - } - - /** - * Returns the default room identifier for the test post. - * - * @return string Room identifier. - */ - private function get_post_room() { - return 'postType/post:' . self::$post_id; - } - - /* - * Required abstract method implementations. - * - * The sync endpoint is a single POST endpoint, not a standard CRUD controller. - * Methods that don't apply are stubbed with @doesNotPerformAssertions. - */ - - public function test_register_routes() { - $routes = rest_get_server()->get_routes(); - $this->assertArrayHasKey( '/wp-sync/v1/updates', $routes ); - } - - /** - * Verifies the sync route is registered when relying on the option's default - * value (option not stored in the database). - * - * This covers the upgrade scenario where a site has never explicitly saved - * the collaboration setting. - * - * @ticket 64814 - */ - public function test_register_routes_with_default_option() { - global $wp_rest_server; - - // Ensure the option is not in the database. - delete_option( 'wp_collaboration_enabled' ); - - // Reset the REST server so routes are re-registered from scratch. - $wp_rest_server = null; - - $routes = rest_get_server()->get_routes(); - $this->assertArrayNotHasKey( '/wp-sync/v1/updates', $routes ); - } - - /** - * @doesNotPerformAssertions - */ - public function test_context_param() { - // Not applicable for sync endpoint. - } - - /** - * @doesNotPerformAssertions - */ - public function test_get_items() { - // Not applicable for sync endpoint. - } - - /** - * @doesNotPerformAssertions - */ - public function test_get_item() { - // Not applicable for sync endpoint. - } - - public function test_create_item() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - /** - * @doesNotPerformAssertions - */ - public function test_update_item() { - // Not applicable for sync endpoint. - } - - /** - * @doesNotPerformAssertions - */ - public function test_delete_item() { - // Not applicable for sync endpoint. - } - - /** - * @doesNotPerformAssertions - */ - public function test_prepare_item() { - // Not applicable for sync endpoint. - } - - /** - * @doesNotPerformAssertions - */ - public function test_get_item_schema() { - // Not applicable for sync endpoint. - } - - /* - * Permission tests. - */ - - public function test_sync_requires_authentication() { - wp_set_current_user( 0 ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 401 ); - } - - public function test_sync_post_requires_edit_capability() { - wp_set_current_user( self::$subscriber_id ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - public function test_sync_post_allowed_with_edit_capability() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - public function test_sync_post_type_collection_requires_edit_posts_capability() { - wp_set_current_user( self::$subscriber_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'postType/post' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - public function test_sync_post_type_collection_allowed_with_edit_posts_capability() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'postType/post' ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - public function test_sync_root_collection_allowed() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'root/site' ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - public function test_sync_taxonomy_collection_allowed() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'taxonomy/category' ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - public function test_sync_unknown_collection_kind_rejected() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'unknown/entity' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - public function test_sync_non_posttype_entity_with_object_id_rejected() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'root/site:123' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - public function test_sync_nonexistent_post_rejected() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'postType/post:999999' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - public function test_sync_permission_checked_per_room() { - wp_set_current_user( self::$editor_id ); - - // First room is allowed, second room is forbidden. - $response = $this->dispatch_sync( - array( - $this->build_room( $this->get_post_room() ), - $this->build_room( 'unknown/entity' ), - ) - ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_malformed_object_id_rejected() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'postType/post:1abc' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_zero_object_id_rejected(): void { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'postType/post:0' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_post_type_mismatch_rejected(): void { - wp_set_current_user( self::$editor_id ); - - // The test post is of type 'post', not 'page'. - $response = $this->dispatch_sync( array( $this->build_room( 'postType/page:' . self::$post_id ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_taxonomy_term_allowed(): void { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'taxonomy/category:' . self::$category_id ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - /** - * @ticket 64890 - */ - public function test_sync_nonexistent_taxonomy_term_rejected(): void { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'taxonomy/category:999999' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_taxonomy_term_wrong_taxonomy_rejected(): void { - wp_set_current_user( self::$editor_id ); - - // The tag term exists in 'post_tag', not 'category'. - $response = $this->dispatch_sync( array( $this->build_room( 'taxonomy/category:' . self::$tag_id ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_comment_allowed(): void { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'root/comment:' . self::$comment_id ) ) ); - - $this->assertSame( 200, $response->get_status() ); - } - - /** - * @ticket 64890 - */ - public function test_sync_nonexistent_comment_rejected(): void { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'root/comment:999999' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /** - * @ticket 64890 - */ - public function test_sync_nonexistent_post_type_collection_rejected(): void { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( 'postType/nonexistent_type' ) ) ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /* - * Validation tests. - */ - - public function test_sync_invalid_room_format_rejected() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( - array( - $this->build_room( 'invalid-room-format' ), - ) - ); - - $this->assertSame( 400, $response->get_status() ); - } - - /** - * Verifies that schema type validation rejects a non-string value for the - * update 'data' field, confirming that per-arg schema validation still runs - * with a route-level validate_callback registered. - * - * @ticket 64890 - */ - public function test_sync_rejects_non_string_update_data(): void { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp-sync/v1/updates' ); - $request->set_body_params( - array( - 'rooms' => array( - array( - 'after' => 0, - 'awareness' => array( 'user' => 'test' ), - 'client_id' => 1, - 'room' => $this->get_post_room(), - 'updates' => array( - array( - 'data' => 12345, - 'type' => 'update', - ), - ), - ), - ), - ) - ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); - } - - /** - * Verifies that schema enum validation rejects an invalid update type, - * confirming that per-arg schema validation still runs with a route-level - * validate_callback registered. - * - * @ticket 64890 - */ - public function test_sync_rejects_invalid_update_type_enum(): void { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp-sync/v1/updates' ); - $request->set_body_params( - array( - 'rooms' => array( - array( - 'after' => 0, - 'awareness' => array( 'user' => 'test' ), - 'client_id' => 1, - 'room' => $this->get_post_room(), - 'updates' => array( - array( - 'data' => 'dGVzdA==', - 'type' => 'invalid_type', - ), - ), - ), - ), - ) - ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); - } - - /** - * Verifies that schema required-field validation rejects a room missing - * the 'client_id' field, confirming that per-arg schema validation still - * runs with a route-level validate_callback registered. - * - * @ticket 64890 - */ - public function test_sync_rejects_missing_required_room_field(): void { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp-sync/v1/updates' ); - $request->set_body_params( - array( - 'rooms' => array( - array( - 'after' => 0, - 'awareness' => array( 'user' => 'test' ), - // 'client_id' deliberately omitted. - 'room' => $this->get_post_room(), - 'updates' => array(), - ), - ), - ) - ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); - } - - /** - * Verifies that the maxItems constraint rejects a request with more rooms - * than MAX_ROOMS_PER_REQUEST. - * - * @ticket 64890 - */ - public function test_sync_rejects_rooms_exceeding_max_items(): void { - wp_set_current_user( self::$editor_id ); - - $rooms = array(); - for ( $i = 0; $i < WP_HTTP_Polling_Sync_Server::MAX_ROOMS_PER_REQUEST + 1; $i++ ) { - $rooms[] = $this->build_room( 'root/site', $i + 1 ); - } - - $response = $this->dispatch_sync( $rooms ); - $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); - } - - /** - * Verifies that the maxLength constraint rejects update data exceeding - * MAX_UPDATE_DATA_SIZE. - * - * @ticket 64890 - */ - public function test_sync_rejects_update_data_exceeding_max_length(): void { - wp_set_current_user( self::$editor_id ); - - $oversized_data = str_repeat( 'a', WP_HTTP_Polling_Sync_Server::MAX_UPDATE_DATA_SIZE + 1 ); - - $request = new WP_REST_Request( 'POST', '/wp-sync/v1/updates' ); - $request->set_body_params( - array( - 'rooms' => array( - array( - 'after' => 0, - 'awareness' => array( 'user' => 'test' ), - 'client_id' => 1, - 'room' => $this->get_post_room(), - 'updates' => array( - array( - 'data' => $oversized_data, - 'type' => 'update', - ), - ), - ), - ), - ) - ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); - } - - /** - * Verifies that the route-level validate_callback rejects a request body - * exceeding MAX_BODY_SIZE. - * - * @ticket 64890 - */ - public function test_sync_rejects_oversized_request_body(): void { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp-sync/v1/updates' ); - - // Set valid parsed params so per-arg schema validation passes first. - $request->set_body_params( - array( - 'rooms' => array( - $this->build_room( $this->get_post_room() ), - ), - ) - ); - - // Set an oversized raw body to trigger the route-level validate_callback. - $request->set_body( str_repeat( 'x', WP_HTTP_Polling_Sync_Server::MAX_BODY_SIZE + 1 ) ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_sync_body_too_large', $response, 413 ); - } - - /* - * Response format tests. - */ - - public function test_sync_response_structure() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $this->assertSame( 200, $response->get_status() ); - - $data = $response->get_data(); - $this->assertArrayHasKey( 'rooms', $data ); - $this->assertCount( 1, $data['rooms'] ); - - $room_data = $data['rooms'][0]; - $this->assertArrayHasKey( 'room', $room_data ); - $this->assertArrayHasKey( 'awareness', $room_data ); - $this->assertArrayHasKey( 'updates', $room_data ); - $this->assertArrayHasKey( 'end_cursor', $room_data ); - $this->assertArrayHasKey( 'total_updates', $room_data ); - $this->assertArrayHasKey( 'should_compact', $room_data ); - } - - public function test_sync_response_room_matches_request() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $response = $this->dispatch_sync( array( $this->build_room( $room ) ) ); - - $data = $response->get_data(); - $this->assertSame( $room, $data['rooms'][0]['room'] ); - } - - public function test_sync_end_cursor_is_positive_integer() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $data = $response->get_data(); - $this->assertIsInt( $data['rooms'][0]['end_cursor'] ); - $this->assertGreaterThanOrEqual( 0, $data['rooms'][0]['end_cursor'] ); - } - - public function test_sync_empty_updates_returns_zero_total() { - wp_set_current_user( self::$editor_id ); - - $response = $this->dispatch_sync( array( $this->build_room( $this->get_post_room() ) ) ); - - $data = $response->get_data(); - $this->assertSame( 0, $data['rooms'][0]['total_updates'] ); - $this->assertEmpty( $data['rooms'][0]['updates'] ); - } - - /* - * Update tests. - */ - - public function test_sync_update_delivered_to_other_client() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'update', - 'data' => 'dGVzdCBkYXRh', - ); - - // Client 1 sends an update. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'client1' ), array( $update ) ), - ) - ); - - // Client 2 requests updates from the beginning. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0 ), - ) - ); - - $data = $response->get_data(); - $updates = $data['rooms'][0]['updates']; - - $this->assertNotEmpty( $updates ); - - $types = wp_list_pluck( $updates, 'type' ); - $this->assertContains( 'update', $types ); - } - - public function test_sync_own_updates_not_returned() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'update', - 'data' => 'b3duIGRhdGE=', - ); - - // Client 1 sends an update. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'client1' ), array( $update ) ), - ) - ); - - $data = $response->get_data(); - $updates = $data['rooms'][0]['updates']; - - // Client 1 should not see its own non-compaction update. - $this->assertEmpty( $updates ); - } - - public function test_sync_step1_update_stored_and_returned() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'sync_step1', - 'data' => 'c3RlcDE=', - ); - - // Client 1 sends sync_step1. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'client1' ), array( $update ) ), - ) - ); - - // Client 2 should see the sync_step1 update. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0 ), - ) - ); - - $data = $response->get_data(); - $types = wp_list_pluck( $data['rooms'][0]['updates'], 'type' ); - $this->assertContains( 'sync_step1', $types ); - } - - public function test_sync_step2_update_stored_and_returned() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'sync_step2', - 'data' => 'c3RlcDI=', - ); - - // Client 1 sends sync_step2. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'client1' ), array( $update ) ), - ) - ); - - // Client 2 should see the sync_step2 update. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0 ), - ) - ); - - $data = $response->get_data(); - $types = wp_list_pluck( $data['rooms'][0]['updates'], 'type' ); - $this->assertContains( 'sync_step2', $types ); - } - - public function test_sync_multiple_updates_in_single_request() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $updates = array( - array( - 'type' => 'sync_step1', - 'data' => 'c3RlcDE=', - ), - array( - 'type' => 'update', - 'data' => 'dXBkYXRl', - ), - ); - - // Client 1 sends multiple updates. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'client1' ), $updates ), - ) - ); - - // Client 2 should see both updates. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0 ), - ) - ); - - $data = $response->get_data(); - $room_updates = $data['rooms'][0]['updates']; - - $this->assertCount( 2, $room_updates ); - $this->assertSame( 2, $data['rooms'][0]['total_updates'] ); - } - - public function test_sync_update_data_preserved() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'update', - 'data' => 'cHJlc2VydmVkIGRhdGE=', - ); - - // Client 1 sends an update. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'client1' ), array( $update ) ), - ) - ); - - // Client 2 should receive the exact same data. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0 ), - ) - ); - - $data = $response->get_data(); - $room_updates = $data['rooms'][0]['updates']; - - $this->assertSame( 'cHJlc2VydmVkIGRhdGE=', $room_updates[0]['data'] ); - $this->assertSame( 'update', $room_updates[0]['type'] ); - } - - public function test_sync_total_updates_increments() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'update', - 'data' => 'dGVzdA==', - ); - - // Send three updates from different clients. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'c1' ), array( $update ) ), - ) - ); - $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0, array( 'user' => 'c2' ), array( $update ) ), - ) - ); - $this->dispatch_sync( - array( - $this->build_room( $room, 3, 0, array( 'user' => 'c3' ), array( $update ) ), - ) - ); - - // Any client should see total_updates = 3. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 4, 0 ), - ) - ); - - $data = $response->get_data(); - $this->assertSame( 3, $data['rooms'][0]['total_updates'] ); - } - - /* - * Compaction tests. - */ - - public function test_sync_should_compact_is_false_below_threshold() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'update', - 'data' => 'dGVzdA==', - ); - - // Client 1 sends a single update. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'c1' ), array( $update ) ), - ) - ); - - $data = $response->get_data(); - $this->assertFalse( $data['rooms'][0]['should_compact'] ); - } - - public function test_sync_should_compact_is_true_above_threshold_for_compactor() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $updates = array(); - for ( $i = 0; $i < 51; $i++ ) { - $updates[] = array( - 'type' => 'update', - 'data' => base64_encode( "update-$i" ), - ); - } - - // Client 1 sends enough updates to exceed the compaction threshold. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'c1' ), $updates ), - ) - ); - - // Client 1 polls again. It is the lowest (only) client, so it is the compactor. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'c1' ) ), - ) - ); - - $data = $response->get_data(); - $this->assertTrue( $data['rooms'][0]['should_compact'] ); - } - - public function test_sync_should_compact_is_false_for_non_compactor() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $updates = array(); - for ( $i = 0; $i < 51; $i++ ) { - $updates[] = array( - 'type' => 'update', - 'data' => base64_encode( "update-$i" ), - ); - } - - // Client 1 sends enough updates to exceed the compaction threshold. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'c1' ), $updates ), - ) - ); - - // Client 2 (higher ID than client 1) should not be the compactor. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0, array( 'user' => 'c2' ) ), - ) - ); - - $data = $response->get_data(); - $this->assertFalse( $data['rooms'][0]['should_compact'] ); - } - - public function test_sync_stale_compaction_succeeds_when_newer_compaction_exists() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - $update = array( - 'type' => 'update', - 'data' => 'dGVzdA==', - ); - - // Client 1 sends an update to seed the room. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'user' => 'c1' ), array( $update ) ), - ) - ); - - $end_cursor = $response->get_data()['rooms'][0]['end_cursor']; - - // Client 2 sends a compaction at the current cursor. - $compaction = array( - 'type' => 'compaction', - 'data' => 'Y29tcGFjdGVk', - ); - - $this->dispatch_sync( - array( - $this->build_room( $room, 2, $end_cursor, array( 'user' => 'c2' ), array( $compaction ) ), - ) - ); - - // Client 3 sends a stale compaction at cursor 0. The server should find - // client 2's compaction in the updates after cursor 0 and silently discard - // this one. - $stale_compaction = array( - 'type' => 'compaction', - 'data' => 'c3RhbGU=', - ); - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 3, 0, array( 'user' => 'c3' ), array( $stale_compaction ) ), - ) - ); - - $this->assertSame( 200, $response->get_status() ); - - // Verify the newer compaction is preserved and the stale one was not stored. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 4, 0, array( 'user' => 'c4' ) ), - ) - ); - $update_data = wp_list_pluck( $response->get_data()['rooms'][0]['updates'], 'data' ); - - $this->assertContains( 'Y29tcGFjdGVk', $update_data, 'The newer compaction should be preserved.' ); - $this->assertNotContains( 'c3RhbGU=', $update_data, 'The stale compaction should not be stored.' ); - } - - /* - * Awareness tests. - */ - - public function test_sync_awareness_returned() { - wp_set_current_user( self::$editor_id ); - - $awareness = array( 'name' => 'Editor' ); - $response = $this->dispatch_sync( - array( - $this->build_room( $this->get_post_room(), 1, 0, $awareness ), - ) - ); - - $data = $response->get_data(); - $this->assertArrayHasKey( 1, $data['rooms'][0]['awareness'] ); - $this->assertSame( $awareness, $data['rooms'][0]['awareness'][1] ); - } - - public function test_sync_awareness_shows_multiple_clients() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - - // Client 1 connects. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'name' => 'Client 1' ) ), - ) - ); - - // Client 2 connects. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 2, 0, array( 'name' => 'Client 2' ) ), - ) - ); - - $data = $response->get_data(); - $awareness = $data['rooms'][0]['awareness']; - - $this->assertArrayHasKey( 1, $awareness ); - $this->assertArrayHasKey( 2, $awareness ); - $this->assertSame( array( 'name' => 'Client 1' ), $awareness[1] ); - $this->assertSame( array( 'name' => 'Client 2' ), $awareness[2] ); - } - - public function test_sync_awareness_updates_existing_client() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - - // Client 1 connects with initial awareness. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'cursor' => 'start' ) ), - ) - ); - - // Client 1 updates its awareness. - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'cursor' => 'updated' ) ), - ) - ); - - $data = $response->get_data(); - $awareness = $data['rooms'][0]['awareness']; - - // Should have exactly one entry for client 1 with updated state. - $this->assertCount( 1, $awareness ); - $this->assertSame( array( 'cursor' => 'updated' ), $awareness[1] ); - } - - public function test_sync_awareness_client_id_cannot_be_used_by_another_user() { - wp_set_current_user( self::$editor_id ); - - $room = $this->get_post_room(); - - // Editor establishes awareness with client_id 1. - $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'name' => 'Editor' ) ), - ) - ); - - // A different user tries to use the same client_id. - $editor_id_2 = self::factory()->user->create( array( 'role' => 'editor' ) ); - wp_set_current_user( $editor_id_2 ); - - $response = $this->dispatch_sync( - array( - $this->build_room( $room, 1, 0, array( 'name' => 'Impostor' ) ), - ) - ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - /* - * Multiple rooms tests. - */ - - public function test_sync_multiple_rooms_in_single_request() { - wp_set_current_user( self::$editor_id ); - - $room1 = $this->get_post_room(); - $room2 = 'taxonomy/category'; - - $response = $this->dispatch_sync( - array( - $this->build_room( $room1 ), - $this->build_room( $room2 ), - ) - ); - - $this->assertSame( 200, $response->get_status() ); - - $data = $response->get_data(); - $this->assertCount( 2, $data['rooms'] ); - $this->assertSame( $room1, $data['rooms'][0]['room'] ); - $this->assertSame( $room2, $data['rooms'][1]['room'] ); - } - - public function test_sync_rooms_are_isolated() { - wp_set_current_user( self::$editor_id ); - - $post_id_2 = self::factory()->post->create( array( 'post_author' => self::$editor_id ) ); - $room1 = $this->get_post_room(); - $room2 = 'postType/post:' . $post_id_2; - - $update = array( - 'type' => 'update', - 'data' => 'cm9vbTEgb25seQ==', - ); - - // Client 1 sends an update to room 1 only. - $this->dispatch_sync( - array( - $this->build_room( $room1, 1, 0, array( 'user' => 'client1' ), array( $update ) ), - ) - ); - - // Client 2 queries both rooms. - $response = $this->dispatch_sync( - array( - $this->build_room( $room1, 2, 0 ), - $this->build_room( $room2, 2, 0 ), - ) - ); - - $data = $response->get_data(); - - // Room 1 should have the update. - $this->assertNotEmpty( $data['rooms'][0]['updates'] ); - - // Room 2 should have no updates. - $this->assertEmpty( $data['rooms'][1]['updates'] ); - } -} diff --git a/tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php b/tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php index 9ee564ef00069..d73a2c64177fc 100644 --- a/tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php +++ b/tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php @@ -776,4 +776,244 @@ public function test_filter_by_nonexistent_category(): void { $this->assertIsArray( $data ); $this->assertEmpty( $data, 'Should return empty array for non-existent category' ); } + + /** + * Test that WordPress-internal schema keywords are stripped from ability schemas in REST response. + * + * @ticket 65035 + */ + public function test_internal_schema_keywords_stripped_from_response(): void { + $this->register_test_ability( + 'test/with-internal-keywords', + array( + 'label' => 'Test Internal Keywords', + 'description' => 'Tests stripping of internal schema keywords', + 'category' => 'general', + 'input_schema' => array( + 'type' => 'object', + 'properties' => array( + 'content' => array( + 'type' => 'string', + 'description' => 'The content value.', + 'sanitize_callback' => 'sanitize_text_field', + 'validate_callback' => 'is_string', + 'arg_options' => array( 'sanitize_callback' => 'wp_kses_post' ), + ), + ), + ), + 'output_schema' => array( + 'type' => 'string', + 'sanitize_callback' => 'sanitize_text_field', + ), + 'execute_callback' => static function ( $input ) { + return $input['content']; + }, + 'permission_callback' => '__return_true', + 'meta' => array( 'show_in_rest' => true ), + ) + ); + + $request = new WP_REST_Request( 'GET', '/wp-abilities/v1/abilities/test/with-internal-keywords' ); + $response = $this->server->dispatch( $request ); + + $this->assertSame( 200, $response->get_status() ); + + $data = $response->get_data(); + $this->assertArrayHasKey( 'input_schema', $data ); + $this->assertArrayHasKey( 'properties', $data['input_schema'] ); + $this->assertArrayHasKey( 'content', $data['input_schema']['properties'] ); + $this->assertArrayHasKey( 'output_schema', $data ); + + // Verify internal keywords are stripped from input_schema properties. + $content_schema = $data['input_schema']['properties']['content']; + $this->assertArrayNotHasKey( 'sanitize_callback', $content_schema ); + $this->assertArrayNotHasKey( 'validate_callback', $content_schema ); + $this->assertArrayNotHasKey( 'arg_options', $content_schema ); + + // Verify valid JSON Schema keywords are preserved. + $this->assertSame( 'string', $content_schema['type'] ); + $this->assertSame( 'The content value.', $content_schema['description'] ); + + // Verify internal keywords are stripped from output_schema. + $this->assertArrayNotHasKey( 'sanitize_callback', $data['output_schema'] ); + $this->assertSame( 'string', $data['output_schema']['type'] ); + } + + /** + * Test that internal schema keywords are stripped from nested sub-schema locations. + * + * @ticket 64098 + */ + public function test_internal_schema_keywords_stripped_from_nested_sub_schemas(): void { + $this->register_test_ability( + 'test/nested-internal-keywords', + array( + 'label' => 'Test Nested Keywords', + 'description' => 'Tests stripping from all sub-schema locations', + 'category' => 'general', + 'input_schema' => array( + 'type' => 'object', + 'anyOf' => array( + array( + 'type' => 'object', + 'sanitize_callback' => 'sanitize_text_field', + 'properties' => array( + 'value' => array( + 'type' => 'string', + 'validate_callback' => 'is_string', + ), + ), + ), + array( + 'type' => 'number', + 'arg_options' => array( 'sanitize_callback' => 'absint' ), + ), + ), + 'oneOf' => array( + array( + 'type' => 'string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + 'allOf' => array( + array( + 'type' => 'object', + 'validate_callback' => 'rest_validate_request_arg', + ), + ), + 'not' => array( + 'type' => 'null', + 'arg_options' => array( 'sanitize_callback' => 'absint' ), + ), + 'patternProperties' => array( + '^S_' => array( + 'type' => 'string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + 'definitions' => array( + 'address' => array( + 'type' => 'object', + 'validate_callback' => 'rest_validate_request_arg', + 'properties' => array( + 'street' => array( + 'type' => 'string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + ), + ), + 'dependencies' => array( + 'bar' => array( + 'type' => 'object', + 'validate_callback' => 'rest_validate_request_arg', + 'properties' => array( + 'baz' => array( + 'type' => 'string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + ), + 'qux' => array( 'bar' ), + ), + 'additionalProperties' => array( + 'type' => 'string', + 'sanitize_callback' => 'sanitize_text_field', + ), + ), + 'output_schema' => array( + 'type' => 'array', + 'items' => array( + array( + 'type' => 'string', + 'validate_callback' => 'is_string', + ), + array( + 'type' => 'number', + 'arg_options' => array( 'sanitize_callback' => 'absint' ), + ), + ), + 'additionalItems' => array( + 'type' => 'boolean', + 'sanitize_callback' => 'rest_sanitize_boolean', + ), + ), + 'execute_callback' => static function ( $input ) { + return array(); + }, + 'permission_callback' => '__return_true', + 'meta' => array( 'show_in_rest' => true ), + ) + ); + + $request = new WP_REST_Request( 'GET', '/wp-abilities/v1/abilities/test/nested-internal-keywords' ); + $response = $this->server->dispatch( $request ); + + $this->assertSame( 200, $response->get_status() ); + + $data = $response->get_data(); + + // Verify internal keywords are stripped from anyOf sub-schemas. + $this->assertArrayHasKey( 'anyOf', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['input_schema']['anyOf'][0] ); + $this->assertSame( 'object', $data['input_schema']['anyOf'][0]['type'] ); + $this->assertArrayNotHasKey( 'validate_callback', $data['input_schema']['anyOf'][0]['properties']['value'] ); + $this->assertSame( 'string', $data['input_schema']['anyOf'][0]['properties']['value']['type'] ); + $this->assertArrayNotHasKey( 'arg_options', $data['input_schema']['anyOf'][1] ); + $this->assertSame( 'number', $data['input_schema']['anyOf'][1]['type'] ); + + // Verify internal keywords are stripped from oneOf sub-schemas. + $this->assertArrayHasKey( 'oneOf', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['input_schema']['oneOf'][0] ); + $this->assertSame( 'string', $data['input_schema']['oneOf'][0]['type'] ); + + // Verify internal keywords are stripped from allOf sub-schemas. + $this->assertArrayHasKey( 'allOf', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'validate_callback', $data['input_schema']['allOf'][0] ); + $this->assertSame( 'object', $data['input_schema']['allOf'][0]['type'] ); + + // Verify internal keywords are stripped from not sub-schema. + $this->assertArrayHasKey( 'not', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'arg_options', $data['input_schema']['not'] ); + $this->assertSame( 'null', $data['input_schema']['not']['type'] ); + + // Verify internal keywords are stripped from patternProperties sub-schemas. + $this->assertArrayHasKey( 'patternProperties', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['input_schema']['patternProperties']['^S_'] ); + $this->assertSame( 'string', $data['input_schema']['patternProperties']['^S_']['type'] ); + + // Verify internal keywords are stripped from dependencies schema values. + $this->assertArrayHasKey( 'dependencies', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'validate_callback', $data['input_schema']['dependencies']['bar'] ); + $this->assertSame( 'object', $data['input_schema']['dependencies']['bar']['type'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['input_schema']['dependencies']['bar']['properties']['baz'] ); + $this->assertSame( 'string', $data['input_schema']['dependencies']['bar']['properties']['baz']['type'] ); + // Property dependencies (numeric arrays) should pass through unchanged. + $this->assertSame( array( 'bar' ), $data['input_schema']['dependencies']['qux'] ); + + // Verify internal keywords are stripped from definitions sub-schemas. + $this->assertArrayHasKey( 'definitions', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'validate_callback', $data['input_schema']['definitions']['address'] ); + $this->assertSame( 'object', $data['input_schema']['definitions']['address']['type'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['input_schema']['definitions']['address']['properties']['street'] ); + $this->assertSame( 'string', $data['input_schema']['definitions']['address']['properties']['street']['type'] ); + + // Verify internal keywords are stripped from additionalProperties sub-schema. + $this->assertArrayHasKey( 'additionalProperties', $data['input_schema'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['input_schema']['additionalProperties'] ); + $this->assertSame( 'string', $data['input_schema']['additionalProperties']['type'] ); + + // Verify internal keywords are stripped from tuple-style items sub-schemas. + $this->assertArrayHasKey( 'items', $data['output_schema'] ); + $this->assertCount( 2, $data['output_schema']['items'] ); + $this->assertArrayNotHasKey( 'validate_callback', $data['output_schema']['items'][0] ); + $this->assertSame( 'string', $data['output_schema']['items'][0]['type'] ); + $this->assertArrayNotHasKey( 'arg_options', $data['output_schema']['items'][1] ); + $this->assertSame( 'number', $data['output_schema']['items'][1]['type'] ); + + // Verify internal keywords are stripped from additionalItems sub-schema. + $this->assertArrayHasKey( 'additionalItems', $data['output_schema'] ); + $this->assertArrayNotHasKey( 'sanitize_callback', $data['output_schema']['additionalItems'] ); + $this->assertSame( 'boolean', $data['output_schema']['additionalItems']['type'] ); + } } diff --git a/tests/phpunit/tests/rewrite/addRewriteEndpoint.php b/tests/phpunit/tests/rewrite/addRewriteEndpoint.php index 7b3ada5febe7d..6527f32929917 100644 --- a/tests/phpunit/tests/rewrite/addRewriteEndpoint.php +++ b/tests/phpunit/tests/rewrite/addRewriteEndpoint.php @@ -2,6 +2,8 @@ /** * @group rewrite + * + * @covers ::add_rewrite_endpoint */ class Tests_Rewrite_AddRewriteEndpoint extends WP_UnitTestCase { private $qvs; diff --git a/tests/phpunit/tests/rewrite/addRewriteRule.php b/tests/phpunit/tests/rewrite/addRewriteRule.php index 02efc7bd0aa37..d667f58ceafa9 100644 --- a/tests/phpunit/tests/rewrite/addRewriteRule.php +++ b/tests/phpunit/tests/rewrite/addRewriteRule.php @@ -2,6 +2,8 @@ /** * @group rewrite + * + * @covers ::add_rewrite_rule */ class Tests_Rewrite_AddRewriteRule extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/rewrite/permastructs.php b/tests/phpunit/tests/rewrite/permastructs.php index 4e2bc0594b216..ce98e06a68bb3 100644 --- a/tests/phpunit/tests/rewrite/permastructs.php +++ b/tests/phpunit/tests/rewrite/permastructs.php @@ -2,6 +2,9 @@ /** * @group rewrite + * + * @covers ::add_permastruct + * @covers ::remove_permastruct */ class Tests_Rewrite_Permastructs extends WP_UnitTestCase { diff --git a/tests/phpunit/tests/script-modules/wpScriptModules.php b/tests/phpunit/tests/script-modules/wpScriptModules.php index 4f647c6a3d2e0..09b5a91e2896f 100644 --- a/tests/phpunit/tests/script-modules/wpScriptModules.php +++ b/tests/phpunit/tests/script-modules/wpScriptModules.php @@ -1986,6 +1986,23 @@ private function get_registered_script_modules( WP_Script_Modules $script_module return $registered_property->getValue( $script_modules ); } + /** + * Returns the inline text of the first SCRIPT tag with the given id, or null if not found. + * + * @param string $markup The HTML markup to search. + * @param string $id The id attribute to match. + * @return string|null The inline script text, or null if no matching tag was found. + */ + private function get_inline_script_text( string $markup, string $id ): ?string { + $processor = new WP_HTML_Tag_Processor( $markup ); + while ( $processor->next_tag( 'SCRIPT' ) ) { + if ( $id === $processor->get_attribute( 'id' ) ) { + return $processor->get_modifiable_text(); + } + } + return null; + } + /** * Data provider. * @@ -2024,6 +2041,7 @@ public function test_included_module_appears_in_importmap() { array( 'classic-dependency' ), false, array( + 'strategy' => 'defer', 'module_dependencies' => array( 'example', array( @@ -2092,6 +2110,7 @@ public function test_import_map_includes_dependencies_of_classic_scripts_recursi array(), false, array( + 'in_footer' => true, 'module_dependencies' => array( 'classic-transitive-dependency' ), ) ); @@ -2101,6 +2120,7 @@ public function test_import_map_includes_dependencies_of_classic_scripts_recursi array( 'classic-transitive-dep' ), false, array( + 'in_footer' => true, 'module_dependencies' => array( 'not-enqueued' ), ) ); @@ -2136,6 +2156,7 @@ public function test_wp_scripts_doing_it_wrong_for_missing_script_module_depende array(), null, array( + 'strategy' => 'defer', 'module_dependencies' => array( 'does-not-exist' ), ) ); @@ -2566,4 +2587,293 @@ public function test_missing_script_module_dependency_triggers_incorrect_usage() $this->caught_doing_it_wrong[ $expected_incorrect_usage ] ); } + + /** + * Tests that set_translations() returns false for unregistered module. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::set_translations + */ + public function test_set_translations_returns_false_for_unregistered_module() { + $result = $this->script_modules->set_translations( 'unregistered-module', 'default' ); + $this->assertFalse( $result ); + } + + /** + * Tests that set_translations() returns true for registered module. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::set_translations + */ + public function test_set_translations_returns_true_for_registered_module() { + $this->script_modules->register( 'test-module', '/test-module.js' ); + $result = $this->script_modules->set_translations( 'test-module', 'test-domain' ); + $this->assertTrue( $result ); + } + + /** + * Tests that wp_set_script_module_translations() wrapper works. + * + * @ticket 65015 + * + * @covers ::wp_set_script_module_translations + * @covers WP_Script_Modules::set_translations + */ + public function test_wp_set_script_module_translations_wrapper() { + wp_register_script_module( 'test-module', '/test-module.js' ); + $result = wp_set_script_module_translations( 'test-module', 'test-domain' ); + $this->assertTrue( $result ); + } + + /** + * Tests that wp_set_script_module_translations() returns false for unregistered module. + * + * @ticket 65015 + * + * @covers ::wp_set_script_module_translations + * @covers WP_Script_Modules::set_translations + */ + public function test_wp_set_script_module_translations_returns_false_for_unregistered() { + $result = wp_set_script_module_translations( 'unregistered-module', 'default' ); + $this->assertFalse( $result ); + } + + /** + * Tests that get_registered() returns null for unregistered module. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::get_registered + */ + public function test_get_registered_returns_null_for_unregistered_module() { + $result = $this->script_modules->get_registered( 'unregistered-module' ); + $this->assertNull( $result ); + } + + /** + * Tests that get_registered() returns correct src for registered module. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::get_registered + */ + public function test_get_registered_returns_array_for_registered_module() { + $this->script_modules->register( 'test-module', '/test-module.js' ); + $result = $this->script_modules->get_registered( 'test-module' ); + $this->assertIsArray( $result, 'get_registered() should return an array for a registered module.' ); + $this->assertSame( '/test-module.js', $result['src'], 'src should match the value passed to register().' ); + $this->assertFalse( $result['version'], 'version should default to false.' ); + $this->assertSame( array(), $result['dependencies'], 'dependencies should default to an empty array.' ); + $this->assertFalse( $result['in_footer'], 'in_footer should default to false.' ); + $this->assertSame( 'auto', $result['fetchpriority'], 'fetchpriority should default to auto.' ); + } + + /** + * Tests that print_script_module_translations() outputs nothing when no translations are set. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::print_script_module_translations + */ + public function test_print_script_module_translations_outputs_nothing_when_no_translations() { + $this->script_modules->register( 'test-module', '/test-module.js' ); + $this->script_modules->enqueue( 'test-module' ); + + $output = get_echo( array( $this->script_modules, 'print_script_module_translations' ) ); + + $this->assertEmpty( $output ); + } + + /** + * Tests that print_script_module_translations() outputs nothing for non-enqueued modules. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::print_script_module_translations + */ + public function test_print_script_module_translations_outputs_nothing_for_non_enqueued() { + $this->script_modules->register( 'test-module', '/test-module.js' ); + $this->script_modules->set_translations( 'test-module', 'default' ); + + $output = get_echo( array( $this->script_modules, 'print_script_module_translations' ) ); + + $this->assertEmpty( $output ); + } + + /** + * Tests that print_script_module_translations() auto-detects translations + * for enqueued modules without requiring an explicit set_translations() call. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::print_script_module_translations + * @covers ::load_script_module_textdomain + */ + public function test_print_script_module_translations_outputs_set_locale_data() { + $this->script_modules->register( 'test-module', '/wp-includes/js/test-module.js' ); + $this->script_modules->enqueue( 'test-module' ); + + // Provide test translations via the pre_load_script_translations filter + // so no fixture files are needed. + add_filter( + 'pre_load_script_translations', + static function ( $translations, $file, $handle ) { + if ( 'test-module' !== $handle ) { + return $translations; + } + return wp_json_encode( + array( + 'domain' => 'messages', + 'locale_data' => array( + 'messages' => array( + '' => array( + 'domain' => 'messages', + 'lang' => 'es', + ), + 'Hello' => array( 'Hola' ), + ), + ), + ) + ); + }, + 10, + 3 + ); + + $filtered = array(); + add_filter( + 'load_script_textdomain_relative_path', + static function ( $relative, $src, $is_module ) use ( &$filtered ) { + $filtered[] = compact( 'relative', 'src', 'is_module' ); + return $relative; + }, + 10, + 3 + ); + + $output = get_echo( array( $this->script_modules, 'print_script_module_translations' ) ); + + $this->assertCount( 1, $filtered, 'load_script_textdomain_relative_path filter should fire once for the enqueued module.' ); + foreach ( $filtered as $filter_args ) { + $this->assertIsString( $filter_args['relative'], 'Filter should receive a string $relative argument.' ); + $this->assertIsString( $filter_args['src'], 'Filter should receive a string $src argument.' ); + $this->assertTrue( $filter_args['is_module'], 'Filter should receive $is_module=true for script modules.' ); + } + + $script_text = $this->get_inline_script_text( $output, 'wp-script-module-translation-data-test-module' ); + $this->assertNotNull( $script_text, 'Translation inline script should be printed with the expected ID.' ); + $this->assertStringContainsString( 'wp.i18n.setLocaleData', $script_text, 'Output should call wp.i18n.setLocaleData().' ); + $this->assertStringContainsString( 'Hola', $script_text, 'Output should contain the translated string.' ); + } + + /** + * Tests that print_script_module_translations() also outputs translations + * for dependencies of enqueued modules (not just directly enqueued ones). + * + * @ticket 65015 + * + * @covers WP_Script_Modules::print_script_module_translations + * @covers ::load_script_module_textdomain + */ + public function test_print_script_module_translations_includes_dependencies() { + $this->script_modules->register( 'dep-module', '/wp-includes/js/dep-module.js' ); + $this->script_modules->register( 'main-module', '/wp-includes/js/main-module.js', array( 'dep-module' ) ); + $this->script_modules->enqueue( 'main-module' ); + + add_filter( + 'pre_load_script_translations', + static function ( $translations, $file, $handle ) { + if ( 'dep-module' !== $handle ) { + return $translations; + } + return wp_json_encode( + array( + 'locale_data' => array( + 'messages' => array( + '' => array( + 'domain' => 'messages', + 'lang' => 'es', + ), + 'World' => array( 'Mundo' ), + ), + ), + ) + ); + }, + 10, + 3 + ); + + $filtered = array(); + add_filter( + 'load_script_textdomain_relative_path', + static function ( $relative, $src, $is_module ) use ( &$filtered ) { + $filtered[] = compact( 'relative', 'src', 'is_module' ); + return $relative; + }, + 10, + 3 + ); + + $output = get_echo( array( $this->script_modules, 'print_script_module_translations' ) ); + + // With auto-detection, the filter fires for every enqueued module and its dependencies. + $this->assertCount( 2, $filtered, 'load_script_textdomain_relative_path filter should fire for the enqueued module and its dependency.' ); + foreach ( $filtered as $filter_args ) { + $this->assertIsString( $filter_args['relative'], 'Filter should receive a string $relative argument.' ); + $this->assertIsString( $filter_args['src'], 'Filter should receive a string $src argument.' ); + $this->assertTrue( $filter_args['is_module'], 'Filter should receive $is_module=true for script modules.' ); + } + + $script_text = $this->get_inline_script_text( $output, 'wp-script-module-translation-data-dep-module' ); + $this->assertNotNull( $script_text, 'Dependency module translations should be printed.' ); + $this->assertStringContainsString( 'Mundo', $script_text, 'Output should contain the dependency translation.' ); + } + + /** + * Tests that set_translations() can override the auto-detected text domain. + * + * @ticket 65015 + * + * @covers WP_Script_Modules::print_script_module_translations + * @covers WP_Script_Modules::set_translations + */ + public function test_print_script_module_translations_respects_set_translations_override() { + $this->script_modules->register( 'test-module', '/wp-includes/js/test-module.js' ); + $this->script_modules->enqueue( 'test-module' ); + $this->script_modules->set_translations( 'test-module', 'my-plugin' ); + + $seen_domain = null; + add_filter( + 'pre_load_script_translations', + static function ( $translations, $file, $handle, $domain ) use ( &$seen_domain ) { + if ( 'test-module' !== $handle ) { + return $translations; + } + $seen_domain = $domain; + return wp_json_encode( + array( + 'locale_data' => array( + 'messages' => array( + '' => array( + 'domain' => 'my-plugin', + 'lang' => 'es', + ), + 'Hello' => array( 'Hola' ), + ), + ), + ) + ); + }, + 10, + 4 + ); + + $output = get_echo( array( $this->script_modules, 'print_script_module_translations' ) ); + + $this->assertSame( 'my-plugin', $seen_domain, 'load_script_module_textdomain() should be called with the overridden domain.' ); + $this->assertStringContainsString( 'Hola', $output, 'Output should contain the translated string loaded under the overridden domain.' ); + } } diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index 003dc397ae305..c00c6908f5d26 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -11085,12 +11085,6 @@ mockedApiResponse.Schema = { "type": "string", "required": false }, - "wp_collaboration_enabled": { - "title": "", - "description": "Enable Real-Time Collaboration", - "type": "boolean", - "required": false - }, "posts_per_page": { "title": "Maximum posts per page", "description": "Blog pages show at most.", @@ -14556,7 +14550,6 @@ mockedApiResponse.settings = { "use_smilies": true, "default_category": 1, "default_post_format": "0", - "wp_collaboration_enabled": false, "posts_per_page": 10, "show_on_front": "posts", "page_on_front": 0, diff --git a/tools/vendors/copy-vendors.js b/tools/vendors/copy-vendors.js deleted file mode 100644 index 12660fc639645..0000000000000 --- a/tools/vendors/copy-vendors.js +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env node - -/** - * Copy Vendor Scripts - * - * This script copies vendor dependencies from node_modules to wp-includes/js/dist/vendor/. - * These are Core's own dependencies (moment, lodash, regenerator-runtime, polyfills, etc.) - * separate from Gutenberg packages. - * - * @package WordPress - */ - -const fs = require( 'fs' ); -const path = require( 'path' ); - -// Paths -const rootDir = path.resolve( __dirname, '../..' ); -const nodeModulesDir = path.join( rootDir, 'node_modules' ); - -// Parse command line arguments -const args = process.argv.slice( 2 ); -const buildDirArg = args.find( arg => arg.startsWith( '--build-dir=' ) ); -const buildTarget = buildDirArg - ? buildDirArg.split( '=' )[1] - : ( args.includes( '--dev' ) ? 'src' : 'build' ); - -const vendorDir = path.join( rootDir, buildTarget, 'wp-includes/js/dist/vendor' ); - -/** - * Vendor files to copy from node_modules. - */ -const VENDOR_FILES = { - // Moment.js - 'moment': { - files: [ - { from: 'moment/moment.js', to: 'moment.js' }, - { from: 'moment/min/moment.min.js', to: 'moment.min.js' }, - ], - }, - - // Lodash - 'lodash': { - files: [ - { from: 'lodash/lodash.js', to: 'lodash.js' }, - { from: 'lodash/lodash.min.js', to: 'lodash.min.js' }, - ], - }, - - // Regenerator Runtime - 'regenerator-runtime': { - files: [ - { from: 'regenerator-runtime/runtime.js', to: 'regenerator-runtime.js' }, - { from: 'regenerator-runtime/runtime.js', to: 'regenerator-runtime.min.js' }, - ], - }, - - // React (UMD builds from node_modules) - 'react': { - files: [ - { from: 'react/umd/react.development.js', to: 'react.js' }, - { from: 'react/umd/react.production.min.js', to: 'react.min.js' }, - ], - }, - - // React DOM (UMD builds from node_modules) - 'react-dom': { - files: [ - { from: 'react-dom/umd/react-dom.development.js', to: 'react-dom.js' }, - { from: 'react-dom/umd/react-dom.production.min.js', to: 'react-dom.min.js' }, - ], - }, - - // Main Polyfill bundle - 'wp-polyfill': { - files: [ - { from: '@wordpress/babel-preset-default/build/polyfill.js', to: 'wp-polyfill.js' }, - { from: '@wordpress/babel-preset-default/build/polyfill.min.js', to: 'wp-polyfill.min.js' }, - ], - }, - - // Polyfills - Fetch (same source for both - was minified by webpack) - 'wp-polyfill-fetch': { - files: [ - { from: 'whatwg-fetch/dist/fetch.umd.js', to: 'wp-polyfill-fetch.js' }, - { from: 'whatwg-fetch/dist/fetch.umd.js', to: 'wp-polyfill-fetch.min.js' }, - ], - }, - - // Polyfills - FormData - 'wp-polyfill-formdata': { - files: [ - { from: 'formdata-polyfill/FormData.js', to: 'wp-polyfill-formdata.js' }, - { from: 'formdata-polyfill/formdata.min.js', to: 'wp-polyfill-formdata.min.js' }, - ], - }, - - // Polyfills - Element Closest (same for both) - 'wp-polyfill-element-closest': { - files: [ - { from: 'element-closest/browser.js', to: 'wp-polyfill-element-closest.js' }, - { from: 'element-closest/browser.js', to: 'wp-polyfill-element-closest.min.js' }, - ], - }, - - // Polyfills - Object Fit - 'wp-polyfill-object-fit': { - files: [ - { from: 'objectFitPolyfill/src/objectFitPolyfill.js', to: 'wp-polyfill-object-fit.js' }, - { from: 'objectFitPolyfill/dist/objectFitPolyfill.min.js', to: 'wp-polyfill-object-fit.min.js' }, - ], - }, - - // Polyfills - Inert - 'wp-polyfill-inert': { - files: [ - { from: 'wicg-inert/dist/inert.js', to: 'wp-polyfill-inert.js' }, - { from: 'wicg-inert/dist/inert.min.js', to: 'wp-polyfill-inert.min.js' }, - ], - }, - - // Polyfills - URL - 'wp-polyfill-url': { - files: [ - { from: 'core-js-url-browser/url.js', to: 'wp-polyfill-url.js' }, - { from: 'core-js-url-browser/url.min.js', to: 'wp-polyfill-url.min.js' }, - ], - }, - - // Polyfills - DOMRect (same source for both - was minified by webpack) - 'wp-polyfill-dom-rect': { - files: [ - { from: 'polyfill-library/polyfills/__dist/DOMRect/raw.js', to: 'wp-polyfill-dom-rect.js' }, - { from: 'polyfill-library/polyfills/__dist/DOMRect/raw.js', to: 'wp-polyfill-dom-rect.min.js' }, - ], - }, - - // Polyfills - Node.contains (same source for both - was minified by webpack) - 'wp-polyfill-node-contains': { - files: [ - { from: 'polyfill-library/polyfills/__dist/Node.prototype.contains/raw.js', to: 'wp-polyfill-node-contains.js' }, - { from: 'polyfill-library/polyfills/__dist/Node.prototype.contains/raw.js', to: 'wp-polyfill-node-contains.min.js' }, - ], - }, -}; - -/** - * Main execution function. - */ -async function main() { - console.log( '📦 Copying vendor scripts from node_modules...' ); - console.log( ` Build target: ${ buildTarget }/` ); - - // Create vendor directory - fs.mkdirSync( vendorDir, { recursive: true } ); - - let copied = 0; - let skipped = 0; - - for ( const [ vendor, config ] of Object.entries( VENDOR_FILES ) ) { - for ( const file of config.files ) { - const srcPath = path.join( nodeModulesDir, file.from ); - const destPath = path.join( vendorDir, file.to ); - - if ( fs.existsSync( srcPath ) ) { - fs.copyFileSync( srcPath, destPath ); - copied++; - } else { - console.log( ` ⚠️ Skipping ${ file.to }: source not found` ); - skipped++; - } - } - } - - console.log( `\n✅ Vendor scripts copied!` ); - console.log( ` Copied: ${ copied } files` ); - if ( skipped > 0 ) { - console.log( ` Skipped: ${ skipped } files` ); - } -} - -// Run main function -main().catch( ( error ) => { - console.error( '❌ Unexpected error:', error ); - process.exit( 1 ); -} );