From 91a4ceb434c2d05b7c24ec5c9bbebcda765f16a7 Mon Sep 17 00:00:00 2001 From: mogmarsh Date: Tue, 7 Nov 2023 15:02:49 +0000 Subject: [PATCH] Built changes for v0.2.0 --- .deployignore | 22 - .github/dependabot.yml | 25 - .github/workflows/built-branch.yml | 11 - .github/workflows/built-release.yml | 15 - .github/workflows/coding-standards.yml | 16 - .github/workflows/dependabot-auto-approve.yml | 11 - .github/workflows/dependabot-auto-merge.yml | 10 - .../workflows/merge-develop-to-scaffold.yml | 34 - .github/workflows/node-tests.yml | 16 - .github/workflows/unit-test.yml | 21 - .github/workflows/update-changelog.yml | 28 - .../workflows/upgrade-wordpress-plugin.yml | 19 - .gitignore | 44 +- .phpcs.xml | 56 - Makefile | 4 - bin/create-block/defaultValues.js | 15 - bin/create-block/index.js | 72 - bin/create-block/selectTemplates.js | 29 - .../templates/javascript/edit.jsx.mustache | 38 - .../templates/javascript/index.js.mustache | 39 - .../templates/javascript/index.scss.mustache | 13 - .../templates/javascript/save.jsx.mustache | 26 - .../templates/javascript/style.scss.mustache | 18 - .../templates/typescript/edit.tsx.mustache | 38 - .../templates/typescript/index.scss.mustache | 13 - .../templates/typescript/index.ts.mustache | 42 - .../templates/typescript/save.tsx.mustache | 26 - .../templates/typescript/style.scss.mustache | 18 - build/blocks/index.asset.php | 1 + build/blocks/index.css | 7 + .phpcs/.gitkeep => build/blocks/index.js | 0 build/editor/index.asset.php | 1 + build/editor/index.css | 1 + build/editor/index.js | 0 build/email-settings/block.json | 17 + build/email-settings/index.asset.php | 1 + build/email-settings/index.css | 1 + build/email-settings/index.js | 1 + build/email-settings/index.php | 23 + .../email-settings/render.php | 7 - build/email-settings/style-index.css | 1 + build/footer/block.json | 23 + build/footer/index.asset.php | 1 + build/footer/index.css | 1 + build/footer/index.js | 1 + .../footer/index.php | 7 +- build/footer/render.php | 76 + build/footer/style-index.css | 1 + build/header/block.json | 17 + build/header/index.asset.php | 1 + build/header/index.css | 1 + build/header/index.js | 42 + .../header/index.php | 7 +- build/header/render.php | 21 + build/header/style-index.css | 1 + build/index.js/index.asset.php | 1 + build/index.js/index.js | 0 build/newsletter-status/index.asset.php | 1 + build/newsletter-status/index.js | 1 + build/post/block.json | 93 ++ build/post/index.asset.php | 1 + build/post/index.css | 2 + build/post/index.js | 42 + build/post/index.php | 21 + build/post/render.php | 130 ++ build/post/style-index.css | 1 + build/section/block.json | 31 + build/section/index.asset.php | 1 + build/section/index.css | 5 + build/section/index.js | 42 + build/section/index.php | 21 + build/section/render.php | 22 + build/section/style-index.css | 1 + build/signup-form-list/block.json | 35 + build/signup-form-list/index.asset.php | 1 + build/signup-form-list/index.js | 1 + build/signup-form-list/index.php | 21 + build/signup-form-list/render.php | 40 + build/signup-form/block.json | 37 + build/signup-form/index.asset.php | 1 + build/signup-form/index.css | 1 + build/signup-form/index.js | 1 + build/signup-form/index.php | 40 + build/signup-form/render.php | 55 + build/signup-form/view.asset.php | 1 + build/signup-form/view.js | 1 + build/two-up-post/block.json | 17 + build/two-up-post/index.asset.php | 1 + build/two-up-post/index.css | 1 + build/two-up-post/index.js | 1 + build/two-up-post/index.php | 21 + .../two-up-post/render.php | 7 +- build/two-up-post/style-index.css | 1 + .../index.asset.php | 1 + .../wp-newsletter-builder-from-post/index.js | 42 + .../index.asset.php | 1 + .../wp-newsletter-builder-separator/index.js | 1 + configure.php | 763 --------- package-lock.json | 1374 +++++++++++++++-- phpunit.xml | 9 - tests/bootstrap.php | 16 - tests/class-test-case.php | 17 - 102 files changed, 2259 insertions(+), 1645 deletions(-) delete mode 100644 .deployignore delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/built-branch.yml delete mode 100644 .github/workflows/built-release.yml delete mode 100644 .github/workflows/coding-standards.yml delete mode 100644 .github/workflows/dependabot-auto-approve.yml delete mode 100644 .github/workflows/dependabot-auto-merge.yml delete mode 100644 .github/workflows/merge-develop-to-scaffold.yml delete mode 100644 .github/workflows/node-tests.yml delete mode 100644 .github/workflows/unit-test.yml delete mode 100644 .github/workflows/update-changelog.yml delete mode 100644 .github/workflows/upgrade-wordpress-plugin.yml delete mode 100644 .phpcs.xml delete mode 100644 Makefile delete mode 100644 bin/create-block/defaultValues.js delete mode 100644 bin/create-block/index.js delete mode 100644 bin/create-block/selectTemplates.js delete mode 100644 bin/create-block/templates/javascript/edit.jsx.mustache delete mode 100644 bin/create-block/templates/javascript/index.js.mustache delete mode 100644 bin/create-block/templates/javascript/index.scss.mustache delete mode 100644 bin/create-block/templates/javascript/save.jsx.mustache delete mode 100644 bin/create-block/templates/javascript/style.scss.mustache delete mode 100644 bin/create-block/templates/typescript/edit.tsx.mustache delete mode 100644 bin/create-block/templates/typescript/index.scss.mustache delete mode 100644 bin/create-block/templates/typescript/index.ts.mustache delete mode 100644 bin/create-block/templates/typescript/save.tsx.mustache delete mode 100644 bin/create-block/templates/typescript/style.scss.mustache create mode 100644 build/blocks/index.asset.php create mode 100644 build/blocks/index.css rename .phpcs/.gitkeep => build/blocks/index.js (100%) create mode 100644 build/editor/index.asset.php create mode 100644 build/editor/index.css create mode 100644 build/editor/index.js create mode 100644 build/email-settings/block.json create mode 100644 build/email-settings/index.asset.php create mode 100644 build/email-settings/index.css create mode 100644 build/email-settings/index.js create mode 100644 build/email-settings/index.php rename bin/create-block/templates/typescript/render.php.mustache => build/email-settings/render.php (67%) create mode 100644 build/email-settings/style-index.css create mode 100644 build/footer/block.json create mode 100644 build/footer/index.asset.php create mode 100644 build/footer/index.css create mode 100644 build/footer/index.js rename bin/create-block/templates/typescript/index.php.mustache => build/footer/index.php (73%) create mode 100644 build/footer/render.php create mode 100644 build/footer/style-index.css create mode 100644 build/header/block.json create mode 100644 build/header/index.asset.php create mode 100644 build/header/index.css create mode 100644 build/header/index.js rename bin/create-block/templates/javascript/index.php.mustache => build/header/index.php (73%) create mode 100644 build/header/render.php create mode 100644 build/header/style-index.css create mode 100644 build/index.js/index.asset.php create mode 100644 build/index.js/index.js create mode 100644 build/newsletter-status/index.asset.php create mode 100644 build/newsletter-status/index.js create mode 100644 build/post/block.json create mode 100644 build/post/index.asset.php create mode 100644 build/post/index.css create mode 100644 build/post/index.js create mode 100644 build/post/index.php create mode 100644 build/post/render.php create mode 100644 build/post/style-index.css create mode 100644 build/section/block.json create mode 100644 build/section/index.asset.php create mode 100644 build/section/index.css create mode 100644 build/section/index.js create mode 100644 build/section/index.php create mode 100644 build/section/render.php create mode 100644 build/section/style-index.css create mode 100644 build/signup-form-list/block.json create mode 100644 build/signup-form-list/index.asset.php create mode 100644 build/signup-form-list/index.js create mode 100644 build/signup-form-list/index.php create mode 100644 build/signup-form-list/render.php create mode 100644 build/signup-form/block.json create mode 100644 build/signup-form/index.asset.php create mode 100644 build/signup-form/index.css create mode 100644 build/signup-form/index.js create mode 100644 build/signup-form/index.php create mode 100644 build/signup-form/render.php create mode 100644 build/signup-form/view.asset.php create mode 100644 build/signup-form/view.js create mode 100644 build/two-up-post/block.json create mode 100644 build/two-up-post/index.asset.php create mode 100644 build/two-up-post/index.css create mode 100644 build/two-up-post/index.js create mode 100644 build/two-up-post/index.php rename bin/create-block/templates/javascript/render.php.mustache => build/two-up-post/render.php (68%) create mode 100644 build/two-up-post/style-index.css create mode 100644 build/wp-newsletter-builder-from-post/index.asset.php create mode 100644 build/wp-newsletter-builder-from-post/index.js create mode 100644 build/wp-newsletter-builder-separator/index.asset.php create mode 100644 build/wp-newsletter-builder-separator/index.js delete mode 100644 configure.php delete mode 100644 phpunit.xml delete mode 100644 tests/bootstrap.php delete mode 100644 tests/class-test-case.php diff --git a/.deployignore b/.deployignore deleted file mode 100644 index 56180bf5..00000000 --- a/.deployignore +++ /dev/null @@ -1,22 +0,0 @@ -.DS_Store -Thumbs.db -wp-cli.local.yml -node_modules/ -*.sql -*.tar.gz -*.zip -.phpunit.result.cache -Dockerfile -output.log -.github -tests -bin -composer.lock -.phpcs.xml -phpunit.xml -configure.php -DOCKER_ENV -phpunit.xml -tests -.phpcs -Makefile diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 115b12e2..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "composer" - directory: "/" - schedule: - interval: "weekly" - - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" - day: "saturday" - time: "09:00" - timezone: "America/New_York" - ignore: - - dependency-name: "@wordpress/*" diff --git a/.github/workflows/built-branch.yml b/.github/workflows/built-branch.yml deleted file mode 100644 index cc534404..00000000 --- a/.github/workflows/built-branch.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Create a -built branch - -on: - push: - branches: - - main - - develop - -jobs: - built-branch: - uses: alleyinteractive/.github/.github/workflows/built-branch.yml@main diff --git a/.github/workflows/built-release.yml b/.github/workflows/built-release.yml deleted file mode 100644 index 46b1ef21..00000000 --- a/.github/workflows/built-release.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Built Release - -on: - push: - branches: - - develop - - main - - production - -jobs: - built-release: - uses: alleyinteractive/.github/.github/workflows/built-release.yml@main - if: ${{ github.repository != 'alleyinteractive/create-wordpress-plugin' }} - with: - node: 16 diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml deleted file mode 100644 index 4adcf4ef..00000000 --- a/.github/workflows/coding-standards.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Coding Standards - -on: - push: - branches: - - develop - pull_request: - # Uncomment and edit the following to run on a schedule. - # schedule: - # - cron: '0 5 * * 0' # Run once per week at 5am UTC on Sundays. - -jobs: - coding-standards: - uses: alleyinteractive/.github/.github/workflows/php-coding-standards.yml@main - with: - php: '8.2' diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-approve.yml deleted file mode 100644 index e2119dec..00000000 --- a/.github/workflows/dependabot-auto-approve.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: dependabot-auto-approve -on: - pull_request: - -permissions: - pull-requests: write - contents: write - -jobs: - dependabot: - uses: alleyinteractive/.github/.github/workflows/dependabot-auto-approve.yml@main diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml deleted file mode 100644 index aaed13d4..00000000 --- a/.github/workflows/dependabot-auto-merge.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: dependabot-auto-merge -on: pull_request_target - -permissions: - pull-requests: write - contents: write - -jobs: - dependabot: - uses: alleyinteractive/.github/.github/workflows/dependabot-auto-merge.yml@main diff --git a/.github/workflows/merge-develop-to-scaffold.yml b/.github/workflows/merge-develop-to-scaffold.yml deleted file mode 100644 index 5465956a..00000000 --- a/.github/workflows/merge-develop-to-scaffold.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Merge Develop to Scaffold Branch - -on: - push: - branches: - - develop - - remove-scaffold - -jobs: - merge-develop-to-scaffold: - name: merge develop to scaffold - runs-on: ubuntu-latest - - steps: - - name: Merge develop to scaffold - shell: bash - env: - DEVELOP_BRANCH: develop - SCAFFOLD_BRANCH: scaffold - - TOKEN: ${{ secrets.GH_TOKEN }} - run: | - git config --global user.name "$GITHUB_ACTOR" - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - - echo "Cloning alleyinteractive/create-wordpress-plugin..." - git clone --recursive --quiet https://$TOKEN@github.com/alleyinteractive/create-wordpress-plugin.git create-wordpress-plugin -b $SCAFFOLD_BRANCH - cd create-wordpress-plugin - - git fetch origin $DEVELOP_BRANCH - git fetch origin $SCAFFOLD_BRANCH - - git merge origin/$DEVELOP_BRANCH --no-edit - git push -u origin $SCAFFOLD_BRANCH diff --git a/.github/workflows/node-tests.yml b/.github/workflows/node-tests.yml deleted file mode 100644 index 668b078a..00000000 --- a/.github/workflows/node-tests.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Node Tests - -on: - push: - branches: - - develop - pull_request: - # Uncomment and edit the following to run on a schedule. - # schedule: - # - cron: '15 5 * * 0' # Run once per week at 5:15am UTC on Sundays. - -jobs: - node-tests: - uses: alleyinteractive/.github/.github/workflows/node-tests.yml@main - with: - run-audit: true diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index 213fbb43..00000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Testing Suite - -on: - push: - branches: - - develop - pull_request: - # Uncomment and edit the following to run on a schedule. - # schedule: - # - cron: '30 5 * * 0' # Run once per week at 5:30am UTC on Sundays. - -jobs: - php-tests: - strategy: - matrix: - php: [8.0, 8.1, 8.2] - wordpress: ["latest"] - uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main - with: - php: ${{ matrix.php }} - wordpress: ${{ matrix.wordpress }} diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml deleted file mode 100644 index 0cdea233..00000000 --- a/.github/workflows/update-changelog.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Update Changelog" - -on: - release: - types: [released] - -jobs: - update: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: main - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ github.event.release.name }} - release-notes: ${{ github.event.release.body }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v5 - with: - branch: main - commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md diff --git a/.github/workflows/upgrade-wordpress-plugin.yml b/.github/workflows/upgrade-wordpress-plugin.yml deleted file mode 100644 index 9fdf3c6f..00000000 --- a/.github/workflows/upgrade-wordpress-plugin.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Update WordPress Plugin - -on: - schedule: - - cron: '0 6 1 * *' # Run on the first day of every month at 6am UTC. - -permissions: - contents: write - pull-requests: write - -jobs: - update-plugin: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: alleyinteractive/action-update-wordpress-plugin@v1.2.1 - with: - plugin-file: 'plugin.php' - upgrade-npm-dependencies: "true" diff --git a/.gitignore b/.gitignore index a8545793..56180bf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,22 @@ -# Build files -build -vendor -composer.lock -node_modules - -# Log files -*.log - -# Cache files -.phpcs/*.json -.phpunit.result.cache - -# Ignore temporary OS files .DS_Store -.DS_Store? -.Spotlight-V100 -.Trashes -ehthumbs.db Thumbs.db -.thumbsdb - -# IDE files -*.code-workspace -.idea -.vscode +wp-cli.local.yml +node_modules/ +*.sql +*.tar.gz +*.zip +.phpunit.result.cache +Dockerfile +output.log +.github +tests +bin +composer.lock +.phpcs.xml +phpunit.xml +configure.php +DOCKER_ENV +phpunit.xml +tests +.phpcs +Makefile diff --git a/.phpcs.xml b/.phpcs.xml deleted file mode 100644 index f77fbf7f..00000000 --- a/.phpcs.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - PHP_CodeSniffer standard for create-wordpress-plugin. - - - - - - - - - - - - - - - - - - - - - build/ - vendor/ - - - - - - - - - - - - - - - - - src/assets.php - blocks - build - entries - - - - src/assets.php - - diff --git a/Makefile b/Makefile deleted file mode 100644 index d9e033f8..00000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -setup: - php ./configure.php - -.PHONY: setup diff --git a/bin/create-block/defaultValues.js b/bin/create-block/defaultValues.js deleted file mode 100644 index 5873f6f3..00000000 --- a/bin/create-block/defaultValues.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Default variables for scaffolding blocks. - * - * @see https://github.com/WordPress/gutenberg/blob/trunk/packages/create-block/docs/external-template.md#defaultvalues - */ -module.exports = { - namespace: 'wp-newsletter-builder', - plugin: false, - description: '', - dashicon: 'palmtree', - category: 'widgets', - editorScript: 'file:index.ts', - editorStyle: 'file:index.css', - style: ['file:style-index.css'], -}; diff --git a/bin/create-block/index.js b/bin/create-block/index.js deleted file mode 100644 index 229f29ff..00000000 --- a/bin/create-block/index.js +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env node - -const prompts = require('prompts'); -const path = require('path'); -const { sync: spawn } = require('cross-spawn'); - -const fs = require('fs'); - -// The directory where the blocks will be created relative to the current working directory. -const directoryName = 'blocks'; - -// Create the directory if it doesn't exist. -if (!fs.existsSync(directoryName)) { - fs.mkdirSync(directoryName); - // eslint-disable-next-line no-console - console.log(`Directory '${directoryName}' created successfully!`); - // Navigate to the directory to create the block. - process.chdir(directoryName); -} else { - process.chdir(directoryName); -} - -/** - * Prompts the user to select a block language (TypeScript or JavaScript) - * and then create a block using the @wordpress/create-block package. - */ -(async () => { - const response = await prompts({ - type: 'select', - name: 'blockLanguage', - message: 'Create a block in TypeScript or JavaScript?', - choices: [ - { title: 'TypeScript', value: 'typescript' }, - { title: 'JavaScript', value: 'javascript' }, - ], - initial: 0, - }); - - const language = response?.blockLanguage || null; - - if (language) { - // Set the block language as an environment variable - // so it can be used in the selectTemplates.js file. - process.env.blockLanguage = language; - - // Create a block using the @wordpress/create-block package. - const result = spawn( - 'npx', - [ - '@wordpress/create-block', - /** - * This argument specifies an external npm package as a template. - * In this case, the selectTemplates.js file is used as a the entry for the template. - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/#template - */ - '--template', - path.join(__dirname, 'selectTemplates.js'), - /** - * With this argument, the create-block package runs in - * "No plugin mode" which only scaffolds block files into the current directory. - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/#no-plugin - */ - '--no-plugin', - ], - { stdio: 'inherit' }, - ); - - process.exit(result.status); - } else { - process.exit(1); - } -})(); diff --git a/bin/create-block/selectTemplates.js b/bin/create-block/selectTemplates.js deleted file mode 100644 index 8c1a933b..00000000 --- a/bin/create-block/selectTemplates.js +++ /dev/null @@ -1,29 +0,0 @@ -const path = require('path'); -const defaultValues = require('./defaultValues'); - -const { blockLanguage } = process.env; - -/** - * Custom variants for scaffolding blocks. - * - * Currently there are only two variants: - * - static: A block that scaffolds a save.js file - * that saves the content and markup directly in the post content. - * - dynamic: A block that scaffolds a render.php template - * which can be used to render the block on the front-end. - * - * @see https://github.com/WordPress/gutenberg/blob/trunk/packages/create-block/docs/external-template.md#external-project-templates - */ -module.exports = { - defaultValues, - variants: { - static: { - blockTemplatesPath: path.join(__dirname, 'templates', blockLanguage), - }, - dynamic: { - blockTemplatesPath: path.join(__dirname, 'templates', blockLanguage), - render: 'file:render.php', - }, - }, - blockTemplatesPath: path.join(__dirname, 'templates', blockLanguage), -}; diff --git a/bin/create-block/templates/javascript/edit.jsx.mustache b/bin/create-block/templates/javascript/edit.jsx.mustache deleted file mode 100644 index d10cda51..00000000 --- a/bin/create-block/templates/javascript/edit.jsx.mustache +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Retrieves the translation of text. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ - */ -import { __ } from '@wordpress/i18n'; - -/** - * React hook that is used to mark the block wrapper element. - * It provides all the necessary props like the class name. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops - */ -import { useBlockProps } from '@wordpress/block-editor'; - -/** - * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. - * Those files can contain any CSS code that gets applied to the editor. - * - * @see https://www.npmjs.com/package/@wordpress/scripts#using-css - */ -import './index.scss'; - -/** - * The edit function describes the structure of your block in the context of the - * editor. This represents what the editor will render when the block is used. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit - * - * @return {WPElement} Element to render. - */ -export default function Edit() { - return ( -

- { __('Block Title – hello from the editor!', 'wp-newsletter-builder') } -

- ); -} diff --git a/bin/create-block/templates/javascript/index.js.mustache b/bin/create-block/templates/javascript/index.js.mustache deleted file mode 100644 index 4f309fc6..00000000 --- a/bin/create-block/templates/javascript/index.js.mustache +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Registers a new block provided a unique name and an object defining its behavior. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ - */ -import { registerBlockType } from '@wordpress/blocks'; - -/** - * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. - * All files containing `style` keyword are bundled together. The code used - * gets applied both to the front of your site and to the editor. - * - * @see https://www.npmjs.com/package/@wordpress/scripts#using-css - */ -import './style.scss'; - -/** - * Internal dependencies - */ -import edit from './edit'; -{{#isStaticVariant}} -import save from './save'; -{{/isStaticVariant}} -import metadata from './block.json'; - -/** - * Every block starts by registering a new block type definition. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ - */ -registerBlockType( - metadata.name, - { - edit, - {{#isStaticVariant}} - save, - {{/isStaticVariant}} - }, -); diff --git a/bin/create-block/templates/javascript/index.scss.mustache b/bin/create-block/templates/javascript/index.scss.mustache deleted file mode 100644 index 76e79841..00000000 --- a/bin/create-block/templates/javascript/index.scss.mustache +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The following styles get applied inside the editor only. - * - * All imported CSS files are bundled into one chunk named after the entry point, - * which defaults to index.js, and thus the file created becomes index.css. - * This is for styles used only in the editor. - * - * Replace them with your own styles or remove the file completely. - */ - -.wp-block-{{namespace}}-{{slug}} { - border: 1px dotted #f00; -} diff --git a/bin/create-block/templates/javascript/save.jsx.mustache b/bin/create-block/templates/javascript/save.jsx.mustache deleted file mode 100644 index 15a1c598..00000000 --- a/bin/create-block/templates/javascript/save.jsx.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{#isStaticVariant}} -/** - * React hook that is used to mark the block wrapper element. - * It provides all the necessary props like the class name. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops - */ -import { useBlockProps } from '@wordpress/block-editor'; - -/** - * The save function defines the way in which the different attributes should - * be combined into the final markup, which is then serialized by the block - * editor into `post_content`. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save - * - * @return {WPElement} Element to render. - */ -export default function save() { - return ( -

- {'{{title}} - hello from the saved content!'} -

- ); -} -{{/isStaticVariant}} diff --git a/bin/create-block/templates/javascript/style.scss.mustache b/bin/create-block/templates/javascript/style.scss.mustache deleted file mode 100644 index b76ce02b..00000000 --- a/bin/create-block/templates/javascript/style.scss.mustache +++ /dev/null @@ -1,18 +0,0 @@ -/** - * The following styles get applied both on the front of your site - * and in the editor. - * - * Imported style.css file(s) (applies to SASS and SCSS extensions) - * get bundled into one style-index.css file that is meant to be - * used both on the front-end and in the editor. - * - * Replace them with your own styles or remove the file completely. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#block-styles - */ - -.wp-block-{{namespace}}-{{slug}} { - background-color: #21759b; - color: #fff; - padding: 2px; -} diff --git a/bin/create-block/templates/typescript/edit.tsx.mustache b/bin/create-block/templates/typescript/edit.tsx.mustache deleted file mode 100644 index 060f33d4..00000000 --- a/bin/create-block/templates/typescript/edit.tsx.mustache +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Retrieves the translation of text. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ - */ -import { __ } from '@wordpress/i18n'; - -/** - * React hook that is used to mark the block wrapper element. - * It provides all the necessary props like the class name. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops - */ -import { useBlockProps } from '@wordpress/block-editor'; - -/** - * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. - * Those files can contain any CSS code that gets applied to the editor. - * - * @see https://www.npmjs.com/package/@wordpress/scripts#using-css - */ -import './index.scss'; - -/** - * The edit function describes the structure of your block in the context of the - * editor. This represents what the editor will render when the block is used. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit - * - * @return {WPElement} Element to render. - */ -export default function Edit() { - return ( -

- { __('Block Title - hello from the editor!', 'wp-newsletter-builder') } -

- ); -} diff --git a/bin/create-block/templates/typescript/index.scss.mustache b/bin/create-block/templates/typescript/index.scss.mustache deleted file mode 100644 index 76e79841..00000000 --- a/bin/create-block/templates/typescript/index.scss.mustache +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The following styles get applied inside the editor only. - * - * All imported CSS files are bundled into one chunk named after the entry point, - * which defaults to index.js, and thus the file created becomes index.css. - * This is for styles used only in the editor. - * - * Replace them with your own styles or remove the file completely. - */ - -.wp-block-{{namespace}}-{{slug}} { - border: 1px dotted #f00; -} diff --git a/bin/create-block/templates/typescript/index.ts.mustache b/bin/create-block/templates/typescript/index.ts.mustache deleted file mode 100644 index 8598b1cf..00000000 --- a/bin/create-block/templates/typescript/index.ts.mustache +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Registers a new block provided a unique name and an object defining its behavior. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ - */ -import { registerBlockType } from '@wordpress/blocks'; - -/** - * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. - * All files containing `style` keyword are bundled together. The code used - * gets applied both to the front of your site and to the editor. - * - * @see https://www.npmjs.com/package/@wordpress/scripts#using-css - */ -import './style.scss'; - -/** - * Internal dependencies - */ -import edit from './edit'; -{{#isStaticVariant}} -import save from './save'; -{{/isStaticVariant}} -import metadata from './block.json'; - -/** - * Every block starts by registering a new block type definition. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ - */ -registerBlockType( - /* @ts-expect-error Provided types are inaccurate to the actual plugin API. */ - metadata, - { - apiVersion: 2, - edit, - {{#isStaticVariant}} - save, - {{/isStaticVariant}} - title: metadata.title, - }, -); diff --git a/bin/create-block/templates/typescript/save.tsx.mustache b/bin/create-block/templates/typescript/save.tsx.mustache deleted file mode 100644 index 15a1c598..00000000 --- a/bin/create-block/templates/typescript/save.tsx.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{#isStaticVariant}} -/** - * React hook that is used to mark the block wrapper element. - * It provides all the necessary props like the class name. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops - */ -import { useBlockProps } from '@wordpress/block-editor'; - -/** - * The save function defines the way in which the different attributes should - * be combined into the final markup, which is then serialized by the block - * editor into `post_content`. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#save - * - * @return {WPElement} Element to render. - */ -export default function save() { - return ( -

- {'{{title}} - hello from the saved content!'} -

- ); -} -{{/isStaticVariant}} diff --git a/bin/create-block/templates/typescript/style.scss.mustache b/bin/create-block/templates/typescript/style.scss.mustache deleted file mode 100644 index b76ce02b..00000000 --- a/bin/create-block/templates/typescript/style.scss.mustache +++ /dev/null @@ -1,18 +0,0 @@ -/** - * The following styles get applied both on the front of your site - * and in the editor. - * - * Imported style.css file(s) (applies to SASS and SCSS extensions) - * get bundled into one style-index.css file that is meant to be - * used both on the front-end and in the editor. - * - * Replace them with your own styles or remove the file completely. - * - * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#block-styles - */ - -.wp-block-{{namespace}}-{{slug}} { - background-color: #21759b; - color: #fff; - padding: 2px; -} diff --git a/build/blocks/index.asset.php b/build/blocks/index.asset.php new file mode 100644 index 00000000..56a6f78c --- /dev/null +++ b/build/blocks/index.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'cb910f84d6beddcdcf0c'); diff --git a/build/blocks/index.css b/build/blocks/index.css new file mode 100644 index 00000000..2cb9ba77 --- /dev/null +++ b/build/blocks/index.css @@ -0,0 +1,7 @@ +.main,.mso,body{-webkit-text-size-adjust:100%;background-color:#fff;color:#000;margin:0;padding:0}figure{margin:0}figure,img{display:block}img{height:auto;line-height:100%;max-width:100%;outline:none;text-decoration:none}a img,img{border:0}.image-fix{display:block}table,td{border-collapse:collapse} +.wp-newsletter-builder-container{margin:0 auto;max-width:600px;min-width:320px;width:320px;width:calc(28000% - 167400px)}.has-text-align-left{text-align:left}.has-text-align-center{text-align:center}.has-text-align-right{text-align:right}.wp-newsletter-builder__ad{margin:30px 0}table.wrapper{background-color:#fff;min-width:320px;table-layout:fixed;width:100%}.liveintent-disclosures img{display:inline} +h2,h3,h4,h5,h6{font-family:Georgia,serif;font-weight:700;line-height:1.3}h2{font-size:26px}h3{font-size:20px}h4{font-size:18px}h5{font-size:16px}h6{font-size:14px} +.wp-block-image{margin-bottom:20px}.aligncenter>img{margin-left:auto;margin-right:auto} +p{font-family:Merriweather,Georgia,serif;font-size:16px;line-height:1.33} +.wp-block-button{font-weight:700;margin:0 auto;max-width:50%;width:-moz-max-content;width:max-content}.wp-block-button.wp-newsletter-builder__subscribe{max-width:none;text-transform:uppercase;width:100%}.wp-block-button.wp-newsletter-builder__subscribe .wp-element-button{display:block}.wp-element-button{-webkit-text-size-adjust:none;background-color:#d62827;border-radius:4px;color:#fff;display:inline-block;font-family:Verdana,sans-serif;font-size:14px;font-weight:700;line-height:24px;padding:12px;text-align:center;text-decoration:none} +.wp-block-separator,hr{background-color:#979797;border:0;height:2px;margin:30px auto;max-width:40px}.wp-block-separator.is-style-wide,hr.is-style-wide{max-width:none} diff --git a/.phpcs/.gitkeep b/build/blocks/index.js similarity index 100% rename from .phpcs/.gitkeep rename to build/blocks/index.js diff --git a/build/editor/index.asset.php b/build/editor/index.asset.php new file mode 100644 index 00000000..2d14e46b --- /dev/null +++ b/build/editor/index.asset.php @@ -0,0 +1 @@ + array(), 'version' => 'a73e01d1b0eb49b5942b'); diff --git a/build/editor/index.css b/build/editor/index.css new file mode 100644 index 00000000..2b25e957 --- /dev/null +++ b/build/editor/index.css @@ -0,0 +1 @@ +html :where(.editor-styles-wrapper) h2,html :where(.editor-styles-wrapper) h3,html :where(.editor-styles-wrapper) h4,html :where(.editor-styles-wrapper) h5,html :where(.editor-styles-wrapper) h6{font-family:Georgia,serif;font-weight:700;line-height:1.3}html :where(.editor-styles-wrapper) h2{font-size:26px}html :where(.editor-styles-wrapper) h3{font-size:20px}html :where(.editor-styles-wrapper) h4{font-size:18px}html :where(.editor-styles-wrapper) h5{font-size:16px}html :where(.editor-styles-wrapper) h6{font-size:14px}.block-editor .editor-styles-wrapper{margin:0 auto;max-width:600px;min-width:320px;width:320px;width:calc(28000% - 167400px)}.block-editor .editor-styles-wrapper .wp-block-image{margin-bottom:20px}.block-editor .editor-styles-wrapper .aligncenter>img{margin-left:auto;margin-right:auto}.block-editor .editor-styles-wrapper p{font-family:Merriweather,Georgia,serif;font-size:16px;line-height:1.33}.block-editor .editor-styles-wrapper .wp-block-button{font-weight:700;margin:0 auto;max-width:50%;width:-moz-max-content;width:max-content}.block-editor .editor-styles-wrapper .wp-block-button.wp-newsletter-builder__subscribe{max-width:none;text-transform:uppercase;width:100%}.block-editor .editor-styles-wrapper .wp-block-button.wp-newsletter-builder__subscribe .wp-element-button{display:block}.block-editor .editor-styles-wrapper .wp-element-button{-webkit-text-size-adjust:none;background-color:#d62827;border-radius:4px;color:#fff;display:inline-block;font-family:Verdana,sans-serif;font-size:14px;font-weight:700;line-height:24px;padding:12px;text-align:center;text-decoration:none}.block-editor .editor-styles-wrapper .wp-block-separator,.block-editor .editor-styles-wrapper hr{background-color:#979797;border:0;height:2px;margin:30px auto;max-width:40px}.block-editor .editor-styles-wrapper .wp-block-separator.is-style-wide,.block-editor .editor-styles-wrapper hr.is-style-wide{max-width:none} diff --git a/build/editor/index.js b/build/editor/index.js new file mode 100644 index 00000000..e69de29b diff --git a/build/email-settings/block.json b/build/email-settings/block.json new file mode 100644 index 00000000..b933b12e --- /dev/null +++ b/build/email-settings/block.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/email-settings", + "version": "0.1.0", + "title": "Email Settings", + "category": "design", + "icon": "email", + "description": "Block to set the email subject, preview text, and list.", + "textdomain": "email-settings", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php" +} \ No newline at end of file diff --git a/build/email-settings/index.asset.php b/build/email-settings/index.asset.php new file mode 100644 index 00000000..37da29a9 --- /dev/null +++ b/build/email-settings/index.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3ab1fcb89e35438d76a1'); diff --git a/build/email-settings/index.css b/build/email-settings/index.css new file mode 100644 index 00000000..1199faf3 --- /dev/null +++ b/build/email-settings/index.css @@ -0,0 +1 @@ +.wp-block-wp-newsletter-builder-email-settings{background-color:#eee;padding:5px} diff --git a/build/email-settings/index.js b/build/email-settings/index.js new file mode 100644 index 00000000..9d4f3a3e --- /dev/null +++ b/build/email-settings/index.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t={823:function(e,t,r){var n=window.wp.blocks,l=window.wp.element,a=window.wp.i18n,s=window.wp.components,o=window.wp.apiFetch,i=r.n(o),c=window.wp.data,d=window.wp.blockEditor,u=r(196),p=r.n(u),m=r(893);!function(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(".rmsc{--rmsc-main: #4285f4;--rmsc-hover: #f1f3f5;--rmsc-selected: #e2e6ea;--rmsc-border: #ccc;--rmsc-gray: #aaa;--rmsc-bg: #fff;--rmsc-p: 10px;--rmsc-radius: 4px;--rmsc-h: 38px}.rmsc *{box-sizing:border-box;transition:all .2s ease}.rmsc .gray{color:var(--rmsc-gray)}.rmsc .dropdown-content{position:absolute;z-index:1;top:100%;width:100%;padding-top:8px}.rmsc .dropdown-content .panel-content{overflow:hidden;border-radius:var(--rmsc-radius);background:var(--rmsc-bg);box-shadow:0 0 0 1px #0000001a,0 4px 11px #0000001a}.rmsc .dropdown-container{position:relative;outline:0;background-color:var(--rmsc-bg);border:1px solid var(--rmsc-border);border-radius:var(--rmsc-radius)}.rmsc .dropdown-container[aria-disabled=true]:focus-within{box-shadow:var(--rmsc-gray) 0 0 0 1px;border-color:var(--rmsc-gray)}.rmsc .dropdown-container:focus-within{box-shadow:var(--rmsc-main) 0 0 0 1px;border-color:var(--rmsc-main)}.rmsc .dropdown-heading{position:relative;padding:0 var(--rmsc-p);display:flex;align-items:center;width:100%;height:var(--rmsc-h);cursor:default;outline:0}.rmsc .dropdown-heading .dropdown-heading-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.rmsc .clear-selected-button{cursor:pointer;background:none;border:0;padding:0;display:flex}.rmsc .options{max-height:260px;overflow-y:auto;margin:0;padding-left:0}.rmsc .options li{list-style:none;margin:0}.rmsc .select-item{box-sizing:border-box;cursor:pointer;display:block;padding:var(--rmsc-p);outline-offset:-1px;outline-color:var(--rmsc-primary)}.rmsc .select-item:hover{background:var(--rmsc-hover)}.rmsc .select-item.selected{background:var(--rmsc-selected)}.rmsc .no-options{padding:var(--rmsc-p);text-align:center;color:var(--rmsc-gray)}.rmsc .search{width:100%;position:relative;border-bottom:1px solid var(--rmsc-border)}.rmsc .search input{background:none;height:var(--rmsc-h);padding:0 var(--rmsc-p);width:100%;outline:0;border:0;font-size:1em}.rmsc .search input:focus{background:var(--rmsc-hover)}.rmsc .search-clear-button{cursor:pointer;position:absolute;top:0;right:0;bottom:0;background:none;border:0;padding:0 calc(var(--rmsc-p) / 2)}.rmsc .search-clear-button [hidden]{display:none}.rmsc .item-renderer{display:flex;align-items:baseline}.rmsc .item-renderer input{margin:0 5px 0 0}.rmsc .item-renderer.disabled{opacity:.5}.rmsc .spinner{animation:rotate 2s linear infinite}.rmsc .spinner .path{stroke:var(--rmsc-border);stroke-width:4px;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}\n");var h={allItemsAreSelected:"All items are selected.",clearSearch:"Clear Search",clearSelected:"Clear Selected",noOptions:"No options",search:"Search",selectAll:"Select All",selectAllFiltered:"Select All (Filtered)",selectSomeItems:"Select...",create:"Create"},f={value:[],hasSelectAll:!0,className:"multi-select",debounceDuration:200,options:[]},b=p().createContext({}),v=({props:e,children:t})=>{let[r,n]=(0,u.useState)(e.options);return(0,u.useEffect)((()=>{n(e.options)}),[e.options]),(0,m.jsx)(b.Provider,{value:{t:t=>{var r;return(null==(r=e.overrideStrings)?void 0:r[t])||h[t]},...f,...e,options:r,setOptions:n},children:t})},w=()=>p().useContext(b),g={when:!0,eventTypes:["keydown"]};function x(e,t,r){let n=(0,u.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),l=Object.assign({},g,r),{when:a,eventTypes:s}=l,o=(0,u.useRef)(t),{target:i}=l;(0,u.useEffect)((()=>{o.current=t}));let c=(0,u.useCallback)((e=>{n.some((t=>e.key===t||e.code===t))&&o.current(e)}),[n]);(0,u.useEffect)((()=>{if(a&&typeof window<"u"){let e=i?i.current:window;return s.forEach((t=>{e&&e.addEventListener(t,c)})),()=>{s.forEach((t=>{e&&e.removeEventListener(t,c)}))}}}),[a,s,n,i,t])}var y={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",SPACE:"Space"},_=()=>(0,m.jsxs)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"dropdown-search-clear-icon gray",children:[(0,m.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,m.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),k=({checked:e,option:t,onClick:r,disabled:n})=>(0,m.jsxs)("div",{className:"item-renderer "+(n?"disabled":""),children:[(0,m.jsx)("input",{type:"checkbox",onChange:r,checked:e,tabIndex:-1,disabled:n}),(0,m.jsx)("span",{children:t.label})]}),E=({itemRenderer:e=k,option:t,checked:r,tabIndex:n,disabled:l,onSelectionChanged:a,onClick:s})=>{let o=(0,u.useRef)(),i=()=>{l||a(!r)};return x([y.ENTER,y.SPACE],(e=>{i(),e.preventDefault()}),{target:o}),(0,m.jsx)("label",{className:"select-item "+(r?"selected":""),role:"option","aria-selected":r,tabIndex:n,ref:o,children:(0,m.jsx)(e,{option:t,checked:r,onClick:e=>{i(),s(e)},disabled:l})})},S=({options:e,onClick:t,skipIndex:r})=>{let{disabled:n,value:l,onChange:a,ItemRenderer:s}=w();return(0,m.jsx)(m.Fragment,{children:e.map(((e,o)=>{let i=o+r;return(0,m.jsx)("li",{children:(0,m.jsx)(E,{tabIndex:i,option:e,onSelectionChanged:t=>((e,t)=>{n||a(t?[...l,e]:l.filter((t=>t.value!==e.value)))})(e,t),checked:!!l.find((t=>t.value===e.value)),onClick:e=>t(e,i),itemRenderer:s,disabled:e.disabled||n})},(null==e?void 0:e.key)||o)}))})},C=()=>{let{t:e,onChange:t,options:r,setOptions:n,value:l,filterOptions:a,ItemRenderer:s,disabled:o,disableSearch:i,hasSelectAll:c,ClearIcon:d,debounceDuration:p,isCreatable:h,onCreateOption:f}=w(),b=(0,u.useRef)(),v=(0,u.useRef)(),[g,k]=(0,u.useState)(""),[C,j]=(0,u.useState)(r),[N,O]=(0,u.useState)(""),[R,A]=(0,u.useState)(0),I=(0,u.useCallback)(((e,t)=>{let r;return function(...n){clearTimeout(r),r=setTimeout((()=>{e.apply(null,n)}),t)}})((e=>O(e)),p),[]),T=(0,u.useMemo)((()=>{let e=0;return i||(e+=1),c&&(e+=1),e}),[i,c]),P={label:e(g?"selectAllFiltered":"selectAll"),value:""},D=()=>{var e;O(""),k(""),null==(e=null==v?void 0:v.current)||e.focus()},L=e=>A(e);x([y.ARROW_DOWN,y.ARROW_UP],(e=>{switch(e.code){case y.ARROW_UP:B(-1);break;case y.ARROW_DOWN:B(1);break;default:return}e.stopPropagation(),e.preventDefault()}),{target:b});let W=async()=>{let e={label:g,value:g,__isNew__:!0};f&&(e=await f(g)),n([e,...r]),D(),t([...l,e])},B=e=>{let t=R+e;t=Math.max(0,t),t=Math.min(t,r.length+Math.max(T-1,0)),A(t)};(0,u.useEffect)((()=>{var e,t;null==(t=null==(e=null==b?void 0:b.current)?void 0:e.querySelector(`[tabIndex='${R}']`))||t.focus()}),[R]);let[F,H]=(0,u.useMemo)((()=>{let e=C.filter((e=>!e.disabled));return[e.every((e=>-1!==l.findIndex((t=>t.value===e.value)))),0!==e.length]}),[C,l]);(0,u.useEffect)((()=>{(async()=>a?await a(r,N):function(e,t){return t?e.filter((({label:e,value:r})=>null!=e&&null!=r&&e.toLowerCase().includes(t.toLowerCase()))):e}(r,N))().then(j)}),[N,r]);let M=(0,u.useRef)();x([y.ENTER],W,{target:M});let V=h&&g&&!C.some((e=>(null==e?void 0:e.value)===g));return(0,m.jsxs)("div",{className:"select-panel",role:"listbox",ref:b,children:[!i&&(0,m.jsxs)("div",{className:"search",children:[(0,m.jsx)("input",{placeholder:e("search"),type:"text","aria-describedby":e("search"),onChange:e=>{I(e.target.value),k(e.target.value),A(0)},onFocus:()=>{A(0)},value:g,ref:v,tabIndex:0}),(0,m.jsx)("button",{type:"button",className:"search-clear-button",hidden:!g,onClick:D,"aria-label":e("clearSearch"),children:d||(0,m.jsx)(_,{})})]}),(0,m.jsxs)("ul",{className:"options",children:[c&&H&&(0,m.jsx)(E,{tabIndex:1===T?0:1,checked:F,option:P,onSelectionChanged:e=>{let n=(e=>{let t=C.filter((e=>!e.disabled)).map((e=>e.value));if(e){let e=[...l.map((e=>e.value)),...t];return(a?C:r).filter((t=>e.includes(t.value)))}return l.filter((e=>!t.includes(e.value)))})(e);t(n)},onClick:()=>L(1),itemRenderer:s,disabled:o}),C.length?(0,m.jsx)(S,{skipIndex:T,options:C,onClick:(e,t)=>L(t)}):V?(0,m.jsx)("li",{onClick:W,className:"select-item creatable",tabIndex:1,ref:M,children:`${e("create")} "${g}"`}):(0,m.jsx)("li",{className:"no-options",children:e("noOptions")})]})]})},j=({expanded:e})=>(0,m.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"dropdown-heading-dropdown-arrow gray",children:(0,m.jsx)("path",{d:e?"M18 15 12 9 6 15":"M6 9L12 15 18 9"})}),N=()=>{let{t:e,value:t,options:r,valueRenderer:n}=w(),l=0===t.length,a=t.length===r.length,s=n&&n(t,r);return l?(0,m.jsx)("span",{className:"gray",children:s||e("selectSomeItems")}):(0,m.jsx)("span",{children:s||(a?e("allItemsAreSelected"):t.map((e=>e.label)).join(", "))})},O=({size:e=24})=>(0,m.jsx)("span",{style:{width:e,marginRight:"0.2rem"},children:(0,m.jsx)("svg",{width:e,height:e,className:"spinner",viewBox:"0 0 50 50",style:{display:"inline",verticalAlign:"middle"},children:(0,m.jsx)("circle",{cx:"25",cy:"25",r:"20",fill:"none",className:"path"})})}),R=()=>{let{t:e,onMenuToggle:t,ArrowRenderer:r,shouldToggleOnHover:n,isLoading:l,disabled:a,onChange:s,labelledBy:o,value:i,isOpen:c,defaultIsOpen:d,ClearSelectedIcon:p,closeOnChangedValue:h}=w();(0,u.useEffect)((()=>{h&&g(!1)}),[i]);let[f,b]=(0,u.useState)(!0),[v,g]=(0,u.useState)(d),[k,E]=(0,u.useState)(!1),S=r||j,R=(0,u.useRef)();(function(e,t){let r=(0,u.useRef)(!1);(0,u.useEffect)((()=>{r.current?e():r.current=!0}),t)})((()=>{t&&t(v)}),[v]),(0,u.useEffect)((()=>{void 0===d&&"boolean"==typeof c&&(b(!1),g(c))}),[c]),x([y.ENTER,y.ARROW_DOWN,y.SPACE,y.ESCAPE],(e=>{var t;["text","button"].includes(e.target.type)&&[y.SPACE,y.ENTER].includes(e.code)||(f&&(e.code===y.ESCAPE?(g(!1),null==(t=null==R?void 0:R.current)||t.focus()):g(!0)),e.preventDefault())}),{target:R});let A=e=>{f&&n&&g(e)};return(0,m.jsxs)("div",{tabIndex:0,className:"dropdown-container","aria-labelledby":o,"aria-expanded":v,"aria-readonly":!0,"aria-disabled":a,ref:R,onFocus:()=>!k&&E(!0),onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&f&&(E(!1),g(!1))},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),children:[(0,m.jsxs)("div",{className:"dropdown-heading",onClick:()=>{f&&g(!l&&!a&&!v)},children:[(0,m.jsx)("div",{className:"dropdown-heading-value",children:(0,m.jsx)(N,{})}),l&&(0,m.jsx)(O,{}),i.length>0&&null!==p&&(0,m.jsx)("button",{type:"button",className:"clear-selected-button",onClick:e=>{e.stopPropagation(),s([]),f&&g(!1)},disabled:a,"aria-label":e("clearSelected"),children:p||(0,m.jsx)(_,{})}),(0,m.jsx)(S,{expanded:v})]}),v&&(0,m.jsx)("div",{className:"dropdown-content",children:(0,m.jsx)("div",{className:"panel-content",children:(0,m.jsx)(C,{})})})]})},A=e=>(0,m.jsx)(v,{props:e,children:(0,m.jsx)("div",{className:`rmsc ${e.className||"multi-select"}`,children:(0,m.jsx)(R,{})})});const{newsletterBuilder:{fromNames:I=[],templates:T={}}={}}=window,P=I.map((e=>({value:e,label:e})));var D=function(e){let{contentHandler:t,typeHandler:r,imageHandler:n,templateHandler:o,fromNameHandler:c,typeValue:d,templateValue:u,fromNameValue:p}=e;const[m,h]=(0,l.useState)({});(0,l.useEffect)((()=>{Object.keys(m).length>0||i()({path:"/wp-newsletter-builder/v1/email-types"}).then((e=>{h(e)}))}),[m]),(0,l.useEffect)((()=>{p||c(I[0])}),[c,p]);const f=(e,t)=>e.labelt.label?1:0,b=e=>{var t;const r=null!==(t=e[d]?.templates)&&void 0!==t?t:[];if(!r.length)return[];const n=r.map((e=>({value:e,label:T[parseInt(e,10)]})));return n.sort(f),n.unshift({label:(0,a.__)("Select a template","wp-newsletter-builder"),value:""}),n},v=async e=>{if(o(e),!e)return;const r=m[d],{image:l,from_name:a}=r;n(parseInt(l,10)),c(a),i()({path:`/wp/v2/nb_template/${e}?context=edit`}).then((e=>{const{content:r}=e;t(r.raw)}))};return(0,l.useEffect)((()=>{if(!d)return;const e=m[d]?.templates;e&&1===e.length&&v(e[0])}),[d]),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(s.SelectControl,{label:(0,a.__)("Select Header Type","wp-newsletter-builder"),value:d,options:(e=>{const t=Object.keys(e).map((t=>({label:e[t].label,value:t})));return t.sort(f),t.unshift({label:(0,a.__)("Select a type","wp-newsletter-builder"),value:""}),t})(m),onChange:r}),b(m).length?(0,l.createElement)(s.SelectControl,{label:(0,a.__)("Select Template","wp-newsletter-builder"),value:u,options:b(m),onChange:v}):null,(0,l.createElement)(s.SelectControl,{label:(0,a.__)("From Name","wp-newsletter-builder"),value:p||m[d]?.from_name,options:P,onChange:c}))},L=window.wp.coreData,W=window.lodash,B=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/email-settings","version":"0.1.0","title":"Email Settings","category":"design","icon":"email","description":"Block to set the email subject, preview text, and list.","textdomain":"email-settings","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php"}');(0,n.registerBlockType)(B,{apiVersion:2,edit:function(){const[e,t]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=(0,c.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[n,l]=(0,L.useEntityProp)("postType",r,"meta",t),a="function"==typeof l?l:()=>console.error(`Error attempting to set post meta for post type ${r}. Does it have support for custom-fields?`);return["object"==typeof n?n:{},e=>a((0,W.cloneDeep)(e))]}(),{nb_newsletter_subject:r,nb_newsletter_preview:o,nb_newsletter_list:u,nb_newsletter_email_type:p,nb_newsletter_template:m,nb_newsletter_from_name:h}=e,[f,b]=(0,l.useState)([]),v=Array.isArray(u)?u:[u],w=f.length>0?f.map((e=>({label:e.Name,value:e.ListID}))):[],g=w.filter((e=>v.includes(e.value)));return(0,l.useEffect)((()=>{f.length>0||i()({path:"/wp-newsletter-builder/v1/lists"}).then((e=>{b(e)}))}),[f]),(0,l.createElement)("div",(0,d.useBlockProps)(),(0,l.createElement)(D,{typeValue:p,contentHandler:e=>{(0,c.dispatch)("core/block-editor").resetBlocks((0,n.parse)(e))},typeHandler:e=>{t({nb_newsletter_email_type:e})},imageHandler:e=>{t({nb_newsletter_header_img:e})},templateHandler:e=>{t({nb_newsletter_template:e})},fromNameHandler:e=>{t({nb_newsletter_from_name:e})},templateValue:m,fromNameValue:h}),(0,l.createElement)(s.TextControl,{label:(0,a.__)("Subject","wp-newsletter-builder"),placeholder:(0,a.__)("Enter subject","wp-newsletter-builder"),value:r,onChange:e=>t({nb_newsletter_subject:e})}),(0,l.createElement)(s.TextControl,{label:(0,a.__)("Preview Text","wp-newsletter-builder"),placeholder:(0,a.__)("Enter preview text","wp-newsletter-builder"),value:o,onChange:e=>t({nb_newsletter_preview:e})}),f.length>0?(0,l.createElement)("label",{htmlFor:"wp-newsletter-builder-list"},(0,a.__)("Email List","wp-newsletter-builder"),(0,l.createElement)(A,{labelledBy:(0,a.__)("List","wp-newsletter-builder"),value:g,options:w,onChange:e=>{const r=e.map((e=>e.value));t({nb_newsletter_list:r})},hasSelectAll:!1,overrideStrings:{selectSomeItems:(0,a.__)("Select Email List","wp-newsletter-builder")}})):(0,l.createElement)(s.Spinner,null))},title:B.title})},251:function(e,t,r){var n=r(196),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,a={},c=null,d=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)s.call(t,n)&&!i.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:l,type:e,key:c,ref:d,props:a,_owner:o.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},893:function(e,t,r){e.exports=r(251)},196:function(e){e.exports=window.React}},r={};function n(e){var l=r[e];if(void 0!==l)return l.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=function(t,r,l,a){if(!r){var s=1/0;for(d=0;d=a)&&Object.keys(n.O).every((function(e){return n.O[e](r[i])}))?r.splice(i--,1):(o=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[r,l,a]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={646:0,165:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var l,a,s=r[0],o=r[1],i=r[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(l in o)n.o(o,l)&&(n.m[l]=o[l]);if(i)var d=i(n)}for(t&&t(r);c -

> - -

-{{/isDynamicVariant}} diff --git a/build/email-settings/style-index.css b/build/email-settings/style-index.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/build/email-settings/style-index.css @@ -0,0 +1 @@ + diff --git a/build/footer/block.json b/build/footer/block.json new file mode 100644 index 00000000..b1f8e4fc --- /dev/null +++ b/build/footer/block.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/footer", + "version": "0.1.0", + "title": "Newsletter Footer", + "category": "design", + "icon": "align-wide", + "description": "Outputs the company logo, social links, address, and footer links.", + "textdomain": "footer", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php", + "attributes": { + "narrow_separator": { + "type": "boolean", + "default": false + } + } +} \ No newline at end of file diff --git a/build/footer/index.asset.php b/build/footer/index.asset.php new file mode 100644 index 00000000..4dd3f8cd --- /dev/null +++ b/build/footer/index.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '8e022b5b4706ead2affa'); diff --git a/build/footer/index.css b/build/footer/index.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/build/footer/index.css @@ -0,0 +1 @@ + diff --git a/build/footer/index.js b/build/footer/index.js new file mode 100644 index 00000000..537b76f5 --- /dev/null +++ b/build/footer/index.js @@ -0,0 +1 @@ +!function(){var e,t={168:function(e,t,r){"use strict";var n=window.wp.blocks,l=window.wp.element,i=window.wp.i18n,o=r(184),s=r.n(o),a=window.wp.blockEditor,c=window.wp.apiFetch,u=r.n(c),p=window.wp.components,w=window.wp.data,d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/footer","version":"0.1.0","title":"Newsletter Footer","category":"design","icon":"align-wide","description":"Outputs the company logo, social links, address, and footer links.","textdomain":"footer","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php","attributes":{"narrow_separator":{"type":"boolean","default":false}}}');(0,n.registerBlockType)(d,{apiVersion:2,edit:function(e){var t,r,n,o,c,d;let{attributes:{narrow_separator:f=!1}}=e;const[m,b]=(0,l.useState)(!0),[_,g]=(0,l.useState)(),h=null!==(t=_?.facebook_url)&&void 0!==t?t:"",k=null!==(r=_?.twitter_url)&&void 0!==r?r:"",v=null!==(n=_?.instagram_url)&&void 0!==n?n:"",E=null!==(o=_?.youtube_url)&&void 0!==o?o:"",y=null!==(c=_?.image)&&void 0!==c?c:0,N=null!==(d=_?.address)&&void 0!==d?d:"";(0,l.useEffect)((()=>{_?b(!1):u()({path:"/wp-newsletter-builder/v1/footer_settings"}).then((e=>{g(e)}))}),[_]);const{media:O=null}=(0,w.useSelect)((e=>({media:y?e("core").getMedia(y):null})),[_,y]),x=O?O.source_url:"",S=O?O.alt_text:"";return(0,l.createElement)("div",(0,a.useBlockProps)(),(0,l.createElement)("hr",{className:s()("wp-block-separator","has-alpha-channel-opacity",{"is-style-wide":!f})}),m?(0,l.createElement)(p.Spinner,null):(0,l.createElement)(l.Fragment,null,h||k||v||E?(0,l.createElement)("div",{className:"wp-block-wp-newsletter-builder-footer__social-links"},h?(0,l.createElement)("span",{className:"wp-block-wp-newsletter-builder-footer__social-links__item"},(0,l.createElement)("a",{className:"wp-block-wp-newsletter-builder-footer__social-links__link",href:h},(0,l.createElement)("img",{src:"/wp-content/plugins/wp-newsletter-builder/images/facebook.png",alt:"Facebook",height:"26",width:"26"}))):null,k?(0,l.createElement)("span",{className:"wp-block-wp-newsletter-builder-footer__social-links__item"},(0,l.createElement)("a",{className:"wp-block-wp-newsletter-builder-footer__social-links__link",href:k},(0,l.createElement)("img",{src:"/wp-content/plugins/wp-newsletter-builder/images/twitter.png",alt:"Twitter",height:"26",width:"26"}))):null,v?(0,l.createElement)("span",{className:"wp-block-wp-newsletter-builder-footer__social-links__item"},(0,l.createElement)("a",{className:"wp-block-wp-newsletter-builder-footer__social-links__link",href:v},(0,l.createElement)("img",{src:"/wp-content/plugins/wp-newsletter-builder/images/instagram.png",alt:"Instagram",height:"26",width:"26"}))):null,E?(0,l.createElement)("span",{className:"wp-block-wp-newsletter-builder-footer__social-links__item"},(0,l.createElement)("a",{className:"wp-block-wp-newsletter-builder-footer__social-links__link",href:E},(0,l.createElement)("img",{src:"/wp-content/plugins/wp-newsletter-builder/images/youtube.png",alt:"YouTube",height:"26",width:"26"}))):null):null,x?(0,l.createElement)("div",{className:"wp-block-wp-newsletter-builder-footer__logo"},(0,l.createElement)("img",{src:x,alt:S,width:"300"})):null,N?(0,l.createElement)("div",{className:"wp-block-wp-newsletter-builder-footer__address"},N):null),(0,l.createElement)("div",{className:"wp-block-wp-newsletter-builder-footer__links"},(0,l.createElement)("preferences",null,(0,i.__)("Preferences","wp-newsletter-builder"))," | ",(0,l.createElement)("unsubscribe",null,(0,i.__)("Unsubscribe","wp-newsletter-builder"))))},title:d.title})},184:function(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function l(){for(var e=[],t=0;t=i)&&Object.keys(n.O).every((function(e){return n.O[e](r[a])}))?r.splice(a--,1):(s=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[r,l,i]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={264:0,880:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var l,i,o=r[0],s=r[1],a=r[2],c=0;if(o.some((function(t){return 0!==e[t]}))){for(l in s)n.o(s,l)&&(n.m[l]=s[l]);if(a)var u=a(n)}for(t&&t(r);c. + * @param WP_Block $block_instance The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-newsletter-builder + */ + +$nb_settings = get_option( 'nb_campaign_monitor_settings' ); +$nb_facebook_url = $nb_settings['footer_settings']['facebook_url'] ?? ''; +$nb_twitter_url = $nb_settings['footer_settings']['twitter_url'] ?? ''; +$nb_instagram_url = $nb_settings['footer_settings']['instagram_url'] ?? ''; +$nb_youtube_url = $nb_settings['footer_settings']['youtube_url'] ?? ''; +$nb_image_id = $nb_settings['footer_settings']['image'] ?? 0; +$nb_address = $nb_settings['footer_settings']['address'] ?? ''; +$nb_has_social_links = ! empty( $nb_facebook_url ) || ! empty( $nb_twitter_url ) || ! empty( $nb_instagram_url ) || ! empty( $nb_youtube_url ); +$nb_narrow_separator = ! empty( $attributes['narrow_separator'] ); +$nb_separator_class = $nb_narrow_separator ? '' : 'is-style-wide'; +?> +
align="center"> +
+ + + + + + + + + + + + + + +
diff --git a/build/footer/style-index.css b/build/footer/style-index.css new file mode 100644 index 00000000..5869efc6 --- /dev/null +++ b/build/footer/style-index.css @@ -0,0 +1 @@ +.wp-block-wp-newsletter-builder-footer{font-family:Verdana,sans-serif;font-size:13px;margin-bottom:30px;text-align:center}.wp-block-wp-newsletter-builder-footer__social-links{margin-top:20px;text-align:center}.wp-block-wp-newsletter-builder-footer__social-links__item{padding-right:4px}.wp-block-wp-newsletter-builder-footer__social-links__link{background-color:#d62827;border-radius:50%;color:#d62827;display:inline-block;height:26px;max-height:26px;text-decoration:underline;transition:opacity .1s ease-in;width:26px}.wp-block-wp-newsletter-builder-footer__logo{margin:20px auto;text-align:center;width:300px}.wp-block-wp-newsletter-builder-footer__address{margin-top:20px}.wp-block-wp-newsletter-builder-footer__links{color:#595959;margin-top:20px}.wp-block-wp-newsletter-builder-footer__links a,.wp-block-wp-newsletter-builder-footer__links u{color:#595959;text-decoration:underline} diff --git a/build/header/block.json b/build/header/block.json new file mode 100644 index 00000000..edd7784e --- /dev/null +++ b/build/header/block.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/header", + "version": "0.1.0", + "title": "Newsletter Header", + "category": "design", + "icon": "format-image", + "description": "Displays the header image for a newsletter", + "textdomain": "header", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php" +} \ No newline at end of file diff --git a/build/header/index.asset.php b/build/header/index.asset.php new file mode 100644 index 00000000..0b4ec3b8 --- /dev/null +++ b/build/header/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'aebe331ebd8c9c567cee'); diff --git a/build/header/index.css b/build/header/index.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/build/header/index.css @@ -0,0 +1 @@ + diff --git a/build/header/index.js b/build/header/index.js new file mode 100644 index 00000000..45e8a401 --- /dev/null +++ b/build/header/index.js @@ -0,0 +1,42 @@ +!function(){var e,t={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".alley-scripts-post-picker__post-list{display:flex;flex-wrap:wrap;float:left;height:calc(70vh - 200px);justify-content:flex-start;overflow-y:auto;padding:8px;width:100%}.alley-scripts-post-picker__post{border:1px solid #eee;height:auto;justify-content:center;margin:0 8px 8px 0;transition:background-color .2s ease-in-out;width:calc((100% - 40px)/3)}@media(min-width: 780px){.alley-scripts-post-picker__post{width:calc((100% - 40px)/5)}}.alley-scripts-post-picker__post:hover{background-color:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.alley-scripts-post-picker__load-more{clear:both;float:left;text-align:center;width:100%}","",{version:3,sources:["webpack://./src/components/post-picker/post-list.scss"],names:[],mappings:"AAAA,sCACE,YAAA,CACA,cAAA,CACA,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,WAAA,CACA,UAAA,CAGF,iCACE,qBAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,2CAAA,CACA,2BAAA,CAGA,yBATF,iCAUI,2BAAA,CAAA,CAGF,uCACE,wBAAA,CAGF,6CACE,wBAAA,CAIJ,sCACE,UAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA",sourcesContent:[".alley-scripts-post-picker__post-list {\n display: flex;\n flex-wrap: wrap;\n float: left;\n height: calc(70vh - 200px);\n justify-content: flex-start;\n overflow-y: auto;\n padding: 8px;\n width: 100%;\n}\n\n.alley-scripts-post-picker__post {\n border: 1px solid #eee;\n height: auto;\n justify-content: center;\n margin: 0 8px 8px 0;\n transition: background-color 0.2s ease-in-out;\n width: calc((100% - 40px) / 3);\n\n\n @media (min-width: 780px) {\n width: calc((100% - 40px) / 5);\n }\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\n }\n}\n\n.alley-scripts-post-picker__load-more {\n clear: both;\n float: left;\n text-align: center;\n width: 100%;\n}\n"],sourceRoot:""}]);const a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".components-modal__content{width:90vw}.alley-scripts-post-picker__buttons{clear:both;display:block;text-align:right;width:100%}.alley-scripts-post-picker__buttons button{margin:5px}","",{version:3,sources:["webpack://./src/components/post-picker/search-modal.scss"],names:[],mappings:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\n}\n\n.alley-scripts-post-picker__buttons {\n clear: both;\n display: block;\n text-align: right;\n width: 100%;\n\n button {\n margin: 5px;\n }\n}\n"],sourceRoot:""}]);const a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,'.edit-post-sidebar .autocomplete__component,.editor-styles-wrapper .autocomplete__component{margin-bottom:20px}.edit-post-sidebar .autocomplete-base-control,.editor-styles-wrapper .autocomplete-base-control{position:relative}.edit-post-sidebar .autocomplete-text-control__input,.editor-styles-wrapper .autocomplete-text-control__input{margin:0}.edit-post-sidebar .autocomplete__selection-list,.editor-styles-wrapper .autocomplete__selection-list{list-style-type:none;margin:0 0 6px;padding:0}.edit-post-sidebar .autocomplete__selection-list--item,.editor-styles-wrapper .autocomplete__selection-list--item{display:inline-block;list-style:none}.edit-post-sidebar .autocomplete__selection-list--item--button,.editor-styles-wrapper .autocomplete__selection-list--item--button{margin-bottom:4px;margin-right:3px}.edit-post-sidebar .autocomplete__selection-list--item--button::after,.editor-styles-wrapper .autocomplete__selection-list--item--button::after{content:"×";font-size:16px;line-height:20px;margin-left:5px}.edit-post-sidebar .autocomplete__dropdown,.editor-styles-wrapper .autocomplete__dropdown{background-color:#fff;border-color:rgba(0,0,0,0) #e2e4e7 #e2e4e7;border-radius:0 0 4px 4px;border-style:solid;border-width:0 1px 1px;left:0;max-height:0;overflow-y:hidden;position:absolute;top:calc(100% + 1px);visibility:hidden;width:100%;z-index:10}.edit-post-sidebar .autocomplete__dropdown--is-open,.editor-styles-wrapper .autocomplete__dropdown--is-open{box-shadow:0 3px 30px rgba(25,30,35,.1);max-height:225px;overflow-y:scroll;visibility:visible}.edit-post-sidebar .autocomplete__dropdown--notice,.editor-styles-wrapper .autocomplete__dropdown--notice{padding:15px}.edit-post-sidebar .autocomplete__dropdown--results,.editor-styles-wrapper .autocomplete__dropdown--results{list-style:none;margin:0;padding:0}.edit-post-sidebar .autocomplete__list--item,.editor-styles-wrapper .autocomplete__list--item{list-style:none}.edit-post-sidebar .autocomplete__list--item>button,.editor-styles-wrapper .autocomplete__list--item>button{background:rgba(0,0,0,0);border-color:#e2e4e7;border-style:solid;border-width:0 0 1px;height:100%;line-height:1.25;text-align:left;white-space:inherit;width:100%}.edit-post-sidebar .autocomplete__list--item:last-child>button,.editor-styles-wrapper .autocomplete__list--item:last-child>button{border-bottom:0}',"",{version:3,sources:["webpack://./src/components/selector/styles.scss"],names:[],mappings:"AAAA,4FAgBI,kBACE,CAAA,gGAMF,iBACE,CAAA,8GAMF,QACE,CAAA,sGAMF,oBACE,CAAA,cACA,CAAA,SACA,CAAA,kHAEA,oBACE,CAAA,eACA,CAAA,kIAEA,iBACE,CAAA,gBACA,CAAA,gJAEA,WACE,CAAA,cACA,CAAA,gBACA,CAAA,eACA,CAAA,0FASR,qBACE,CAAA,0CACA,CAAA,yBACA,CAAA,kBACA,CAAA,sBACA,CAAA,MACA,CAAA,YACA,CAAA,iBACA,CAAA,iBACA,CAAA,oBACA,CAAA,iBACA,CAAA,UACA,CAAA,UACA,CAAA,4GAGA,uCACE,CAAA,gBACA,CAAA,iBACA,CAAA,kBACA,CAAA,0GAIF,YACE,CAAA,4GAIF,eACE,CAAA,QACA,CAAA,SACA,CAAA,8FAOJ,eACE,CAAA,4GAEA,wBACE,CAAA,oBACA,CAAA,kBACA,CAAA,oBACA,CAAA,WACA,CAAA,gBACA,CAAA,eACA,CAAA,mBACA,CAAA,UACA,CAAA,kIAGF,eACE",sourcesContent:["//--------------------------------------------------------------\n// AutoComplete Styles\n//--------------------------------------------------------------\n\n/* stylelint-disable max-nesting-depth */\n\n//-----------------------------------------\n// Accommodate editor well, or the sidebar.\n//-----------------------------------------\n.edit-post-sidebar,\n.editor-styles-wrapper {\n .autocomplete {\n\n //-----------------------------------------\n // Parent form wrapper.\n //-----------------------------------------\n &__component {\n margin-bottom: 20px;\n }\n\n //-----------------------------------------\n // Wrapper\n //-----------------------------------------\n &-base-control {\n position: relative;\n }\n\n //-----------------------------------------\n // Input\n //-----------------------------------------\n &-text-control__input {\n margin: 0;\n }\n\n //-----------------------------------------\n // Selected buttons.\n //-----------------------------------------\n &__selection-list {\n list-style-type: none;\n margin: 0 0 6px;\n padding: 0;\n\n &--item {\n display: inline-block;\n list-style: none;\n\n &--button {\n margin-bottom: 4px;\n margin-right: 3px;\n\n &::after {\n content: '×';\n font-size: 16px;\n line-height: 20px;\n margin-left: 5px;\n }\n }\n }\n }\n\n //-----------------------------------------\n // Results\n //-----------------------------------------\n &__dropdown {\n background-color: #fff;\n border-color: transparent #e2e4e7 #e2e4e7;\n border-radius: 0 0 4px 4px;\n border-style: solid;\n border-width: 0 1px 1px;\n left: 0;\n max-height: 0;\n overflow-y: hidden;\n position: absolute;\n top: calc(100% + 1px); // Offset focus border.\n visibility: hidden;\n width: 100%;\n z-index: 10;\n\n // Container is open.\n &--is-open {\n box-shadow: 0 3px 30px rgba(25, 30, 35, 0.1);\n max-height: 225px;\n overflow-y: scroll;\n visibility: visible;\n }\n\n // Notice handler.\n &--notice {\n padding: 15px;\n }\n\n // Results container.\n &--results {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n }\n\n //-----------------------------------------\n // List/Results\n //-----------------------------------------\n &__list--item {\n list-style: none;\n\n > button {\n background: transparent;\n border-color: #e2e4e7;\n border-style: solid;\n border-width: 0 0 1px;\n height: 100%;\n line-height: 1.25;\n text-align: left;\n white-space: inherit;\n width: 100%;\n }\n\n &:last-child > button {\n border-bottom: 0;\n }\n }\n }\n}\n"],sourceRoot:""}]);const a=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),s="/*# ".concat(o," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),A=w(RegExp.prototype.test),b=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let s=r.length;for(;s--;){let t=r[s];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[s]=e),t=e)}e[t]=!0}return e}function x(t){const n=a(null);for(const[r,s]of e(t))void 0!==o(t,r)&&(n[r]=s);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const E=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),L=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),P=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),q=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:_,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,H=U.prototype,V=S(H,"cloneNode"),Z=S(H,"nextSibling"),K=S(H,"childNodes"),Q=S(H,"parentNode");if("function"==typeof _){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let J,X="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=o,{importNode:oe}=i;let se={};r.isSupported="function"==typeof e&&"function"==typeof Q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:ae,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de}=G;let{IS_ALLOWED_URI:fe}=G,he=null;const me=C({},[...E,...k,...R,...I,...O]);let ge=null;const ye=C({},[...L,...P,...j,...D]);let ve=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ae=null,be=null,_e=!0,we=!0,Ce=!1,xe=!0,Se=!1,Ee=!1,ke=!1,Re=!1,Te=!1,Ie=!1,Ne=!1,Oe=!0,Le=!1,Pe=!0,je=!1,De={},Ue=null;const Me=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const Fe=C({},["audio","video","img","source","image","track"]);let ze=null;const qe=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ge=We,Ye=!1,Ve=null;const Ze=C({},[$e,He,We],h);let Ke=null;const Qe=["application/xhtml+xml","text/html"];let Je=null,Xe=null;const et=o.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Xe||Xe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ke=Ke=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Je="application/xhtml+xml"===Ke?h:f,he="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS,Je):me,ge="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR,Je):ye,Ve="ALLOWED_NAMESPACES"in e?C({},e.ALLOWED_NAMESPACES,h):Ze,ze="ADD_URI_SAFE_ATTR"in e?C(x(qe),e.ADD_URI_SAFE_ATTR,Je):qe,Be="ADD_DATA_URI_TAGS"in e?C(x(Fe),e.ADD_DATA_URI_TAGS,Je):Fe,Ue="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS,Je):Me,Ae="FORBID_TAGS"in e?C({},e.FORBID_TAGS,Je):{},be="FORBID_ATTR"in e?C({},e.FORBID_ATTR,Je):{},De="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Se=e.SAFE_FOR_TEMPLATES||!1,Ee=e.WHOLE_DOCUMENT||!1,Te=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Le=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||q,Ge=e.NAMESPACE||We,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(we=!1),Ie&&(Te=!0),De&&(he=C({},[...O]),ge=[],!0===De.html&&(C(he,E),C(ge,L)),!0===De.svg&&(C(he,k),C(ge,P),C(ge,D)),!0===De.svgFilters&&(C(he,R),C(ge,P),C(ge,D)),!0===De.mathMl&&(C(he,I),C(ge,j),C(ge,D))),e.ADD_TAGS&&(he===me&&(he=x(he)),C(he,e.ADD_TAGS,Je)),e.ADD_ATTR&&(ge===ye&&(ge=x(ge)),C(ge,e.ADD_ATTR,Je)),e.ADD_URI_SAFE_ATTR&&C(ze,e.ADD_URI_SAFE_ATTR,Je),e.FORBID_CONTENTS&&(Ue===Me&&(Ue=x(Ue)),C(Ue,e.FORBID_CONTENTS,Je)),Pe&&(he["#text"]=!0),Ee&&C(he,["html","head","body"]),he.table&&(C(he,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,X=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}($,l)),null!==J&&"string"==typeof X&&(X=J.createHTML(""));s&&s(e),Xe=e}},rt=C({},["mi","mo","mn","ms","mtext"]),ot=C({},["foreignobject","desc","title","annotation-xml"]),st=C({},["title","style","font","a","script"]),it=C({},k);C(it,R),C(it,T);const at=C({},I);C(at,N);const lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Te||Ie)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(Re)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ke&&Ge===We&&(e=''+e+"");const r=J?J.createHTML(e):e;if(Ge===We)try{t=(new z).parseFromString(r,Ke)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Ge,"template",null);try{t.documentElement.innerHTML=Ye?X:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),Ge===We?re.call(t,Ee?"html":"body")[0]:Ee?t.documentElement:s},pt=function(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},dt=function(e){return"function"==typeof w&&e instanceof w},ft=function(e,t,n){se[e]&&u(se[e],(e=>{e.call(r,t,n,Xe)}))},ht=function(e){let t=null;if(ft("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=Je(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:o,allowedTags:he}),e.hasChildNodes()&&!dt(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return lt(e),!0;if(!he[o]||Ae[o]){if(!Ae[o]&>(o)){if(ve.tagNameCheck instanceof RegExp&&A(ve.tagNameCheck,o))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(o))return!1}if(Pe&&!Ue[o]){const t=Q(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(V(n[r],!0),Z(e))}return lt(e),!0}return e instanceof U&&!function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ge,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===We?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(it[n]):e.namespaceURI===$e?t.namespaceURI===We?"math"===n:t.namespaceURI===He?"math"===n&&ot[r]:Boolean(at[n]):e.namespaceURI===We?!(t.namespaceURI===He&&!ot[r])&&!(t.namespaceURI===$e&&!rt[r])&&!at[n]&&(st[n]||!it[n]):!("application/xhtml+xml"!==Ke||!Ve[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,u([ie,ae,le],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(lt(e),!0)},mt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in o||n in et))return!1;if(we&&!be[t]&&A(ce,t));else if(_e&&A(ue,t));else if(!ge[t]||be[t]){if(!(gt(e)&&(ve.tagNameCheck instanceof RegExp&&A(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&A(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&A(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(ze[t]);else if(A(fe,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Be[e])if(Ce&&!A(pe,g(n,de,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},yt=function(e){ft("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const s=t[o],{name:i,namespaceURI:a,value:l}=s,c=Je(i);let d="value"===i?l:v(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ct(i,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,d)){ct(i,e);continue}Se&&u([ie,ae,le],(e=>{d=g(d,e," ")}));const f=Je(e.nodeName);if(mt(f,c,d)){if(!Le||"id"!==c&&"name"!==c||(ct(i,e),d="user-content-"+d),J&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(a);else switch($.getAttributeType(f,c)){case"TrustedHTML":d=J.createHTML(d);break;case"TrustedScriptURL":d=J.createScriptURL(d)}try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),p(r.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)},vt=function e(t){let n=null;const r=pt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof c&&e(n.content),yt(n));ft("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,a=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!dt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!r.isSupported)return e;if(ke||nt(t),r.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=Je(e.nodeName);if(!he[t]||Ae[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=ut("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Te&&!Se&&!Ee&&-1===e.indexOf("<"))return J&&Ne?J.createHTML(e):e;if(n=ut(e),!n)return Te?null:Ne?X:""}n&&Re&<(n.firstChild);const l=pt(je?e:n);for(;s=l.nextNode();)ht(s)||(s.content instanceof c&&vt(s.content),yt(s));if(je)return e;if(Te){if(Ie)for(a=ne.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let p=Ee?n.outerHTML:n.innerHTML;return Ee&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(W,n.ownerDocument.doctype.name)&&(p="\n"+p),Se&&u([ie,ae,le],(e=>{p=g(p,e," ")})),J&&Ne?J.createHTML(p):p},r.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ke=!0},r.clearConfig=function(){Xe=null,ke=!1},r.isValidAttribute=function(e,t,n){Xe||nt({});const r=Je(e),o=Je(t);return mt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return p(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},286:function(e,t){var n,r;n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,o={},s=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(_(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!_(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(a);return l.onmessage=g,l.id=s++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=_(r.step),r.chunk=_(r.chunk),r.complete=_(r.complete),r.error=_(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.NODE_STREAM_INPUT,"string"==typeof n?(n=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(n),f=r.download?new c(r):new p(r)):!0===n.readable&&_(n.read)&&_(n.on)?f=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",s="\r\n",a='"',l=a+a,c=!1,u=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(_(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!_(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){_(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function p(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=b((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,r,o=Math.pow(2,53),s=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,u=0,p=0,d=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(_(e.step)){var v=e.step;e.step=function(t){if(y=t,C())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!b(e)}))),C()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;C()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,s)),i=x(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,p+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)_(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,s){var a,l,c,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var p=0;p=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:u}),B++}}else B++}return H();function q(e){b.push(e),x=u}function $(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),C.push(e),u=m,q(C),A&&Y()),G()}function W(e){u=e,q(C),C=[],U=i.indexOf(r,u)}function G(e){return{data:b,errors:w,meta:{delimiter:n,linebreak:r,aborted:p,truncated:!!e,cursor:x+(d||0)}}}function Y(){s(G()),b=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return u}}function g(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(_(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:o};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{AudioPicker:()=>zt,CSVUploader:()=>Kt,Checkboxes:()=>Ht,ImagePicker:()=>en,MediaPicker:()=>an,PostPicker:()=>sr,PostSelector:()=>ar,SafeHtml:()=>pn,Selector:()=>Ar,TermSelector:()=>_r,VideoPicker:()=>Sr,getMediaUrl:()=>Zt,parseCSVFile:()=>Vt,useCurrentPostId:()=>xn,useDebounce:()=>hn,useHasInnerBlocks:()=>mn,useInnerBlocks:()=>yn,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>vn,useInnerBlocksIndex:()=>gn,useMedia:()=>An,useParentBlock:()=>bn,useParentBlockAttributes:()=>wn,usePost:()=>Cn,usePostById:()=>kn,usePostMeta:()=>In,usePostMetaValue:()=>Nn,usePosts:()=>On,useTerms:()=>Ln});var e=n(322),t=n(980),o=n.n(t),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||H(j)>3?"":" "}function Y(e,t){for(;--t&&F()&&!(j<48||j>102||j>57&&j<65||j>70&&j<97););return $(e,q()+(t<6&&32==z()&&32==F()))}function V(e){for(;F();)switch(j){case e:return P;case 34:case 39:34!==e&&39!==e&&V(j);break;case 40:41===e&&V(e);break;case 92:F()}return P}function Z(e,t){for(;F()&&e+j!==57&&(e+j!==84||47!==z()););return"/*"+$(t,P-1)+"*"+A(47===e?e:F())}function K(e){for(;!H(z());)F();return $(e,P)}function Q(e,t){for(var n="",r=0;r6)switch(S(e,t+1)){case 109:if(45!==S(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+d+(108==S(e,t+3)?"$3":"$2-$3"))+e;case 115:return~x(e,"stretch")?X(C(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return C(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,s,i,a){return p+n+":"+r+a+(o?p+n+"-span:"+(s?i:+i-+r)+a:"")+e}));case 4949:if(121===S(e,t+6))return C(e,":",":"+f)+e;break;case 6444:switch(S(e,45===S(e,14)?18:11)){case 120:return C(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===S(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e;case 100:return C(e,":",":"+p)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(e,"scroll-","scroll-snap-")+e}return e}function ee(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=X(e.value,e.length,n));case y:return Q([M(e,{value:C(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(w(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":B(M(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})),B(M(e,{props:[t]})),b(e,{props:I(n,r)});break;case"::placeholder":B(M(e,{props:[C(t,/:(plac\w+)/,":"+f+"input-$1")]})),B(M(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]})),B(M(e,{props:[C(t,/:(plac\w+)/,p+"input-$1")]})),B(M(e,{props:[t]})),b(e,{props:I(n,r)})}return""}))}}function te(e){return function(e){return D="",e}(ne("",null,null,null,[""],e=function(e){return N=O=1,L=k(D=e),P=0,[]}(e),0,[0],e))}function ne(e,t,n,r,o,s,i,a,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,g=1,y=1,v=0,b="",_=o,w=s,E=r,R=b;g;)switch(h=v,v=F()){case 40:if(108!=h&&58==S(R,p-1)){-1!=x(R+=C(W(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:R+=W(v);break;case 9:case 10:case 13:case 32:R+=G(h);break;case 92:R+=Y(q()-1,7);continue;case 47:switch(z()){case 42:case 47:T(oe(Z(F(),q()),t,n,l),l);break;default:R+="/"}break;case 123*m:a[c++]=k(R)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(R=C(R,/\f/g,"")),f>0&&k(R)-p&&T(f>32?se(R+";",r,n,p-1,l):se(C(R," ","")+";",r,n,p-2,l),l);break;case 59:R+=";";default:if(T(E=re(R,t,n,c,u,o,a,b,_=[],w=[],p,s),s),123===v)if(0===u)ne(R,t,E,E,_,s,p,a,w);else switch(99===d&&110===S(R,3)?100:d){case 100:case 108:case 109:case 115:ne(e,E,E,r&&T(re(e,E,E,0,0,o,a,b,o,_=[],p,w),w),o,w,p,a,r?_:w);break;default:ne(R,E,E,E,[""],w,0,a,w)}}c=u=f=0,m=y=1,b=R="",p=i;break;case 58:p=1+k(R),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(j=P>0?S(D,--P):0,O--,10===j&&(O=1,N--),j))continue;switch(R+=A(v),v*m){case 38:y=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(k(R)-1)*y,y=1;break;case 64:45===z()&&(R+=W(F())),d=z(),u=p=k(b=R+=K(q())),v++;break;case 45:45===h&&2==k(R)&&(m=0)}}return s}function re(e,t,n,r,o,s,i,a,l,c,u,p){for(var d=o-1,f=0===o?s:[""],h=R(f),g=0,y=0,A=0;g0?f[b]+" "+w:C(w,/&\f/g,f[b])))&&(l[A++]=x);return U(e,t,n,0===o?m:a,l,c,u,p)}function oe(e,t,n,r){return U(e,t,n,h,A(j),E(e,2,-2),0,r)}function se(e,t,n,r,o){return U(e,t,n,g,E(e,0,r),E(e,r+1,-1),r,o)}const ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ae="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",le="undefined"!=typeof window&&"HTMLElement"in window,ce=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ue=(new Set,Object.freeze([])),pe=Object.freeze({}),de=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),fe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,he=/(^-|-$)/g;function me(e){return e.replace(fe,"-").replace(he,"")}var ge=/(a)(d)/gi,ye=function(e){return String.fromCharCode(e+(e>25?39:97))};function ve(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ye(t%52)+n;return(ye(t%52)+n).replace(ge,"$1-$2")}var Ae,be=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},_e=function(e){return be(5381,e)};function we(e){return"string"==typeof e&&!0}var Ce="function"==typeof Symbol&&Symbol.for,xe=Ce?Symbol.for("react.memo"):60115,Se=Ce?Symbol.for("react.forward_ref"):60112,Ee={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ke={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Re={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Te=((Ae={})[Se]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ae[xe]=Re,Ae);function Ie(e){return("type"in(t=e)&&t.type.$$typeof)===xe?Re:"$$typeof"in e?Te[e.$$typeof]:Ee;var t}var Ne=Object.defineProperty,Oe=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,Pe=Object.getOwnPropertyDescriptor,je=Object.getPrototypeOf,De=Object.prototype;function Ue(e,t,n){if("string"!=typeof t){if(De){var r=je(t);r&&r!==De&&Ue(e,r,n)}var o=Oe(t);Le&&(o=o.concat(Le(t)));for(var s=Ie(e),i=Ie(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ge=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw We(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ut,n).replace(r,c))})),i.prefix&&u.push(ee),u.push(J);var p=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(pt,""),c=te(s||o?"".concat(s," ").concat(o," { ").concat(l," }"):l);i.namespace&&(c=dt(c,i.namespace));var p,d,f,h=[];return Q(c,(p=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),d=R(p),function(e,t,n,r){for(var o="",s=0;s="A"&&e<="Z"};function wt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=Fe(r,s),this.staticRulesId=s}else{for(var a=be(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=Fe(r,d)}}return r},e}(),Tt=l().createContext(void 0);Tt.Consumer;var It={};function Nt(e,t,n){var r=Be(e),o=e,i=!we(e),c=t.attrs,u=void 0===c?ue:c,p=t.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":me(e);It[n]=(It[n]||0)+1;var r="".concat(n,"-").concat(function(e){return ve(_e(e)>>>0)}("6.1.0"+n+It[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,f=(void 0===t.displayName&&function(e){we(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(me(t.displayName),"-").concat(t.componentId):t.componentId||d),h=r&&o.attrs?o.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var v=new Rt(n,f,r?o.componentStyle:void 0),A=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,p=e.target,d=l().useContext(Tt),f=vt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,o=s(s({},t),{className:void 0,theme:n}),i=0;i2&&ct.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=nt(),r=ze([n&&'nonce="'.concat(n,'"'),"".concat(ae,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw We(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw We(2);var n=((t={})[ae]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=nt();return r&&(n.nonce=r),[l().createElement("style",s({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ct({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw We(2);return l().createElement(At,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw We(3)}}(),"__sc-".concat(ae,"__");const Mt=Ut.div` + height: auto; + width: 100%; +`,Bt=({src:t})=>(0,e.jsx)(Mt,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});Bt.propTypes={src:o().string.isRequired};const Ft=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:o,preview:Bt,value:s,valueURL:i});Ft.defaultProps={className:"",onUpdateURL:null,valueURL:""},Ft.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const zt=Ft,qt=window.wp.components,$t=({label:t,value:n,options:r,onChange:o})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(qt.BaseControl,{label:t}),r.map((t=>(0,e.jsx)(qt.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{o(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});$t.propTypes={label:o().string.isRequired,value:o().arrayOf(o().string).isRequired,options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().string.isRequired})).isRequired,onChange:o().func.isRequired};const Ht=$t,Wt=window.wp.i18n;var Gt=n(286),Yt=n.n(Gt);const Vt=e=>new Promise(((t,n)=>{Yt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Zt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:s=""}={}}={},source_url:i="",url:a=""}=e;return o||n||s||r||a||i||""};class Kt extends l().PureComponent{static handleSubmit(e){e.preventDefault()}constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.state={error:"",success:""}}handleChange(e){const{attributeName:t,callback:n,setAttributes:r}=this.props;e.target.files&&e.target.files[0]&&Vt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Wt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Wt.__)("Could not map CSV data. Please check the source file to ensure that it has the correct structure.","alley-scripts"),success:""})})).catch((e=>{this.setState({error:e,success:""})}))}render(){const{error:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Wt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Kt.defaultProps={callback:null},Kt.propTypes={attributeName:o().string.isRequired,callback:o().func,setAttributes:o().func.isRequired};const Qt=Ut.div` + box-sizing: border-box; + flex-shrink: 0; + height: auto; + max-height: 1450px; + max-width: 1450px; + min-height: 20px; + min-width: 20px; + position: relative; + width: auto; +`,Jt=({src:t})=>(0,e.jsx)(Qt,{children:(0,e.jsx)("img",{alt:(0,Wt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Wt.__)("Edit image","alley-scripts")})});Jt.propTypes={src:o().string.isRequired};const Xt=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(an,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,preview:Jt,value:a,valueURL:l});Xt.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},Xt.propTypes={className:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const en=Xt,tn=window.wp.blockEditor,nn=window.wp.data,rn=Ut.div` + display: block; + position: relative; +`,on=Ut.div` + background: white; + border: 1px solid black; + padding: 1em; +`,sn=({allowedTypes:t,className:n,icon:r,imageSize:o,displayControlsInToolbar:s,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:p})=>{const{media:d}=(0,nn.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===d)return(0,e.jsx)(qt.Spinner,{});const f=d?Zt(d,o):p;return f?(0,e.jsxs)(rn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(on,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),s?(0,e.jsx)(tn.BlockControls,{group:"other",children:(0,e.jsx)(tn.MediaReplaceFlow,{name:(0,Wt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)(qt.ToolbarButton,{isDestructive:!0,text:(0,Wt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)(qt.Button,{variant:"primary",onClick:i,children:(0,Wt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(rn,{className:n,children:(0,e.jsx)(tn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!p,icon:(0,e.jsx)(tn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};sn.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},sn.propTypes={allowedTypes:o().arrayOf(o().string),className:o().string,icon:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,preview:o().element,value:o().number.isRequired,valueURL:o().string};const an=sn;var ln=n(368),cn=n.n(ln);const un=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:cn().sanitize(n)}});un.defaultProps={className:""},un.propTypes={className:o().string,html:o().string.isRequired,tag:o().string.isRequired};const pn=un,dn=window.wp.element,fn=window.wp.url,hn=(e,t)=>{const[n,r]=(0,dn.useState)(e);return(0,dn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},mn=e=>vn(e)>0,gn=e=>{const t=bn(e),n=yn(t);return n?n.findIndex((t=>t.clientId===e)):-1},yn=e=>(0,nn.useSelect)((t=>t(tn.store).getBlocks(e)),[e]),_n=e=>yn(e).map((e=>e.attributes)),vn=e=>yn(e).length,An=e=>(0,nn.useSelect)((t=>t("core").getMedia(e)),[e]),bn=e=>(0,nn.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(tn.store),o=r(e);return o?n(o):null}),[e]),wn=e=>(0,nn.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(tn.store),o=r(e);return o?n(o):null}),[e]),Cn=(e,t="post")=>(0,nn.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),xn=()=>(0,nn.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),Sn=window.wp.apiFetch;var En=n.n(Sn);const kn=(e,t=null)=>{const[n,r]=(0,dn.useState)({});return(0,dn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,fn.addQueryArgs)("/wp/v2/search",{include:e}),n=await En()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),Cn(e,n[e]??"")},Rn=window.wp.coreData,Tn=window.lodash,In=(e=null,t=null)=>{const n=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,o]=(0,Rn.useEntityProp)("postType",n,"meta",t),s="function"==typeof o?o:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>s((0,Tn.cloneDeep)(e))]},Nn=(e,t=null,n=null)=>{const[r,o]=In(t,n);return[r[e],t=>o({...r,[e]:t})]},On=(e,t="post")=>(0,nn.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),Ln=(e=null,t=null,n="categories")=>{const r=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[o,s]=(0,Rn.useEntityProp)("postType",r,n,t);return[o,e=>s(e)]};var Pn=n(62),jn=n.n(Pn),Dn=n(36),Un=n.n(Dn),Mn=n(793),Bn=n.n(Mn),Fn=n(892),zn=n.n(Fn),qn=n(173),$n=n.n(qn),Hn=n(464),Wn=n.n(Hn),Gn=n(992),Yn={};Yn.styleTagTransform=Wn(),Yn.setAttributes=zn(),Yn.insert=Bn().bind(null,"head"),Yn.domAPI=Un(),Yn.insertStyleElement=$n(),jn()(Gn.Z,Yn),Gn.Z&&Gn.Z.locals&&Gn.Z.locals;var Vn=n(779),Zn=n.n(Vn),Kn=n(905),Qn={};Qn.styleTagTransform=Wn(),Qn.setAttributes=zn(),Qn.insert=Bn().bind(null,"head"),Qn.domAPI=Un(),Qn.insertStyleElement=$n(),jn()(Kn.Z,Qn),Kn.Z&&Kn.Z.locals&&Kn.Z.locals;const Jn=window.wp.htmlEntities,Xn=Ut.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,er=({title:t,postType:n,attachmentID:r})=>{const o=An(r),s=o?.media_details?.sizes?.thumbnail?.source_url,i=o?.alt_text??"";return(0,e.jsxs)(Xn,{children:[s?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:s,alt:i}):null,(0,e.jsx)(pn,{html:(0,Jn.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Wt.sprintf)(" (%s)",n)]})},tr=({baseUrl:t,searchRender:n,selected:r,setSelected:o,suppressPostIds:s=[]})=>{const[i,a]=(0,dn.useState)(!1),[l,c]=(0,dn.useState)([]),[u,p]=(0,dn.useState)(!1),[d,f]=(0,dn.useState)(0),[h,m]=(0,dn.useState)({searchValue:"",page:1}),g=(0,dn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,fn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:s.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,fn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const o=await En()({path:r,parse:!1});f(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,s]);return(0,dn.useEffect)((()=>{let e=!1;return u||(p(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(qt.TextControl,{value:h.searchValue,placeholder:(0,Wt.__)("Search...","alley-scripts"),label:(0,Wt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)(qt.Button,{className:Zn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>o(t.id),children:n?n(t):(0,e.jsx)(er,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)(qt.Spinner,{}):null,d>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Wt.__)("Load More","alley-scripts")})}):null]})]})},nr=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:o,searchRender:s,suppressPostIds:i=[]})=>{const[a,l]=(0,dn.useState)();return(0,e.jsxs)(qt.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(tr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:s,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)(qt.Button,{variant:"secondary",onClick:n,children:(0,Wt.__)("Cancel","alley-scripts")}),(0,e.jsx)(qt.Button,{variant:"primary",onClick:()=>{a&&(o(a),n())},disabled:!a,children:(0,Wt.__)("Select","alley-scripts")})]})]})},rr=Ut.div` + display: block; + position: relative; +`,or=Ut.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,sr=({allowedTypes:t,className:n,getPostType:r,modalTitle:o=(0,Wt.__)("Select Post","alley-scripts"),onReset:s,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Wt.__)("Replace","alley-scripts"),resetText:u=(0,Wt.__)("Reset","alley-scripts"),searchEndpoint:p="/wp/v2/search",searchRender:d,selectText:f=(0,Wt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,v]=(0,dn.useState)(!1),A=(0,fn.addQueryArgs)(p,{type:"post",subtype:t??"any",...a}),b=kn(g,r),{featured_media:_,title:{rendered:w=""}={},type:C=""}=b||{},x=()=>{v(!0)};return 0!==g&&null===b?(0,e.jsx)(qt.Spinner,{}):(0,e.jsxs)(rr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==b?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(b):(0,e.jsx)(or,{children:(0,e.jsx)(er,{title:w,postType:C,attachmentID:_})}),(0,e.jsxs)(qt.ButtonGroup,{children:[(0,e.jsx)(qt.Button,{variant:"secondary",onClick:s,style:{margin:"0 4px"},children:u}),(0,e.jsx)(qt.Button,{variant:"secondary",onClick:x,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)(qt.Button,{onClick:x,variant:"secondary",children:f}),y?(0,e.jsx)(nr,{closeModal:()=>{v(!1)},baseUrl:A,modalTitle:o,onUpdate:i,searchRender:d,suppressPostIds:h}):null]})},ir=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(Ar,{type:"post",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});ir.defaultProps={className:"",emptyLabel:(0,Wt.__)("No posts found","alley-scripts"),label:(0,Wt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},ir.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const ar=ir,lr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let cr;const ur=new Uint8Array(16);function pr(){if(!cr&&(cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cr(ur)}const dr=[];for(let e=0;e<256;++e)dr.push((e+256).toString(16).slice(1));const fr=function(e,t,n){if(lr.randomUUID&&!t&&!e)return lr.randomUUID();const r=(e=e||{}).random||(e.rng||pr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return dr[e[t+0]]+dr[e[t+1]]+dr[e[t+2]]+dr[e[t+3]]+"-"+dr[e[t+4]]+dr[e[t+5]]+"-"+dr[e[t+6]]+dr[e[t+7]]+"-"+dr[e[t+8]]+dr[e[t+9]]+"-"+dr[e[t+10]]+dr[e[t+11]]+dr[e[t+12]]+dr[e[t+13]]+dr[e[t+14]]+dr[e[t+15]]}(r)},hr=({emptyLabel:t,error:n,id:r,isOpen:o,labelledbyId:s,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:p})=>{if(!i&&(""===p||u>p.length))return null;let d="",f="";return i?(d="loading",f=(0,Wt.__)("Loading...","alley-scripts")):n?(d="error",f=n):i||0!==l.length||(d="no-posts",f=t),i||!i&&(p&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Zn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("div",{className:Zn()("autocomplete__dropdown--notice",`autocomplete__${d}`),children:f})}):(0,e.jsx)("div",{className:Zn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":s,id:r,className:Zn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)(qt.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};hr.propTypes={emptyLabel:o().string.isRequired,error:o().string.isRequired,id:o().string.isRequired,isOpen:o().bool.isRequired,labelledbyId:o().string.isRequired,loading:o().bool.isRequired,options:o().arrayOf(o().shape({label:o().string,value:o().string})).isRequired,onSelect:o().func.isRequired,selectedItems:o().shape([]).isRequired,threshold:o().number.isRequired,value:o().string.isRequired};const mr=hr;var gr=n(458),yr={};yr.styleTagTransform=Wn(),yr.setAttributes=zn(),yr.insert=Bn().bind(null,"head"),yr.domAPI=Un(),yr.insertStyleElement=$n(),jn()(gr.Z,yr),gr.Z&&gr.Z.locals&&gr.Z.locals;const vr=({type:t,className:n,emptyLabel:r,label:o,maxPages:s,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:p})=>{const d=fr(),[f,h]=(0,dn.useState)(""),[m,g]=(0,dn.useState)([]),[y,v]=(0,dn.useState)(!1),[A,b]=(0,dn.useState)(!1),[_,w]=(0,dn.useState)(""),[C,x]=(0,dn.useState)([]),S=(0,dn.useRef)(),E=hn(_,750),k=(0,dn.useCallback)((async(e=1)=>{if(E.length0?c.join(","):"any",type:t});await En()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>s?s:t,e.json()})).then((t=>{g((e=>[...e,...t])),b(!1),(n&&n>e||e>=1&&i&&C.length>0)&&k(e+1)})).catch((e=>h(e.message)))}),[E,t,s,i,c,C.length,p]);(0,dn.useEffect)((()=>{x(u)}),[u]),(0,dn.useEffect)((()=>{E&&p<=E.length?k():g([])}),[E,k,p]);const R=e=>{v(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&v(!1)};(0,dn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,dn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const I=e=>{let t=[];if(C.some((t=>t.id===e.id))){const n=C.findIndex((t=>t.id===e.id));t=[...C.slice(0,n),...C.slice(n+1,C.length)]}else i?t=[...C,e]:(t=[e],v(!1));x(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Zn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${d}`,className:Zn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Zn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${d}`,children:(0,e.jsx)("div",{children:o})}),C.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${d}`,id:`selected-items-${d}`,className:Zn()("autocomplete__selection--results","autocomplete__selection-list"),children:C.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)(qt.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>I(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Zn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${d}`,onChange:e=>w(e.target.value),onFocus:()=>v(!0),placeholder:l,type:"text",value:_})]}),(0,e.jsx)(mr,{emptyLabel:r,error:f,labelledById:`autocomplete-${d}`,id:`listbox-${d}`,isOpen:y,loading:A&&E,onSelect:I,options:m,selectedItems:C,threshold:p,value:E})]})})};vr.defaultProps={type:"post",className:"",emptyLabel:(0,Wt.__)("No items found","alley-scripts"),label:(0,Wt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},vr.propTypes={type:o().string,className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const Ar=vr,br=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(Ar,{type:"term",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});br.defaultProps={className:"",emptyLabel:(0,Wt.__)("No terms found","alley-scripts"),label:(0,Wt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},br.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const _r=br,wr=Ut.div` + height: auto; + width: 100%; +`,Cr=({src:t})=>(0,e.jsx)(wr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});Cr.propTypes={src:o().string.isRequired};const xr=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:o,preview:Cr,value:s,valueURL:i});xr.defaultProps={className:"",onUpdateURL:null,valueURL:""},xr.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const Sr=xr})(),r})(),e.exports=t()},61:function(e,t,n){"use strict";var r=window.wp.blocks,o=window.wp.element,s=window.wp.i18n,i=window.wp.blockEditor,a=window.wp.data,l=n(373),c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/header","version":"0.1.0","title":"Newsletter Header","category":"design","icon":"format-image","description":"Displays the header image for a newsletter","textdomain":"header","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php"}');(0,r.registerBlockType)(c,{apiVersion:2,edit:function(){const[e]=(0,l.usePostMeta)(),{nb_newsletter_header_img:t}=e,{media:n=null}=(0,a.useSelect)((e=>({media:t?e("core").getMedia(t):null})),[t]),r=n?n.source_url:"";return(0,o.createElement)("div",(0,i.useBlockProps)(),r?(0,o.createElement)("img",{src:r,alt:(0,s.__)("Header","wp-newsletter-builder")}):null)},title:c.title})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=function(t,n,o,s){if(!n){var i=1/0;for(u=0;u=s)&&Object.keys(r.O).every((function(e){return r.O[e](n[l])}))?n.splice(l--,1):(a=!1,s0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,o,s]},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={324:0,457:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,s,i=n[0],a=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var u=l(r)}for(t&&t(n);c. + * @param WP_Block $block_instance The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-newsletter-builder + */ + +$image_id = get_post_meta( get_the_ID(), 'nb_newsletter_header_img', true ); +if ( empty( $image_id ) ) { + return; +} +// TODO: Add a check to see if the image exists. +// TODO: Get proper alt text. +?> +
role="banner" align="center"> + +
diff --git a/build/header/style-index.css b/build/header/style-index.css new file mode 100644 index 00000000..9e0b13ee --- /dev/null +++ b/build/header/style-index.css @@ -0,0 +1 @@ +.wp-block-wp-newsletter-builder-header{margin-bottom:20px;margin-top:6px} diff --git a/build/index.js/index.asset.php b/build/index.js/index.asset.php new file mode 100644 index 00000000..f5345333 --- /dev/null +++ b/build/index.js/index.asset.php @@ -0,0 +1 @@ + array(), 'version' => '31d6cfe0d16ae931b73c'); diff --git a/build/index.js/index.js b/build/index.js/index.js new file mode 100644 index 00000000..e69de29b diff --git a/build/newsletter-status/index.asset.php b/build/newsletter-status/index.asset.php new file mode 100644 index 00000000..29fac2ae --- /dev/null +++ b/build/newsletter-status/index.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'b00ab2344aa607faa2a9'); diff --git a/build/newsletter-status/index.js b/build/newsletter-status/index.js new file mode 100644 index 00000000..1bb3d600 --- /dev/null +++ b/build/newsletter-status/index.js @@ -0,0 +1 @@ +!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var l in n)e.o(n,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:n[l]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.plugins,n=window.wp.element,l=window.wp.editPost,r=window.wp.i18n,u=window.wp.data,a=window.wp.apiFetch,i=e.n(a),d=window.wp.components;(0,t.registerPlugin)("newsletter-status",{render:function(){const e=(0,u.select)("core/editor").getCurrentPostId(),[t,a]=(0,n.useState)({}),[c,s]=(0,n.useState)(!1),w=(0,n.useCallback)((async()=>{s(!0);const t=await i()({path:`/wp-newsletter-builder/v1/status/${e}`});a(t),s(!1)}),[e]);(0,n.useEffect)((()=>{w()}),[w]);const{Status:o="",Name:p="",Recipients:m=null,TotalOpened:E=null,UniqueOpened:_=null}=t;return(0,n.createElement)(l.PluginDocumentSettingPanel,{name:"rubric-selection",title:(0,r.__)("Newsletter Status","wp-newsletter-builder")},t?(0,n.createElement)(n.Fragment,null,(0,n.createElement)("dl",null,(0,n.createElement)("dt",null,(0,r.__)("Status","wp-newsletter-builder")),(0,n.createElement)("dd",null,o),(0,n.createElement)("dt",null,(0,r.__)("Campaign Name","wp-newsletter-builder")),(0,n.createElement)("dd",null,p),(0,n.createElement)("dt",null,(0,r.__)("Recipients","wp-newsletter-builder")),(0,n.createElement)("dd",null,m),(0,n.createElement)("dt",null,(0,r.__)("Total Opened","wp-newsletter-builder")),(0,n.createElement)("dd",null,E),(0,n.createElement)("dt",null,(0,r.__)("Unique Opened","wp-newsletter-builder")),(0,n.createElement)("dd",null,_)),(0,n.createElement)(d.Button,{onClick:w,variant:"secondary",disabled:c},(0,r.__)("Refresh","wp-newsletter-builder"))):(0,n.createElement)(d.Spinner,null))}})}(); \ No newline at end of file diff --git a/build/post/block.json b/build/post/block.json new file mode 100644 index 00000000..67657fff --- /dev/null +++ b/build/post/block.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/post", + "version": "0.1.0", + "title": "Newsletter Single Post", + "category": "design", + "icon": "admin-post", + "description": "Displays a post", + "textdomain": "post", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php", + "attributes": { + "postId": { + "type": "number", + "default": 0 + }, + "showImage": { + "type": "boolean", + "default": true + }, + "showExcerpt": { + "type": "boolean", + "default": true + }, + "showContent": { + "type": "boolean", + "default": true + }, + "showByline": { + "type": "boolean", + "default": true + }, + "showCta": { + "type": "boolean", + "default": true + }, + "showProBadge": { + "type": "boolean", + "default": true + }, + "order": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "title", + "byline", + "image", + "excerpt", + "content", + "cta" + ] + }, + "overrideTitle": { + "type": "string", + "default": "" + }, + "overrideImage": { + "type": "number", + "default": 0 + }, + "overrideExcerpt": { + "type": "string", + "default": "" + }, + "overrideContent": { + "type": "string", + "default": "" + }, + "overrideByline": { + "type": "string", + "default": "" + }, + "number": { + "type": "number", + "default": null + }, + "smallerFont": { + "type": "boolean", + "default": false + }, + "imgSizes": { + "type": "string", + "default": "" + } + } +} \ No newline at end of file diff --git a/build/post/index.asset.php b/build/post/index.asset.php new file mode 100644 index 00000000..c64eafc7 --- /dev/null +++ b/build/post/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '924778d95069d20a4a53'); diff --git a/build/post/index.css b/build/post/index.css new file mode 100644 index 00000000..3b7de6c3 --- /dev/null +++ b/build/post/index.css @@ -0,0 +1,2 @@ +.post-type-nb_newsletter .alley-scripts-post-picker__post-list .alley-scripts-post-picker__post{height:auto;padding:0 5px 0 0;width:99%}.post-type-nb_newsletter .nb-post-picker-result{align-items:center;display:flex;flex-direction:row;gap:10px;justify-content:flex-start;width:100%}.post-type-nb_newsletter .nb-post-picker-result-image__container{height:56px;width:100px}.post-type-nb_newsletter .nb-post-picker-result-image__container img{max-height:56px;max-width:100px}.post-type-nb_newsletter .nb-post-picker-result-title{font-weight:600;margin:5px 0;text-align:left}.post-type-nb_newsletter .nb-post-picker-result-date{margin-left:auto;text-align:right} +.wp-block-wp-newsletter-builder-post{margin:0 auto;width:600px}.wp-block-wp-newsletter-builder-post .newsletter-remove-post{margin:0;position:absolute;right:3px;top:3px}.image-container{line-height:0}.newsletter-read-more{margin-bottom:30px} diff --git a/build/post/index.js b/build/post/index.js new file mode 100644 index 00000000..0418700e --- /dev/null +++ b/build/post/index.js @@ -0,0 +1,42 @@ +!function(){var e,t={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".alley-scripts-post-picker__post-list{display:flex;flex-wrap:wrap;float:left;height:calc(70vh - 200px);justify-content:flex-start;overflow-y:auto;padding:8px;width:100%}.alley-scripts-post-picker__post{border:1px solid #eee;height:auto;justify-content:center;margin:0 8px 8px 0;transition:background-color .2s ease-in-out;width:calc((100% - 40px)/3)}@media(min-width: 780px){.alley-scripts-post-picker__post{width:calc((100% - 40px)/5)}}.alley-scripts-post-picker__post:hover{background-color:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.alley-scripts-post-picker__load-more{clear:both;float:left;text-align:center;width:100%}","",{version:3,sources:["webpack://./src/components/post-picker/post-list.scss"],names:[],mappings:"AAAA,sCACE,YAAA,CACA,cAAA,CACA,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,WAAA,CACA,UAAA,CAGF,iCACE,qBAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,2CAAA,CACA,2BAAA,CAGA,yBATF,iCAUI,2BAAA,CAAA,CAGF,uCACE,wBAAA,CAGF,6CACE,wBAAA,CAIJ,sCACE,UAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA",sourcesContent:[".alley-scripts-post-picker__post-list {\n display: flex;\n flex-wrap: wrap;\n float: left;\n height: calc(70vh - 200px);\n justify-content: flex-start;\n overflow-y: auto;\n padding: 8px;\n width: 100%;\n}\n\n.alley-scripts-post-picker__post {\n border: 1px solid #eee;\n height: auto;\n justify-content: center;\n margin: 0 8px 8px 0;\n transition: background-color 0.2s ease-in-out;\n width: calc((100% - 40px) / 3);\n\n\n @media (min-width: 780px) {\n width: calc((100% - 40px) / 5);\n }\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\n }\n}\n\n.alley-scripts-post-picker__load-more {\n clear: both;\n float: left;\n text-align: center;\n width: 100%;\n}\n"],sourceRoot:""}]);const a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".components-modal__content{width:90vw}.alley-scripts-post-picker__buttons{clear:both;display:block;text-align:right;width:100%}.alley-scripts-post-picker__buttons button{margin:5px}","",{version:3,sources:["webpack://./src/components/post-picker/search-modal.scss"],names:[],mappings:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\n}\n\n.alley-scripts-post-picker__buttons {\n clear: both;\n display: block;\n text-align: right;\n width: 100%;\n\n button {\n margin: 5px;\n }\n}\n"],sourceRoot:""}]);const a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,'.edit-post-sidebar .autocomplete__component,.editor-styles-wrapper .autocomplete__component{margin-bottom:20px}.edit-post-sidebar .autocomplete-base-control,.editor-styles-wrapper .autocomplete-base-control{position:relative}.edit-post-sidebar .autocomplete-text-control__input,.editor-styles-wrapper .autocomplete-text-control__input{margin:0}.edit-post-sidebar .autocomplete__selection-list,.editor-styles-wrapper .autocomplete__selection-list{list-style-type:none;margin:0 0 6px;padding:0}.edit-post-sidebar .autocomplete__selection-list--item,.editor-styles-wrapper .autocomplete__selection-list--item{display:inline-block;list-style:none}.edit-post-sidebar .autocomplete__selection-list--item--button,.editor-styles-wrapper .autocomplete__selection-list--item--button{margin-bottom:4px;margin-right:3px}.edit-post-sidebar .autocomplete__selection-list--item--button::after,.editor-styles-wrapper .autocomplete__selection-list--item--button::after{content:"×";font-size:16px;line-height:20px;margin-left:5px}.edit-post-sidebar .autocomplete__dropdown,.editor-styles-wrapper .autocomplete__dropdown{background-color:#fff;border-color:rgba(0,0,0,0) #e2e4e7 #e2e4e7;border-radius:0 0 4px 4px;border-style:solid;border-width:0 1px 1px;left:0;max-height:0;overflow-y:hidden;position:absolute;top:calc(100% + 1px);visibility:hidden;width:100%;z-index:10}.edit-post-sidebar .autocomplete__dropdown--is-open,.editor-styles-wrapper .autocomplete__dropdown--is-open{box-shadow:0 3px 30px rgba(25,30,35,.1);max-height:225px;overflow-y:scroll;visibility:visible}.edit-post-sidebar .autocomplete__dropdown--notice,.editor-styles-wrapper .autocomplete__dropdown--notice{padding:15px}.edit-post-sidebar .autocomplete__dropdown--results,.editor-styles-wrapper .autocomplete__dropdown--results{list-style:none;margin:0;padding:0}.edit-post-sidebar .autocomplete__list--item,.editor-styles-wrapper .autocomplete__list--item{list-style:none}.edit-post-sidebar .autocomplete__list--item>button,.editor-styles-wrapper .autocomplete__list--item>button{background:rgba(0,0,0,0);border-color:#e2e4e7;border-style:solid;border-width:0 0 1px;height:100%;line-height:1.25;text-align:left;white-space:inherit;width:100%}.edit-post-sidebar .autocomplete__list--item:last-child>button,.editor-styles-wrapper .autocomplete__list--item:last-child>button{border-bottom:0}',"",{version:3,sources:["webpack://./src/components/selector/styles.scss"],names:[],mappings:"AAAA,4FAgBI,kBACE,CAAA,gGAMF,iBACE,CAAA,8GAMF,QACE,CAAA,sGAMF,oBACE,CAAA,cACA,CAAA,SACA,CAAA,kHAEA,oBACE,CAAA,eACA,CAAA,kIAEA,iBACE,CAAA,gBACA,CAAA,gJAEA,WACE,CAAA,cACA,CAAA,gBACA,CAAA,eACA,CAAA,0FASR,qBACE,CAAA,0CACA,CAAA,yBACA,CAAA,kBACA,CAAA,sBACA,CAAA,MACA,CAAA,YACA,CAAA,iBACA,CAAA,iBACA,CAAA,oBACA,CAAA,iBACA,CAAA,UACA,CAAA,UACA,CAAA,4GAGA,uCACE,CAAA,gBACA,CAAA,iBACA,CAAA,kBACA,CAAA,0GAIF,YACE,CAAA,4GAIF,eACE,CAAA,QACA,CAAA,SACA,CAAA,8FAOJ,eACE,CAAA,4GAEA,wBACE,CAAA,oBACA,CAAA,kBACA,CAAA,oBACA,CAAA,WACA,CAAA,gBACA,CAAA,eACA,CAAA,mBACA,CAAA,UACA,CAAA,kIAGF,eACE",sourcesContent:["//--------------------------------------------------------------\n// AutoComplete Styles\n//--------------------------------------------------------------\n\n/* stylelint-disable max-nesting-depth */\n\n//-----------------------------------------\n// Accommodate editor well, or the sidebar.\n//-----------------------------------------\n.edit-post-sidebar,\n.editor-styles-wrapper {\n .autocomplete {\n\n //-----------------------------------------\n // Parent form wrapper.\n //-----------------------------------------\n &__component {\n margin-bottom: 20px;\n }\n\n //-----------------------------------------\n // Wrapper\n //-----------------------------------------\n &-base-control {\n position: relative;\n }\n\n //-----------------------------------------\n // Input\n //-----------------------------------------\n &-text-control__input {\n margin: 0;\n }\n\n //-----------------------------------------\n // Selected buttons.\n //-----------------------------------------\n &__selection-list {\n list-style-type: none;\n margin: 0 0 6px;\n padding: 0;\n\n &--item {\n display: inline-block;\n list-style: none;\n\n &--button {\n margin-bottom: 4px;\n margin-right: 3px;\n\n &::after {\n content: '×';\n font-size: 16px;\n line-height: 20px;\n margin-left: 5px;\n }\n }\n }\n }\n\n //-----------------------------------------\n // Results\n //-----------------------------------------\n &__dropdown {\n background-color: #fff;\n border-color: transparent #e2e4e7 #e2e4e7;\n border-radius: 0 0 4px 4px;\n border-style: solid;\n border-width: 0 1px 1px;\n left: 0;\n max-height: 0;\n overflow-y: hidden;\n position: absolute;\n top: calc(100% + 1px); // Offset focus border.\n visibility: hidden;\n width: 100%;\n z-index: 10;\n\n // Container is open.\n &--is-open {\n box-shadow: 0 3px 30px rgba(25, 30, 35, 0.1);\n max-height: 225px;\n overflow-y: scroll;\n visibility: visible;\n }\n\n // Notice handler.\n &--notice {\n padding: 15px;\n }\n\n // Results container.\n &--results {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n }\n\n //-----------------------------------------\n // List/Results\n //-----------------------------------------\n &__list--item {\n list-style: none;\n\n > button {\n background: transparent;\n border-color: #e2e4e7;\n border-style: solid;\n border-width: 0 0 1px;\n height: 100%;\n line-height: 1.25;\n text-align: left;\n white-space: inherit;\n width: 100%;\n }\n\n &:last-child > button {\n border-bottom: 0;\n }\n }\n }\n}\n"],sourceRoot:""}]);const a=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),s="/*# ".concat(o," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),b=w(RegExp.prototype.test),_=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let s=r.length;for(;s--;){let t=r[s];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[s]=e),t=e)}e[t]=!0}return e}function x(t){const n=a(null);for(const[r,s]of e(t))void 0!==o(t,r)&&(n[r]=s);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const E=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),P=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),$=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:A,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:q}=n,H=U.prototype,V=S(H,"cloneNode"),Z=S(H,"nextSibling"),K=S(H,"childNodes"),Q=S(H,"parentNode");if("function"==typeof A){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let J,X="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=o,{importNode:oe}=i;let se={};r.isSupported="function"==typeof e&&"function"==typeof Q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:ae,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de}=G;let{IS_ALLOWED_URI:fe}=G,he=null;const me=C({},[...E,...k,...R,...I,...O]);let ge=null;const ye=C({},[...P,...L,...j,...D]);let ve=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,_e=null,Ae=!0,we=!0,Ce=!1,xe=!0,Se=!1,Ee=!1,ke=!1,Re=!1,Te=!1,Ie=!1,Ne=!1,Oe=!0,Pe=!1,Le=!0,je=!1,De={},Ue=null;const Me=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const Fe=C({},["audio","video","img","source","image","track"]);let ze=null;const $e=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ge=We,Ye=!1,Ve=null;const Ze=C({},[qe,He,We],h);let Ke=null;const Qe=["application/xhtml+xml","text/html"];let Je=null,Xe=null;const et=o.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Xe||Xe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ke=Ke=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Je="application/xhtml+xml"===Ke?h:f,he="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS,Je):me,ge="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR,Je):ye,Ve="ALLOWED_NAMESPACES"in e?C({},e.ALLOWED_NAMESPACES,h):Ze,ze="ADD_URI_SAFE_ATTR"in e?C(x($e),e.ADD_URI_SAFE_ATTR,Je):$e,Be="ADD_DATA_URI_TAGS"in e?C(x(Fe),e.ADD_DATA_URI_TAGS,Je):Fe,Ue="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS,Je):Me,be="FORBID_TAGS"in e?C({},e.FORBID_TAGS,Je):{},_e="FORBID_ATTR"in e?C({},e.FORBID_ATTR,Je):{},De="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Se=e.SAFE_FOR_TEMPLATES||!1,Ee=e.WHOLE_DOCUMENT||!1,Te=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||$,Ge=e.NAMESPACE||We,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(we=!1),Ie&&(Te=!0),De&&(he=C({},[...O]),ge=[],!0===De.html&&(C(he,E),C(ge,P)),!0===De.svg&&(C(he,k),C(ge,L),C(ge,D)),!0===De.svgFilters&&(C(he,R),C(ge,L),C(ge,D)),!0===De.mathMl&&(C(he,I),C(ge,j),C(ge,D))),e.ADD_TAGS&&(he===me&&(he=x(he)),C(he,e.ADD_TAGS,Je)),e.ADD_ATTR&&(ge===ye&&(ge=x(ge)),C(ge,e.ADD_ATTR,Je)),e.ADD_URI_SAFE_ATTR&&C(ze,e.ADD_URI_SAFE_ATTR,Je),e.FORBID_CONTENTS&&(Ue===Me&&(Ue=x(Ue)),C(Ue,e.FORBID_CONTENTS,Je)),Le&&(he["#text"]=!0),Ee&&C(he,["html","head","body"]),he.table&&(C(he,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,X=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(q,l)),null!==J&&"string"==typeof X&&(X=J.createHTML(""));s&&s(e),Xe=e}},rt=C({},["mi","mo","mn","ms","mtext"]),ot=C({},["foreignobject","desc","title","annotation-xml"]),st=C({},["title","style","font","a","script"]),it=C({},k);C(it,R),C(it,T);const at=C({},I);C(at,N);const lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Te||Ie)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(Re)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ke&&Ge===We&&(e=''+e+"");const r=J?J.createHTML(e):e;if(Ge===We)try{t=(new z).parseFromString(r,Ke)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Ge,"template",null);try{t.documentElement.innerHTML=Ye?X:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),Ge===We?re.call(t,Ee?"html":"body")[0]:Ee?t.documentElement:s},pt=function(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},dt=function(e){return"function"==typeof w&&e instanceof w},ft=function(e,t,n){se[e]&&u(se[e],(e=>{e.call(r,t,n,Xe)}))},ht=function(e){let t=null;if(ft("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=Je(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:o,allowedTags:he}),e.hasChildNodes()&&!dt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return lt(e),!0;if(!he[o]||be[o]){if(!be[o]&>(o)){if(ve.tagNameCheck instanceof RegExp&&b(ve.tagNameCheck,o))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(o))return!1}if(Le&&!Ue[o]){const t=Q(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(V(n[r],!0),Z(e))}return lt(e),!0}return e instanceof U&&!function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ge,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===We?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(it[n]):e.namespaceURI===qe?t.namespaceURI===We?"math"===n:t.namespaceURI===He?"math"===n&&ot[r]:Boolean(at[n]):e.namespaceURI===We?!(t.namespaceURI===He&&!ot[r])&&!(t.namespaceURI===qe&&!rt[r])&&!at[n]&&(st[n]||!it[n]):!("application/xhtml+xml"!==Ke||!Ve[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,u([ie,ae,le],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(lt(e),!0)},mt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in o||n in et))return!1;if(we&&!_e[t]&&b(ce,t));else if(Ae&&b(ue,t));else if(!ge[t]||_e[t]){if(!(gt(e)&&(ve.tagNameCheck instanceof RegExp&&b(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&b(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&b(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(ze[t]);else if(b(fe,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Be[e])if(Ce&&!b(pe,g(n,de,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},yt=function(e){ft("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const s=t[o],{name:i,namespaceURI:a,value:l}=s,c=Je(i);let d="value"===i?l:v(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ct(i,e),!n.keepAttr)continue;if(!xe&&b(/\/>/i,d)){ct(i,e);continue}Se&&u([ie,ae,le],(e=>{d=g(d,e," ")}));const f=Je(e.nodeName);if(mt(f,c,d)){if(!Pe||"id"!==c&&"name"!==c||(ct(i,e),d="user-content-"+d),J&&"object"==typeof q&&"function"==typeof q.getAttributeType)if(a);else switch(q.getAttributeType(f,c)){case"TrustedHTML":d=J.createHTML(d);break;case"TrustedScriptURL":d=J.createScriptURL(d)}try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),p(r.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)},vt=function e(t){let n=null;const r=pt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof c&&e(n.content),yt(n));ft("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,a=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!dt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return e;if(ke||nt(t),r.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=Je(e.nodeName);if(!he[t]||be[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=ut("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Te&&!Se&&!Ee&&-1===e.indexOf("<"))return J&&Ne?J.createHTML(e):e;if(n=ut(e),!n)return Te?null:Ne?X:""}n&&Re&<(n.firstChild);const l=pt(je?e:n);for(;s=l.nextNode();)ht(s)||(s.content instanceof c&&vt(s.content),yt(s));if(je)return e;if(Te){if(Ie)for(a=ne.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let p=Ee?n.outerHTML:n.innerHTML;return Ee&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(W,n.ownerDocument.doctype.name)&&(p="\n"+p),Se&&u([ie,ae,le],(e=>{p=g(p,e," ")})),J&&Ne?J.createHTML(p):p},r.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ke=!0},r.clearConfig=function(){Xe=null,ke=!1},r.isValidAttribute=function(e,t,n){Xe||nt({});const r=Je(e),o=Je(t);return mt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return p(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},286:function(e,t){var n,r;n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,o={},s=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(A(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!A(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(a);return l.onmessage=g,l.id=s++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=A(r.step),r.chunk=A(r.chunk),r.complete=A(r.complete),r.error=A(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.NODE_STREAM_INPUT,"string"==typeof n?(n=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(n),f=r.download?new c(r):new p(r)):!0===n.readable&&A(n.read)&&A(n.on)?f=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",s="\r\n",a='"',l=a+a,c=!1,u=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(A(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!A(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){A(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function p(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=_((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=_((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=_((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=_((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,r,o=Math.pow(2,53),s=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,u=0,p=0,d=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(A(e.step)){var v=e.step;e.step=function(t){if(y=t,C())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function _(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!_(e)}))),C()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;C()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,s)),i=x(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,p+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)A(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,s){var a,l,c,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var p=0;p=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:u}),B++}}else B++}return H();function $(e){_.push(e),x=u}function q(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),C.push(e),u=m,$(C),b&&Y()),G()}function W(e){u=e,$(C),C=[],U=i.indexOf(r,u)}function G(e){return{data:_,errors:w,meta:{delimiter:n,linebreak:r,aborted:p,truncated:!!e,cursor:x+(d||0)}}}function Y(){s(G()),_=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return u}}function g(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(A(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:o};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{AudioPicker:()=>zt,CSVUploader:()=>Kt,Checkboxes:()=>Ht,ImagePicker:()=>en,MediaPicker:()=>an,PostPicker:()=>sr,PostSelector:()=>ar,SafeHtml:()=>pn,Selector:()=>br,TermSelector:()=>Ar,VideoPicker:()=>Sr,getMediaUrl:()=>Zt,parseCSVFile:()=>Vt,useCurrentPostId:()=>xn,useDebounce:()=>hn,useHasInnerBlocks:()=>mn,useInnerBlocks:()=>yn,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>vn,useInnerBlocksIndex:()=>gn,useMedia:()=>bn,useParentBlock:()=>An,useParentBlockAttributes:()=>wn,usePost:()=>Cn,usePostById:()=>kn,usePostMeta:()=>In,usePostMetaValue:()=>Nn,usePosts:()=>On,useTerms:()=>Pn});var e=n(322),t=n(980),o=n.n(t),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||H(j)>3?"":" "}function Y(e,t){for(;--t&&F()&&!(j<48||j>102||j>57&&j<65||j>70&&j<97););return q(e,$()+(t<6&&32==z()&&32==F()))}function V(e){for(;F();)switch(j){case e:return L;case 34:case 39:34!==e&&39!==e&&V(j);break;case 40:41===e&&V(e);break;case 92:F()}return L}function Z(e,t){for(;F()&&e+j!==57&&(e+j!==84||47!==z()););return"/*"+q(t,L-1)+"*"+b(47===e?e:F())}function K(e){for(;!H(z());)F();return q(e,L)}function Q(e,t){for(var n="",r=0;r6)switch(S(e,t+1)){case 109:if(45!==S(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+d+(108==S(e,t+3)?"$3":"$2-$3"))+e;case 115:return~x(e,"stretch")?X(C(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return C(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,s,i,a){return p+n+":"+r+a+(o?p+n+"-span:"+(s?i:+i-+r)+a:"")+e}));case 4949:if(121===S(e,t+6))return C(e,":",":"+f)+e;break;case 6444:switch(S(e,45===S(e,14)?18:11)){case 120:return C(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===S(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e;case 100:return C(e,":",":"+p)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(e,"scroll-","scroll-snap-")+e}return e}function ee(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=X(e.value,e.length,n));case y:return Q([M(e,{value:C(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(w(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":B(M(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})),B(M(e,{props:[t]})),_(e,{props:I(n,r)});break;case"::placeholder":B(M(e,{props:[C(t,/:(plac\w+)/,":"+f+"input-$1")]})),B(M(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]})),B(M(e,{props:[C(t,/:(plac\w+)/,p+"input-$1")]})),B(M(e,{props:[t]})),_(e,{props:I(n,r)})}return""}))}}function te(e){return function(e){return D="",e}(ne("",null,null,null,[""],e=function(e){return N=O=1,P=k(D=e),L=0,[]}(e),0,[0],e))}function ne(e,t,n,r,o,s,i,a,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,g=1,y=1,v=0,_="",A=o,w=s,E=r,R=_;g;)switch(h=v,v=F()){case 40:if(108!=h&&58==S(R,p-1)){-1!=x(R+=C(W(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:R+=W(v);break;case 9:case 10:case 13:case 32:R+=G(h);break;case 92:R+=Y($()-1,7);continue;case 47:switch(z()){case 42:case 47:T(oe(Z(F(),$()),t,n,l),l);break;default:R+="/"}break;case 123*m:a[c++]=k(R)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(R=C(R,/\f/g,"")),f>0&&k(R)-p&&T(f>32?se(R+";",r,n,p-1,l):se(C(R," ","")+";",r,n,p-2,l),l);break;case 59:R+=";";default:if(T(E=re(R,t,n,c,u,o,a,_,A=[],w=[],p,s),s),123===v)if(0===u)ne(R,t,E,E,A,s,p,a,w);else switch(99===d&&110===S(R,3)?100:d){case 100:case 108:case 109:case 115:ne(e,E,E,r&&T(re(e,E,E,0,0,o,a,_,o,A=[],p,w),w),o,w,p,a,r?A:w);break;default:ne(R,E,E,E,[""],w,0,a,w)}}c=u=f=0,m=y=1,_=R="",p=i;break;case 58:p=1+k(R),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(j=L>0?S(D,--L):0,O--,10===j&&(O=1,N--),j))continue;switch(R+=b(v),v*m){case 38:y=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(k(R)-1)*y,y=1;break;case 64:45===z()&&(R+=W(F())),d=z(),u=p=k(_=R+=K($())),v++;break;case 45:45===h&&2==k(R)&&(m=0)}}return s}function re(e,t,n,r,o,s,i,a,l,c,u,p){for(var d=o-1,f=0===o?s:[""],h=R(f),g=0,y=0,b=0;g0?f[_]+" "+w:C(w,/&\f/g,f[_])))&&(l[b++]=x);return U(e,t,n,0===o?m:a,l,c,u,p)}function oe(e,t,n,r){return U(e,t,n,h,b(j),E(e,2,-2),0,r)}function se(e,t,n,r,o){return U(e,t,n,g,E(e,0,r),E(e,r+1,-1),r,o)}const ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ae="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",le="undefined"!=typeof window&&"HTMLElement"in window,ce=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ue=(new Set,Object.freeze([])),pe=Object.freeze({}),de=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),fe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,he=/(^-|-$)/g;function me(e){return e.replace(fe,"-").replace(he,"")}var ge=/(a)(d)/gi,ye=function(e){return String.fromCharCode(e+(e>25?39:97))};function ve(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ye(t%52)+n;return(ye(t%52)+n).replace(ge,"$1-$2")}var be,_e=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ae=function(e){return _e(5381,e)};function we(e){return"string"==typeof e&&!0}var Ce="function"==typeof Symbol&&Symbol.for,xe=Ce?Symbol.for("react.memo"):60115,Se=Ce?Symbol.for("react.forward_ref"):60112,Ee={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ke={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Re={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Te=((be={})[Se]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},be[xe]=Re,be);function Ie(e){return("type"in(t=e)&&t.type.$$typeof)===xe?Re:"$$typeof"in e?Te[e.$$typeof]:Ee;var t}var Ne=Object.defineProperty,Oe=Object.getOwnPropertyNames,Pe=Object.getOwnPropertySymbols,Le=Object.getOwnPropertyDescriptor,je=Object.getPrototypeOf,De=Object.prototype;function Ue(e,t,n){if("string"!=typeof t){if(De){var r=je(t);r&&r!==De&&Ue(e,r,n)}var o=Oe(t);Pe&&(o=o.concat(Pe(t)));for(var s=Ie(e),i=Ie(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ge=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw We(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ut,n).replace(r,c))})),i.prefix&&u.push(ee),u.push(J);var p=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(pt,""),c=te(s||o?"".concat(s," ").concat(o," { ").concat(l," }"):l);i.namespace&&(c=dt(c,i.namespace));var p,d,f,h=[];return Q(c,(p=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),d=R(p),function(e,t,n,r){for(var o="",s=0;s="A"&&e<="Z"};function wt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=Fe(r,s),this.staticRulesId=s}else{for(var a=_e(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=Fe(r,d)}}return r},e}(),Tt=l().createContext(void 0);Tt.Consumer;var It={};function Nt(e,t,n){var r=Be(e),o=e,i=!we(e),c=t.attrs,u=void 0===c?ue:c,p=t.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":me(e);It[n]=(It[n]||0)+1;var r="".concat(n,"-").concat(function(e){return ve(Ae(e)>>>0)}("6.1.0"+n+It[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,f=(void 0===t.displayName&&function(e){we(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(me(t.displayName),"-").concat(t.componentId):t.componentId||d),h=r&&o.attrs?o.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var v=new Rt(n,f,r?o.componentStyle:void 0),b=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,p=e.target,d=l().useContext(Tt),f=vt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,o=s(s({},t),{className:void 0,theme:n}),i=0;i2&&ct.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=nt(),r=ze([n&&'nonce="'.concat(n,'"'),"".concat(ae,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw We(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw We(2);var n=((t={})[ae]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=nt();return r&&(n.nonce=r),[l().createElement("style",s({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ct({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw We(2);return l().createElement(bt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw We(3)}}(),"__sc-".concat(ae,"__");const Mt=Ut.div` + height: auto; + width: 100%; +`,Bt=({src:t})=>(0,e.jsx)(Mt,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});Bt.propTypes={src:o().string.isRequired};const Ft=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:o,preview:Bt,value:s,valueURL:i});Ft.defaultProps={className:"",onUpdateURL:null,valueURL:""},Ft.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const zt=Ft,$t=window.wp.components,qt=({label:t,value:n,options:r,onChange:o})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($t.BaseControl,{label:t}),r.map((t=>(0,e.jsx)($t.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{o(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});qt.propTypes={label:o().string.isRequired,value:o().arrayOf(o().string).isRequired,options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().string.isRequired})).isRequired,onChange:o().func.isRequired};const Ht=qt,Wt=window.wp.i18n;var Gt=n(286),Yt=n.n(Gt);const Vt=e=>new Promise(((t,n)=>{Yt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Zt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:s=""}={}}={},source_url:i="",url:a=""}=e;return o||n||s||r||a||i||""};class Kt extends l().PureComponent{static handleSubmit(e){e.preventDefault()}constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.state={error:"",success:""}}handleChange(e){const{attributeName:t,callback:n,setAttributes:r}=this.props;e.target.files&&e.target.files[0]&&Vt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Wt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Wt.__)("Could not map CSV data. Please check the source file to ensure that it has the correct structure.","alley-scripts"),success:""})})).catch((e=>{this.setState({error:e,success:""})}))}render(){const{error:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Wt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Kt.defaultProps={callback:null},Kt.propTypes={attributeName:o().string.isRequired,callback:o().func,setAttributes:o().func.isRequired};const Qt=Ut.div` + box-sizing: border-box; + flex-shrink: 0; + height: auto; + max-height: 1450px; + max-width: 1450px; + min-height: 20px; + min-width: 20px; + position: relative; + width: auto; +`,Jt=({src:t})=>(0,e.jsx)(Qt,{children:(0,e.jsx)("img",{alt:(0,Wt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Wt.__)("Edit image","alley-scripts")})});Jt.propTypes={src:o().string.isRequired};const Xt=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(an,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,preview:Jt,value:a,valueURL:l});Xt.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},Xt.propTypes={className:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const en=Xt,tn=window.wp.blockEditor,nn=window.wp.data,rn=Ut.div` + display: block; + position: relative; +`,on=Ut.div` + background: white; + border: 1px solid black; + padding: 1em; +`,sn=({allowedTypes:t,className:n,icon:r,imageSize:o,displayControlsInToolbar:s,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:p})=>{const{media:d}=(0,nn.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===d)return(0,e.jsx)($t.Spinner,{});const f=d?Zt(d,o):p;return f?(0,e.jsxs)(rn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(on,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),s?(0,e.jsx)(tn.BlockControls,{group:"other",children:(0,e.jsx)(tn.MediaReplaceFlow,{name:(0,Wt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)($t.ToolbarButton,{isDestructive:!0,text:(0,Wt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)($t.Button,{variant:"primary",onClick:i,children:(0,Wt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(rn,{className:n,children:(0,e.jsx)(tn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!p,icon:(0,e.jsx)(tn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};sn.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},sn.propTypes={allowedTypes:o().arrayOf(o().string),className:o().string,icon:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,preview:o().element,value:o().number.isRequired,valueURL:o().string};const an=sn;var ln=n(368),cn=n.n(ln);const un=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:cn().sanitize(n)}});un.defaultProps={className:""},un.propTypes={className:o().string,html:o().string.isRequired,tag:o().string.isRequired};const pn=un,dn=window.wp.element,fn=window.wp.url,hn=(e,t)=>{const[n,r]=(0,dn.useState)(e);return(0,dn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},mn=e=>vn(e)>0,gn=e=>{const t=An(e),n=yn(t);return n?n.findIndex((t=>t.clientId===e)):-1},yn=e=>(0,nn.useSelect)((t=>t(tn.store).getBlocks(e)),[e]),_n=e=>yn(e).map((e=>e.attributes)),vn=e=>yn(e).length,bn=e=>(0,nn.useSelect)((t=>t("core").getMedia(e)),[e]),An=e=>(0,nn.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(tn.store),o=r(e);return o?n(o):null}),[e]),wn=e=>(0,nn.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(tn.store),o=r(e);return o?n(o):null}),[e]),Cn=(e,t="post")=>(0,nn.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),xn=()=>(0,nn.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),Sn=window.wp.apiFetch;var En=n.n(Sn);const kn=(e,t=null)=>{const[n,r]=(0,dn.useState)({});return(0,dn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,fn.addQueryArgs)("/wp/v2/search",{include:e}),n=await En()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),Cn(e,n[e]??"")},Rn=window.wp.coreData,Tn=window.lodash,In=(e=null,t=null)=>{const n=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,o]=(0,Rn.useEntityProp)("postType",n,"meta",t),s="function"==typeof o?o:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>s((0,Tn.cloneDeep)(e))]},Nn=(e,t=null,n=null)=>{const[r,o]=In(t,n);return[r[e],t=>o({...r,[e]:t})]},On=(e,t="post")=>(0,nn.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),Pn=(e=null,t=null,n="categories")=>{const r=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[o,s]=(0,Rn.useEntityProp)("postType",r,n,t);return[o,e=>s(e)]};var Ln=n(62),jn=n.n(Ln),Dn=n(36),Un=n.n(Dn),Mn=n(793),Bn=n.n(Mn),Fn=n(892),zn=n.n(Fn),$n=n(173),qn=n.n($n),Hn=n(464),Wn=n.n(Hn),Gn=n(992),Yn={};Yn.styleTagTransform=Wn(),Yn.setAttributes=zn(),Yn.insert=Bn().bind(null,"head"),Yn.domAPI=Un(),Yn.insertStyleElement=qn(),jn()(Gn.Z,Yn),Gn.Z&&Gn.Z.locals&&Gn.Z.locals;var Vn=n(779),Zn=n.n(Vn),Kn=n(905),Qn={};Qn.styleTagTransform=Wn(),Qn.setAttributes=zn(),Qn.insert=Bn().bind(null,"head"),Qn.domAPI=Un(),Qn.insertStyleElement=qn(),jn()(Kn.Z,Qn),Kn.Z&&Kn.Z.locals&&Kn.Z.locals;const Jn=window.wp.htmlEntities,Xn=Ut.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,er=({title:t,postType:n,attachmentID:r})=>{const o=bn(r),s=o?.media_details?.sizes?.thumbnail?.source_url,i=o?.alt_text??"";return(0,e.jsxs)(Xn,{children:[s?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:s,alt:i}):null,(0,e.jsx)(pn,{html:(0,Jn.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Wt.sprintf)(" (%s)",n)]})},tr=({baseUrl:t,searchRender:n,selected:r,setSelected:o,suppressPostIds:s=[]})=>{const[i,a]=(0,dn.useState)(!1),[l,c]=(0,dn.useState)([]),[u,p]=(0,dn.useState)(!1),[d,f]=(0,dn.useState)(0),[h,m]=(0,dn.useState)({searchValue:"",page:1}),g=(0,dn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,fn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:s.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,fn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const o=await En()({path:r,parse:!1});f(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,s]);return(0,dn.useEffect)((()=>{let e=!1;return u||(p(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)($t.TextControl,{value:h.searchValue,placeholder:(0,Wt.__)("Search...","alley-scripts"),label:(0,Wt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)($t.Button,{className:Zn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>o(t.id),children:n?n(t):(0,e.jsx)(er,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)($t.Spinner,{}):null,d>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Wt.__)("Load More","alley-scripts")})}):null]})]})},nr=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:o,searchRender:s,suppressPostIds:i=[]})=>{const[a,l]=(0,dn.useState)();return(0,e.jsxs)($t.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(tr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:s,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)($t.Button,{variant:"secondary",onClick:n,children:(0,Wt.__)("Cancel","alley-scripts")}),(0,e.jsx)($t.Button,{variant:"primary",onClick:()=>{a&&(o(a),n())},disabled:!a,children:(0,Wt.__)("Select","alley-scripts")})]})]})},rr=Ut.div` + display: block; + position: relative; +`,or=Ut.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,sr=({allowedTypes:t,className:n,getPostType:r,modalTitle:o=(0,Wt.__)("Select Post","alley-scripts"),onReset:s,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Wt.__)("Replace","alley-scripts"),resetText:u=(0,Wt.__)("Reset","alley-scripts"),searchEndpoint:p="/wp/v2/search",searchRender:d,selectText:f=(0,Wt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,v]=(0,dn.useState)(!1),b=(0,fn.addQueryArgs)(p,{type:"post",subtype:t??"any",...a}),_=kn(g,r),{featured_media:A,title:{rendered:w=""}={},type:C=""}=_||{},x=()=>{v(!0)};return 0!==g&&null===_?(0,e.jsx)($t.Spinner,{}):(0,e.jsxs)(rr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==_?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(_):(0,e.jsx)(or,{children:(0,e.jsx)(er,{title:w,postType:C,attachmentID:A})}),(0,e.jsxs)($t.ButtonGroup,{children:[(0,e.jsx)($t.Button,{variant:"secondary",onClick:s,style:{margin:"0 4px"},children:u}),(0,e.jsx)($t.Button,{variant:"secondary",onClick:x,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)($t.Button,{onClick:x,variant:"secondary",children:f}),y?(0,e.jsx)(nr,{closeModal:()=>{v(!1)},baseUrl:b,modalTitle:o,onUpdate:i,searchRender:d,suppressPostIds:h}):null]})},ir=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(br,{type:"post",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});ir.defaultProps={className:"",emptyLabel:(0,Wt.__)("No posts found","alley-scripts"),label:(0,Wt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},ir.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const ar=ir,lr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let cr;const ur=new Uint8Array(16);function pr(){if(!cr&&(cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cr(ur)}const dr=[];for(let e=0;e<256;++e)dr.push((e+256).toString(16).slice(1));const fr=function(e,t,n){if(lr.randomUUID&&!t&&!e)return lr.randomUUID();const r=(e=e||{}).random||(e.rng||pr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return dr[e[t+0]]+dr[e[t+1]]+dr[e[t+2]]+dr[e[t+3]]+"-"+dr[e[t+4]]+dr[e[t+5]]+"-"+dr[e[t+6]]+dr[e[t+7]]+"-"+dr[e[t+8]]+dr[e[t+9]]+"-"+dr[e[t+10]]+dr[e[t+11]]+dr[e[t+12]]+dr[e[t+13]]+dr[e[t+14]]+dr[e[t+15]]}(r)},hr=({emptyLabel:t,error:n,id:r,isOpen:o,labelledbyId:s,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:p})=>{if(!i&&(""===p||u>p.length))return null;let d="",f="";return i?(d="loading",f=(0,Wt.__)("Loading...","alley-scripts")):n?(d="error",f=n):i||0!==l.length||(d="no-posts",f=t),i||!i&&(p&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Zn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("div",{className:Zn()("autocomplete__dropdown--notice",`autocomplete__${d}`),children:f})}):(0,e.jsx)("div",{className:Zn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":s,id:r,className:Zn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)($t.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};hr.propTypes={emptyLabel:o().string.isRequired,error:o().string.isRequired,id:o().string.isRequired,isOpen:o().bool.isRequired,labelledbyId:o().string.isRequired,loading:o().bool.isRequired,options:o().arrayOf(o().shape({label:o().string,value:o().string})).isRequired,onSelect:o().func.isRequired,selectedItems:o().shape([]).isRequired,threshold:o().number.isRequired,value:o().string.isRequired};const mr=hr;var gr=n(458),yr={};yr.styleTagTransform=Wn(),yr.setAttributes=zn(),yr.insert=Bn().bind(null,"head"),yr.domAPI=Un(),yr.insertStyleElement=qn(),jn()(gr.Z,yr),gr.Z&&gr.Z.locals&&gr.Z.locals;const vr=({type:t,className:n,emptyLabel:r,label:o,maxPages:s,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:p})=>{const d=fr(),[f,h]=(0,dn.useState)(""),[m,g]=(0,dn.useState)([]),[y,v]=(0,dn.useState)(!1),[b,_]=(0,dn.useState)(!1),[A,w]=(0,dn.useState)(""),[C,x]=(0,dn.useState)([]),S=(0,dn.useRef)(),E=hn(A,750),k=(0,dn.useCallback)((async(e=1)=>{if(E.length0?c.join(","):"any",type:t});await En()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>s?s:t,e.json()})).then((t=>{g((e=>[...e,...t])),_(!1),(n&&n>e||e>=1&&i&&C.length>0)&&k(e+1)})).catch((e=>h(e.message)))}),[E,t,s,i,c,C.length,p]);(0,dn.useEffect)((()=>{x(u)}),[u]),(0,dn.useEffect)((()=>{E&&p<=E.length?k():g([])}),[E,k,p]);const R=e=>{v(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&v(!1)};(0,dn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,dn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const I=e=>{let t=[];if(C.some((t=>t.id===e.id))){const n=C.findIndex((t=>t.id===e.id));t=[...C.slice(0,n),...C.slice(n+1,C.length)]}else i?t=[...C,e]:(t=[e],v(!1));x(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Zn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${d}`,className:Zn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Zn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${d}`,children:(0,e.jsx)("div",{children:o})}),C.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${d}`,id:`selected-items-${d}`,className:Zn()("autocomplete__selection--results","autocomplete__selection-list"),children:C.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)($t.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>I(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Zn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${d}`,onChange:e=>w(e.target.value),onFocus:()=>v(!0),placeholder:l,type:"text",value:A})]}),(0,e.jsx)(mr,{emptyLabel:r,error:f,labelledById:`autocomplete-${d}`,id:`listbox-${d}`,isOpen:y,loading:b&&E,onSelect:I,options:m,selectedItems:C,threshold:p,value:E})]})})};vr.defaultProps={type:"post",className:"",emptyLabel:(0,Wt.__)("No items found","alley-scripts"),label:(0,Wt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},vr.propTypes={type:o().string,className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const br=vr,_r=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(br,{type:"term",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});_r.defaultProps={className:"",emptyLabel:(0,Wt.__)("No terms found","alley-scripts"),label:(0,Wt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},_r.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const Ar=_r,wr=Ut.div` + height: auto; + width: 100%; +`,Cr=({src:t})=>(0,e.jsx)(wr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});Cr.propTypes={src:o().string.isRequired};const xr=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:o,preview:Cr,value:s,valueURL:i});xr.defaultProps={className:"",onUpdateURL:null,valueURL:""},xr.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const Sr=xr})(),r})(),e.exports=t()},372:function(e,t,n){"use strict";var r=window.wp.blocks,o=window.wp.element,s=window.wp.i18n,i=n(373),a=window.wp.data,l=window.wp.components,c=window.wp.blockEditor,u=function(e){let{featured_image:t,post_date:n,title:r}=e;return(0,o.createElement)("div",{className:"nb-post-picker-result"},(0,o.createElement)("div",{className:"nb-post-picker-result-image__container"},t?(0,o.createElement)("img",{className:"nb-post-picker-result-image",src:t,alt:""}):null),(0,o.createElement)(i.SafeHtml,{html:r,className:"nb-post-picker-result-title",tag:"div"}),(0,o.createElement)("span",{className:"nb-post-picker-result-date"},n))},p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/post","version":"0.1.0","title":"Newsletter Single Post","category":"design","icon":"admin-post","description":"Displays a post","textdomain":"post","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php","attributes":{"postId":{"type":"number","default":0},"showImage":{"type":"boolean","default":true},"showExcerpt":{"type":"boolean","default":true},"showContent":{"type":"boolean","default":true},"showByline":{"type":"boolean","default":true},"showCta":{"type":"boolean","default":true},"showProBadge":{"type":"boolean","default":true},"order":{"type":"array","items":{"type":"string"},"default":["title","byline","image","excerpt","content","cta"]},"overrideTitle":{"type":"string","default":""},"overrideImage":{"type":"number","default":0},"overrideExcerpt":{"type":"string","default":""},"overrideContent":{"type":"string","default":""},"overrideByline":{"type":"string","default":""},"number":{"type":"number","default":null},"smallerFont":{"type":"boolean","default":false},"imgSizes":{"type":"string","default":""}}}');(0,r.registerBlockType)(p,{apiVersion:2,edit:function(e){let{attributes:{postId:t=0,showImage:n,showExcerpt:r,showContent:p,showCta:d,showByline:f,order:h,overrideTitle:m,overrideImage:g,overrideExcerpt:y,overrideContent:v,overrideByline:b,number:_,smallerFont:A},setAttributes:w}=e;const C=e=>{w({postId:e,overrideTitle:"",overrideImage:0,overrideExcerpt:"",overrideContent:""})},x=(0,a.useSelect)((e=>t?e("core").getEntityRecord("postType","post",t):null),[t]);let S=x?x.title.rendered:"";const E=x?x.content.rendered:"";let k=x?x.excerpt.raw:"",R=x?x.wp_newsletter_builder_byline:"",T=x?x.featured_media:null;S=m||S,T=g||T,k=y||k,R=b||R;const{media:I=null}=(0,a.useSelect)((e=>({media:T?e("core").getMedia(T):null})),[T]),N=I?I.source_url:"",O=E.match(//gi)||[],P=v||(L=O?.slice(0,2).join(""),L?L.replace(/]*?>(.*?)<\/a>/gi,"$1"):"");var L;const j=new Date;j.setMonth(j.getMonth()-3);const D=A?"post__title--small":"";return(0,o.createElement)("div",(0,c.useBlockProps)(),t&&!x?(0,o.createElement)(l.Spinner,null):null,t?(0,o.createElement)(o.Fragment,null,(0,o.createElement)(l.Button,{variant:"primary",isDestructive:!0,onClick:()=>C(0),className:"newsletter-remove-post","aria-label":(0,s.__)("Remove Post","wp-newsletter-builder")},"X"),h.map((e=>{switch(e){case"image":return n&&N?(0,o.createElement)("div",{className:"image-container"},(0,o.createElement)("img",{src:N,alt:S})):null;case"title":return(0,o.createElement)("h2",{className:D},_?(0,o.createElement)("span",{className:"newsletter-post__number"},`${_}. `):"",(0,o.createElement)(c.RichText,{value:S,tagName:"span",onChange:e=>w({overrideTitle:e})}));case"byline":return f?(0,o.createElement)("p",{className:"post__byline"},(0,s.__)("By ","wp-newsletter-builder"),(0,o.createElement)(c.RichText,{value:R,tagName:"span",onChange:e=>w({overrideByline:e}),allowedFormats:[]})):null;case"excerpt":return r?(0,o.createElement)("div",{className:"post__dek"},(0,o.createElement)(c.RichText,{value:k,tagName:"p",multiline:!1,onChange:e=>w({overrideExcerpt:e})})):null;case"content":return p?(0,o.createElement)(c.RichText,{value:P,tagName:"div",multiline:!0,onChange:e=>w({overrideContent:e})}):null;case"cta":return d?(0,o.createElement)("div",{className:"newsletter-read-more has-text-align-center"},(0,o.createElement)("span",{className:"wp-element-button"},(0,s.__)("Read More","wp-newsletter-builder"))):null;default:return""}})),(0,o.createElement)(c.InspectorControls,null,(0,o.createElement)(l.PanelBody,{title:(0,s.__)("Post","wp-newsletter-builder"),initialOpen:!0},(0,o.createElement)(l.PanelRow,null,(0,o.createElement)(l.CheckboxControl,{label:(0,s.__)("Show image","wp-newsletter-builder"),checked:n,onChange:e=>w({showImage:e})})),(0,o.createElement)(l.PanelRow,null,(0,o.createElement)(l.CheckboxControl,{label:(0,s.__)("Show Byline","wp-newsletter-builder"),checked:f,onChange:e=>w({showByline:e})})),(0,o.createElement)(l.PanelRow,null,(0,o.createElement)(l.CheckboxControl,{label:(0,s.__)("Show dek","wp-newsletter-builder"),checked:r,onChange:e=>w({showExcerpt:e})})),(0,o.createElement)(l.PanelRow,null,(0,o.createElement)(l.CheckboxControl,{label:(0,s.__)("Show content","wp-newsletter-builder"),checked:p,onChange:e=>w({showContent:e})})),(0,o.createElement)(l.PanelRow,null,(0,o.createElement)(l.CheckboxControl,{label:(0,s.__)("Show CTA","wp-newsletter-builder"),checked:d,onChange:e=>w({showCta:e})}))),(0,o.createElement)(l.PanelBody,{title:(0,s.__)("Override Image","wp-newsletter-builder"),initialOpen:!0},(0,o.createElement)(l.PanelRow,null,(0,o.createElement)(i.ImagePicker,{value:null!=g?g:0,onUpdate:e=>{let{id:t}=e;return w({overrideImage:t})},onReset:()=>w({overrideImage:0})}))))):(0,o.createElement)("div",null,(0,o.createElement)(i.PostPicker,{onUpdate:C,allowedTypes:["post"],onReset:()=>C(0),params:{after:j.toISOString(),per_page:20},title:(0,s.__)("Please select a post","wp-newsletter-builder"),value:t,searchRender:u})))},title:p.title})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=function(t,n,o,s){if(!n){var i=1/0;for(u=0;u=s)&&Object.keys(r.O).every((function(e){return r.O[e](n[l])}))?n.splice(l--,1):(a=!1,s0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,o,s]},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={844:0,253:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,s,i=n[0],a=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var u=l(r)}for(t&&t(n);c. + * @param WP_Block $block_instance The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-newsletter-builder + */ + +use function WP_Newsletter_Builder\get_byline; + +$wp_newsletter_builder_block_post = get_post( $attributes['postId'] ); +if ( empty( $attributes['postId'] ) || ! $wp_newsletter_builder_block_post ) { + return; +} +$wp_newsletter_builder_post_title = ! empty( $attributes['overrideTitle'] ) ? $attributes['overrideTitle'] : $wp_newsletter_builder_block_post->post_title; +$wp_newsletter_builder_post_image = ! empty( $attributes['overrideImage'] ) ? $attributes['overrideImage'] : get_post_thumbnail_id( $wp_newsletter_builder_block_post->ID ); +$wp_newsletter_builder_excerpt = ! empty( $attributes['overrideExcerpt'] ) ? $attributes['overrideExcerpt'] : $wp_newsletter_builder_block_post->post_excerpt; +$wp_newsletter_builder_content = $wp_newsletter_builder_block_post->post_content; +preg_match_all( '//iU', $wp_newsletter_builder_content, $matches ); +$wp_newsletter_builder_paragraphs = $matches[0]; +$wp_newsletter_builder_content = implode( '', array_slice( $wp_newsletter_builder_paragraphs, 0, 2 ) ); +$wp_newsletter_builder_content = preg_replace( '/]*?>(.*?)<\/a>/i', '$1', $wp_newsletter_builder_content ); +$wp_newsletter_builder_content = ! empty( $attributes['overrideContent'] ) ? $attributes['overrideContent'] : $wp_newsletter_builder_content; +$wp_newsletter_builder_byline = ! empty( $attributes['overrideByline'] ) ? $attributes['overrideByline'] : get_byline( $wp_newsletter_builder_block_post ); +$wp_newsletter_builder_order = ! empty( $attributes['order'] ) ? $attributes['order'] : [ + 'title', + 'byline', + 'image', + 'excerpt', + 'content', + 'cta', +]; +$wp_newsletter_builder_showimage = $attributes['showImage'] ?? true; +$wp_newsletter_builder_showexcerpt = $attributes['showExcerpt'] ?? true; +$wp_newsletter_builder_showcontent = $attributes['showContent'] ?? true; +$wp_newsletter_builder_showbyline = $attributes['showByline'] ?? true; +$wp_newsletter_builder_showcta = $attributes['showCta'] ?? true; +$wp_newsletter_builder_showprobadge = $attributes['showProBadge'] ?? true; +$wp_newsletter_builder_number = $attributes['number'] ?? null; +$wp_newsletter_builder_smaller_font = $attributes['smallerFont'] ?? false; +$wp_newsletter_builder_title_class = $wp_newsletter_builder_smaller_font ? 'post__title--small' : ''; +$wp_newsletter_builder_img_sizes = $attributes['imgSizes'] ?? ''; +?> +
> + + + +

+ + + + +

+
+ + + + + + + $wp_newsletter_builder_img_sizes ] ); ?> + + + +
+

+
+ + + + + +
+ + + + + +
+ + +
diff --git a/build/post/style-index.css b/build/post/style-index.css new file mode 100644 index 00000000..2df066c6 --- /dev/null +++ b/build/post/style-index.css @@ -0,0 +1 @@ +.wp-block-wp-newsletter-builder-post>*{margin:15px 0}.wp-block-wp-newsletter-builder-post .post__title-link{color:#000;display:block;margin:20px auto;text-decoration:none}.wp-block-wp-newsletter-builder-post h2{margin-bottom:0;text-align:center}.wp-block-wp-newsletter-builder-post h2.post__title--small{font-size:24px}.wp-block-wp-newsletter-builder-two-up-post .wp-block-wp-newsletter-builder-post h2{font-size:18px}.wp-block-wp-newsletter-builder-post .post__byline{font-family:Georgia,serif;font-size:15px;font-weight:700;text-align:center}.wp-block-wp-newsletter-builder-post .post__image-link{display:block;margin:20px auto}.wp-block-wp-newsletter-builder-post .post__dek p{margin:20px}.wp-block-wp-newsletter-builder-post .wp-block-button{margin:20px auto}.wp-block-wp-newsletter-builder-post .newsletter-post__number{color:#d62827}.wp-block-wp-newsletter-builder-post table{width:100%} diff --git a/build/section/block.json b/build/section/block.json new file mode 100644 index 00000000..9ddc3986 --- /dev/null +++ b/build/section/block.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/section", + "version": "0.1.0", + "title": "Newsletter Section", + "category": "design", + "icon": "layout", + "description": "Section to contain other blocks and allow for choosing multiple posts.", + "textdomain": "section", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php", + "attributes": { + "showNumbers": { + "type": "boolean", + "default": false + }, + "heading": { + "type": "string", + "default": "" + }, + "adAfter": { + "type": "boolean", + "default": false + } + } +} \ No newline at end of file diff --git a/build/section/index.asset.php b/build/section/index.asset.php new file mode 100644 index 00000000..35b5ba80 --- /dev/null +++ b/build/section/index.asset.php @@ -0,0 +1 @@ + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '4e31e5c5065d5e59e786'); diff --git a/build/section/index.css b/build/section/index.css new file mode 100644 index 00000000..e80a94d9 --- /dev/null +++ b/build/section/index.css @@ -0,0 +1,5 @@ +.components-modal__content{width:90vw}.alley-scripts-post-picker__buttons{clear:both;display:block;text-align:right;width:100%}.alley-scripts-post-picker__buttons button{margin:5px}.nb-multi-post-picker-modal{display:flex;flex-direction:row;height:90%;justify-content:space-between;margin-bottom:10px;width:100%}.nb-multi-post-picker-modal__search-results,.nb-multi-post-picker-modal__selected{border:1px solid #ccc;height:100%;padding:5px;width:49%} +.nb-multi-post-picker-modal .alley-scripts-post-picker__post-list{float:left;height:calc(70vh - 250px);overflow-y:auto}.alley-scripts-post-picker__post{align-items:center;border:1px solid #eee;display:flex;float:left;height:150px;margin:5px;overflow:hidden;padding:.5rem .75rem;transition:background-color .2s ease-in-out;width:150px}.alley-scripts-post-picker__post.is-selected,.alley-scripts-post-picker__post:hover{background-color:#f5f5f5}.alley-scripts-post-picker__load-more{clear:both;float:left;text-align:center;width:100%} +.nb-multi-post-picker-modal .alley-scripts-post-picker__post-list.nb-sortable-list{height:calc(70vh - 170px);width:100%}.nb-post-picker-draggable{align-items:center;border:1px solid #ccc;display:flex;flex-direction:row;margin:5px 0;min-height:60px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.nb-post-picker-draggable>span{cursor:move;height:100%} +.post-type-nb_newsletter .alley-scripts-post-picker__post-list .alley-scripts-post-picker__post{height:auto;padding:0 5px 0 0;width:99%}.post-type-nb_newsletter .nb-post-picker-result{align-items:center;display:flex;flex-direction:row;gap:10px;justify-content:flex-start;width:100%}.post-type-nb_newsletter .nb-post-picker-result-image__container{height:56px;width:100px}.post-type-nb_newsletter .nb-post-picker-result-image__container img{max-height:56px;max-width:100px}.post-type-nb_newsletter .nb-post-picker-result-title{font-weight:600;margin:5px 0;text-align:left}.post-type-nb_newsletter .nb-post-picker-result-date{margin-left:auto;text-align:right} +.wp-block-wp-newsletter-builder-section{border:1px dashed #ccc;padding:2px} diff --git a/build/section/index.js b/build/section/index.js new file mode 100644 index 00000000..49b2f365 --- /dev/null +++ b/build/section/index.js @@ -0,0 +1,42 @@ +!function(){var e,t={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".alley-scripts-post-picker__post-list{display:flex;flex-wrap:wrap;float:left;height:calc(70vh - 200px);justify-content:flex-start;overflow-y:auto;padding:8px;width:100%}.alley-scripts-post-picker__post{border:1px solid #eee;height:auto;justify-content:center;margin:0 8px 8px 0;transition:background-color .2s ease-in-out;width:calc((100% - 40px)/3)}@media(min-width: 780px){.alley-scripts-post-picker__post{width:calc((100% - 40px)/5)}}.alley-scripts-post-picker__post:hover{background-color:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.alley-scripts-post-picker__load-more{clear:both;float:left;text-align:center;width:100%}","",{version:3,sources:["webpack://./src/components/post-picker/post-list.scss"],names:[],mappings:"AAAA,sCACE,YAAA,CACA,cAAA,CACA,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,WAAA,CACA,UAAA,CAGF,iCACE,qBAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,2CAAA,CACA,2BAAA,CAGA,yBATF,iCAUI,2BAAA,CAAA,CAGF,uCACE,wBAAA,CAGF,6CACE,wBAAA,CAIJ,sCACE,UAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA",sourcesContent:[".alley-scripts-post-picker__post-list {\n display: flex;\n flex-wrap: wrap;\n float: left;\n height: calc(70vh - 200px);\n justify-content: flex-start;\n overflow-y: auto;\n padding: 8px;\n width: 100%;\n}\n\n.alley-scripts-post-picker__post {\n border: 1px solid #eee;\n height: auto;\n justify-content: center;\n margin: 0 8px 8px 0;\n transition: background-color 0.2s ease-in-out;\n width: calc((100% - 40px) / 3);\n\n\n @media (min-width: 780px) {\n width: calc((100% - 40px) / 5);\n }\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\n }\n}\n\n.alley-scripts-post-picker__load-more {\n clear: both;\n float: left;\n text-align: center;\n width: 100%;\n}\n"],sourceRoot:""}]);const a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,".components-modal__content{width:90vw}.alley-scripts-post-picker__buttons{clear:both;display:block;text-align:right;width:100%}.alley-scripts-post-picker__buttons button{margin:5px}","",{version:3,sources:["webpack://./src/components/post-picker/search-modal.scss"],names:[],mappings:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\n}\n\n.alley-scripts-post-picker__buttons {\n clear: both;\n display: block;\n text-align: right;\n width: 100%;\n\n button {\n margin: 5px;\n }\n}\n"],sourceRoot:""}]);const a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),o=n.n(r),s=n(609),i=n.n(s)()(o());i.push([e.id,'.edit-post-sidebar .autocomplete__component,.editor-styles-wrapper .autocomplete__component{margin-bottom:20px}.edit-post-sidebar .autocomplete-base-control,.editor-styles-wrapper .autocomplete-base-control{position:relative}.edit-post-sidebar .autocomplete-text-control__input,.editor-styles-wrapper .autocomplete-text-control__input{margin:0}.edit-post-sidebar .autocomplete__selection-list,.editor-styles-wrapper .autocomplete__selection-list{list-style-type:none;margin:0 0 6px;padding:0}.edit-post-sidebar .autocomplete__selection-list--item,.editor-styles-wrapper .autocomplete__selection-list--item{display:inline-block;list-style:none}.edit-post-sidebar .autocomplete__selection-list--item--button,.editor-styles-wrapper .autocomplete__selection-list--item--button{margin-bottom:4px;margin-right:3px}.edit-post-sidebar .autocomplete__selection-list--item--button::after,.editor-styles-wrapper .autocomplete__selection-list--item--button::after{content:"×";font-size:16px;line-height:20px;margin-left:5px}.edit-post-sidebar .autocomplete__dropdown,.editor-styles-wrapper .autocomplete__dropdown{background-color:#fff;border-color:rgba(0,0,0,0) #e2e4e7 #e2e4e7;border-radius:0 0 4px 4px;border-style:solid;border-width:0 1px 1px;left:0;max-height:0;overflow-y:hidden;position:absolute;top:calc(100% + 1px);visibility:hidden;width:100%;z-index:10}.edit-post-sidebar .autocomplete__dropdown--is-open,.editor-styles-wrapper .autocomplete__dropdown--is-open{box-shadow:0 3px 30px rgba(25,30,35,.1);max-height:225px;overflow-y:scroll;visibility:visible}.edit-post-sidebar .autocomplete__dropdown--notice,.editor-styles-wrapper .autocomplete__dropdown--notice{padding:15px}.edit-post-sidebar .autocomplete__dropdown--results,.editor-styles-wrapper .autocomplete__dropdown--results{list-style:none;margin:0;padding:0}.edit-post-sidebar .autocomplete__list--item,.editor-styles-wrapper .autocomplete__list--item{list-style:none}.edit-post-sidebar .autocomplete__list--item>button,.editor-styles-wrapper .autocomplete__list--item>button{background:rgba(0,0,0,0);border-color:#e2e4e7;border-style:solid;border-width:0 0 1px;height:100%;line-height:1.25;text-align:left;white-space:inherit;width:100%}.edit-post-sidebar .autocomplete__list--item:last-child>button,.editor-styles-wrapper .autocomplete__list--item:last-child>button{border-bottom:0}',"",{version:3,sources:["webpack://./src/components/selector/styles.scss"],names:[],mappings:"AAAA,4FAgBI,kBACE,CAAA,gGAMF,iBACE,CAAA,8GAMF,QACE,CAAA,sGAMF,oBACE,CAAA,cACA,CAAA,SACA,CAAA,kHAEA,oBACE,CAAA,eACA,CAAA,kIAEA,iBACE,CAAA,gBACA,CAAA,gJAEA,WACE,CAAA,cACA,CAAA,gBACA,CAAA,eACA,CAAA,0FASR,qBACE,CAAA,0CACA,CAAA,yBACA,CAAA,kBACA,CAAA,sBACA,CAAA,MACA,CAAA,YACA,CAAA,iBACA,CAAA,iBACA,CAAA,oBACA,CAAA,iBACA,CAAA,UACA,CAAA,UACA,CAAA,4GAGA,uCACE,CAAA,gBACA,CAAA,iBACA,CAAA,kBACA,CAAA,0GAIF,YACE,CAAA,4GAIF,eACE,CAAA,QACA,CAAA,SACA,CAAA,8FAOJ,eACE,CAAA,4GAEA,wBACE,CAAA,oBACA,CAAA,kBACA,CAAA,oBACA,CAAA,WACA,CAAA,gBACA,CAAA,eACA,CAAA,mBACA,CAAA,UACA,CAAA,kIAGF,eACE",sourcesContent:["//--------------------------------------------------------------\n// AutoComplete Styles\n//--------------------------------------------------------------\n\n/* stylelint-disable max-nesting-depth */\n\n//-----------------------------------------\n// Accommodate editor well, or the sidebar.\n//-----------------------------------------\n.edit-post-sidebar,\n.editor-styles-wrapper {\n .autocomplete {\n\n //-----------------------------------------\n // Parent form wrapper.\n //-----------------------------------------\n &__component {\n margin-bottom: 20px;\n }\n\n //-----------------------------------------\n // Wrapper\n //-----------------------------------------\n &-base-control {\n position: relative;\n }\n\n //-----------------------------------------\n // Input\n //-----------------------------------------\n &-text-control__input {\n margin: 0;\n }\n\n //-----------------------------------------\n // Selected buttons.\n //-----------------------------------------\n &__selection-list {\n list-style-type: none;\n margin: 0 0 6px;\n padding: 0;\n\n &--item {\n display: inline-block;\n list-style: none;\n\n &--button {\n margin-bottom: 4px;\n margin-right: 3px;\n\n &::after {\n content: '×';\n font-size: 16px;\n line-height: 20px;\n margin-left: 5px;\n }\n }\n }\n }\n\n //-----------------------------------------\n // Results\n //-----------------------------------------\n &__dropdown {\n background-color: #fff;\n border-color: transparent #e2e4e7 #e2e4e7;\n border-radius: 0 0 4px 4px;\n border-style: solid;\n border-width: 0 1px 1px;\n left: 0;\n max-height: 0;\n overflow-y: hidden;\n position: absolute;\n top: calc(100% + 1px); // Offset focus border.\n visibility: hidden;\n width: 100%;\n z-index: 10;\n\n // Container is open.\n &--is-open {\n box-shadow: 0 3px 30px rgba(25, 30, 35, 0.1);\n max-height: 225px;\n overflow-y: scroll;\n visibility: visible;\n }\n\n // Notice handler.\n &--notice {\n padding: 15px;\n }\n\n // Results container.\n &--results {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n }\n\n //-----------------------------------------\n // List/Results\n //-----------------------------------------\n &__list--item {\n list-style: none;\n\n > button {\n background: transparent;\n border-color: #e2e4e7;\n border-style: solid;\n border-width: 0 0 1px;\n height: 100%;\n line-height: 1.25;\n text-align: left;\n white-space: inherit;\n width: 100%;\n }\n\n &:last-child > button {\n border-bottom: 0;\n }\n }\n }\n}\n"],sourceRoot:""}]);const a=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),s="/*# ".concat(o," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:s,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;s||(s=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),v=w(String.prototype.trim),b=w(RegExp.prototype.test),_=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let s=r.length;for(;s--;){let t=r[s];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[s]=e),t=e)}e[t]=!0}return e}function x(t){const n=a(null);for(const[r,s]of e(t))void 0!==o(t,r)&&(n[r]=s);return n}function S(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const E=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=s(["#text"]),L=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),P=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),q=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const i=o,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:A,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,H=U.prototype,V=S(H,"cloneNode"),K=S(H,"nextSibling"),Z=S(H,"childNodes"),Q=S(H,"parentNode");if("function"==typeof A){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let X,J="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=o,{importNode:oe}=i;let se={};r.isSupported="function"==typeof e&&"function"==typeof Q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:ae,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de}=G;let{IS_ALLOWED_URI:fe}=G,he=null;const me=C({},[...E,...k,...R,...I,...O]);let ge=null;const ye=C({},[...L,...P,...j,...D]);let ve=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),be=null,_e=null,Ae=!0,we=!0,Ce=!1,xe=!0,Se=!1,Ee=!1,ke=!1,Re=!1,Te=!1,Ie=!1,Ne=!1,Oe=!0,Le=!1,Pe=!0,je=!1,De={},Ue=null;const Me=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const Fe=C({},["audio","video","img","source","image","track"]);let ze=null;const qe=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ge=We,Ye=!1,Ve=null;const Ke=C({},[$e,He,We],h);let Ze=null;const Qe=["application/xhtml+xml","text/html"];let Xe=null,Je=null;const et=o.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Je||Je!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ze=Ze=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Xe="application/xhtml+xml"===Ze?h:f,he="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS,Xe):me,ge="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR,Xe):ye,Ve="ALLOWED_NAMESPACES"in e?C({},e.ALLOWED_NAMESPACES,h):Ke,ze="ADD_URI_SAFE_ATTR"in e?C(x(qe),e.ADD_URI_SAFE_ATTR,Xe):qe,Be="ADD_DATA_URI_TAGS"in e?C(x(Fe),e.ADD_DATA_URI_TAGS,Xe):Fe,Ue="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS,Xe):Me,be="FORBID_TAGS"in e?C({},e.FORBID_TAGS,Xe):{},_e="FORBID_ATTR"in e?C({},e.FORBID_ATTR,Xe):{},De="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Se=e.SAFE_FOR_TEMPLATES||!1,Ee=e.WHOLE_DOCUMENT||!1,Te=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Le=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||q,Ge=e.NAMESPACE||We,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(we=!1),Ie&&(Te=!0),De&&(he=C({},[...O]),ge=[],!0===De.html&&(C(he,E),C(ge,L)),!0===De.svg&&(C(he,k),C(ge,P),C(ge,D)),!0===De.svgFilters&&(C(he,R),C(ge,P),C(ge,D)),!0===De.mathMl&&(C(he,I),C(ge,j),C(ge,D))),e.ADD_TAGS&&(he===me&&(he=x(he)),C(he,e.ADD_TAGS,Xe)),e.ADD_ATTR&&(ge===ye&&(ge=x(ge)),C(ge,e.ADD_ATTR,Xe)),e.ADD_URI_SAFE_ATTR&&C(ze,e.ADD_URI_SAFE_ATTR,Xe),e.FORBID_CONTENTS&&(Ue===Me&&(Ue=x(Ue)),C(Ue,e.FORBID_CONTENTS,Xe)),Pe&&(he["#text"]=!0),Ee&&C(he,["html","head","body"]),he.table&&(C(he,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');X=e.TRUSTED_TYPES_POLICY,J=X.createHTML("")}else void 0===X&&(X=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}($,l)),null!==X&&"string"==typeof J&&(J=X.createHTML(""));s&&s(e),Je=e}},rt=C({},["mi","mo","mn","ms","mtext"]),ot=C({},["foreignobject","desc","title","annotation-xml"]),st=C({},["title","style","font","a","script"]),it=C({},k);C(it,R),C(it,T);const at=C({},I);C(at,N);const lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Te||Ie)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(Re)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Ge===We&&(e=''+e+"");const r=X?X.createHTML(e):e;if(Ge===We)try{t=(new z).parseFromString(r,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Ge,"template",null);try{t.documentElement.innerHTML=Ye?J:r}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),Ge===We?re.call(t,Ee?"html":"body")[0]:Ee?t.documentElement:s},pt=function(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},dt=function(e){return"function"==typeof w&&e instanceof w},ft=function(e,t,n){se[e]&&u(se[e],(e=>{e.call(r,t,n,Je)}))},ht=function(e){let t=null;if(ft("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=Xe(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:o,allowedTags:he}),e.hasChildNodes()&&!dt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return lt(e),!0;if(!he[o]||be[o]){if(!be[o]&>(o)){if(ve.tagNameCheck instanceof RegExp&&b(ve.tagNameCheck,o))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(o))return!1}if(Pe&&!Ue[o]){const t=Q(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(V(n[r],!0),K(e))}return lt(e),!0}return e instanceof U&&!function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ge,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===We?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(it[n]):e.namespaceURI===$e?t.namespaceURI===We?"math"===n:t.namespaceURI===He?"math"===n&&ot[r]:Boolean(at[n]):e.namespaceURI===We?!(t.namespaceURI===He&&!ot[r])&&!(t.namespaceURI===$e&&!rt[r])&&!at[n]&&(st[n]||!it[n]):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,u([ie,ae,le],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(lt(e),!0)},mt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in o||n in et))return!1;if(we&&!_e[t]&&b(ce,t));else if(Ae&&b(ue,t));else if(!ge[t]||_e[t]){if(!(gt(e)&&(ve.tagNameCheck instanceof RegExp&&b(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&b(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&b(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(ze[t]);else if(b(fe,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Be[e])if(Ce&&!b(pe,g(n,de,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},yt=function(e){ft("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const s=t[o],{name:i,namespaceURI:a,value:l}=s,c=Xe(i);let d="value"===i?l:v(l);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ct(i,e),!n.keepAttr)continue;if(!xe&&b(/\/>/i,d)){ct(i,e);continue}Se&&u([ie,ae,le],(e=>{d=g(d,e," ")}));const f=Xe(e.nodeName);if(mt(f,c,d)){if(!Le||"id"!==c&&"name"!==c||(ct(i,e),d="user-content-"+d),X&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(a);else switch($.getAttributeType(f,c)){case"TrustedHTML":d=X.createHTML(d);break;case"TrustedScriptURL":d=X.createScriptURL(d)}try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),p(r.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)},vt=function e(t){let n=null;const r=pt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof c&&e(n.content),yt(n));ft("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,s=null,a=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!dt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return e;if(ke||nt(t),r.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=Xe(e.nodeName);if(!he[t]||be[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=ut("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Te&&!Se&&!Ee&&-1===e.indexOf("<"))return X&&Ne?X.createHTML(e):e;if(n=ut(e),!n)return Te?null:Ne?J:""}n&&Re&<(n.firstChild);const l=pt(je?e:n);for(;s=l.nextNode();)ht(s)||(s.content instanceof c&&vt(s.content),yt(s));if(je)return e;if(Te){if(Ie)for(a=ne.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let p=Ee?n.outerHTML:n.innerHTML;return Ee&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(W,n.ownerDocument.doctype.name)&&(p="\n"+p),Se&&u([ie,ae,le],(e=>{p=g(p,e," ")})),X&&Ne?X.createHTML(p):p},r.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ke=!0},r.clearConfig=function(){Je=null,ke=!1},r.isValidAttribute=function(e,t,n){Je||nt({});const r=Xe(e),o=Xe(t);return mt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return p(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},286:function(e,t){var n,r;n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,o={},s=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(A(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!A(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(a);return l.onmessage=g,l.id=s++,o[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=A(r.step),r.chunk=A(r.chunk),r.complete=A(r.complete),r.error=A(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.NODE_STREAM_INPUT,"string"==typeof n?(n=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(n),f=r.download?new c(r):new p(r)):!0===n.readable&&A(n.read)&&A(n.on)?f=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,o=",",s="\r\n",a='"',l=a+a,c=!1,u=null,p=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(p=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(A(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!A(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){A(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function p(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=_((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=_((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=_((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=_((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,r,o=Math.pow(2,53),s=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,u=0,p=0,d=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(A(e.step)){var v=e.step;e.step=function(t){if(y=t,C())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function _(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!_(e)}))),C()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;C()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,s)),i=x(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,p+n):r=r.length/2?"\r\n":"\r"}(o,l)),r=!1,e.delimiter)A(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,o,s){var a,l,c,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var p=0;p=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:u}),B++}}else B++}return H();function q(e){_.push(e),x=u}function $(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),C.push(e),u=m,q(C),b&&Y()),G()}function W(e){u=e,q(C),C=[],U=i.indexOf(r,u)}function G(e){return{data:_,errors:w,meta:{delimiter:n,linebreak:r,aborted:p,truncated:!!e,cursor:x+(d||0)}}}function Y(){s(G()),_=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return u}}function g(e){var t=e.data,n=o[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(A(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function o(){}function s(){}s.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,s,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:o};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,s={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===s[r]&&(s[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:s,_owner:a.current}}t.Fragment=s,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={id:r,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{AudioPicker:()=>zt,CSVUploader:()=>Zt,Checkboxes:()=>Ht,ImagePicker:()=>en,MediaPicker:()=>an,PostPicker:()=>sr,PostSelector:()=>ar,SafeHtml:()=>pn,Selector:()=>br,TermSelector:()=>Ar,VideoPicker:()=>Sr,getMediaUrl:()=>Kt,parseCSVFile:()=>Vt,useCurrentPostId:()=>xn,useDebounce:()=>hn,useHasInnerBlocks:()=>mn,useInnerBlocks:()=>yn,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>vn,useInnerBlocksIndex:()=>gn,useMedia:()=>bn,useParentBlock:()=>An,useParentBlockAttributes:()=>wn,usePost:()=>Cn,usePostById:()=>kn,usePostMeta:()=>In,usePostMetaValue:()=>Nn,usePosts:()=>On,useTerms:()=>Ln});var e=n(322),t=n(980),o=n.n(t),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||H(j)>3?"":" "}function Y(e,t){for(;--t&&F()&&!(j<48||j>102||j>57&&j<65||j>70&&j<97););return $(e,q()+(t<6&&32==z()&&32==F()))}function V(e){for(;F();)switch(j){case e:return P;case 34:case 39:34!==e&&39!==e&&V(j);break;case 40:41===e&&V(e);break;case 92:F()}return P}function K(e,t){for(;F()&&e+j!==57&&(e+j!==84||47!==z()););return"/*"+$(t,P-1)+"*"+b(47===e?e:F())}function Z(e){for(;!H(z());)F();return $(e,P)}function Q(e,t){for(var n="",r=0;r6)switch(S(e,t+1)){case 109:if(45!==S(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+d+(108==S(e,t+3)?"$3":"$2-$3"))+e;case 115:return~x(e,"stretch")?J(C(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return C(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,s,i,a){return p+n+":"+r+a+(o?p+n+"-span:"+(s?i:+i-+r)+a:"")+e}));case 4949:if(121===S(e,t+6))return C(e,":",":"+f)+e;break;case 6444:switch(S(e,45===S(e,14)?18:11)){case 120:return C(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===S(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+p+"$2box$3")+e;case 100:return C(e,":",":"+p)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(e,"scroll-","scroll-snap-")+e}return e}function ee(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=J(e.value,e.length,n));case y:return Q([M(e,{value:C(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(w(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":B(M(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})),B(M(e,{props:[t]})),_(e,{props:I(n,r)});break;case"::placeholder":B(M(e,{props:[C(t,/:(plac\w+)/,":"+f+"input-$1")]})),B(M(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]})),B(M(e,{props:[C(t,/:(plac\w+)/,p+"input-$1")]})),B(M(e,{props:[t]})),_(e,{props:I(n,r)})}return""}))}}function te(e){return function(e){return D="",e}(ne("",null,null,null,[""],e=function(e){return N=O=1,L=k(D=e),P=0,[]}(e),0,[0],e))}function ne(e,t,n,r,o,s,i,a,l){for(var c=0,u=0,p=i,d=0,f=0,h=0,m=1,g=1,y=1,v=0,_="",A=o,w=s,E=r,R=_;g;)switch(h=v,v=F()){case 40:if(108!=h&&58==S(R,p-1)){-1!=x(R+=C(W(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:R+=W(v);break;case 9:case 10:case 13:case 32:R+=G(h);break;case 92:R+=Y(q()-1,7);continue;case 47:switch(z()){case 42:case 47:T(oe(K(F(),q()),t,n,l),l);break;default:R+="/"}break;case 123*m:a[c++]=k(R)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(R=C(R,/\f/g,"")),f>0&&k(R)-p&&T(f>32?se(R+";",r,n,p-1,l):se(C(R," ","")+";",r,n,p-2,l),l);break;case 59:R+=";";default:if(T(E=re(R,t,n,c,u,o,a,_,A=[],w=[],p,s),s),123===v)if(0===u)ne(R,t,E,E,A,s,p,a,w);else switch(99===d&&110===S(R,3)?100:d){case 100:case 108:case 109:case 115:ne(e,E,E,r&&T(re(e,E,E,0,0,o,a,_,o,A=[],p,w),w),o,w,p,a,r?A:w);break;default:ne(R,E,E,E,[""],w,0,a,w)}}c=u=f=0,m=y=1,_=R="",p=i;break;case 58:p=1+k(R),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==(j=P>0?S(D,--P):0,O--,10===j&&(O=1,N--),j))continue;switch(R+=b(v),v*m){case 38:y=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(k(R)-1)*y,y=1;break;case 64:45===z()&&(R+=W(F())),d=z(),u=p=k(_=R+=Z(q())),v++;break;case 45:45===h&&2==k(R)&&(m=0)}}return s}function re(e,t,n,r,o,s,i,a,l,c,u,p){for(var d=o-1,f=0===o?s:[""],h=R(f),g=0,y=0,b=0;g0?f[_]+" "+w:C(w,/&\f/g,f[_])))&&(l[b++]=x);return U(e,t,n,0===o?m:a,l,c,u,p)}function oe(e,t,n,r){return U(e,t,n,h,b(j),E(e,2,-2),0,r)}function se(e,t,n,r,o){return U(e,t,n,g,E(e,0,r),E(e,r+1,-1),r,o)}const ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ae="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",le="undefined"!=typeof window&&"HTMLElement"in window,ce=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ue=(new Set,Object.freeze([])),pe=Object.freeze({}),de=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),fe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,he=/(^-|-$)/g;function me(e){return e.replace(fe,"-").replace(he,"")}var ge=/(a)(d)/gi,ye=function(e){return String.fromCharCode(e+(e>25?39:97))};function ve(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ye(t%52)+n;return(ye(t%52)+n).replace(ge,"$1-$2")}var be,_e=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ae=function(e){return _e(5381,e)};function we(e){return"string"==typeof e&&!0}var Ce="function"==typeof Symbol&&Symbol.for,xe=Ce?Symbol.for("react.memo"):60115,Se=Ce?Symbol.for("react.forward_ref"):60112,Ee={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ke={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Re={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Te=((be={})[Se]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},be[xe]=Re,be);function Ie(e){return("type"in(t=e)&&t.type.$$typeof)===xe?Re:"$$typeof"in e?Te[e.$$typeof]:Ee;var t}var Ne=Object.defineProperty,Oe=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,Pe=Object.getOwnPropertyDescriptor,je=Object.getPrototypeOf,De=Object.prototype;function Ue(e,t,n){if("string"!=typeof t){if(De){var r=je(t);r&&r!==De&&Ue(e,r,n)}var o=Oe(t);Le&&(o=o.concat(Le(t)));for(var s=Ie(e),i=Ie(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ge=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw We(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},s=0;s0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ut,n).replace(r,c))})),i.prefix&&u.push(ee),u.push(X);var p=function(e,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(pt,""),c=te(s||o?"".concat(s," ").concat(o," { ").concat(l," }"):l);i.namespace&&(c=dt(c,i.namespace));var p,d,f,h=[];return Q(c,(p=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),d=R(p),function(e,t,n,r){for(var o="",s=0;s="A"&&e<="Z"};function wt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i)}r=Fe(r,s),this.staticRulesId=s}else{for(var a=_e(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(l,".".concat(d),void 0,this.componentId)),r=Fe(r,d)}}return r},e}(),Tt=l().createContext(void 0);Tt.Consumer;var It={};function Nt(e,t,n){var r=Be(e),o=e,i=!we(e),c=t.attrs,u=void 0===c?ue:c,p=t.componentId,d=void 0===p?function(e,t){var n="string"!=typeof e?"sc":me(e);It[n]=(It[n]||0)+1;var r="".concat(n,"-").concat(function(e){return ve(Ae(e)>>>0)}("6.1.0"+n+It[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):p,f=(void 0===t.displayName&&function(e){we(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(me(t.displayName),"-").concat(t.componentId):t.componentId||d),h=r&&o.attrs?o.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var v=new Rt(n,f,r?o.componentStyle:void 0),b=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,p=e.target,d=l().useContext(Tt),f=vt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,o=s(s({},t),{className:void 0,theme:n}),i=0;i2&&ct.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=nt(),r=ze([n&&'nonce="'.concat(n,'"'),"".concat(ae,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw We(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw We(2);var n=((t={})[ae]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=nt();return r&&(n.nonce=r),[l().createElement("style",s({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ct({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw We(2);return l().createElement(bt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw We(3)}}(),"__sc-".concat(ae,"__");const Mt=Ut.div` + height: auto; + width: 100%; +`,Bt=({src:t})=>(0,e.jsx)(Mt,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});Bt.propTypes={src:o().string.isRequired};const Ft=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:o,preview:Bt,value:s,valueURL:i});Ft.defaultProps={className:"",onUpdateURL:null,valueURL:""},Ft.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const zt=Ft,qt=window.wp.components,$t=({label:t,value:n,options:r,onChange:o})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(qt.BaseControl,{label:t}),r.map((t=>(0,e.jsx)(qt.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{o(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});$t.propTypes={label:o().string.isRequired,value:o().arrayOf(o().string).isRequired,options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().string.isRequired})).isRequired,onChange:o().func.isRequired};const Ht=$t,Wt=window.wp.i18n;var Gt=n(286),Yt=n.n(Gt);const Vt=e=>new Promise(((t,n)=>{Yt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Kt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:o=""}={},full:{url:s=""}={}}={},source_url:i="",url:a=""}=e;return o||n||s||r||a||i||""};class Zt extends l().PureComponent{static handleSubmit(e){e.preventDefault()}constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.state={error:"",success:""}}handleChange(e){const{attributeName:t,callback:n,setAttributes:r}=this.props;e.target.files&&e.target.files[0]&&Vt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Wt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Wt.__)("Could not map CSV data. Please check the source file to ensure that it has the correct structure.","alley-scripts"),success:""})})).catch((e=>{this.setState({error:e,success:""})}))}render(){const{error:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Wt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Zt.defaultProps={callback:null},Zt.propTypes={attributeName:o().string.isRequired,callback:o().func,setAttributes:o().func.isRequired};const Qt=Ut.div` + box-sizing: border-box; + flex-shrink: 0; + height: auto; + max-height: 1450px; + max-width: 1450px; + min-height: 20px; + min-width: 20px; + position: relative; + width: auto; +`,Xt=({src:t})=>(0,e.jsx)(Qt,{children:(0,e.jsx)("img",{alt:(0,Wt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Wt.__)("Edit image","alley-scripts")})});Xt.propTypes={src:o().string.isRequired};const Jt=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(an,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:o,onUpdate:s,onUpdateURL:i,preview:Xt,value:a,valueURL:l});Jt.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},Jt.propTypes={className:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const en=Jt,tn=window.wp.blockEditor,nn=window.wp.data,rn=Ut.div` + display: block; + position: relative; +`,on=Ut.div` + background: white; + border: 1px solid black; + padding: 1em; +`,sn=({allowedTypes:t,className:n,icon:r,imageSize:o,displayControlsInToolbar:s,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:p})=>{const{media:d}=(0,nn.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===d)return(0,e.jsx)(qt.Spinner,{});const f=d?Kt(d,o):p;return f?(0,e.jsxs)(rn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(on,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),s?(0,e.jsx)(tn.BlockControls,{group:"other",children:(0,e.jsx)(tn.MediaReplaceFlow,{name:(0,Wt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)(qt.ToolbarButton,{isDestructive:!0,text:(0,Wt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)(qt.Button,{variant:"primary",onClick:i,children:(0,Wt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(rn,{className:n,children:(0,e.jsx)(tn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!p,icon:(0,e.jsx)(tn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};sn.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},sn.propTypes={allowedTypes:o().arrayOf(o().string),className:o().string,icon:o().string,imageSize:o().string,displayControlsInToolbar:o().bool,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,preview:o().element,value:o().number.isRequired,valueURL:o().string};const an=sn;var ln=n(368),cn=n.n(ln);const un=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:cn().sanitize(n)}});un.defaultProps={className:""},un.propTypes={className:o().string,html:o().string.isRequired,tag:o().string.isRequired};const pn=un,dn=window.wp.element,fn=window.wp.url,hn=(e,t)=>{const[n,r]=(0,dn.useState)(e);return(0,dn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},mn=e=>vn(e)>0,gn=e=>{const t=An(e),n=yn(t);return n?n.findIndex((t=>t.clientId===e)):-1},yn=e=>(0,nn.useSelect)((t=>t(tn.store).getBlocks(e)),[e]),_n=e=>yn(e).map((e=>e.attributes)),vn=e=>yn(e).length,bn=e=>(0,nn.useSelect)((t=>t("core").getMedia(e)),[e]),An=e=>(0,nn.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(tn.store),o=r(e);return o?n(o):null}),[e]),wn=e=>(0,nn.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(tn.store),o=r(e);return o?n(o):null}),[e]),Cn=(e,t="post")=>(0,nn.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),xn=()=>(0,nn.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),Sn=window.wp.apiFetch;var En=n.n(Sn);const kn=(e,t=null)=>{const[n,r]=(0,dn.useState)({});return(0,dn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,fn.addQueryArgs)("/wp/v2/search",{include:e}),n=await En()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),Cn(e,n[e]??"")},Rn=window.wp.coreData,Tn=window.lodash,In=(e=null,t=null)=>{const n=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,o]=(0,Rn.useEntityProp)("postType",n,"meta",t),s="function"==typeof o?o:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>s((0,Tn.cloneDeep)(e))]},Nn=(e,t=null,n=null)=>{const[r,o]=In(t,n);return[r[e],t=>o({...r,[e]:t})]},On=(e,t="post")=>(0,nn.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),Ln=(e=null,t=null,n="categories")=>{const r=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[o,s]=(0,Rn.useEntityProp)("postType",r,n,t);return[o,e=>s(e)]};var Pn=n(62),jn=n.n(Pn),Dn=n(36),Un=n.n(Dn),Mn=n(793),Bn=n.n(Mn),Fn=n(892),zn=n.n(Fn),qn=n(173),$n=n.n(qn),Hn=n(464),Wn=n.n(Hn),Gn=n(992),Yn={};Yn.styleTagTransform=Wn(),Yn.setAttributes=zn(),Yn.insert=Bn().bind(null,"head"),Yn.domAPI=Un(),Yn.insertStyleElement=$n(),jn()(Gn.Z,Yn),Gn.Z&&Gn.Z.locals&&Gn.Z.locals;var Vn=n(779),Kn=n.n(Vn),Zn=n(905),Qn={};Qn.styleTagTransform=Wn(),Qn.setAttributes=zn(),Qn.insert=Bn().bind(null,"head"),Qn.domAPI=Un(),Qn.insertStyleElement=$n(),jn()(Zn.Z,Qn),Zn.Z&&Zn.Z.locals&&Zn.Z.locals;const Xn=window.wp.htmlEntities,Jn=Ut.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,er=({title:t,postType:n,attachmentID:r})=>{const o=bn(r),s=o?.media_details?.sizes?.thumbnail?.source_url,i=o?.alt_text??"";return(0,e.jsxs)(Jn,{children:[s?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:s,alt:i}):null,(0,e.jsx)(pn,{html:(0,Xn.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Wt.sprintf)(" (%s)",n)]})},tr=({baseUrl:t,searchRender:n,selected:r,setSelected:o,suppressPostIds:s=[]})=>{const[i,a]=(0,dn.useState)(!1),[l,c]=(0,dn.useState)([]),[u,p]=(0,dn.useState)(!1),[d,f]=(0,dn.useState)(0),[h,m]=(0,dn.useState)({searchValue:"",page:1}),g=(0,dn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,fn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:s.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,fn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const o=await En()({path:r,parse:!1});f(parseInt(o.headers.get("X-WP-TotalPages"),10));const i=await o.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,s]);return(0,dn.useEffect)((()=>{let e=!1;return u||(p(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(qt.TextControl,{value:h.searchValue,placeholder:(0,Wt.__)("Search...","alley-scripts"),label:(0,Wt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)(qt.Button,{className:Kn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>o(t.id),children:n?n(t):(0,e.jsx)(er,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)(qt.Spinner,{}):null,d>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Wt.__)("Load More","alley-scripts")})}):null]})]})},nr=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:o,searchRender:s,suppressPostIds:i=[]})=>{const[a,l]=(0,dn.useState)();return(0,e.jsxs)(qt.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(tr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:s,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)(qt.Button,{variant:"secondary",onClick:n,children:(0,Wt.__)("Cancel","alley-scripts")}),(0,e.jsx)(qt.Button,{variant:"primary",onClick:()=>{a&&(o(a),n())},disabled:!a,children:(0,Wt.__)("Select","alley-scripts")})]})]})},rr=Ut.div` + display: block; + position: relative; +`,or=Ut.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,sr=({allowedTypes:t,className:n,getPostType:r,modalTitle:o=(0,Wt.__)("Select Post","alley-scripts"),onReset:s,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Wt.__)("Replace","alley-scripts"),resetText:u=(0,Wt.__)("Reset","alley-scripts"),searchEndpoint:p="/wp/v2/search",searchRender:d,selectText:f=(0,Wt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,v]=(0,dn.useState)(!1),b=(0,fn.addQueryArgs)(p,{type:"post",subtype:t??"any",...a}),_=kn(g,r),{featured_media:A,title:{rendered:w=""}={},type:C=""}=_||{},x=()=>{v(!0)};return 0!==g&&null===_?(0,e.jsx)(qt.Spinner,{}):(0,e.jsxs)(rr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==_?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(_):(0,e.jsx)(or,{children:(0,e.jsx)(er,{title:w,postType:C,attachmentID:A})}),(0,e.jsxs)(qt.ButtonGroup,{children:[(0,e.jsx)(qt.Button,{variant:"secondary",onClick:s,style:{margin:"0 4px"},children:u}),(0,e.jsx)(qt.Button,{variant:"secondary",onClick:x,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)(qt.Button,{onClick:x,variant:"secondary",children:f}),y?(0,e.jsx)(nr,{closeModal:()=>{v(!1)},baseUrl:b,modalTitle:o,onUpdate:i,searchRender:d,suppressPostIds:h}):null]})},ir=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(br,{type:"post",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});ir.defaultProps={className:"",emptyLabel:(0,Wt.__)("No posts found","alley-scripts"),label:(0,Wt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},ir.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const ar=ir,lr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let cr;const ur=new Uint8Array(16);function pr(){if(!cr&&(cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cr(ur)}const dr=[];for(let e=0;e<256;++e)dr.push((e+256).toString(16).slice(1));const fr=function(e,t,n){if(lr.randomUUID&&!t&&!e)return lr.randomUUID();const r=(e=e||{}).random||(e.rng||pr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return dr[e[t+0]]+dr[e[t+1]]+dr[e[t+2]]+dr[e[t+3]]+"-"+dr[e[t+4]]+dr[e[t+5]]+"-"+dr[e[t+6]]+dr[e[t+7]]+"-"+dr[e[t+8]]+dr[e[t+9]]+"-"+dr[e[t+10]]+dr[e[t+11]]+dr[e[t+12]]+dr[e[t+13]]+dr[e[t+14]]+dr[e[t+15]]}(r)},hr=({emptyLabel:t,error:n,id:r,isOpen:o,labelledbyId:s,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:p})=>{if(!i&&(""===p||u>p.length))return null;let d="",f="";return i?(d="loading",f=(0,Wt.__)("Loading...","alley-scripts")):n?(d="error",f=n):i||0!==l.length||(d="no-posts",f=t),i||!i&&(p&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Kn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("div",{className:Kn()("autocomplete__dropdown--notice",`autocomplete__${d}`),children:f})}):(0,e.jsx)("div",{className:Kn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":o}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":s,id:r,className:Kn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)(qt.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};hr.propTypes={emptyLabel:o().string.isRequired,error:o().string.isRequired,id:o().string.isRequired,isOpen:o().bool.isRequired,labelledbyId:o().string.isRequired,loading:o().bool.isRequired,options:o().arrayOf(o().shape({label:o().string,value:o().string})).isRequired,onSelect:o().func.isRequired,selectedItems:o().shape([]).isRequired,threshold:o().number.isRequired,value:o().string.isRequired};const mr=hr;var gr=n(458),yr={};yr.styleTagTransform=Wn(),yr.setAttributes=zn(),yr.insert=Bn().bind(null,"head"),yr.domAPI=Un(),yr.insertStyleElement=$n(),jn()(gr.Z,yr),gr.Z&&gr.Z.locals&&gr.Z.locals;const vr=({type:t,className:n,emptyLabel:r,label:o,maxPages:s,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:p})=>{const d=fr(),[f,h]=(0,dn.useState)(""),[m,g]=(0,dn.useState)([]),[y,v]=(0,dn.useState)(!1),[b,_]=(0,dn.useState)(!1),[A,w]=(0,dn.useState)(""),[C,x]=(0,dn.useState)([]),S=(0,dn.useRef)(),E=hn(A,750),k=(0,dn.useCallback)((async(e=1)=>{if(E.length0?c.join(","):"any",type:t});await En()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>s?s:t,e.json()})).then((t=>{g((e=>[...e,...t])),_(!1),(n&&n>e||e>=1&&i&&C.length>0)&&k(e+1)})).catch((e=>h(e.message)))}),[E,t,s,i,c,C.length,p]);(0,dn.useEffect)((()=>{x(u)}),[u]),(0,dn.useEffect)((()=>{E&&p<=E.length?k():g([])}),[E,k,p]);const R=e=>{v(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&v(!1)};(0,dn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,dn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const I=e=>{let t=[];if(C.some((t=>t.id===e.id))){const n=C.findIndex((t=>t.id===e.id));t=[...C.slice(0,n),...C.slice(n+1,C.length)]}else i?t=[...C,e]:(t=[e],v(!1));x(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Kn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${d}`,className:Kn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Kn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${d}`,children:(0,e.jsx)("div",{children:o})}),C.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${d}`,id:`selected-items-${d}`,className:Kn()("autocomplete__selection--results","autocomplete__selection-list"),children:C.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)(qt.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>I(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Kn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${d}`,onChange:e=>w(e.target.value),onFocus:()=>v(!0),placeholder:l,type:"text",value:A})]}),(0,e.jsx)(mr,{emptyLabel:r,error:f,labelledById:`autocomplete-${d}`,id:`listbox-${d}`,isOpen:y,loading:b&&E,onSelect:I,options:m,selectedItems:C,threshold:p,value:E})]})})};vr.defaultProps={type:"post",className:"",emptyLabel:(0,Wt.__)("No items found","alley-scripts"),label:(0,Wt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},vr.propTypes={type:o().string,className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const br=vr,_r=({className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(br,{type:"term",className:t,emptyLabel:n,label:r,maxPages:o,multiple:s,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});_r.defaultProps={className:"",emptyLabel:(0,Wt.__)("No terms found","alley-scripts"),label:(0,Wt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},_r.propTypes={className:o().string,emptyLabel:o().string,label:o().string,maxPages:o().number,multiple:o().bool,onSelect:o().func.isRequired,placeholder:o().string,subTypes:o().arrayOf(o().string),selected:o().arrayOf([o().shape({id:o().number,title:o().string})]),threshold:o().number};const Ar=_r,wr=Ut.div` + height: auto; + width: 100%; +`,Cr=({src:t})=>(0,e.jsx)(wr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});Cr.propTypes={src:o().string.isRequired};const xr=({className:t,onReset:n,onUpdate:r,onUpdateURL:o,value:s,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:o,preview:Cr,value:s,valueURL:i});xr.defaultProps={className:"",onUpdateURL:null,valueURL:""},xr.propTypes={className:o().string,onReset:o().func.isRequired,onUpdate:o().func.isRequired,onUpdateURL:o().func,value:o().number.isRequired,valueURL:o().string};const Sr=xr})(),r})(),e.exports=t()},797:function(e,t,n){"use strict";var r=window.wp.element,o=window.wp.blocks,s=window.wp.blockEditor,i=window.wp.data,a=window.wp.i18n,l=window.wp.components,c=window.wp.url,u=window.wp.apiFetch,p=n.n(u),d=function(e){let{baseUrl:t,searchRender:n,selected:o,setSelected:s}=e;const[i,u]=(0,r.useState)(!1),[d,f]=(0,r.useState)([]),[h,m]=(0,r.useState)(!1),[g,y]=(0,r.useState)(0),[v,b]=(0,r.useState)({searchValue:"",page:1}),_=(0,r.useCallback)((async function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(){let n=(0,c.addQueryArgs)(t,{page:e.page});return e.searchValue&&e.searchValue.length>2&&(n=(0,c.addQueryArgs)(n,{search:e.searchValue})),n}if(e.searchValue&&e.searchValue.length<=2)return;const o=r();u(!0);const s=await p()({path:o,parse:!1});y(parseInt(s.headers.get("X-WP-TotalPages"),10));const i=await s.json();let a=i;e.page>1&&(a=[...d,...i]),n||(f(a),u(!1))}),[d,t]);return(0,r.useEffect)((()=>{let e=!1;return h||(m(!0),_(v,e)),()=>{e=!0}}),[_,h,v]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.TextControl,{value:v.searchValue,placeholder:(0,a.__)("Search...","alley-scripts"),label:(0,a.__)("Search","alley-scripts"),onChange:e=>{const t={...v,searchValue:e,page:1};b(t),_(t)}}),(0,r.createElement)("div",{className:"alley-scripts-post-picker__post-list"},d?d.map((e=>o&&o.includes(e)?null:(0,r.createElement)(l.Button,{key:e.id,className:"alley-scripts-post-picker__post",onClick:()=>s(e)},n?n(e):(0,r.createElement)("div",null,(0,r.createElement)("strong",null,e.title),(0,a.sprintf)(" (%s)",e.subtype))))):null,i?(0,r.createElement)(l.Spinner,null):null,g>0&&v.page{const e={...v,page:v.page+1};b(e),_(e)}},(0,a.__)("Load More","alley-scripts"))):null))},f=function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=u.left&&r=u.top&&o=r&&l<=i||!a&&l>=i&&l<=r){var d=S.current[a?l-1:l+1];if(d){var f=d.left-p.left,h=d.top-p.top;c.style.transform="translate3d("+f+"px, "+h+"px, 0px)"}}else c.style.transform="translate3d(0,0,0)";c.style.transitionDuration="300ms"}null===(t=O.setPosition)||void 0===t||t.call(O,I.current,S.current,u)}}},onEnd:function(){for(var e,t=0;t{const r=(s=[...n],i=e,a=t,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r(0,r.createElement)(S,{key:e.id},(0,r.createElement)("div",{className:"nb-post-picker-draggable"},(0,r.createElement)(E,null,(0,r.createElement)("span",{"aria-label":(0,a.__)("Move item","wp-newsletter-builder")},"::")),(0,r.createElement)(l.Button,{className:"nb-post-picker__post",onClick:()=>{return t=e,void o(n?n.filter((e=>e.id!==t.id)):[]);var t}},t(e)))))):null)},T=function(e){let{baseUrl:t,closeModal:n,onUpdate:o,searchRender:s}=e;const[i,c]=(0,r.useState)([]);return(0,r.createElement)(l.Modal,{isDismissible:!0,title:(0,a.__)("Select Post","alley-scripts"),onRequestClose:n,closeButtonLabel:"Close"},(0,r.createElement)("div",{className:"nb-multi-post-picker-modal"},(0,r.createElement)("div",{className:"nb-multi-post-picker-modal__search-results"},(0,r.createElement)(d,{baseUrl:t,selected:null!=i?i:[],setSelected:e=>{c([...i,e])},searchRender:s})),(0,r.createElement)("div",{className:"nb-multi-post-picker-modal__selected"},(0,r.createElement)(R,{selected:i,setSelected:c,searchRender:s}))),(0,r.createElement)("div",{className:"alley-scripts-post-picker__buttons"},(0,r.createElement)(l.Button,{variant:"secondary",onClick:n},(0,a.__)("Cancel","alley-scripts")),(0,r.createElement)(l.Button,{variant:"primary",onClick:()=>{if(!i)return;const e=i.map((e=>e.id));o(e),n()},disabled:!i},(0,a.__)("Select","alley-scripts"))))},I=function(e){let{allowedTypes:t,onUpdate:n,params:o={},searchEndpoint:s="/wp/v2/search",searchRender:i}=e;const[u,p]=(0,r.useState)(!1),d=(0,c.addQueryArgs)(s,{type:"post",subtype:null!=t?t:"any",...o});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.Button,{onClick:()=>{p(!0)},variant:"secondary"},(0,a.__)("Select Posts","alley-scripts")),u?(0,r.createElement)(T,{closeModal:()=>{p(!1)},baseUrl:d,onUpdate:n,searchRender:i}):null)},N=n(373),O=function(e){let{featured_image:t,post_date:n,title:o}=e;return(0,r.createElement)("div",{className:"nb-post-picker-result"},(0,r.createElement)("div",{className:"nb-post-picker-result-image__container"},t?(0,r.createElement)("img",{className:"nb-post-picker-result-image",src:t,alt:""}):null),(0,r.createElement)(N.SafeHtml,{html:o,className:"nb-post-picker-result-title",tag:"div"}),(0,r.createElement)("span",{className:"nb-post-picker-result-date"},n))},L=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/section","version":"0.1.0","title":"Newsletter Section","category":"design","icon":"layout","description":"Section to contain other blocks and allow for choosing multiple posts.","textdomain":"section","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php","attributes":{"showNumbers":{"type":"boolean","default":false},"heading":{"type":"string","default":""},"adAfter":{"type":"boolean","default":false}}}');(0,o.registerBlockType)(L,{apiVersion:2,edit:function(e){let{clientId:t,attributes:{showNumbers:n=!1,heading:o=""},setAttributes:c}=e;const u=new Date;u.setMonth(u.getMonth()-3);const p=(0,i.select)("core/block-editor").getBlocksByClientId(t)[0]||null,d=function e(t,n,r){return t.forEach((t=>(n.includes(t.name)&&r.push(t.clientId),t.innerBlocks&&t.innerBlocks.length>0?e(t.innerBlocks,n,r):r))),r}(p?p.innerBlocks:[],["wp-newsletter-builder/post"],[]);return(0,r.useEffect)((()=>{n&&d.forEach(((e,t)=>{(0,i.dispatch)("core/block-editor").updateBlockAttributes(e,{number:t+1})}))}),[d,n]),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",(0,s.useBlockProps)(),o?(0,r.createElement)(s.RichText,{tagName:"h2",value:o,onChange:e=>c({heading:e}),className:"wp-newsletter-builder-section__heading"}):null,(0,r.createElement)(s.InnerBlocks,null)),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(l.PanelBody,{title:(0,a.__)("Post Selection","wp-newsletter-builder"),initialOpen:!0},(0,r.createElement)(l.PanelRow,null,(0,r.createElement)(I,{onUpdate:e=>{d.forEach((t=>{const n=e.shift();(0,i.dispatch)("core/block-editor").updateBlockAttributes(t,{postId:n})}))},allowedTypes:["post"],params:{after:u.toISOString(),per_page:20},searchRender:O})))))},title:L.title,save:()=>{const e=s.useBlockProps.save();return(0,r.createElement)("div",e,(0,r.createElement)(s.InnerBlocks.Content,null))}})},206:function(e){"use strict";const t=(e,t,n)=>{const r=t<0?e.length+t:t;if(r>=0&&r(e=[...e],t(e,n,r),e),e.exports.mutate=t}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=function(t,n,o,s){if(!n){var i=1/0;for(u=0;u=s)&&Object.keys(r.O).every((function(e){return r.O[e](n[l])}))?n.splice(l--,1):(a=!1,s0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,o,s]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={581:0,41:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,s,i=n[0],a=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var u=l(r)}for(t&&t(n);c. + * @param WP_Block $block_instance The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-newsletter-builder + */ + +$wp_newsletter_builder_heading = $attributes['heading']; + +// Check if the content is empty. +if ( empty( trim( wp_strip_all_tags( $content ) ) ) ) { + return; +} +if ( ! empty( $wp_newsletter_builder_heading ) ) { + printf( '

%s

', esc_html( $wp_newsletter_builder_heading ) ); +} + +echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped diff --git a/build/section/style-index.css b/build/section/style-index.css new file mode 100644 index 00000000..a61b1ce2 --- /dev/null +++ b/build/section/style-index.css @@ -0,0 +1 @@ +h2.wp-newsletter-builder-section__heading{color:#d62827;font-size:40px;line-height:47px;text-align:center;text-transform:uppercase} diff --git a/build/signup-form-list/block.json b/build/signup-form-list/block.json new file mode 100644 index 00000000..c5f5af66 --- /dev/null +++ b/build/signup-form-list/block.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/signup-form-list", + "version": "0.1.0", + "title": "Newsletter Signup Form List", + "category": "widgets", + "icon": "yes", + "description": "Child block of Newsletter Signup Form to show a single list", + "textdomain": "wp-newsletter-builder", + "editorScript": "file:index.js", + "render": "file:render.php", + "attributes": { + "logo": { + "type": "number", + "default": 0 + }, + "title": { + "type": "string" + }, + "frequency": { + "type": "string" + }, + "description": { + "type": "string" + }, + "listId": { + "type": "string" + }, + "initialChecked": { + "type": "boolean", + "default": false + } + } +} \ No newline at end of file diff --git a/build/signup-form-list/index.asset.php b/build/signup-form-list/index.asset.php new file mode 100644 index 00000000..dcef6590 --- /dev/null +++ b/build/signup-form-list/index.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '31c534492807fee3dae3'); diff --git a/build/signup-form-list/index.js b/build/signup-form-list/index.js new file mode 100644 index 00000000..3ae985dd --- /dev/null +++ b/build/signup-form-list/index.js @@ -0,0 +1 @@ +!function(){"use strict";var e={n:function(t){var l=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(l,{a:l}),l},d:function(t,l){for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.blocks,l=window.wp.element,n=window.wp.i18n,i=window.wp.data,r=window.wp.components,o=window.wp.blockEditor,a=window.wp.apiFetch,s=e.n(a);function c(e){let{selected:t,updateFunction:i}=e;const[o,a]=(0,l.useState)([]),c=o.length>0?(e=>{const t=e.map((e=>({label:e.Name,value:e.ListID})));return t.unshift({label:(0,n.__)("Select a list","wp-newsletter-builder"),value:""}),t})(o):[];return(0,l.useEffect)((()=>{o.length>0||s()({path:"/wp-newsletter-builder/v1/lists"}).then((e=>{a(e)}))}),[o]),(0,l.createElement)(r.SelectControl,{value:t,options:c,onChange:i})}var u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/signup-form-list","version":"0.1.0","title":"Newsletter Signup Form List","category":"widgets","icon":"yes","description":"Child block of Newsletter Signup Form to show a single list","textdomain":"wp-newsletter-builder","editorScript":"file:index.ts","render":"file:render.php","attributes":{"logo":{"type":"number","default":0},"title":{"type":"string"},"frequency":{"type":"string"},"description":{"type":"string"},"listId":{"type":"string"},"initialChecked":{"type":"boolean","default":false}}}');(0,t.registerBlockType)(u,{apiVersion:2,edit:function(e){let{attributes:{logo:t=0,title:a="",frequency:s="",description:u="",listId:d="",initialChecked:p=!1},setAttributes:w}=e;const{logoMedia:m=null}=(0,i.useSelect)((e=>({logoMedia:t?e("core").getMedia(t):null})),[t]);return(0,l.createElement)("div",(0,o.useBlockProps)(),m?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(r.Button,{type:"button",onClick:()=>w({logo:null}),"aria-label":(0,n.__)("Remove Logo","wp-newsletter-builder"),isDestructive:!0,variant:"primary",className:"wp-block-wp-newsletter-builder-signup-form-list__image_delete"},"X"),(0,l.createElement)("img",{src:m.media_details?.sizes?.medium?.source_url||m.source_url,alt:(0,n.__)("Newsletter Logo","wp-newsletter-builder")})):(0,l.createElement)(o.MediaPlaceholder,{icon:"format-image",labels:{title:(0,n.__)("Image","wp-newsletter-builder"),instructions:(0,n.__)("Drag an image, upload a new one or select a file from your library.","wp-newsletter-builder")},onSelect:e=>w({logo:e.id}),accept:"image/*",allowedTypes:["image"]}),(0,l.createElement)("div",{className:"wp-block-wp-newsletter-builder-signup-form-list__content"},(0,l.createElement)(o.RichText,{tagName:"h3",value:a,onChange:e=>w({title:e}),placeholder:(0,n.__)("Title","wp-newsletter-builder")}),(0,l.createElement)(o.RichText,{tagName:"div",value:s,className:"wp-block-wp-newsletter-builder-signup-form-list__frequency",onChange:e=>w({frequency:e}),placeholder:(0,n.__)("Frequency","wp-newsletter-builder")}),(0,l.createElement)(o.RichText,{tagName:"div",value:u,className:"wp-block-wp-newsletter-builder-signup-form-list__description",onChange:e=>w({description:e}),placeholder:(0,n.__)("Description","wp-newsletter-builder")}),(0,l.createElement)(r.CheckboxControl,{checked:p,onChange:e=>w({initialChecked:e})})),(0,l.createElement)(o.InspectorControls,null,(0,l.createElement)(r.PanelBody,{title:(0,n.__)("List Settings","wp-newsletter-builder")},(0,l.createElement)(r.PanelRow,null,(0,l.createElement)(c,{selected:d,updateFunction:e=>w({listId:e})})))))},title:u.title})}(); \ No newline at end of file diff --git a/build/signup-form-list/index.php b/build/signup-form-list/index.php new file mode 100644 index 00000000..1a97c0ec --- /dev/null +++ b/build/signup-form-list/index.php @@ -0,0 +1,21 @@ +. + * @param WP_Block $block_instance The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-newsletter-builder + */ + +$wp_newsletter_builder_title = $attributes['title']; +$wp_newsletter_builder_frequency = $attributes['frequency'] ?? ''; +$wp_newsletter_builder_description = $attributes['description'] ?? ''; +$wp_newsletter_builder_list_id = $attributes['listId']; +$wp_newsletter_builder_logo_id = $attributes['logo'] ?? null; +$wp_newsletter_builder_checked = $attributes['initialChecked'] ?? false; +$wp_newsletter_builder_checked_str = $wp_newsletter_builder_checked ? 'checked="checked"' : ''; + +if ( empty( $wp_newsletter_builder_title ) || empty( $wp_newsletter_builder_list_id ) ) { + return; +} +?> +
> + +
diff --git a/build/signup-form/block.json b/build/signup-form/block.json new file mode 100644 index 00000000..123dee95 --- /dev/null +++ b/build/signup-form/block.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/signup-form", + "version": "0.1.0", + "title": "Newsletter Signup Form", + "category": "widgets", + "icon": "forms", + "description": "Shows a form to allow users to subscribe to newsletter lists", + "textdomain": "wp-newsletter-builder", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php", + "viewScript": [ + "file:view.js" + ], + "attributes": { + "headerText": { + "type": "string" + }, + "subheaderText": { + "type": "string" + }, + "disclaimerText": { + "type": "string" + }, + "buttonText": { + "type": "string" + }, + "listId": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/build/signup-form/index.asset.php b/build/signup-form/index.asset.php new file mode 100644 index 00000000..a81c3bd1 --- /dev/null +++ b/build/signup-form/index.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b60c7ea436075e0a05e1'); diff --git a/build/signup-form/index.css b/build/signup-form/index.css new file mode 100644 index 00000000..e8237759 --- /dev/null +++ b/build/signup-form/index.css @@ -0,0 +1 @@ +.wp-block-wp-newsletter-builder-signup-form div.block-editor-block-list__layout{grid-gap:1rem;display:grid;grid-template-columns:1fr 1fr 1fr}.wp-block-wp-newsletter-builder-signup-form-list__image_delete{position:absolute;right:0;top:0}.wp-block-wp-newsletter-builder-signup-form__fake-text-input{border:1px solid #000;display:block;font-family:sans-serif;font-size:16px;padding:6px 4px 2px;width:300px}.wp-block-wp-newsletter-builder-signup-form__fake-button{background:#fff;border:1px solid var(--primary-black,#1d1d1f)} diff --git a/build/signup-form/index.js b/build/signup-form/index.js new file mode 100644 index 00000000..36ba7570 --- /dev/null +++ b/build/signup-form/index.js @@ -0,0 +1 @@ +!function(){"use strict";var e={n:function(t){var l=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(l,{a:l}),l},d:function(t,l){for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,l=window.wp.blocks,n=window.wp.blockEditor,r=window.wp.i18n,i=window.wp.components,s=window.wp.apiFetch,a=e.n(s);function o(e){let{selected:l,updateFunction:n}=e;const[s,o]=(0,t.useState)([]),c=s.length>0?(e=>{const t=e.map((e=>({label:e.Name,value:e.ListID})));return t.unshift({label:(0,r.__)("Select a list","wp-newsletter-builder"),value:""}),t})(s):[];return(0,t.useEffect)((()=>{s.length>0||a()({path:"/wp-newsletter-builder/v1/lists"}).then((e=>{o(e)}))}),[s]),(0,t.createElement)(i.SelectControl,{value:l,options:c,onChange:n})}var c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/signup-form","version":"0.1.0","title":"Newsletter Signup Form","category":"widgets","icon":"forms","description":"Shows a form to allow users to subscribe to newsletter lists","textdomain":"wp-newsletter-builder","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php","viewScript":["file:view.ts"],"attributes":{"headerText":{"type":"string"},"subheaderText":{"type":"string"},"disclaimerText":{"type":"string"},"buttonText":{"type":"string"},"listId":{"type":"string"}}}');(0,l.registerBlockType)(c,{apiVersion:2,edit:function(e){let{attributes:{headerText:l,subheaderText:s="",disclaimerText:a="",buttonText:c,listId:u},setAttributes:p}=e;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",(0,n.useBlockProps)(),(0,t.createElement)("div",{className:"wp-block-wp-newsletter-builder-signup-form__header"},(0,t.createElement)("div",null,(0,t.createElement)(n.RichText,{tagName:"h2",value:l,onChange:e=>p({headerText:e}),placeholder:(0,r.__)("Header Text","wp-newsletter-builder")}),(0,t.createElement)(n.RichText,{tagName:"div",value:s,className:"wp-block-wp-newsletter-builder-signup-form__subheader",onChange:e=>p({subheaderText:e}),placeholder:(0,r.__)("Subheader Text","wp-newsletter-builder")})),(0,t.createElement)("div",null,(0,t.createElement)("div",null,(0,t.createElement)("span",{className:"wp-block-wp-newsletter-builder-signup-form__fake-text-input wp-block-wp-newsletter-builder-signup-form__email-input"},(0,r.__)("Email","wp-newsletter-builder"))),(0,t.createElement)(n.RichText,{tagName:"div",value:a,className:"wp-block-wp-newsletter-builder-signup-form__disclaimer",onChange:e=>p({disclaimerText:e}),placeholder:(0,r.__)("Disclaimer Text","wp-newsletter-builder")}),(0,t.createElement)("div",{className:"wp-block-button is-style-subscribe"},(0,t.createElement)("div",{className:"wp-block-wp-newsletter-builder-signup-form__fake-button wp-block-button__link wp-element-button"},(0,t.createElement)(n.RichText,{tagName:"span",value:c,onChange:e=>p({buttonText:e}),placeholder:(0,r.__)("Button Text","wp-newsletter-builder")}))))),u?null:(0,t.createElement)(n.InnerBlocks,{allowedBlocks:["wp-newsletter-builder/signup-form-list"]})),(0,t.createElement)(n.InspectorControls,null,(0,t.createElement)(i.PanelBody,{title:(0,r.__)("List Settings","wp-newsletter-builder")},(0,t.createElement)(i.PanelRow,null,(0,t.createElement)(o,{selected:null!=u?u:"",updateFunction:e=>p({listId:e})})))))},title:c.title,save:()=>{const e=n.useBlockProps.save();return(0,t.createElement)("div",e,(0,t.createElement)(n.InnerBlocks.Content,null))}})}(); \ No newline at end of file diff --git a/build/signup-form/index.php b/build/signup-form/index.php new file mode 100644 index 00000000..3b1a06db --- /dev/null +++ b/build/signup-form/index.php @@ -0,0 +1,40 @@ + true, + 'name' => true, + 'value' => [], + 'placeholder' => true, + 'class' => true, + 'checked' => true, + ]; + return $tags; +} +add_filter( 'wp_kses_allowed_html', 'wp_newsletter_builder_modify_wpkses_post_allowed_tags', 10, 2 ); diff --git a/build/signup-form/render.php b/build/signup-form/render.php new file mode 100644 index 00000000..4ab7cb9a --- /dev/null +++ b/build/signup-form/render.php @@ -0,0 +1,55 @@ +. + * @param WP_Block $block_instance The instance of the WP_Block class that represents the block being rendered. + * + * @package wp-newsletter-builder + */ + +$wp_newsletter_builder_header_text = $attributes['headerText']; +$wp_newsletter_builder_subheader_text = $attributes['subheaderText'] ?? ''; +$wp_newsletter_builder_disclaimer_text = $attributes['disclaimerText'] ?? ''; +$wp_newsletter_builder_button_text = $attributes['buttonText'] ?? __( 'Subscribe', 'wp-newsletter-builder' ); +$wp_newsletter_builder_list_id = $attributes['listId'] ?? ''; +?> +
data-component="wp-newsletter-builder-signup"> + + ', esc_attr( $wp_newsletter_builder_list_id ) ); + } else { + echo wp_kses_post( $content ); + } + ?> +
diff --git a/build/signup-form/view.asset.php b/build/signup-form/view.asset.php new file mode 100644 index 00000000..1616c8c5 --- /dev/null +++ b/build/signup-form/view.asset.php @@ -0,0 +1 @@ + array(), 'version' => '04ecbe14f3ebccb80f72'); diff --git a/build/signup-form/view.js b/build/signup-form/view.js new file mode 100644 index 00000000..3c570a7b --- /dev/null +++ b/build/signup-form/view.js @@ -0,0 +1 @@ +window.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll('[data-component="wp-newsletter-builder-signup"]').forEach((e=>{const r=e.querySelector("button");r&&r.addEventListener("click",(r=>{r.preventDefault();const t=e.querySelector('input[type="email"]'),n=e.querySelectorAll('input[type="checkbox"]:checked'),s=e.querySelector('input[name="wp-newsletter-builder-hidden"]'),l=e.querySelector(".wp-block-wp-newsletter-builder-signup-form__response");if(!l||!t)return;if(l.innerHTML="",l.classList.remove("success","error"),!t.value)return l.classList.add("error"),l.innerHTML="Email is required",void t.focus();if(!n.length&&!s)return l.classList.add("error"),void(l.innerHTML="Please select a newsletter");const o=new URLSearchParams;var i;o.append("email",t.value),s?o.append("listIds",s.value):o.append("listIds",(null!==(i=Array.from(n).map((e=>e.value)))&&void 0!==i?i:[]).join(",")),fetch("/wp-json/wp-newsletter-builder/v1/subscribe",{method:"POST",body:o,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((e=>e.json())).then((e=>{const{success:r,message:t}=e;l.classList.add(r?"success":"error"),l.innerHTML=t}))}))}))})); \ No newline at end of file diff --git a/build/two-up-post/block.json b/build/two-up-post/block.json new file mode 100644 index 00000000..af63136d --- /dev/null +++ b/build/two-up-post/block.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wp-newsletter-builder/two-up-post", + "version": "0.1.0", + "title": "Two Up Newsletter Post", + "category": "design", + "icon": "editor-table", + "description": "Displays two posts, side by side", + "textdomain": "two-up-post", + "editorScript": "file:index.js", + "editorStyle": "file:index.css", + "style": [ + "file:style-index.css" + ], + "render": "file:render.php" +} \ No newline at end of file diff --git a/build/two-up-post/index.asset.php b/build/two-up-post/index.asset.php new file mode 100644 index 00000000..7b5d9100 --- /dev/null +++ b/build/two-up-post/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-element'), 'version' => '8c324b7c5d84eec90d61'); diff --git a/build/two-up-post/index.css b/build/two-up-post/index.css new file mode 100644 index 00000000..e7fac430 --- /dev/null +++ b/build/two-up-post/index.css @@ -0,0 +1 @@ +.wp-block-wp-newsletter-builder-two-up-post .block-editor-block-list__layout{display:flex}.wp-block-wp-newsletter-builder-two-up-post .block-editor-block-list__layout>div{width:50%} diff --git a/build/two-up-post/index.js b/build/two-up-post/index.js new file mode 100644 index 00000000..20546729 --- /dev/null +++ b/build/two-up-post/index.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t={177:function(){var e=window.wp.element,t=window.wp.blocks,n=window.wp.blockEditor;const r=[["wp-newsletter-builder/post",{showContent:!1,showExcerpt:!1,showByline:!1,showCta:!1,order:["image","title","excerpt","content","byline"]}],["wp-newsletter-builder/post",{showContent:!1,showExcerpt:!1,showByline:!1,showCta:!1,order:["image","title","excerpt","content","byline"]}]];var o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wp-newsletter-builder/two-up-post","version":"0.1.0","title":"Two Up Newsletter Post","category":"design","icon":"editor-table","description":"Displays two posts, side by side","textdomain":"two-up-post","editorScript":"file:index.ts","editorStyle":"file:index.css","style":["file:style-index.css"],"render":"file:render.php"}');(0,t.registerBlockType)(o,{apiVersion:2,edit:function(){return(0,e.createElement)("div",(0,n.useBlockProps)(),(0,e.createElement)(n.InnerBlocks,{orientation:"horizontal",template:r,templateLock:"all"}))},title:o.title,save:()=>{const t=n.useBlockProps.save();return(0,e.createElement)("div",t,(0,e.createElement)(n.InnerBlocks.Content,null))}})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var s=1/0;for(a=0;a=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[c])}))?n.splice(c--,1):(l=!1,i0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[n,o,i]},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={918:0,764:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,s=n[0],l=n[1],c=n[2],p=0;if(s.some((function(t){return 0!==e[t]}))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(c)var a=c(r)}for(t&&t(n);p -

> - -

-{{/isDynamicVariant}} + array('react', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'dcdee0605518e56d9cab'); diff --git a/build/wp-newsletter-builder-from-post/index.js b/build/wp-newsletter-builder-from-post/index.js new file mode 100644 index 00000000..adc7ba78 --- /dev/null +++ b/build/wp-newsletter-builder-from-post/index.js @@ -0,0 +1,42 @@ +!function(){var e={373:function(e){var t;self,t=()=>(()=>{var e={779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e=[],t=0;t{"use strict";n.d(t,{Z:()=>a});var r=n(272),s=n.n(r),o=n(609),i=n.n(o)()(s());i.push([e.id,".alley-scripts-post-picker__post-list{display:flex;flex-wrap:wrap;float:left;height:calc(70vh - 200px);justify-content:flex-start;overflow-y:auto;padding:8px;width:100%}.alley-scripts-post-picker__post{border:1px solid #eee;height:auto;justify-content:center;margin:0 8px 8px 0;transition:background-color .2s ease-in-out;width:calc((100% - 40px)/3)}@media(min-width: 780px){.alley-scripts-post-picker__post{width:calc((100% - 40px)/5)}}.alley-scripts-post-picker__post:hover{background-color:#f5f5f5}.alley-scripts-post-picker__post.is-selected{background-color:#f5f5f5}.alley-scripts-post-picker__load-more{clear:both;float:left;text-align:center;width:100%}","",{version:3,sources:["webpack://./src/components/post-picker/post-list.scss"],names:[],mappings:"AAAA,sCACE,YAAA,CACA,cAAA,CACA,UAAA,CACA,yBAAA,CACA,0BAAA,CACA,eAAA,CACA,WAAA,CACA,UAAA,CAGF,iCACE,qBAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,2CAAA,CACA,2BAAA,CAGA,yBATF,iCAUI,2BAAA,CAAA,CAGF,uCACE,wBAAA,CAGF,6CACE,wBAAA,CAIJ,sCACE,UAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA",sourcesContent:[".alley-scripts-post-picker__post-list {\n display: flex;\n flex-wrap: wrap;\n float: left;\n height: calc(70vh - 200px);\n justify-content: flex-start;\n overflow-y: auto;\n padding: 8px;\n width: 100%;\n}\n\n.alley-scripts-post-picker__post {\n border: 1px solid #eee;\n height: auto;\n justify-content: center;\n margin: 0 8px 8px 0;\n transition: background-color 0.2s ease-in-out;\n width: calc((100% - 40px) / 3);\n\n\n @media (min-width: 780px) {\n width: calc((100% - 40px) / 5);\n }\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &.is-selected {\n background-color: #f5f5f5;\n }\n}\n\n.alley-scripts-post-picker__load-more {\n clear: both;\n float: left;\n text-align: center;\n width: 100%;\n}\n"],sourceRoot:""}]);const a=i},992:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),s=n.n(r),o=n(609),i=n.n(o)()(s());i.push([e.id,".components-modal__content{width:90vw}.alley-scripts-post-picker__buttons{clear:both;display:block;text-align:right;width:100%}.alley-scripts-post-picker__buttons button{margin:5px}","",{version:3,sources:["webpack://./src/components/post-picker/search-modal.scss"],names:[],mappings:"AAAA,2BACE,UAAA,CAGF,oCACE,UAAA,CACA,aAAA,CACA,gBAAA,CACA,UAAA,CAEA,2CACE,UAAA",sourcesContent:[".components-modal__content {\n width: 90vw;\n}\n\n.alley-scripts-post-picker__buttons {\n clear: both;\n display: block;\n text-align: right;\n width: 100%;\n\n button {\n margin: 5px;\n }\n}\n"],sourceRoot:""}]);const a=i},458:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(272),s=n.n(r),o=n(609),i=n.n(o)()(s());i.push([e.id,'.edit-post-sidebar .autocomplete__component,.editor-styles-wrapper .autocomplete__component{margin-bottom:20px}.edit-post-sidebar .autocomplete-base-control,.editor-styles-wrapper .autocomplete-base-control{position:relative}.edit-post-sidebar .autocomplete-text-control__input,.editor-styles-wrapper .autocomplete-text-control__input{margin:0}.edit-post-sidebar .autocomplete__selection-list,.editor-styles-wrapper .autocomplete__selection-list{list-style-type:none;margin:0 0 6px;padding:0}.edit-post-sidebar .autocomplete__selection-list--item,.editor-styles-wrapper .autocomplete__selection-list--item{display:inline-block;list-style:none}.edit-post-sidebar .autocomplete__selection-list--item--button,.editor-styles-wrapper .autocomplete__selection-list--item--button{margin-bottom:4px;margin-right:3px}.edit-post-sidebar .autocomplete__selection-list--item--button::after,.editor-styles-wrapper .autocomplete__selection-list--item--button::after{content:"×";font-size:16px;line-height:20px;margin-left:5px}.edit-post-sidebar .autocomplete__dropdown,.editor-styles-wrapper .autocomplete__dropdown{background-color:#fff;border-color:rgba(0,0,0,0) #e2e4e7 #e2e4e7;border-radius:0 0 4px 4px;border-style:solid;border-width:0 1px 1px;left:0;max-height:0;overflow-y:hidden;position:absolute;top:calc(100% + 1px);visibility:hidden;width:100%;z-index:10}.edit-post-sidebar .autocomplete__dropdown--is-open,.editor-styles-wrapper .autocomplete__dropdown--is-open{box-shadow:0 3px 30px rgba(25,30,35,.1);max-height:225px;overflow-y:scroll;visibility:visible}.edit-post-sidebar .autocomplete__dropdown--notice,.editor-styles-wrapper .autocomplete__dropdown--notice{padding:15px}.edit-post-sidebar .autocomplete__dropdown--results,.editor-styles-wrapper .autocomplete__dropdown--results{list-style:none;margin:0;padding:0}.edit-post-sidebar .autocomplete__list--item,.editor-styles-wrapper .autocomplete__list--item{list-style:none}.edit-post-sidebar .autocomplete__list--item>button,.editor-styles-wrapper .autocomplete__list--item>button{background:rgba(0,0,0,0);border-color:#e2e4e7;border-style:solid;border-width:0 0 1px;height:100%;line-height:1.25;text-align:left;white-space:inherit;width:100%}.edit-post-sidebar .autocomplete__list--item:last-child>button,.editor-styles-wrapper .autocomplete__list--item:last-child>button{border-bottom:0}',"",{version:3,sources:["webpack://./src/components/selector/styles.scss"],names:[],mappings:"AAAA,4FAgBI,kBACE,CAAA,gGAMF,iBACE,CAAA,8GAMF,QACE,CAAA,sGAMF,oBACE,CAAA,cACA,CAAA,SACA,CAAA,kHAEA,oBACE,CAAA,eACA,CAAA,kIAEA,iBACE,CAAA,gBACA,CAAA,gJAEA,WACE,CAAA,cACA,CAAA,gBACA,CAAA,eACA,CAAA,0FASR,qBACE,CAAA,0CACA,CAAA,yBACA,CAAA,kBACA,CAAA,sBACA,CAAA,MACA,CAAA,YACA,CAAA,iBACA,CAAA,iBACA,CAAA,oBACA,CAAA,iBACA,CAAA,UACA,CAAA,UACA,CAAA,4GAGA,uCACE,CAAA,gBACA,CAAA,iBACA,CAAA,kBACA,CAAA,0GAIF,YACE,CAAA,4GAIF,eACE,CAAA,QACA,CAAA,SACA,CAAA,8FAOJ,eACE,CAAA,4GAEA,wBACE,CAAA,oBACA,CAAA,kBACA,CAAA,oBACA,CAAA,WACA,CAAA,gBACA,CAAA,eACA,CAAA,mBACA,CAAA,UACA,CAAA,kIAGF,eACE",sourcesContent:["//--------------------------------------------------------------\n// AutoComplete Styles\n//--------------------------------------------------------------\n\n/* stylelint-disable max-nesting-depth */\n\n//-----------------------------------------\n// Accommodate editor well, or the sidebar.\n//-----------------------------------------\n.edit-post-sidebar,\n.editor-styles-wrapper {\n .autocomplete {\n\n //-----------------------------------------\n // Parent form wrapper.\n //-----------------------------------------\n &__component {\n margin-bottom: 20px;\n }\n\n //-----------------------------------------\n // Wrapper\n //-----------------------------------------\n &-base-control {\n position: relative;\n }\n\n //-----------------------------------------\n // Input\n //-----------------------------------------\n &-text-control__input {\n margin: 0;\n }\n\n //-----------------------------------------\n // Selected buttons.\n //-----------------------------------------\n &__selection-list {\n list-style-type: none;\n margin: 0 0 6px;\n padding: 0;\n\n &--item {\n display: inline-block;\n list-style: none;\n\n &--button {\n margin-bottom: 4px;\n margin-right: 3px;\n\n &::after {\n content: '×';\n font-size: 16px;\n line-height: 20px;\n margin-left: 5px;\n }\n }\n }\n }\n\n //-----------------------------------------\n // Results\n //-----------------------------------------\n &__dropdown {\n background-color: #fff;\n border-color: transparent #e2e4e7 #e2e4e7;\n border-radius: 0 0 4px 4px;\n border-style: solid;\n border-width: 0 1px 1px;\n left: 0;\n max-height: 0;\n overflow-y: hidden;\n position: absolute;\n top: calc(100% + 1px); // Offset focus border.\n visibility: hidden;\n width: 100%;\n z-index: 10;\n\n // Container is open.\n &--is-open {\n box-shadow: 0 3px 30px rgba(25, 30, 35, 0.1);\n max-height: 225px;\n overflow-y: scroll;\n visibility: visible;\n }\n\n // Notice handler.\n &--notice {\n padding: 15px;\n }\n\n // Results container.\n &--results {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n }\n\n //-----------------------------------------\n // List/Results\n //-----------------------------------------\n &__list--item {\n list-style: none;\n\n > button {\n background: transparent;\n border-color: #e2e4e7;\n border-style: solid;\n border-width: 0 0 1px;\n height: 100%;\n line-height: 1.25;\n text-align: left;\n white-space: inherit;\n width: 100%;\n }\n\n &:last-child > button {\n border-bottom: 0;\n }\n }\n }\n}\n"],sourceRoot:""}]);const a=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,s,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(r)for(var a=0;a0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),t.push(u))}},t}},272:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),o="/*# ".concat(s," */");return[t].concat([o]).join("\n")}return[t].join("\n")}},368:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:s}=Object;let{freeze:o,seal:i,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=w(Array.prototype.forEach),d=w(Array.prototype.pop),p=w(Array.prototype.push),f=w(String.prototype.toLowerCase),h=w(String.prototype.toString),m=w(String.prototype.match),g=w(String.prototype.replace),y=w(String.prototype.indexOf),b=w(String.prototype.trim),v=w(RegExp.prototype.test),_=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=s(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function C(t){const n=a(null);for(const[r,o]of e(t))void 0!==s(t,r)&&(n[r]=o);return n}function S(e,t){for(;null!==e;){const n=s(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return function(e){return console.warn("fallback value for",e),null}}const k=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),E=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=o(["#text"]),j=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),P=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),L=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),D=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=i(/<%[\w\W]*|[\w\W]*%>/gm),B=i(/\${[\w\W]*}/gm),F=i(/^data-[\-\w.\u00B7-\uFFFF]/),z=i(/^aria-[\-\w]+$/),q=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=i(/^(?:\w+script|data):/i),H=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:M,TMPLIT_EXPR:B,DATA_ATTR:F,ARIA_ATTR:z,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:H,DOCTYPE_NAME:W});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.6",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:s}=n;const i=s,l=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:A,Node:w,Element:U,NodeFilter:M,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:z,trustedTypes:$}=n,H=U.prototype,V=S(H,"cloneNode"),Z=S(H,"nextSibling"),K=S(H,"childNodes"),Q=S(H,"parentNode");if("function"==typeof A){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let J,X="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=s,{importNode:se}=i;let oe={};r.isSupported="function"==typeof e&&"function"==typeof Q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:ae,TMPLIT_EXPR:le,DATA_ATTR:ce,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:pe}=G;let{IS_ALLOWED_URI:fe}=G,he=null;const me=x({},[...k,...E,...R,...N,...O]);let ge=null;const ye=x({},[...j,...P,...L,...D]);let be=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,_e=null,Ae=!0,we=!0,xe=!1,Ce=!0,Se=!1,ke=!1,Ee=!1,Re=!1,Te=!1,Ne=!1,Ie=!1,Oe=!0,je=!1,Pe=!0,Le=!1,De={},Ue=null;const Me=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Be=null;const Fe=x({},["audio","video","img","source","image","track"]);let ze=null;const qe=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ge=We,Ye=!1,Ve=null;const Ze=x({},[$e,He,We],h);let Ke=null;const Qe=["application/xhtml+xml","text/html"];let Je=null,Xe=null;const et=s.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Xe||Xe!==e){if(e&&"object"==typeof e||(e={}),e=C(e),Ke=Ke=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Je="application/xhtml+xml"===Ke?h:f,he="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS,Je):me,ge="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR,Je):ye,Ve="ALLOWED_NAMESPACES"in e?x({},e.ALLOWED_NAMESPACES,h):Ze,ze="ADD_URI_SAFE_ATTR"in e?x(C(qe),e.ADD_URI_SAFE_ATTR,Je):qe,Be="ADD_DATA_URI_TAGS"in e?x(C(Fe),e.ADD_DATA_URI_TAGS,Je):Fe,Ue="FORBID_CONTENTS"in e?x({},e.FORBID_CONTENTS,Je):Me,ve="FORBID_TAGS"in e?x({},e.FORBID_TAGS,Je):{},_e="FORBID_ATTR"in e?x({},e.FORBID_ATTR,Je):{},De="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Se=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,Te=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Le=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||q,Ge=e.NAMESPACE||We,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(we=!1),Ne&&(Te=!0),De&&(he=x({},[...O]),ge=[],!0===De.html&&(x(he,k),x(ge,j)),!0===De.svg&&(x(he,E),x(ge,P),x(ge,D)),!0===De.svgFilters&&(x(he,R),x(ge,P),x(ge,D)),!0===De.mathMl&&(x(he,N),x(ge,L),x(ge,D))),e.ADD_TAGS&&(he===me&&(he=C(he)),x(he,e.ADD_TAGS,Je)),e.ADD_ATTR&&(ge===ye&&(ge=C(ge)),x(ge,e.ADD_ATTR,Je)),e.ADD_URI_SAFE_ATTR&&x(ze,e.ADD_URI_SAFE_ATTR,Je),e.FORBID_CONTENTS&&(Ue===Me&&(Ue=C(Ue)),x(Ue,e.FORBID_CONTENTS,Je)),Pe&&(he["#text"]=!0),ke&&x(he,["html","head","body"]),he.table&&(x(he,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,X=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}($,l)),null!==J&&"string"==typeof X&&(X=J.createHTML(""));o&&o(e),Xe=e}},rt=x({},["mi","mo","mn","ms","mtext"]),st=x({},["foreignobject","desc","title","annotation-xml"]),ot=x({},["title","style","font","a","script"]),it=x({},E);x(it,R),x(it,T);const at=x({},N);x(at,I);const lt=function(e){p(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{p(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Te||Ne)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ut=function(e){let t=null,n=null;if(Re)e=""+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ke&&Ge===We&&(e=''+e+"");const r=J?J.createHTML(e):e;if(Ge===We)try{t=(new z).parseFromString(r,Ke)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Ge,"template",null);try{t.documentElement.innerHTML=Ye?X:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(s.createTextNode(n),o.childNodes[0]||null),Ge===We?re.call(t,ke?"html":"body")[0]:ke?t.documentElement:o},dt=function(e){return te.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,null)},pt=function(e){return"function"==typeof w&&e instanceof w},ft=function(e,t,n){oe[e]&&u(oe[e],(e=>{e.call(r,t,n,Xe)}))},ht=function(e){let t=null;if(ft("beforeSanitizeElements",e,null),(n=e)instanceof F&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const s=Je(e.nodeName);if(ft("uponSanitizeElement",e,{tagName:s,allowedTags:he}),e.hasChildNodes()&&!pt(e.firstElementChild)&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return lt(e),!0;if(!he[s]||ve[s]){if(!ve[s]&>(s)){if(be.tagNameCheck instanceof RegExp&&v(be.tagNameCheck,s))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(s))return!1}if(Pe&&!Ue[s]){const t=Q(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(V(n[r],!0),Z(e))}return lt(e),!0}return e instanceof U&&!function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ge,tagName:"template"});const n=f(e.tagName),r=f(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===We?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||rt[r]):Boolean(it[n]):e.namespaceURI===$e?t.namespaceURI===We?"math"===n:t.namespaceURI===He?"math"===n&&st[r]:Boolean(at[n]):e.namespaceURI===We?!(t.namespaceURI===He&&!st[r])&&!(t.namespaceURI===$e&&!rt[r])&&!at[n]&&(ot[n]||!it[n]):!("application/xhtml+xml"!==Ke||!Ve[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==s&&"noembed"!==s&&"noframes"!==s||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(Se&&3===e.nodeType&&(t=e.textContent,u([ie,ae,le],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(r.removed,{element:e.cloneNode()}),e.textContent=t)),ft("afterSanitizeElements",e,null),!1):(lt(e),!0)},mt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in s||n in et))return!1;if(we&&!_e[t]&&v(ce,t));else if(Ae&&v(ue,t));else if(!ge[t]||_e[t]){if(!(gt(e)&&(be.tagNameCheck instanceof RegExp&&v(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&v(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&v(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(ze[t]);else if(v(fe,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Be[e])if(xe&&!v(de,g(n,pe,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},yt=function(e){ft("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let s=t.length;for(;s--;){const o=t[s],{name:i,namespaceURI:a,value:l}=o,c=Je(i);let p="value"===i?l:b(l);if(n.attrName=c,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,ft("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(ct(i,e),!n.keepAttr)continue;if(!Ce&&v(/\/>/i,p)){ct(i,e);continue}Se&&u([ie,ae,le],(e=>{p=g(p,e," ")}));const f=Je(e.nodeName);if(mt(f,c,p)){if(!je||"id"!==c&&"name"!==c||(ct(i,e),p="user-content-"+p),J&&"object"==typeof $&&"function"==typeof $.getAttributeType)if(a);else switch($.getAttributeType(f,c)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}try{a?e.setAttributeNS(a,i,p):e.setAttribute(i,p),d(r.removed)}catch(e){}}}ft("afterSanitizeAttributes",e,null)},bt=function e(t){let n=null;const r=dt(t);for(ft("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ft("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof c&&e(n.content),yt(n));ft("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,o=null,a=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ee||nt(t),r.removed=[],"string"==typeof e&&(Le=!1),Le){if(e.nodeName){const t=Je(e.nodeName);if(!he[t]||ve[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof w)n=ut("\x3c!----\x3e"),s=n.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!Te&&!Se&&!ke&&-1===e.indexOf("<"))return J&&Ie?J.createHTML(e):e;if(n=ut(e),!n)return Te?null:Ie?X:""}n&&Re&<(n.firstChild);const l=dt(Le?e:n);for(;o=l.nextNode();)ht(o)||(o.content instanceof c&&bt(o.content),yt(o));if(Le)return e;if(Te){if(Ne)for(a=ne.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=se.call(i,a,!0)),a}let d=ke?n.outerHTML:n.innerHTML;return ke&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&v(W,n.ownerDocument.doctype.name)&&(d="\n"+d),Se&&u([ie,ae,le],(e=>{d=g(d,e," ")})),J&&Ie?J.createHTML(d):d},r.setConfig=function(){nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ee=!0},r.clearConfig=function(){Xe=null,Ee=!1},r.isValidAttribute=function(e,t,n){Xe||nt({});const r=Je(e),s=Je(t);return mt(r,s,n)},r.addHook=function(e,t){"function"==typeof t&&(oe[e]=oe[e]||[],p(oe[e],t))},r.removeHook=function(e){if(oe[e])return d(oe[e])},r.removeHooks=function(e){oe[e]&&(oe[e]=[])},r.removeAllHooks=function(){oe={}},r}()}()},286:function(e,t){var n,r;n=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=t.IS_PAPA_WORKER||!1,s={},o=0,i={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(A(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!A(r.transform)&&r.transform,r.worker&&i.WORKERS_SUPPORTED){var l=function(){if(!i.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),i.BLOB_URL||(i.BLOB_URL=n.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(a);return l.onmessage=g,l.id=o++,s[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=A(r.step),r.chunk=A(r.chunk),r.complete=A(r.complete),r.error=A(r.error),delete r.worker,void l.postMessage({input:n,config:r,workerId:l.id})}var f=null;return i.NODE_STREAM_INPUT,"string"==typeof n?(n=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(n),f=r.download?new c(r):new d(r)):!0===n.readable&&A(n.read)&&A(n.on)?f=new p(r):(t.File&&n instanceof File||n instanceof Object)&&(f=new u(r)),f.stream(n)},unparse:function(e,t){var n=!1,r=!0,s=",",o="\r\n",a='"',l=a+a,c=!1,u=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(s=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(o=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(d=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var p=new RegExp(h(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,c);if("object"==typeof e[0])return f(u||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||u),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),f(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function f(e,t,n){var i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0=this._config.preview;if(r)t.postMessage({results:a,workerId:i.WORKER_ID,finished:c});else if(A(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!c||!A(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){A(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var s=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+s)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function u(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=i.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=_(this._chunkLoaded,this),t.onerror=_(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function p(e){l.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=_((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=_((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=_((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=_((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,n,r,s=Math.pow(2,53),o=-s,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,c=this,u=0,d=0,p=!1,f=!1,g=[],y={data:[],errors:[],meta:{}};if(A(e.step)){var b=e.step;e.step=function(t){if(y=t,x())w();else{if(w(),0===y.data.length)return;u+=t.data.length,e.preview&&u>e.preview?n.abort():(y.data=y.data[0],b(y,c))}}}function _(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function w(){return y&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!_(e)}))),x()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;x()&&t=g.length?"__parsed_extra":g[r]),e.transform&&(i=e.transform(i,o)),i=C(o,i),"__parsed_extra"===o?(s[o]=s[o]||[],s[o].push(i)):s[o]=i}return e.header&&(r>g.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+r,d+n):r=r.length/2?"\r\n":"\r"}(s,l)),r=!1,e.delimiter)A(e.delimiter)&&(e.delimiter=e.delimiter(s),y.meta.delimiter=e.delimiter);else{var c=function(t,n,r,s,o){var a,l,c,u;o=o||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var d=0;d=a)return G(!0)}else for(B=u,u++;;){if(-1===(B=i.indexOf(t,B+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:u}),H();if(B===m-1)return H(i.substring(u,B).replace(M,t));if(t!==c||i[B+1]!==c){if(t===c||0===B||i[B-1]!==c){-1!==D&&D=a)return G(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:u}),B++}}else B++}return H();function q(e){_.push(e),C=u}function $(e){var t=0;if(-1!==e){var n=i.substring(B+1,e);n&&""===n.trim()&&(t=n.length)}return t}function H(e){return f||(void 0===e&&(e=i.substring(u)),x.push(e),u=m,q(x),v&&Y()),G()}function W(e){u=e,q(x),x=[],U=i.indexOf(r,u)}function G(e){return{data:_,errors:w,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:C+(p||0)}}}function Y(){o(G()),_=[],w=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return u}}function g(e){var t=e.data,n=s[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var o={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(A(n.userStep)){for(var i=0;i{"use strict";var r=n(586);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,o,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:s};return n.PropTypes=n,n}},980:(e,t,n)=>{e.exports=n(262)()},586:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},837:(e,t,n)=>{"use strict";var r=n(196),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:s,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},322:(e,t,n)=>{"use strict";e.exports=n(837)},665:e=>{e.exports=function(e,t,n,r){var s=n?n.call(r,e,t):void 0;if(void 0!==s)return!!s;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l{"use strict";var t=[];function n(e){for(var n=-1,r=0;r{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},173:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},36:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},196:e=>{"use strict";e.exports=window.React}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{AudioPicker:()=>zt,CSVUploader:()=>Kt,Checkboxes:()=>Ht,ImagePicker:()=>en,MediaPicker:()=>an,PostPicker:()=>or,PostSelector:()=>ar,SafeHtml:()=>dn,Selector:()=>vr,TermSelector:()=>Ar,VideoPicker:()=>Sr,getMediaUrl:()=>Zt,parseCSVFile:()=>Vt,useCurrentPostId:()=>Cn,useDebounce:()=>hn,useHasInnerBlocks:()=>mn,useInnerBlocks:()=>yn,useInnerBlocksAttributes:()=>_n,useInnerBlocksCount:()=>bn,useInnerBlocksIndex:()=>gn,useMedia:()=>vn,useParentBlock:()=>An,useParentBlockAttributes:()=>wn,usePost:()=>xn,usePostById:()=>En,usePostMeta:()=>Nn,usePostMetaValue:()=>In,usePosts:()=>On,useTerms:()=>jn});var e=n(322),t=n(980),s=n.n(t),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2||H(L)>3?"":" "}function Y(e,t){for(;--t&&F()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return $(e,q()+(t<6&&32==z()&&32==F()))}function V(e){for(;F();)switch(L){case e:return P;case 34:case 39:34!==e&&39!==e&&V(L);break;case 40:41===e&&V(e);break;case 92:F()}return P}function Z(e,t){for(;F()&&e+L!==57&&(e+L!==84||47!==z()););return"/*"+$(t,P-1)+"*"+v(47===e?e:F())}function K(e){for(;!H(z());)F();return $(e,P)}function Q(e,t){for(var n="",r=0;r6)switch(S(e,t+1)){case 109:if(45!==S(e,t+4))break;case 102:return x(e,/(.+:)(.+)-([^]+)/,"$1"+f+"$2-$3$1"+p+(108==S(e,t+3)?"$3":"$2-$3"))+e;case 115:return~C(e,"stretch")?X(x(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return x(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,s,o,i,a){return d+n+":"+r+a+(s?d+n+"-span:"+(o?i:+i-+r)+a:"")+e}));case 4949:if(121===S(e,t+6))return x(e,":",":"+f)+e;break;case 6444:switch(S(e,45===S(e,14)?18:11)){case 120:return x(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+f+(45===S(e,14)?"inline-":"")+"box$3$1"+f+"$2$3$1"+d+"$2box$3")+e;case 100:return x(e,":",":"+d)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return x(e,"scroll-","scroll-snap-")+e}return e}function ee(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:return void(e.return=X(e.value,e.length,n));case y:return Q([M(e,{value:x(e.value,"@","@"+f)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(w(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":B(M(e,{props:[x(t,/:(read-\w+)/,":-moz-$1")]})),B(M(e,{props:[t]})),_(e,{props:N(n,r)});break;case"::placeholder":B(M(e,{props:[x(t,/:(plac\w+)/,":"+f+"input-$1")]})),B(M(e,{props:[x(t,/:(plac\w+)/,":-moz-$1")]})),B(M(e,{props:[x(t,/:(plac\w+)/,d+"input-$1")]})),B(M(e,{props:[t]})),_(e,{props:N(n,r)})}return""}))}}function te(e){return function(e){return D="",e}(ne("",null,null,null,[""],e=function(e){return I=O=1,j=E(D=e),P=0,[]}(e),0,[0],e))}function ne(e,t,n,r,s,o,i,a,l){for(var c=0,u=0,d=i,p=0,f=0,h=0,m=1,g=1,y=1,b=0,_="",A=s,w=o,k=r,R=_;g;)switch(h=b,b=F()){case 40:if(108!=h&&58==S(R,d-1)){-1!=C(R+=x(W(b),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:R+=W(b);break;case 9:case 10:case 13:case 32:R+=G(h);break;case 92:R+=Y(q()-1,7);continue;case 47:switch(z()){case 42:case 47:T(se(Z(F(),q()),t,n,l),l);break;default:R+="/"}break;case 123*m:a[c++]=E(R)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(R=x(R,/\f/g,"")),f>0&&E(R)-d&&T(f>32?oe(R+";",r,n,d-1,l):oe(x(R," ","")+";",r,n,d-2,l),l);break;case 59:R+=";";default:if(T(k=re(R,t,n,c,u,s,a,_,A=[],w=[],d,o),o),123===b)if(0===u)ne(R,t,k,k,A,o,d,a,w);else switch(99===p&&110===S(R,3)?100:p){case 100:case 108:case 109:case 115:ne(e,k,k,r&&T(re(e,k,k,0,0,s,a,_,s,A=[],d,w),w),s,w,d,a,r?A:w);break;default:ne(R,k,k,k,[""],w,0,a,w)}}c=u=f=0,m=y=1,_=R="",d=i;break;case 58:d=1+E(R),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==(L=P>0?S(D,--P):0,O--,10===L&&(O=1,I--),L))continue;switch(R+=v(b),b*m){case 38:y=u>0?1:(R+="\f",-1);break;case 44:a[c++]=(E(R)-1)*y,y=1;break;case 64:45===z()&&(R+=W(F())),p=z(),u=d=E(_=R+=K(q())),b++;break;case 45:45===h&&2==E(R)&&(m=0)}}return o}function re(e,t,n,r,s,o,i,a,l,c,u,d){for(var p=s-1,f=0===s?o:[""],h=R(f),g=0,y=0,v=0;g0?f[_]+" "+w:x(w,/&\f/g,f[_])))&&(l[v++]=C);return U(e,t,n,0===s?m:a,l,c,u,d)}function se(e,t,n,r){return U(e,t,n,h,v(L),k(e,2,-2),0,r)}function oe(e,t,n,r,s){return U(e,t,n,g,k(e,0,r),k(e,r+1,-1),r,s)}const ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ae="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",le="undefined"!=typeof window&&"HTMLElement"in window,ce=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),ue=(new Set,Object.freeze([])),de=Object.freeze({}),pe=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),fe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,he=/(^-|-$)/g;function me(e){return e.replace(fe,"-").replace(he,"")}var ge=/(a)(d)/gi,ye=function(e){return String.fromCharCode(e+(e>25?39:97))};function be(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ye(t%52)+n;return(ye(t%52)+n).replace(ge,"$1-$2")}var ve,_e=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Ae=function(e){return _e(5381,e)};function we(e){return"string"==typeof e&&!0}var xe="function"==typeof Symbol&&Symbol.for,Ce=xe?Symbol.for("react.memo"):60115,Se=xe?Symbol.for("react.forward_ref"):60112,ke={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ee={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Re={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Te=((ve={})[Se]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ve[Ce]=Re,ve);function Ne(e){return("type"in(t=e)&&t.type.$$typeof)===Ce?Re:"$$typeof"in e?Te[e.$$typeof]:ke;var t}var Ie=Object.defineProperty,Oe=Object.getOwnPropertyNames,je=Object.getOwnPropertySymbols,Pe=Object.getOwnPropertyDescriptor,Le=Object.getPrototypeOf,De=Object.prototype;function Ue(e,t,n){if("string"!=typeof t){if(De){var r=Le(t);r&&r!==De&&Ue(e,r,n)}var s=Oe(t);je&&(s=s.concat(je(t)));for(var o=Ne(e),i=Ne(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Ge=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,s=r;e>=s;)if((s<<=1)<0)throw We(16,"".concat(e));this.groupSizes=new Uint32Array(s),this.groupSizes.set(n),this.length=s;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),s=r+n,o=r;o=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(l+="".concat(e,","))})),r+="".concat(i).concat(a,'{content:"').concat(l,'"}').concat("/*!sc*/\n")},o=0;o0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ut,n).replace(r,c))})),i.prefix&&u.push(ee),u.push(J);var d=function(e,s,o,a){void 0===s&&(s=""),void 0===o&&(o=""),void 0===a&&(a="&"),t=a,n=s,r=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(dt,""),c=te(o||s?"".concat(o," ").concat(s," { ").concat(l," }"):l);i.namespace&&(c=pt(c,i.namespace));var d,p,f,h=[];return Q(c,(d=u.concat((f=function(e){return h.push(e)},function(e){e.root||(e=e.return)&&f(e)})),p=R(d),function(e,t,n,r){for(var s="",o=0;o="A"&&e<="Z"};function wt(e){for(var t="",n=0;n>>0);if(!t.hasNameForId(this.componentId,o)){var i=n(s,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,i)}r=Fe(r,o),this.staticRulesId=o}else{for(var a=_e(this.baseHash,n.hash),l="",c=0;c>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(l,".".concat(p),void 0,this.componentId)),r=Fe(r,p)}}return r},e}(),Tt=l().createContext(void 0);Tt.Consumer;var Nt={};function It(e,t,n){var r=Be(e),s=e,i=!we(e),c=t.attrs,u=void 0===c?ue:c,d=t.componentId,p=void 0===d?function(e,t){var n="string"!=typeof e?"sc":me(e);Nt[n]=(Nt[n]||0)+1;var r="".concat(n,"-").concat(function(e){return be(Ae(e)>>>0)}("6.1.0"+n+Nt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,f=(void 0===t.displayName&&function(e){we(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e),t.displayName&&t.componentId?"".concat(me(t.displayName),"-").concat(t.componentId):t.componentId||p),h=r&&s.attrs?s.attrs.concat(u).filter(Boolean):u,m=t.shouldForwardProp;if(r&&s.shouldForwardProp){var g=s.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;m=function(e,t){return g(e,t)&&y(e,t)}}else m=g}var b=new Rt(n,f,r?s.componentStyle:void 0),v=l().forwardRef((function(e,t){return function(e,t,n){var r=e.attrs,s=e.componentStyle,i=e.defaultProps,c=e.foldedComponentIds,u=e.styledComponentId,d=e.target,p=l().useContext(Tt),f=bt(),h=e.shouldForwardProp||f.shouldForwardProp,m=function(e,t,n){for(var r,s=o(o({},t),{className:void 0,theme:n}),i=0;i2&&ct.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}(),function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=nt(),r=ze([n&&'nonce="'.concat(n,'"'),"".concat(ae,'="true"'),"".concat("data-styled-version",'="').concat("6.1.0",'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw We(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw We(2);var n=((t={})[ae]="",t["data-styled-version"]="6.1.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=nt();return r&&(n.nonce=r),[l().createElement("style",o({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ct({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw We(2);return l().createElement(vt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw We(3)}}(),"__sc-".concat(ae,"__");const Mt=Ut.div` + height: auto; + width: 100%; +`,Bt=({src:t})=>(0,e.jsx)(Mt,{children:(0,e.jsx)("audio",{className:"edit-audio-preview",controls:!0,src:t})});Bt.propTypes={src:s().string.isRequired};const Ft=({className:t,onReset:n,onUpdate:r,onUpdateURL:s,value:o,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["audio"],className:t,icon:"format-audio",onReset:n,onUpdate:r,onUpdateURL:s,preview:Bt,value:o,valueURL:i});Ft.defaultProps={className:"",onUpdateURL:null,valueURL:""},Ft.propTypes={className:s().string,onReset:s().func.isRequired,onUpdate:s().func.isRequired,onUpdateURL:s().func,value:s().number.isRequired,valueURL:s().string};const zt=Ft,qt=window.wp.components,$t=({label:t,value:n,options:r,onChange:s})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(qt.BaseControl,{label:t}),r.map((t=>(0,e.jsx)(qt.CheckboxControl,{label:t.label,checked:n.includes(t.value),onChange:e=>{s(e?[...n,t.value]:[...n.filter((e=>e!==t.value))])}})))]});$t.propTypes={label:s().string.isRequired,value:s().arrayOf(s().string).isRequired,options:s().arrayOf(s().shape({label:s().string.isRequired,value:s().string.isRequired})).isRequired,onChange:s().func.isRequired};const Ht=$t,Wt=window.wp.i18n;var Gt=n(286),Yt=n.n(Gt);const Vt=e=>new Promise(((t,n)=>{Yt().parse(e,{complete:e=>t(e.data),dynamicTyping:!0,error:e=>n(e),header:!0,skipEmptyLines:!0})})),Zt=(e,t="full")=>{const{media_details:{sizes:{[t]:{source_url:n=""}={},full:{source_url:r=""}={}}={}}={},sizes:{[t]:{url:s=""}={},full:{url:o=""}={}}={},source_url:i="",url:a=""}=e;return s||n||o||r||a||i||""};class Kt extends l().PureComponent{static handleSubmit(e){e.preventDefault()}constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.state={error:"",success:""}}handleChange(e){const{attributeName:t,callback:n,setAttributes:r}=this.props;e.target.files&&e.target.files[0]&&Vt(e.target.files[0]).then((e=>n?n(e):e)).then((e=>{Array.isArray(e)&&e.length>0?(this.setState({error:"",success:(0,Wt.__)("Successfully read CSV data.","alley-scripts")}),r({[t]:JSON.stringify(e)})):this.setState({error:(0,Wt.__)("Could not map CSV data. Please check the source file to ensure that it has the correct structure.","alley-scripts"),success:""})})).catch((e=>{this.setState({error:e,success:""})}))}render(){const{error:t="",success:n=""}=this.state;return(0,e.jsxs)("div",{className:"alley-scripts-block-csv-uploader",children:[(0,e.jsx)("h2",{children:(0,Wt.__)("Upload CSV","alley-scripts")}),(0,e.jsxs)("form",{onSubmit:this.handleSubmit,children:[""!==t?(0,e.jsxs)("div",{style:{color:"#c00"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Error:","alley-scripts")})," ",t]}):null,""!==n?(0,e.jsxs)("div",{style:{color:"#0c0"},children:[(0,e.jsx)("strong",{children:(0,Wt.__)("Success:","alley-scripts")})," ",n]}):null,(0,e.jsx)("div",{children:(0,e.jsxs)("label",{htmlFor:"alley-scripts-block-csv-uploader-file",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Select a file to load data.","alley-scripts")}),(0,e.jsx)("input",{id:"alley-scripts-block-csv-uploader-file",onChange:this.handleChange,type:"file"})]})})]})]})}}Kt.defaultProps={callback:null},Kt.propTypes={attributeName:s().string.isRequired,callback:s().func,setAttributes:s().func.isRequired};const Qt=Ut.div` + box-sizing: border-box; + flex-shrink: 0; + height: auto; + max-height: 1450px; + max-width: 1450px; + min-height: 20px; + min-width: 20px; + position: relative; + width: auto; +`,Jt=({src:t})=>(0,e.jsx)(Qt,{children:(0,e.jsx)("img",{alt:(0,Wt.__)("Edit image","alley-scripts"),className:"edit-image-preview",src:t,title:(0,Wt.__)("Edit image","alley-scripts")})});Jt.propTypes={src:s().string.isRequired};const Xt=({className:t,imageSize:n,displayControlsInToolbar:r,onReset:s,onUpdate:o,onUpdateURL:i,value:a,valueURL:l})=>(0,e.jsx)(an,{allowedTypes:["image"],className:t,icon:"format-image",imageSize:n,displayControlsInToolbar:r,onReset:s,onUpdate:o,onUpdateURL:i,preview:Jt,value:a,valueURL:l});Xt.defaultProps={className:"",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,valueURL:""},Xt.propTypes={className:s().string,imageSize:s().string,displayControlsInToolbar:s().bool,onReset:s().func.isRequired,onUpdate:s().func.isRequired,onUpdateURL:s().func,value:s().number.isRequired,valueURL:s().string};const en=Xt,tn=window.wp.blockEditor,nn=window.wp.data,rn=Ut.div` + display: block; + position: relative; +`,sn=Ut.div` + background: white; + border: 1px solid black; + padding: 1em; +`,on=({allowedTypes:t,className:n,icon:r,imageSize:s,displayControlsInToolbar:o,onReset:i,onUpdate:a,onUpdateURL:l,preview:c,value:u,valueURL:d})=>{const{media:p}=(0,nn.useSelect)((e=>({media:u?e("core").getMedia(u):void 0})),[u]);if(0!==u&&null===p)return(0,e.jsx)(qt.Spinner,{});const f=p?Zt(p,s):d;return f?(0,e.jsxs)(rn,{className:n,children:[c?(0,e.jsx)(c,{src:f}):(0,e.jsxs)(sn,{className:"alley-scripts-media-picker__preview",children:[(0,e.jsx)("p",{children:(0,Wt.__)("Selected file:","alley-scripts")}),(0,e.jsx)("p",{children:(0,e.jsx)("a",{href:f,children:f})})]}),o?(0,e.jsx)(tn.BlockControls,{group:"other",children:(0,e.jsx)(tn.MediaReplaceFlow,{name:(0,Wt.__)("Edit Media","alley-scripts"),mediaId:u,mediaURL:f,allowedTypes:t,onSelect:a,onSelectURL:l,children:(0,e.jsx)(qt.ToolbarButton,{isDestructive:!0,text:(0,Wt.__)("Remove","alley-scripts"),onClick:i})})}):(0,e.jsx)(qt.Button,{variant:"primary",onClick:i,children:(0,Wt.__)("Reset","alley-scripts")})]}):(0,e.jsx)(rn,{className:n,children:(0,e.jsx)(tn.MediaPlaceholder,{allowedTypes:t,disableMediaButtons:!!d,icon:(0,e.jsx)(tn.BlockIcon,{icon:r}),onSelect:a,onSelectURL:l,value:{id:u,src:f}})})};on.defaultProps={allowedTypes:[],className:"",icon:"format-aside",imageSize:"thumbnail",displayControlsInToolbar:!1,onUpdateURL:null,preview:null,valueURL:""},on.propTypes={allowedTypes:s().arrayOf(s().string),className:s().string,icon:s().string,imageSize:s().string,displayControlsInToolbar:s().bool,onReset:s().func.isRequired,onUpdate:s().func.isRequired,onUpdateURL:s().func,preview:s().element,value:s().number.isRequired,valueURL:s().string};const an=on;var ln=n(368),cn=n.n(ln);const un=({className:t,html:n,tag:r})=>(0,e.jsx)(r,{className:t,dangerouslySetInnerHTML:{__html:cn().sanitize(n)}});un.defaultProps={className:""},un.propTypes={className:s().string,html:s().string.isRequired,tag:s().string.isRequired};const dn=un,pn=window.wp.element,fn=window.wp.url,hn=(e,t)=>{const[n,r]=(0,pn.useState)(e);return(0,pn.useEffect)((()=>{const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n},mn=e=>bn(e)>0,gn=e=>{const t=An(e),n=yn(t);return n?n.findIndex((t=>t.clientId===e)):-1},yn=e=>(0,nn.useSelect)((t=>t(tn.store).getBlocks(e)),[e]),_n=e=>yn(e).map((e=>e.attributes)),bn=e=>yn(e).length,vn=e=>(0,nn.useSelect)((t=>t("core").getMedia(e)),[e]),An=e=>(0,nn.useSelect)((t=>{const{getBlock:n,getBlockRootClientId:r}=t(tn.store),s=r(e);return s?n(s):null}),[e]),wn=e=>(0,nn.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:r}=t(tn.store),s=r(e);return s?n(s):null}),[e]),xn=(e,t="post")=>(0,nn.useSelect)((n=>n("core").getEntityRecord("postType",t,e)),[e,t]),Cn=()=>(0,nn.useSelect)((e=>{const t=e("core/editor");return t?t.getCurrentPostId():null}),[]),Sn=window.wp.apiFetch;var kn=n.n(Sn);const En=(e,t=null)=>{const[n,r]=(0,pn.useState)({});return(0,pn.useEffect)((()=>{e&&!n[e]&&(async()=>{if(t){const n=await t(e);n?r((t=>({...t,[e]:n}))):console.error(`Custom function to get post with ID ${e} failed.`)}else{const t=(0,fn.addQueryArgs)("/wp/v2/search",{include:e}),n=await kn()({path:t});r((t=>({...t,[e]:n[0].subtype})))}})()}),[e]),xn(e,n[e]??"")},Rn=window.wp.coreData,Tn=window.lodash,Nn=(e=null,t=null)=>{const n=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[r,s]=(0,Rn.useEntityProp)("postType",n,"meta",t),o="function"==typeof s?s:()=>console.error(`Error attempting to set post meta for post type ${n}. Does it have support for custom-fields?`);return["object"==typeof r?r:{},e=>o((0,Tn.cloneDeep)(e))]},In=(e,t=null,n=null)=>{const[r,s]=Nn(t,n);return[r[e],t=>s({...r,[e]:t})]},On=(e,t="post")=>(0,nn.useSelect)((n=>{const{getEntityRecords:r}=n("core");return r("postType",t,{include:e})}),[e,t]),jn=(e=null,t=null,n="categories")=>{const r=(0,nn.useSelect)((t=>e||t("core/editor").getCurrentPostType()),[]),[s,o]=(0,Rn.useEntityProp)("postType",r,n,t);return[s,e=>o(e)]};var Pn=n(62),Ln=n.n(Pn),Dn=n(36),Un=n.n(Dn),Mn=n(793),Bn=n.n(Mn),Fn=n(892),zn=n.n(Fn),qn=n(173),$n=n.n(qn),Hn=n(464),Wn=n.n(Hn),Gn=n(992),Yn={};Yn.styleTagTransform=Wn(),Yn.setAttributes=zn(),Yn.insert=Bn().bind(null,"head"),Yn.domAPI=Un(),Yn.insertStyleElement=$n(),Ln()(Gn.Z,Yn),Gn.Z&&Gn.Z.locals&&Gn.Z.locals;var Vn=n(779),Zn=n.n(Vn),Kn=n(905),Qn={};Qn.styleTagTransform=Wn(),Qn.setAttributes=zn(),Qn.insert=Bn().bind(null,"head"),Qn.domAPI=Un(),Qn.insertStyleElement=$n(),Ln()(Kn.Z,Qn),Kn.Z&&Kn.Z.locals&&Kn.Z.locals;const Jn=window.wp.htmlEntities,Xn=Ut.div` + align-items: center; + gap: 4px; + overflow-wrap: anywhere; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0.5rem 0.75rem; +`,er=({title:t,postType:n,attachmentID:r})=>{const s=vn(r),o=s?.media_details?.sizes?.thumbnail?.source_url,i=s?.alt_text??"";return(0,e.jsxs)(Xn,{children:[o?(0,e.jsx)("img",{style:{maxWidth:"100%",height:"auto"},loading:"lazy",src:o,alt:i}):null,(0,e.jsx)(dn,{html:(0,Jn.decodeEntities)(t),className:"post-picker-result-title",tag:"strong"}),(0,Wt.sprintf)(" (%s)",n)]})},tr=({baseUrl:t,searchRender:n,selected:r,setSelected:s,suppressPostIds:o=[]})=>{const[i,a]=(0,pn.useState)(!1),[l,c]=(0,pn.useState)([]),[u,d]=(0,pn.useState)(!1),[p,f]=(0,pn.useState)(0),[h,m]=(0,pn.useState)({searchValue:"",page:1}),g=(0,pn.useCallback)((async(e,n=!1)=>{if(e.searchValue&&e.searchValue.length<=2)return;const r=function(){let n=(0,fn.addQueryArgs)(t,{page:e.page,_embed:1,exclude:o.join(",")});return e.searchValue&&e.searchValue.length>2&&(n=(0,fn.addQueryArgs)(n,{search:e.searchValue})),n}();a(!0);const s=await kn()({path:r,parse:!1});f(parseInt(s.headers.get("X-WP-TotalPages"),10));const i=await s.json();let u=i;e.page>1&&(u=[...l,...i]),n||(c(u),a(!1))}),[l,t,o]);return(0,pn.useEffect)((()=>{let e=!1;return u||(d(!0),g(h,e)),()=>{e=!0}}),[g,u,h]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(qt.TextControl,{value:h.searchValue,placeholder:(0,Wt.__)("Search...","alley-scripts"),label:(0,Wt.__)("Search","alley-scripts"),onChange:e=>{const t={...h,searchValue:e,page:1};m(t),g(t)}}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__post-list",children:[l?l.map((t=>(0,e.jsx)(qt.Button,{className:Zn()({"alley-scripts-post-picker__post":!0,"is-selected":t.id===r}),onClick:()=>s(t.id),children:n?n(t):(0,e.jsx)(er,{title:t.title,postType:t.subtype,attachmentID:t?._embedded?.self[0]?.featured_media})},t.id))):null,i?(0,e.jsx)(qt.Spinner,{}):null,p>0&&h.page{const e={...h,page:h.page+1};m(e),g(e)},children:(0,Wt.__)("Load More","alley-scripts")})}):null]})]})},nr=({baseUrl:t,closeModal:n,modalTitle:r,onUpdate:s,searchRender:o,suppressPostIds:i=[]})=>{const[a,l]=(0,pn.useState)();return(0,e.jsxs)(qt.Modal,{isDismissible:!0,title:r,onRequestClose:n,closeButtonLabel:"Close",children:[(0,e.jsx)(tr,{baseUrl:t,selected:a??0,setSelected:l,searchRender:o,suppressPostIds:i}),(0,e.jsxs)("div",{className:"alley-scripts-post-picker__buttons",children:[(0,e.jsx)(qt.Button,{variant:"secondary",onClick:n,children:(0,Wt.__)("Cancel","alley-scripts")}),(0,e.jsx)(qt.Button,{variant:"primary",onClick:()=>{a&&(s(a),n())},disabled:!a,children:(0,Wt.__)("Select","alley-scripts")})]})]})},rr=Ut.div` + display: block; + position: relative; +`,sr=Ut.div` + border: 1px solid #eee; + display: flex; + flex-direction: column; + margin: 5px 0; + padding: 0.5rem 0.75rem; + text-align: center; +`,or=({allowedTypes:t,className:n,getPostType:r,modalTitle:s=(0,Wt.__)("Select Post","alley-scripts"),onReset:o,onUpdate:i,params:a={},previewRender:l,replaceText:c=(0,Wt.__)("Replace","alley-scripts"),resetText:u=(0,Wt.__)("Reset","alley-scripts"),searchEndpoint:d="/wp/v2/search",searchRender:p,selectText:f=(0,Wt.__)("Select","alley-scripts"),suppressPostIds:h=[],title:m="",value:g=0})=>{const[y,b]=(0,pn.useState)(!1),v=(0,fn.addQueryArgs)(d,{type:"post",subtype:t??"any",...a}),_=En(g,r),{featured_media:A,title:{rendered:w=""}={},type:x=""}=_||{},C=()=>{b(!0)};return 0!==g&&null===_?(0,e.jsx)(qt.Spinner,{}):(0,e.jsxs)(rr,{className:n,children:[m?(0,e.jsx)("h4",{children:m}):null,0!==g&&null!==_?(0,e.jsxs)(e.Fragment,{children:[void 0!==l?l(_):(0,e.jsx)(sr,{children:(0,e.jsx)(er,{title:w,postType:x,attachmentID:A})}),(0,e.jsxs)(qt.ButtonGroup,{children:[(0,e.jsx)(qt.Button,{variant:"secondary",onClick:o,style:{margin:"0 4px"},children:u}),(0,e.jsx)(qt.Button,{variant:"secondary",onClick:C,style:{margin:"0 4px"},children:c})]})]}):(0,e.jsx)(qt.Button,{onClick:C,variant:"secondary",children:f}),y?(0,e.jsx)(nr,{closeModal:()=>{b(!1)},baseUrl:v,modalTitle:s,onUpdate:i,searchRender:p,suppressPostIds:h}):null]})},ir=({className:t,emptyLabel:n,label:r,maxPages:s,multiple:o,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(vr,{type:"post",className:t,emptyLabel:n,label:r,maxPages:s,multiple:o,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});ir.defaultProps={className:"",emptyLabel:(0,Wt.__)("No posts found","alley-scripts"),label:(0,Wt.__)("Search for posts","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for posts","alley-scripts"),subTypes:[],selected:[],threshold:3},ir.propTypes={className:s().string,emptyLabel:s().string,label:s().string,maxPages:s().number,multiple:s().bool,onSelect:s().func.isRequired,placeholder:s().string,subTypes:s().arrayOf(s().string),selected:s().arrayOf([s().shape({id:s().number,title:s().string})]),threshold:s().number};const ar=ir,lr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let cr;const ur=new Uint8Array(16);function dr(){if(!cr&&(cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cr(ur)}const pr=[];for(let e=0;e<256;++e)pr.push((e+256).toString(16).slice(1));const fr=function(e,t,n){if(lr.randomUUID&&!t&&!e)return lr.randomUUID();const r=(e=e||{}).random||(e.rng||dr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return pr[e[t+0]]+pr[e[t+1]]+pr[e[t+2]]+pr[e[t+3]]+"-"+pr[e[t+4]]+pr[e[t+5]]+"-"+pr[e[t+6]]+pr[e[t+7]]+"-"+pr[e[t+8]]+pr[e[t+9]]+"-"+pr[e[t+10]]+pr[e[t+11]]+pr[e[t+12]]+pr[e[t+13]]+pr[e[t+14]]+pr[e[t+15]]}(r)},hr=({emptyLabel:t,error:n,id:r,isOpen:s,labelledbyId:o,loading:i,onSelect:a,options:l,selectedItems:c,threshold:u,value:d})=>{if(!i&&(""===d||u>d.length))return null;let p="",f="";return i?(p="loading",f=(0,Wt.__)("Loading...","alley-scripts")):n?(p="error",f=n):i||0!==l.length||(p="no-posts",f=t),i||!i&&(d&&0===l.length||n)?(0,e.jsx)("div",{"aria-busy":!0,className:Zn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":s}),children:(0,e.jsx)("div",{className:Zn()("autocomplete__dropdown--notice",`autocomplete__${p}`),children:f})}):(0,e.jsx)("div",{className:Zn()("autocomplete__dropdown",{"autocomplete__dropdown--is-open":s}),children:(0,e.jsx)("ul",{role:"listbox","aria-labelledby":o,id:r,className:Zn()("autocomplete__dropdown--results","autocomplete__list"),children:l.map((t=>(0,e.jsx)("li",{className:"autocomplete__list--item",children:(0,e.jsx)(qt.Button,{onClick:()=>a(t),type:"button",disabled:c.some((e=>e.id===t.id)),isTertiary:!0,children:t.title})},t.id)))})})};hr.propTypes={emptyLabel:s().string.isRequired,error:s().string.isRequired,id:s().string.isRequired,isOpen:s().bool.isRequired,labelledbyId:s().string.isRequired,loading:s().bool.isRequired,options:s().arrayOf(s().shape({label:s().string,value:s().string})).isRequired,onSelect:s().func.isRequired,selectedItems:s().shape([]).isRequired,threshold:s().number.isRequired,value:s().string.isRequired};const mr=hr;var gr=n(458),yr={};yr.styleTagTransform=Wn(),yr.setAttributes=zn(),yr.insert=Bn().bind(null,"head"),yr.domAPI=Un(),yr.insertStyleElement=$n(),Ln()(gr.Z,yr),gr.Z&&gr.Z.locals&&gr.Z.locals;const br=({type:t,className:n,emptyLabel:r,label:s,maxPages:o,multiple:i,onSelect:a,placeholder:l,subTypes:c,selected:u,threshold:d})=>{const p=fr(),[f,h]=(0,pn.useState)(""),[m,g]=(0,pn.useState)([]),[y,b]=(0,pn.useState)(!1),[v,_]=(0,pn.useState)(!1),[A,w]=(0,pn.useState)(""),[x,C]=(0,pn.useState)([]),S=(0,pn.useRef)(),k=hn(A,750),E=(0,pn.useCallback)((async(e=1)=>{if(k.length0?c.join(","):"any",type:t});await kn()({path:r,parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"),10);return n=t>o?o:t,e.json()})).then((t=>{g((e=>[...e,...t])),_(!1),(n&&n>e||e>=1&&i&&x.length>0)&&E(e+1)})).catch((e=>h(e.message)))}),[k,t,o,i,c,x.length,d]);(0,pn.useEffect)((()=>{C(u)}),[u]),(0,pn.useEffect)((()=>{k&&d<=k.length?E():g([])}),[k,E,d]);const R=e=>{b(S.current.contains(e.target))},T=e=>{"Escape"===e.key&&b(!1)};(0,pn.useEffect)((()=>(document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)))),(0,pn.useEffect)((()=>(S&&document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R))));const N=e=>{let t=[];if(x.some((t=>t.id===e.id))){const n=x.findIndex((t=>t.id===e.id));t=[...x.slice(0,n),...x.slice(n+1,x.length)]}else i?t=[...x,e]:(t=[e],b(!1));C(t),a(t)};return(0,e.jsx)("form",{className:"autocomplete__component",onSubmit:e=>e.preventDefault(),children:(0,e.jsxs)("div",{className:Zn()("components-base-control","autocomplete-base-control",n),ref:S,children:[(0,e.jsxs)("div",{"aria-expanded":y,"aria-haspopup":"listbox","aria-owns":`listbox-${p}`,className:Zn()("components-base-control__field","autocomplete-base-control__field"),role:"combobox",children:[(0,e.jsx)("label",{className:Zn()("components-base-control__label","autocomplete-base-control__label"),htmlFor:`autocomplete-${p}`,children:(0,e.jsx)("div",{children:s})}),x.length>0?(0,e.jsx)("ul",{role:"listbox","aria-labelledby":`autocomplete-${p}`,id:`selected-items-${p}`,className:Zn()("autocomplete__selection--results","autocomplete__selection-list"),children:x.map((t=>(0,e.jsx)("li",{className:"autocomplete__selection-list--item",children:(0,e.jsx)(qt.Button,{className:"autocomplete__selection-list--item--button",isSecondary:!0,isSmall:!0,onClick:()=>N(t),type:"button",children:t.title})},t.title)))}):null,(0,e.jsx)("input",{"aria-autocomplete":"list",autoComplete:"off",className:Zn()("components-text-control__input","autocomplete-text-control__input",{"autocomplete-text-control__input--working":y}),id:`autocomplete-${p}`,onChange:e=>w(e.target.value),onFocus:()=>b(!0),placeholder:l,type:"text",value:A})]}),(0,e.jsx)(mr,{emptyLabel:r,error:f,labelledById:`autocomplete-${p}`,id:`listbox-${p}`,isOpen:y,loading:v&&k,onSelect:N,options:m,selectedItems:x,threshold:d,value:k})]})})};br.defaultProps={type:"post",className:"",emptyLabel:(0,Wt.__)("No items found","alley-scripts"),label:(0,Wt.__)("Search for items","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for items","alley-scripts"),subTypes:[],selected:[],threshold:3},br.propTypes={type:s().string,className:s().string,emptyLabel:s().string,label:s().string,maxPages:s().number,multiple:s().bool,onSelect:s().func.isRequired,placeholder:s().string,subTypes:s().arrayOf(s().string),selected:s().arrayOf([s().shape({id:s().number,title:s().string})]),threshold:s().number};const vr=br,_r=({className:t,emptyLabel:n,label:r,maxPages:s,multiple:o,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u})=>(0,e.jsx)(vr,{type:"term",className:t,emptyLabel:n,label:r,maxPages:s,multiple:o,onSelect:i,placeholder:a,subTypes:l,selected:c,threshold:u});_r.defaultProps={className:"",emptyLabel:(0,Wt.__)("No terms found","alley-scripts"),label:(0,Wt.__)("Search for terms","alley-scripts"),maxPages:5,multiple:!1,placeholder:(0,Wt.__)("Search for terms","alley-scripts"),subTypes:[],selected:[],threshold:3},_r.propTypes={className:s().string,emptyLabel:s().string,label:s().string,maxPages:s().number,multiple:s().bool,onSelect:s().func.isRequired,placeholder:s().string,subTypes:s().arrayOf(s().string),selected:s().arrayOf([s().shape({id:s().number,title:s().string})]),threshold:s().number};const Ar=_r,wr=Ut.div` + height: auto; + width: 100%; +`,xr=({src:t})=>(0,e.jsx)(wr,{children:(0,e.jsx)("video",{className:"edit-video-preview",controls:!0,src:t})});xr.propTypes={src:s().string.isRequired};const Cr=({className:t,onReset:n,onUpdate:r,onUpdateURL:s,value:o,valueURL:i})=>(0,e.jsx)(an,{allowedTypes:["video"],className:t,icon:"format-video",onReset:n,onUpdate:r,onUpdateURL:s,preview:xr,value:o,valueURL:i});Cr.defaultProps={className:"",onUpdateURL:null,valueURL:""},Cr.propTypes={className:s().string,onReset:s().func.isRequired,onUpdate:s().func.isRequired,onUpdateURL:s().func,value:s().number.isRequired,valueURL:s().string};const Sr=Cr})(),r})(),e.exports=t()},251:function(e,t,n){"use strict";var r=n(196),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:s,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},893:function(e,t,n){"use strict";e.exports=n(251)},196:function(e){"use strict";e.exports=window.React}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.plugins,r=window.wp.editPost,s=window.wp.components,o=window.wp.i18n,i=window.wp.data,a=window.wp.apiFetch,l=n.n(a),c=n(373),u=n(196),d=n.n(u),p=n(893);!function(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(".rmsc{--rmsc-main: #4285f4;--rmsc-hover: #f1f3f5;--rmsc-selected: #e2e6ea;--rmsc-border: #ccc;--rmsc-gray: #aaa;--rmsc-bg: #fff;--rmsc-p: 10px;--rmsc-radius: 4px;--rmsc-h: 38px}.rmsc *{box-sizing:border-box;transition:all .2s ease}.rmsc .gray{color:var(--rmsc-gray)}.rmsc .dropdown-content{position:absolute;z-index:1;top:100%;width:100%;padding-top:8px}.rmsc .dropdown-content .panel-content{overflow:hidden;border-radius:var(--rmsc-radius);background:var(--rmsc-bg);box-shadow:0 0 0 1px #0000001a,0 4px 11px #0000001a}.rmsc .dropdown-container{position:relative;outline:0;background-color:var(--rmsc-bg);border:1px solid var(--rmsc-border);border-radius:var(--rmsc-radius)}.rmsc .dropdown-container[aria-disabled=true]:focus-within{box-shadow:var(--rmsc-gray) 0 0 0 1px;border-color:var(--rmsc-gray)}.rmsc .dropdown-container:focus-within{box-shadow:var(--rmsc-main) 0 0 0 1px;border-color:var(--rmsc-main)}.rmsc .dropdown-heading{position:relative;padding:0 var(--rmsc-p);display:flex;align-items:center;width:100%;height:var(--rmsc-h);cursor:default;outline:0}.rmsc .dropdown-heading .dropdown-heading-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.rmsc .clear-selected-button{cursor:pointer;background:none;border:0;padding:0;display:flex}.rmsc .options{max-height:260px;overflow-y:auto;margin:0;padding-left:0}.rmsc .options li{list-style:none;margin:0}.rmsc .select-item{box-sizing:border-box;cursor:pointer;display:block;padding:var(--rmsc-p);outline-offset:-1px;outline-color:var(--rmsc-primary)}.rmsc .select-item:hover{background:var(--rmsc-hover)}.rmsc .select-item.selected{background:var(--rmsc-selected)}.rmsc .no-options{padding:var(--rmsc-p);text-align:center;color:var(--rmsc-gray)}.rmsc .search{width:100%;position:relative;border-bottom:1px solid var(--rmsc-border)}.rmsc .search input{background:none;height:var(--rmsc-h);padding:0 var(--rmsc-p);width:100%;outline:0;border:0;font-size:1em}.rmsc .search input:focus{background:var(--rmsc-hover)}.rmsc .search-clear-button{cursor:pointer;position:absolute;top:0;right:0;bottom:0;background:none;border:0;padding:0 calc(var(--rmsc-p) / 2)}.rmsc .search-clear-button [hidden]{display:none}.rmsc .item-renderer{display:flex;align-items:baseline}.rmsc .item-renderer input{margin:0 5px 0 0}.rmsc .item-renderer.disabled{opacity:.5}.rmsc .spinner{animation:rotate 2s linear infinite}.rmsc .spinner .path{stroke:var(--rmsc-border);stroke-width:4px;stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}\n");var f={allItemsAreSelected:"All items are selected.",clearSearch:"Clear Search",clearSelected:"Clear Selected",noOptions:"No options",search:"Search",selectAll:"Select All",selectAllFiltered:"Select All (Filtered)",selectSomeItems:"Select...",create:"Create"},h={value:[],hasSelectAll:!0,className:"multi-select",debounceDuration:200,options:[]},m=d().createContext({}),g=({props:e,children:t})=>{let[n,r]=(0,u.useState)(e.options);return(0,u.useEffect)((()=>{r(e.options)}),[e.options]),(0,p.jsx)(m.Provider,{value:{t:t=>{var n;return(null==(n=e.overrideStrings)?void 0:n[t])||f[t]},...h,...e,options:n,setOptions:r},children:t})},y=()=>d().useContext(m),b={when:!0,eventTypes:["keydown"]};function v(e,t,n){let r=(0,u.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),s=Object.assign({},b,n),{when:o,eventTypes:i}=s,a=(0,u.useRef)(t),{target:l}=s;(0,u.useEffect)((()=>{a.current=t}));let c=(0,u.useCallback)((e=>{r.some((t=>e.key===t||e.code===t))&&a.current(e)}),[r]);(0,u.useEffect)((()=>{if(o&&typeof window<"u"){let e=l?l.current:window;return i.forEach((t=>{e&&e.addEventListener(t,c)})),()=>{i.forEach((t=>{e&&e.removeEventListener(t,c)}))}}}),[o,i,r,l,t])}var _={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",SPACE:"Space"},A=()=>(0,p.jsxs)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"dropdown-search-clear-icon gray",children:[(0,p.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,p.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),w=({checked:e,option:t,onClick:n,disabled:r})=>(0,p.jsxs)("div",{className:"item-renderer "+(r?"disabled":""),children:[(0,p.jsx)("input",{type:"checkbox",onChange:n,checked:e,tabIndex:-1,disabled:r}),(0,p.jsx)("span",{children:t.label})]}),x=({itemRenderer:e=w,option:t,checked:n,tabIndex:r,disabled:s,onSelectionChanged:o,onClick:i})=>{let a=(0,u.useRef)(),l=()=>{s||o(!n)};return v([_.ENTER,_.SPACE],(e=>{l(),e.preventDefault()}),{target:a}),(0,p.jsx)("label",{className:"select-item "+(n?"selected":""),role:"option","aria-selected":n,tabIndex:r,ref:a,children:(0,p.jsx)(e,{option:t,checked:n,onClick:e=>{l(),i(e)},disabled:s})})},C=({options:e,onClick:t,skipIndex:n})=>{let{disabled:r,value:s,onChange:o,ItemRenderer:i}=y();return(0,p.jsx)(p.Fragment,{children:e.map(((e,a)=>{let l=a+n;return(0,p.jsx)("li",{children:(0,p.jsx)(x,{tabIndex:l,option:e,onSelectionChanged:t=>((e,t)=>{r||o(t?[...s,e]:s.filter((t=>t.value!==e.value)))})(e,t),checked:!!s.find((t=>t.value===e.value)),onClick:e=>t(e,l),itemRenderer:i,disabled:e.disabled||r})},(null==e?void 0:e.key)||a)}))})},S=()=>{let{t:e,onChange:t,options:n,setOptions:r,value:s,filterOptions:o,ItemRenderer:i,disabled:a,disableSearch:l,hasSelectAll:c,ClearIcon:d,debounceDuration:f,isCreatable:h,onCreateOption:m}=y(),g=(0,u.useRef)(),b=(0,u.useRef)(),[w,S]=(0,u.useState)(""),[k,E]=(0,u.useState)(n),[R,T]=(0,u.useState)(""),[N,I]=(0,u.useState)(0),O=(0,u.useCallback)(((e,t)=>{let n;return function(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(null,r)}),t)}})((e=>T(e)),f),[]),j=(0,u.useMemo)((()=>{let e=0;return l||(e+=1),c&&(e+=1),e}),[l,c]),P={label:e(w?"selectAllFiltered":"selectAll"),value:""},L=()=>{var e;T(""),S(""),null==(e=null==b?void 0:b.current)||e.focus()},D=e=>I(e);v([_.ARROW_DOWN,_.ARROW_UP],(e=>{switch(e.code){case _.ARROW_UP:M(-1);break;case _.ARROW_DOWN:M(1);break;default:return}e.stopPropagation(),e.preventDefault()}),{target:g});let U=async()=>{let e={label:w,value:w,__isNew__:!0};m&&(e=await m(w)),r([e,...n]),L(),t([...s,e])},M=e=>{let t=N+e;t=Math.max(0,t),t=Math.min(t,n.length+Math.max(j-1,0)),I(t)};(0,u.useEffect)((()=>{var e,t;null==(t=null==(e=null==g?void 0:g.current)?void 0:e.querySelector(`[tabIndex='${N}']`))||t.focus()}),[N]);let[B,F]=(0,u.useMemo)((()=>{let e=k.filter((e=>!e.disabled));return[e.every((e=>-1!==s.findIndex((t=>t.value===e.value)))),0!==e.length]}),[k,s]);(0,u.useEffect)((()=>{(async()=>o?await o(n,R):function(e,t){return t?e.filter((({label:e,value:n})=>null!=e&&null!=n&&e.toLowerCase().includes(t.toLowerCase()))):e}(n,R))().then(E)}),[R,n]);let z=(0,u.useRef)();v([_.ENTER],U,{target:z});let q=h&&w&&!k.some((e=>(null==e?void 0:e.value)===w));return(0,p.jsxs)("div",{className:"select-panel",role:"listbox",ref:g,children:[!l&&(0,p.jsxs)("div",{className:"search",children:[(0,p.jsx)("input",{placeholder:e("search"),type:"text","aria-describedby":e("search"),onChange:e=>{O(e.target.value),S(e.target.value),I(0)},onFocus:()=>{I(0)},value:w,ref:b,tabIndex:0}),(0,p.jsx)("button",{type:"button",className:"search-clear-button",hidden:!w,onClick:L,"aria-label":e("clearSearch"),children:d||(0,p.jsx)(A,{})})]}),(0,p.jsxs)("ul",{className:"options",children:[c&&F&&(0,p.jsx)(x,{tabIndex:1===j?0:1,checked:B,option:P,onSelectionChanged:e=>{let r=(e=>{let t=k.filter((e=>!e.disabled)).map((e=>e.value));if(e){let e=[...s.map((e=>e.value)),...t];return(o?k:n).filter((t=>e.includes(t.value)))}return s.filter((e=>!t.includes(e.value)))})(e);t(r)},onClick:()=>D(1),itemRenderer:i,disabled:a}),k.length?(0,p.jsx)(C,{skipIndex:j,options:k,onClick:(e,t)=>D(t)}):q?(0,p.jsx)("li",{onClick:U,className:"select-item creatable",tabIndex:1,ref:z,children:`${e("create")} "${w}"`}):(0,p.jsx)("li",{className:"no-options",children:e("noOptions")})]})]})},k=({expanded:e})=>(0,p.jsx)("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"dropdown-heading-dropdown-arrow gray",children:(0,p.jsx)("path",{d:e?"M18 15 12 9 6 15":"M6 9L12 15 18 9"})}),E=()=>{let{t:e,value:t,options:n,valueRenderer:r}=y(),s=0===t.length,o=t.length===n.length,i=r&&r(t,n);return s?(0,p.jsx)("span",{className:"gray",children:i||e("selectSomeItems")}):(0,p.jsx)("span",{children:i||(o?e("allItemsAreSelected"):t.map((e=>e.label)).join(", "))})},R=({size:e=24})=>(0,p.jsx)("span",{style:{width:e,marginRight:"0.2rem"},children:(0,p.jsx)("svg",{width:e,height:e,className:"spinner",viewBox:"0 0 50 50",style:{display:"inline",verticalAlign:"middle"},children:(0,p.jsx)("circle",{cx:"25",cy:"25",r:"20",fill:"none",className:"path"})})}),T=()=>{let{t:e,onMenuToggle:t,ArrowRenderer:n,shouldToggleOnHover:r,isLoading:s,disabled:o,onChange:i,labelledBy:a,value:l,isOpen:c,defaultIsOpen:d,ClearSelectedIcon:f,closeOnChangedValue:h}=y();(0,u.useEffect)((()=>{h&&w(!1)}),[l]);let[m,g]=(0,u.useState)(!0),[b,w]=(0,u.useState)(d),[x,C]=(0,u.useState)(!1),T=n||k,N=(0,u.useRef)();(function(e,t){let n=(0,u.useRef)(!1);(0,u.useEffect)((()=>{n.current?e():n.current=!0}),t)})((()=>{t&&t(b)}),[b]),(0,u.useEffect)((()=>{void 0===d&&"boolean"==typeof c&&(g(!1),w(c))}),[c]),v([_.ENTER,_.ARROW_DOWN,_.SPACE,_.ESCAPE],(e=>{var t;["text","button"].includes(e.target.type)&&[_.SPACE,_.ENTER].includes(e.code)||(m&&(e.code===_.ESCAPE?(w(!1),null==(t=null==N?void 0:N.current)||t.focus()):w(!0)),e.preventDefault())}),{target:N});let I=e=>{m&&r&&w(e)};return(0,p.jsxs)("div",{tabIndex:0,className:"dropdown-container","aria-labelledby":a,"aria-expanded":b,"aria-readonly":!0,"aria-disabled":o,ref:N,onFocus:()=>!x&&C(!0),onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&m&&(C(!1),w(!1))},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),children:[(0,p.jsxs)("div",{className:"dropdown-heading",onClick:()=>{m&&w(!s&&!o&&!b)},children:[(0,p.jsx)("div",{className:"dropdown-heading-value",children:(0,p.jsx)(E,{})}),s&&(0,p.jsx)(R,{}),l.length>0&&null!==f&&(0,p.jsx)("button",{type:"button",className:"clear-selected-button",onClick:e=>{e.stopPropagation(),i([]),m&&w(!1)},disabled:o,"aria-label":e("clearSelected"),children:f||(0,p.jsx)(A,{})}),(0,p.jsx)(T,{expanded:b})]}),b&&(0,p.jsx)("div",{className:"dropdown-content",children:(0,p.jsx)("div",{className:"panel-content",children:(0,p.jsx)(S,{})})})]})},N=e=>(0,p.jsx)(g,{props:e,children:(0,p.jsx)("div",{className:`rmsc ${e.className||"multi-select"}`,children:(0,p.jsx)(T,{})})}),I=window.wp.blocks;const{newsletterBuilder:{fromNames:O=[],templates:j={}}={}}=window,P=O.map((e=>({value:e,label:e})));var L=function(t){let{contentHandler:n,typeHandler:r,imageHandler:i,templateHandler:a,fromNameHandler:c,typeValue:u,templateValue:d,fromNameValue:p}=t;const[f,h]=(0,e.useState)({});(0,e.useEffect)((()=>{Object.keys(f).length>0||l()({path:"/wp-newsletter-builder/v1/email-types"}).then((e=>{h(e)}))}),[f]),(0,e.useEffect)((()=>{p||c(O[0])}),[c,p]);const m=(e,t)=>e.labelt.label?1:0,g=e=>{var t;const n=null!==(t=e[u]?.templates)&&void 0!==t?t:[];if(!n.length)return[];const r=n.map((e=>({value:e,label:j[parseInt(e,10)]})));return r.sort(m),r.unshift({label:(0,o.__)("Select a template","wp-newsletter-builder"),value:""}),r},y=async e=>{if(a(e),!e)return;const t=f[u],{image:r,from_name:s}=t;i(parseInt(r,10)),c(s),l()({path:`/wp/v2/nb_template/${e}?context=edit`}).then((e=>{const{content:t}=e;n(t.raw)}))};return(0,e.useEffect)((()=>{if(!u)return;const e=f[u]?.templates;e&&1===e.length&&y(e[0])}),[u]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(s.SelectControl,{label:(0,o.__)("Select Header Type","wp-newsletter-builder"),value:u,options:(e=>{const t=Object.keys(e).map((t=>({label:e[t].label,value:t})));return t.sort(m),t.unshift({label:(0,o.__)("Select a type","wp-newsletter-builder"),value:""}),t})(f),onChange:r}),g(f).length?(0,e.createElement)(s.SelectControl,{label:(0,o.__)("Select Template","wp-newsletter-builder"),value:d,options:g(f),onChange:y}):null,(0,e.createElement)(s.SelectControl,{label:(0,o.__)("From Name","wp-newsletter-builder"),value:p||f[u]?.from_name,options:P,onChange:c}))},D=function(t){let{postId:n}=t;const r=(0,c.usePost)(n,"nb_newsletter");if(!r)return null;const{meta:{nb_newsletter_subject:o=""}={},link:i=""}=r;return(0,e.createElement)(s.PanelRow,null,i&&o?(0,e.createElement)(s.Button,{variant:"link",href:i,target:"_blank",style:{marginTop:"1rem"}},o):null)},U=function(){const[t,n]=(0,c.usePostMeta)(),{nb_breaking_email_type:a="",nb_breaking_template:u="",nb_breaking_from_name:d="",nb_breaking_subject:p="",nb_breaking_preview:f="",nb_breaking_list:h=[],nb_breaking_header_img:m=0,nb_breaking_should_send:g=!1,nb_breaking_content:y="",nb_newsletter_sent_breaking_post_id:b=[]}=t,{postId:v,postStatus:_,postTitle:A,postExcerpt:w}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");let n=t("excerpt");if(""===n){const e=t("content"),r=e?e.match(/

(.*?)<\/p>/):[];n=r&&r[1]?r[1]:""}return{postId:t("id"),postStatus:t("status"),postTitle:t("title"),postExcerpt:n}}),[]),[x,C]=(0,e.useState)([]),S=""!==p,k=""!==f,E=Array.isArray(h)?h:[h],{newsletterBuilder:{breakingLists:R={}}}=window,T=x.length>0?x.map((e=>({label:e.Name,value:e.ListID}))):[],O=T.filter((e=>E.includes(e.value)));(0,e.useEffect)((()=>{x.length>0||l()({path:"/wp-newsletter-builder/v1/lists"}).then((e=>{C(e)}))}),[x]);const j=""===a||""===u||""===d||""===p&&""===A||""===f&&""===w||0===h.length;return(0,e.createElement)(r.PluginSidebar,{icon:"email-alt2",name:"nb-newsletter",title:(0,o.__)("Newsletter","wp-newsletter-builder")},(0,e.createElement)(s.PanelBody,{initialOpen:!0,title:(0,o.__)("Send Newsletter","wp-newsletter-builder")},(0,e.createElement)(L,{contentHandler:e=>{const t=(0,I.parse)(e),r=t.findIndex((e=>"wp-newsletter-builder/post"===e.name));t[r].attributes.postId=v,n({nb_breaking_content:(0,I.serialize)(t)})},typeHandler:e=>{n({nb_breaking_email_type:e})},imageHandler:e=>{n({nb_breaking_header_img:e})},typeValue:a,templateHandler:e=>{n({nb_breaking_template:e})},fromNameHandler:e=>{n({nb_breaking_from_name:e})},templateValue:u,fromNameValue:d}),(0,e.createElement)(s.TextareaControl,{label:S?(0,o.__)("Subject","wp-newsletter-builder"):(0,o.__)("Subject (linked)","wp-newsletter-builder"),placeholder:(0,o.__)("Enter subject","wp-newsletter-builder"),value:""!==p?p:A,onChange:e=>{n({nb_breaking_subject:e})}}),(0,e.createElement)(s.TextareaControl,{label:k?(0,o.__)("Preview Text","wp-newsletter-builder"):(0,o.__)("Preview Text (linked)","wp-newsletter-builder"),placeholder:(0,o.__)("Enter preview text","wp-newsletter-builder"),value:""!==f?f:w,onChange:e=>{n({nb_breaking_preview:e})}}),Object.keys(R).map((t=>{const r=R[t];return(0,e.createElement)(s.CheckboxControl,{label:r,checked:E.includes(t),onChange:e=>{const r=e?[...E,t]:E.filter((e=>e!==t));n({nb_breaking_list:r})}})})),x.length>0?(0,e.createElement)("label",{htmlFor:"wp-newsletter-builder-list"},(0,o.__)("Email List","wp-newsletter-builder"),(0,e.createElement)(N,{labelledBy:(0,o.__)("List","wp-newsletter-builder"),value:O,options:T,onChange:e=>{const t=e.map((e=>e.value));n({nb_breaking_list:t})},hasSelectAll:!1,overrideStrings:{selectSomeItems:(0,o.__)("Select Email List","wp-newsletter-builder")}})):(0,e.createElement)(s.Spinner,null),(0,e.createElement)("div",{style:{marginTop:"1rem"}},(0,e.createElement)(s.CheckboxControl,{label:"draft"===_||"auto-draft"===_?(0,o.__)("Send Newsletter on Publish","wp-newsletter-builder"):(0,o.__)("Send Newsletter on Update","wp-newsletter-builder"),checked:g&&!j,onChange:e=>{n({nb_breaking_should_send:e})},disabled:j}),a?null:(0,e.createElement)("p",{style:{color:"red"}},(0,o.__)("Header Type is Required","wp-newsletter-builder")),u?null:(0,e.createElement)("p",{style:{color:"red"}},(0,o.__)("Template is Required","wp-newsletter-builder")),d?null:(0,e.createElement)("p",{style:{color:"red"}},(0,o.__)("From Name is Required","wp-newsletter-builder")),p||A?null:(0,e.createElement)("p",{style:{color:"red"}},(0,o.__)("Subject is Required","wp-newsletter-builder")),f||w?null:(0,e.createElement)("p",{style:{color:"red"}},(0,o.__)("Preview Text is Required","wp-newsletter-builder")),0===h.length?(0,e.createElement)("p",{style:{color:"red"}},(0,o.__)("Email List is Required","wp-newsletter-builder")):null)),b?(0,e.createElement)(s.PanelBody,{initialOpen:!1,title:(0,o.__)("Sent Newsletters","wp-newsletter-builder")},b.map((t=>(0,e.createElement)(D,{postId:t,key:t})))):null)};(0,t.registerPlugin)("wp-newsletter-builder-plugin-sidebar",{icon:"shield",render:()=>(0,e.createElement)(U,null)})}()}(); \ No newline at end of file diff --git a/build/wp-newsletter-builder-separator/index.asset.php b/build/wp-newsletter-builder-separator/index.asset.php new file mode 100644 index 00000000..185f825f --- /dev/null +++ b/build/wp-newsletter-builder-separator/index.asset.php @@ -0,0 +1 @@ + array('wp-hooks'), 'version' => '067db236664da0d1c597'); diff --git a/build/wp-newsletter-builder-separator/index.js b/build/wp-newsletter-builder-separator/index.js new file mode 100644 index 00000000..1bba8545 --- /dev/null +++ b/build/wp-newsletter-builder-separator/index.js @@ -0,0 +1 @@ +!function(){"use strict";(0,window.wp.hooks.addFilter)("blocks.registerBlockType","wp-newsletter-builder/separator",(e=>({...e,attributes:{...e.attributes,hasSeparator:{type:"boolean",default:!1},separatorIsWide:{type:"boolean",default:!1}}})))}(); \ No newline at end of file diff --git a/configure.php b/configure.php deleted file mode 100644 index 04b35f85..00000000 --- a/configure.php +++ /dev/null @@ -1,763 +0,0 @@ -#!/usr/bin/env php -] - * : The author name. - * - * [--author_email=] - * : The author email. - * - * phpcs:disable - */ - -namespace Create_WordPress_Plugin\Configure; - -if ( ! defined( 'STDIN' ) ) { - die( 'Not in CLI mode.' ); -} - -if ( 0 === strpos( strtoupper( PHP_OS ), 'WIN' ) ) { - die( 'Not supported in Windows. 🪟' ); -} - -if ( version_compare( PHP_VERSION, '8.0.0', '<' ) ) { - die( 'PHP 8.0.0 or greater is required.' ); -} - -// Parse the command line arguments from $argv. -$args = []; -$previous_key = null; - -foreach ( $argv as $value ) { - if ( str_starts_with( $value, '--' ) ) { - if ( false !== strpos( $value, '=' ) ) { - [ $arg, $value ] = explode( '=', substr( $value, 2 ), 2 ); - - $args[ $arg ] = trim( $value ); - - $previous_key = null; - } else { - $args[ substr( $value, 2 ) ] = true; - - $previous_key = substr( $value, 2 ); - } - } elseif ( ! empty( $previous_key ) ) { - $args[ $previous_key ] = trim( $value ); - } else { - $previous_key = trim( $value ); - } -} - -$terminal_width = (int) exec( 'tput cols' ); - -function write( string $text ): void { - global $terminal_width; - echo wordwrap( $text, $terminal_width - 1 ) . PHP_EOL; -} - -function ask( string $question, string $default = '', bool $allow_empty = true ): string { - while ( true ) { - write( $question . ( $default ? " [{$default}]" : '' ) . ': ' ); - $answer = readline( '> ' ); - - $value = $answer ?: $default; - - if ( ! $allow_empty && empty( $value ) ) { - echo "This value can't be empty." . PHP_EOL; - continue; - } - - return $value; - } -} - -function confirm( string $question, bool $default = false ): bool { - write( "{$question} (yes/no) [" . ( $default ? 'yes' : 'no' ) . ']: ' ); - - $answer = readline( '> ' ); - - if ( ! $answer ) { - return $default; - } - - return in_array( strtolower( trim( $answer ) ), [ 'y', 'yes', 'true', '1' ], true ); -} - -function run( string $command, string $dir = null ): string { - $command = $dir ? "cd {$dir} && {$command}" : $command; - - return trim( (string) shell_exec( $command ) ); -} - -function str_after( string $subject, string $search ): string { - $pos = strrpos( $subject, $search ); - - if ( $pos === false ) { - return $subject; - } - - return substr( $subject, $pos + strlen( $search ) ); -} - -function slugify( string $subject ): string { - return strtolower( trim( (string) preg_replace( '/[^A-Za-z0-9-]+/', '-', $subject ), '-' ) ); -} - -function title_case( string $subject ): string { - return ensure_capitalp( str_replace( ' ', '_', ucwords( str_replace( [ '-', '_' ], ' ', $subject ) ) ) ); -} - -function ensure_capitalp( string $text ): string { - return str_replace( 'Wordpress', 'WordPress', $text ); -} - -/** - * @param string $file - * @param array $replacements - */ -function replace_in_file( string $file, array $replacements ): void { - $contents = file_get_contents( $file ); - - if ( empty( $contents ) ) { - return; - } - - file_put_contents( - $file, - str_replace( - array_keys( $replacements ), - array_values( $replacements ), - $contents, - ) - ); -} - -function remove_readme_paragraphs( string $file ): void { - $contents = file_get_contents( $file ); - - if ( empty( $contents ) ) { - return; - } - - file_put_contents( - $file, - trim( (string) preg_replace( '/.*/s', '', $contents ) ?: $contents ), - ); -} - -function remove_composer_require(): void { - global $plugin_file; - - $contents = file_get_contents( $plugin_file ); - - if ( empty( $contents ) ) { - return; - } - - file_put_contents( - $plugin_file, - trim( (string) preg_replace( '/\n\/\* Start Composer Loader \*\/.*\/\* End Composer Loader \*\/\n/s', '', $contents ) ?: $contents ) . PHP_EOL, - ); - - echo "Removed Composer's vendor/autoload.php from {$plugin_file}" . PHP_EOL; -} - -function remove_composer_wrapper_comments(): void { - global $plugin_file; - - $contents = file_get_contents( $plugin_file ); - - if ( empty( $contents ) ) { - return; - } - - file_put_contents( - $plugin_file, - trim( preg_replace( '/\n\/\* (Start|End) Composer Loader \*\/\n/', '', $contents ) ?: $contents ) . PHP_EOL, - ); - - echo "Removed Composer's wrapper comments from {$plugin_file}" . PHP_EOL; -} - -function remove_composer_files(): void { - $file_list = [ - 'composer.json', - 'composer.lock', - 'vendor/', - ]; - - delete_files( $file_list ); - - write( sprintf( 'Removed %s files.', implode( ', ', $file_list ) ) ); -} - -function remove_project_files(): void { - $file_list = [ - '.buddy', - 'buddy.yml', - 'CHANGELOG.md', - '.deployignore', - '.editorconfig', - '.gitignore', - '.gitattributes', - '.github', - 'LICENSE', - ]; - - delete_files( $file_list ); - - write( sprintf( 'Removed %s files.', implode( ', ', $file_list ) ) ); -} - -function rollup_phpcs_to_parent( string $parent_file, string $local_file, string $plugin_name, string $plugin_domain ): void { - $config = ' - - PHP_CodeSniffer standard for ' . $plugin_name . ' - - - - - - - - - - - - - - - - - - -'; - - if ( file_put_contents( $local_file, $config ) ) { - delete_files( '.phpcs' ); - - echo "Updated {$local_file}.\n"; - } -} - -function remove_assets_readme( bool $keep_contents, string $file = 'README.md' ): void { - $contents = file_get_contents( $file ); - - if ( empty( $contents ) ) { - return; - } - - if ( $keep_contents ) { - $contents = str_replace( '', '', $contents ); - $contents = str_replace( '', '', $contents ); - - file_put_contents( $file, $contents ); - } else { - file_put_contents( - $file, - trim( (string) preg_replace( '/.*/s', '', $contents ) ?: $contents ), - ); - } -} - -function remove_assets_require(): void { - global $plugin_file; - - $contents = file_get_contents( $plugin_file ); - - if ( empty( $contents ) ) { - return; - } - - file_put_contents( - $plugin_file, - trim( (string) preg_replace( '/require_once __DIR__ \. \'\/src\/assets.php\';\\n/s', '', $contents ) ?: $contents ) . PHP_EOL, - ); -} - -function remove_assets_buddy( string $file = 'buddy.yml' ): void { - $contents = file_get_contents( $file ); - - if ( empty( $contents ) ) { - return; - } - - $contents = trim( preg_replace( '/(- action: "npm audit".*)variables:/s', 'variables:', $contents ) ?: $contents ); - $contents = str_replace( ' variables:', ' variables:', $contents ); - - file_put_contents( $file, $contents ); -} - -function determine_separator( string $path ): string { - return str_replace( '/', DIRECTORY_SEPARATOR, $path ); -} - -/** - * @return array - */ -function list_all_files_for_replacement(): array { - return explode( PHP_EOL, run( 'grep -R -l . --exclude LICENSE --exclude configure.php --exclude .phpunit.result.cache --exclude-dir .phpcs --exclude composer.lock --exclude-dir .git --exclude-dir .github --exclude-dir vendor --exclude-dir node_modules --exclude-dir modules --exclude-dir .phpcs' ) ); -} - -/** - * @param string|array $paths - */ -function delete_files( string|array $paths ): void { - if ( ! is_array( $paths ) ) { - $paths = [ $paths ]; - } - - foreach ( $paths as $path ) { - $path = determine_separator( $path ); - - if ( is_dir( $path ) ) { - run( "rm -rf {$path}" ); - } elseif ( file_exists( $path ) ) { - @unlink( $path ); - } - } -} - -function remove_phpstan(): void { - delete_files( 'phpstan.neon' ); - - // Manually patch the Composer.json file. - if ( file_exists( 'composer.json' ) ) { - $composer_json = (array) json_decode( (string) file_get_contents( 'composer.json' ), true ); - - if ( isset( $composer_json['scripts']['phpstan'] ) ) { // @phpstan-ignore-line - unset( $composer_json['scripts']['phpstan'] ); // @phpstan-ignore-line - - $composer_json['scripts']['test'] = [ // @phpstan-ignore-line - '@phpcs', - '@phpunit', - ]; - - file_put_contents( 'composer.json', json_encode( $composer_json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) ); - } - } -} - -function contributing_message( string $message ): void { - write( "\n{$message}\n" ); - echo "\t\e]8;;https://github.com/alleyinteractive/.github/blob/main/CONTRIBUTING.md#best-practices\e\\CONTRIBUTING.md\e]8;;\e\\\n\n"; -} - -echo "\nWelcome friend to alleyinteractive/create-wordpress-plugin! 😀\nLet's setup your WordPress Plugin 🚀\n\n"; - -// Always delete the 'merge-develop-to-scaffold.yml' file (this is never used in a scaffolded plugins). -delete_files( '.github/workflows/merge-develop-to-scaffold.yml' ); - -$current_dir = getcwd(); - -if ( ! $current_dir ) { - echo "Could not determine current directory.\n"; - exit( 1 ); -} - -$folder_name = ensure_capitalp( basename( $current_dir ) ); - -$author_email = ask( - question: 'Author email?', - default: (string) ( $args['author_email'] ?? run( 'git config user.email' ) ), - allow_empty: false, -); - -$username_guess = explode( ':', run( 'git config remote.origin.url' ) )[1] ?? ''; -$username_guess = dirname( $username_guess ); -$username_guess = basename( $username_guess ); -$author_username = ask( - question: 'Author username?', - default: $username_guess, - allow_empty: false, -); - -$author_name = ask( - question: 'Author name?', - default: (string) ( $args['author_name'] ?? run( 'git config user.name' ) ), - allow_empty: false, -); - -$vendor_name = ask( - question: 'Vendor name (usually the Github Organization)?', - default: $username_guess, - allow_empty: false, -); - -$vendor_slug = slugify( $vendor_name ); -$is_alley_plugin = 'alleyinteractive' === $vendor_slug; - -$plugin_name = ask( - question: 'Plugin name?', - default: (string) ( $args['plugin_name'] ?? str_replace( '_', ' ', title_case( $folder_name ) ) ), - allow_empty: false, -); - -while ( true ) { - $plugin_name_slug = slugify( ask( - question: 'Plugin slug?', - default: slugify( $plugin_name ), - allow_empty: false, - ) ); - - // Suggest a different plugin name if this is an Alley plugin. - if ( $is_alley_plugin && 0 !== strpos( $plugin_name_slug, 'wp-' ) ) { - $example_slug = "wp-{$plugin_name_slug}"; - - contributing_message( "Alley WordPress plugin slugs should be prefixed with \"wp-\". For example, {$example_slug} would be a great slug. If this plugin isn't meant to be published anywhere, this is fine to ignore. See our CONTRIBUTING.md for more details." ); - - if ( ! confirm( 'Do you wish to continue anyway?', false ) ) { - continue; - } - } - - break; -} - -while ( true ) { - $namespace = ask( - question: 'Plugin namespace?', - default: $is_alley_plugin ? 'Alley\\WP\\' . title_case( $plugin_name ) : title_case( $plugin_name ), - allow_empty: false, - ); - - // Check if the namespace is valid. - if ( ! preg_match( '/^[a-zA-Z0-9_\\\\]+$/', $namespace ) ) { - echo "Invalid namespace, please try again.\n"; - continue; - } - - // Offer to fix the namespace if this is an Alley plugin. - if ( $is_alley_plugin && 0 !== strpos( $namespace, 'Alley\\WP\\' ) ) { - $example_namespace = 'Alley\\WP\\' . title_case( $plugin_name ); - contributing_message( "Alley WordPress plugins should be prefixed with \"Alley\\WP\\\". A namespace such as \"{$example_namespace}\" would work well. If this plugin isn't meant to be published anywhere, this is fine to ignore. See our CONTRIBUTING.md for more details." ); - - if ( confirm( 'Do you wish to continue anyway?', false ) ) { - break; - } - } - - break; -} - -$class_name = ask( 'Base class name for plugin?', title_case( $plugin_name ) ); -$description = ask( 'Plugin description?', "This is my plugin {$plugin_name}" ); - -while ( true ) { - $plugin_file = ask( 'Main plugin file?', "{$plugin_name_slug}.php" ); - - // Validate that plugin file is a valid file name. - if ( ! preg_match( '/^[a-zA-Z0-9-_\.]+\.php$/', $plugin_file ) ) { - echo "Invalid plugin file name. Please try again.\n"; - continue; - } - - // Validate that plugin file does not already exist. - if ( file_exists( $plugin_file ) ) { - echo "Plugin file already exists. Please try again.\n"; - continue; - } - - break; -} - -write( '------' ); -write( "Plugin : {$plugin_name} <{$plugin_name_slug}>" ); -write( "Author : {$author_name} ({$author_email})" ); -write( "Vendor : {$vendor_name} ({$vendor_slug})" ); -write( "Description : {$description}" ); -write( "Namespace : {$namespace}" ); -write( "Main File : {$plugin_file}" ); -write( "Main Class : {$class_name}" ); -write( '------' ); - -write( 'This script will replace the above values in all relevant files in the project directory.' ); - -if ( ! confirm( 'Modify files?', true ) ) { - exit( 1 ); -} - -$search_and_replace = [ - 'author_name' => $author_name, - 'author_username' => $author_username, - 'email@domain.com' => $author_email, - - 'A skeleton WordPress plugin' => $description, - - // Escape the namespace used in composer.json. - '"Create_WordPress_Plugin\\"' => (string) json_encode( $namespace ), - '"Create_WordPress_Plugin\\Tests\\"' => (string) json_encode( $namespace . '\\Tests' ), - - 'Create_WordPress_Plugin' => $namespace, - 'Example_Plugin' => $class_name, - - 'create_wordpress_plugin' => str_replace( '-', '_', $plugin_name_slug ), - 'plugin_name' => $plugin_name, - - 'create-wordpress-plugin' => $plugin_name_slug, - 'Create WordPress Plugin' => $plugin_name, - - 'CREATE_WORDPRESS_PLUGIN' => strtoupper( str_replace( '-', '_', $plugin_name_slug ) ), - 'Skeleton' => $class_name, - 'vendor_name' => $vendor_name, - 'alleyinteractive' => $vendor_slug, - 'plugin.php' => $plugin_file, -]; - -// Patch the Composer.json namespace first before search and replace. -run( - 'composer config extra.wordpress-autoloader.autoload --json \'' . json_encode( [ - $namespace => 'src', - ] ) . '\'', -); - -run( - 'composer config extra.wordpress-autoloader.autoload-dev --json \'' . json_encode( [ - $namespace . '\\Tests' => 'tests', - ] ) . '\'', -); - -foreach ( list_all_files_for_replacement() as $path ) { - echo "Updating $path...\n"; - - replace_in_file( $path, $search_and_replace ); - - if ( str_contains( $path, determine_separator( 'src/class-example-plugin.php' ) ) ) { - rename( $path, determine_separator( './src/class-' . str_replace( '_', '-', strtolower( $class_name ) ) . '.php' ) ); - } - - if ( str_contains( $path, 'README.md' ) ) { - remove_readme_paragraphs( $path ); - } -} - -// Attempt to rename the main plugin file. -if ( 'plugin.php' !== $plugin_file ) { - rename( 'plugin.php', $plugin_file ); - - replace_in_file( './.github/workflows/upgrade-wordpress-plugin.yml', $search_and_replace ); - - echo "Renamed plugin.php to {$plugin_file}\n"; -} - -echo "Done!\n\n"; - -$needs_built_assets = false; -$uses_composer = false; - -if ( confirm( 'Will this plugin be compiling front-end assets (Node)?', true ) ) { - $needs_built_assets = true; - - if ( confirm( 'Do you want to run `npm install` and `npm run build`?', true ) ) { - echo run( 'npm install && npm run build' ); - echo "\n\n\n"; - } - - remove_assets_readme( true ); -} elseif ( confirm( 'Do you want to delete the front-end files? (Such as package.json, etc.)', true ) ) { - echo "Deleting...\n"; - - delete_files( - [ - '.github/workflows/node-tests.yml', - '.eslintignore', - '.eslintrc.json', - '.nvmrc', - '.stylelintrc.json', - 'babel.config.js', - 'jest.config.js', - 'jsconfig.json', - 'package.json', - 'package-lock.json', - 'tsconfig.json', - 'entries/', - 'blocks/', - 'build/', - 'bin/', - 'node_modules/', - 'scaffold', - 'src/assets.php', - ] - ); - - remove_assets_readme( false ); - remove_assets_require(); - remove_assets_buddy(); -} - -if ( confirm( 'Will this plugin be using Composer? (WordPress Composer Autoloader already included! phpcs and phpunit also rely on Composer being installed for testing.)', true ) ) { - $uses_composer = true; - $needs_built_assets = true; - - remove_composer_wrapper_comments(); - - if ( confirm( 'Do you want to run `composer install`?', true ) ) { - if ( file_exists( __DIR__ . '/composer.lock' ) ) { - echo run( 'composer update' ); - } else { - echo run( 'composer install' ); - } - - echo "\n\n"; - } -} elseif ( confirm( 'Do you want to remove the vendor/autoload.php dependency from your main plugin file and the composer.json file?' ) ) { - remove_composer_require(); - - // Prompt the user to delete the composer.json file. Plugins often still - // keep this around for development and Packagist. - if ( confirm( 'Do you want to delete the composer.json and composer.lock files? (This will prevent you from using PHPCS/PHPStan/Composer entirely).', false ) ) { - remove_composer_files(); - } -} - -if ( file_exists( 'composer.json') && ! confirm(' Using PHPStan? (PHPStan is a great static analyzer to help find bugs in your code.)', true) ) { - remove_phpstan(); -} - -$standalone = true; - -// Check if the plugin will be use standalone (as a single repository) or as a -// part of larger project (such as a wp-content-rooted project). Assumes that -// the parent project is located at /wp-content/ and this plugin is located at -// /wp-content/plugins/:plugin/. -if ( - file_exists( '../../.git/index' ) - && ! confirm( - 'Will this be a standalone plugin, not located within a larger project? For example, a standalone plugin will have a separate repository and will be distributed independently.', - false, - ) -) { - $standalone = false; - - $needs_built_assets = false; - - if ( confirm( 'Do you want to remove project-based files, such as GitHub actions? (If this is a standalone plugin, these are probably in the root directory.)', true ) ) { - remove_project_files(); - } - - // Offer to roll up this plugin's dependencies to the parent project's composer. - if ( $uses_composer && file_exists( '../../composer.json' ) ) { - $parent_composer = (string) realpath( '../../composer.json' ); - $parent_folder = dirname( $parent_composer ); - - if ( confirm( "Do you want to rollup the plugin's Composer dependencies to the parent project's composer.json file ({$parent_composer})? This will copy this plugin's dependencies to the parent project and delete the local composer.json file.", true ) ) { - $composer = (array) json_decode( (string) file_get_contents( $parent_composer ), true ); - $plugin_composer = (array) json_decode( (string) file_get_contents( 'composer.json' ), true ); - - $original = $composer; - - $composer['require'] = array_merge( - (array) ( $composer['require'] ?? [] ), - (array) ( $plugin_composer['require'] ?? [] ), - ); - - $composer['require-dev'] = array_merge( - (array) ( $composer['require-dev'] ?? [] ), - (array) ( $plugin_composer['require-dev'] ?? [] ), - ); - - $composer['config']['allow-plugins']['alleyinteractive/composer-wordpress-autoloader'] = true; - - ksort( $composer['require'] ); - ksort( $composer['require-dev'] ); - ksort( $composer['config']['allow-plugins'] ); - - if ( $composer !== $original ) { - file_put_contents( $parent_composer, json_encode( $composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) ); - echo "Updated {$parent_composer} with the plugin's composer dependencies.\n"; - - remove_composer_require(); - remove_composer_files(); - - echo "\n\n"; - - if ( confirm( "Do you want to run `composer update` in {$parent_folder}?", true ) ) { - echo run( 'composer update', $parent_folder ); - echo "\n\n"; - } - } - - $parent_files = [ - $parent_folder . '/phpcs.xml', - $parent_folder . '/phpcs.xml.dist', - $parent_folder . '/.phpcs.xml', - ]; - - if ( file_exists( __DIR__ . '/.phpcs.xml' ) ) { - foreach ( $parent_files as $parent_file ) { - if ( ! file_exists( $parent_file ) ) { - continue; - } - - if ( confirm( "Do you want to roll up the phpcs configuration to the parent? (This will change the plugin's phpcs configuration to inherit the parent configuration from {$parent_file}.)" ) ) { - rollup_phpcs_to_parent( - parent_file: '../../' . basename( $parent_file ), - local_file: __DIR__ . '/.phpcs.xml', - plugin_name: $plugin_name, - plugin_domain: $plugin_name_slug, - ); - - break; - } - } - } - } - } - - if ( confirm( 'Do you want to remove the git repository for the plugin?', true ) ) { - delete_files( '.git' ); - } -} - -// Offer to delete the built asset workflows if built assets aren't needed. -if ( ! $needs_built_assets && file_exists( '.github/workflows/built-release.yml' ) && confirm( 'Delete the Github actions for built assets?', true ) ) { - delete_files( - [ - '.github/workflows/built-branch.yml', - '.github/workflows/built-release.yml', - ] - ); -} - -if ( - $standalone && file_exists( __DIR__ . '/buddy.yml' ) && ! confirm( 'Do you need the Buddy CI configuration? (Alley devs only -- if the plugin is open-source it will not be needed)', false ) -) { - delete_files( [ '.buddy', 'buddy.yml' ] ); -} - -if ( confirm( 'Let this script delete itself?', true ) ) { - delete_files( - [ - 'Makefile', - __FILE__, - ] - ); -} - -echo "\n\nWe're done! 🎉\n\n"; - -// Offer some information about built releases if the workflow still exists. -if ( file_exists( '.github/workflows/built-release.yml' ) ) { - echo <<=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^2.2.1" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz", + "integrity": "sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "peer": true, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@csstools/media-query-list-parser": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz", + "integrity": "sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "peer": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^2.3.2", + "@csstools/css-tokenizer": "^2.2.1" + } + }, "node_modules/@csstools/selector-specificity": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", @@ -7712,6 +7776,66 @@ "npm": ">=6" } }, + "node_modules/babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "dev": true, + "peer": true, + "dependencies": { + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.3.3", "license": "MIT", @@ -10809,6 +10933,20 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "dev": true, + "peer": true, + "dependencies": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/find-cache-dir": { "version": "3.3.2", "license": "MIT", @@ -13228,6 +13366,12 @@ "node": ">= 8" } }, + "node_modules/known-css-properties": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", + "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==", + "peer": true + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "license": "CC0-1.0" @@ -16008,6 +16152,13 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "dev": true, + "peer": true + }, "node_modules/resolve": { "version": "1.22.1", "license": "MIT", @@ -17184,6 +17335,82 @@ "postcss": "^8.2.15" } }, + "node_modules/stylelint": { + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.11.0.tgz", + "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==", + "peer": true, + "dependencies": { + "@csstools/css-parser-algorithms": "^2.3.1", + "@csstools/css-tokenizer": "^2.2.0", + "@csstools/media-query-list-parser": "^2.1.4", + "@csstools/selector-specificity": "^3.0.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^8.2.0", + "css-functions-list": "^3.2.1", + "css-tree": "^2.3.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.1", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^7.0.0", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^5.2.4", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.29.0", + "mathml-tag-names": "^2.1.3", + "meow": "^10.1.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.28", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.0.13", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "style-search": "^0.1.0", + "supports-hyperlinks": "^3.0.0", + "svg-tags": "^1.0.0", + "table": "^6.8.1", + "write-file-atomic": "^5.0.1" + }, + "bin": { + "stylelint": "bin/stylelint.mjs" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + } + }, + "node_modules/stylelint-config-sass-guidelines": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-10.0.0.tgz", + "integrity": "sha512-+Rr2Dd4b72CWA4qoj1Kk+y449nP/WJsrD0nzQAWkmPPIuyVcy2GMIcfNr0Z8JJOLjRvtlkKxa49FCNXMePBikQ==", + "dev": true, + "peer": true, + "dependencies": { + "postcss-scss": "^4.0.6", + "stylelint-scss": "^4.4.0" + }, + "engines": { + "node": "^14.13.1 || >=16.13.0 || >=18.0.0" + }, + "peerDependencies": { + "postcss": "^8.4.21", + "stylelint": "^15.2.0" + } + }, "node_modules/stylelint-scss": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.6.0.tgz", @@ -17199,105 +17426,528 @@ "stylelint": "^14.5.1 || ^15.0.0" } }, - "node_modules/stylis": { - "version": "4.1.3", - "license": "MIT" + "node_modules/stylelint/node_modules/@csstools/selector-specificity": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz", + "integrity": "sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "peer": true, + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.13" + } }, - "node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", + "node_modules/stylelint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true + }, + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "peer": true + }, + "node_modules/stylelint/node_modules/camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "peer": true, "dependencies": { - "has-flag": "^4.0.0" + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", + "node_modules/stylelint/node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "peer": true, + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/svg-parser": { - "version": "2.0.4", - "license": "MIT" - }, - "node_modules/svg-tags": { - "version": "1.0.0" - }, - "node_modules/svgo": { - "version": "2.8.0", - "license": "MIT", + "node_modules/stylelint/node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "peer": true, "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^4.1.3", - "css-tree": "^1.1.3", - "csso": "^4.2.0", - "picocolors": "^1.0.0", - "stable": "^0.1.8" - }, - "bin": { - "svgo": "bin/svgo" + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" }, "engines": { - "node": ">=10.13.0" + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, - "node_modules/svgo/node_modules/commander": { - "version": "7.2.0", - "license": "MIT", + "node_modules/stylelint/node_modules/decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "peer": true, "engines": { - "node": ">= 10" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" - }, - "node_modules/table": { - "version": "6.8.1", - "license": "BSD-3-Clause", + "node_modules/stylelint/node_modules/file-entry-cache": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.1.tgz", + "integrity": "sha512-uLfFktPmRetVCbHe5UPuekWrQ6hENufnA46qEGbfACkK5drjTTdQYUragRgMjHldcbYG+nslUerqMPjbBSHXjQ==", + "peer": true, "dependencies": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" + "flat-cache": "^3.1.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } }, - "node_modules/table/node_modules/ajv": { - "version": "8.11.2", - "license": "MIT", + "node_modules/stylelint/node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "peer": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "global-prefix": "^3.0.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">=6" } }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/tannin": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "@tannin/plural-forms": "^1.1.0" + "node_modules/stylelint/node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "peer": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stylelint/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "peer": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/stylelint/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stylelint/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stylelint/node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "peer": true + }, + "node_modules/stylelint/node_modules/meow": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", + "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", + "peer": true, + "dependencies": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "peer": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stylelint/node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "peer": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "peer": true, + "dependencies": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "peer": true, + "dependencies": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stylelint/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/stylelint/node_modules/strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "peer": true, + "dependencies": { + "min-indent": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/trim-newlines": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz", + "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stylelint/node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "peer": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/stylelint/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "peer": true + }, + "node_modules/stylelint/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/stylis": { + "version": "4.1.3", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", + "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-parser": { + "version": "2.0.4", + "license": "MIT" + }, + "node_modules/svg-tags": { + "version": "1.0.0" + }, + "node_modules/svgo": { + "version": "2.8.0", + "license": "MIT", + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.3", + "csso": "^4.2.0", + "picocolors": "^1.0.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + }, + "node_modules/table": { + "version": "6.8.1", + "license": "BSD-3-Clause", + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.11.2", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/tannin": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "@tannin/plural-forms": "^1.1.0" } }, "node_modules/tapable": { @@ -19272,7 +19922,8 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/@alleyinteractive/stylelint-config/-/stylelint-config-0.0.2.tgz", "integrity": "sha512-LQVsV6etd4kD70QIcSbKtyUmHPMwDS/HTtAkwlo7oQC7ygalvFgLE/mxkQ2RUqbK48yMMTbgFLOvVl3EzhuKzw==", - "dev": true + "dev": true, + "requires": {} }, "@alleyinteractive/tsconfig": { "version": "0.1.0", @@ -19741,7 +20392,8 @@ "@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", - "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==" + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "requires": {} }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -20602,10 +21254,31 @@ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, + "@csstools/css-parser-algorithms": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.3.2.tgz", + "integrity": "sha512-sLYGdAdEY2x7TSw9FtmdaTrh2wFtRJO5VMbBrA8tEqEod7GEggFmxTSK9XqExib3yMuYNcvcTdCZIP6ukdjAIA==", + "peer": true, + "requires": {} + }, + "@csstools/css-tokenizer": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.1.tgz", + "integrity": "sha512-Zmsf2f/CaEPWEVgw29odOj+WEVoiJy9s9NOv5GgNY9mZ1CZ7394By6wONrONrTsnNDv6F9hR02nvFihrGVGHBg==", + "peer": true + }, + "@csstools/media-query-list-parser": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.5.tgz", + "integrity": "sha512-IxVBdYzR8pYe89JiyXQuYk4aVVoCPhMJkz6ElRwlVysjwURTsTk/bmY/z4FfeRE+CRBMlykPwXEVUg8lThv7AQ==", + "peer": true, + "requires": {} + }, "@csstools/selector-specificity": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", - "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==" + "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", + "requires": {} }, "@discoveryjs/json-ext": { "version": "0.5.7" @@ -20704,7 +21377,8 @@ "version": "0.8.0" }, "@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.0.0" + "version": "1.0.0", + "requires": {} }, "@emotion/utils": { "version": "1.2.0" @@ -21357,28 +22031,36 @@ } }, "@svgr/babel-plugin-add-jsx-attribute": { - "version": "6.5.1" + "version": "6.5.1", + "requires": {} }, "@svgr/babel-plugin-remove-jsx-attribute": { - "version": "6.5.0" + "version": "6.5.0", + "requires": {} }, "@svgr/babel-plugin-remove-jsx-empty-expression": { - "version": "6.5.0" + "version": "6.5.0", + "requires": {} }, "@svgr/babel-plugin-replace-jsx-attribute-value": { - "version": "6.5.1" + "version": "6.5.1", + "requires": {} }, "@svgr/babel-plugin-svg-dynamic-title": { - "version": "6.5.1" + "version": "6.5.1", + "requires": {} }, "@svgr/babel-plugin-svg-em-dimensions": { - "version": "6.5.1" + "version": "6.5.1", + "requires": {} }, "@svgr/babel-plugin-transform-react-native-svg": { - "version": "6.5.1" + "version": "6.5.1", + "requires": {} }, "@svgr/babel-plugin-transform-svg-component": { - "version": "6.5.1" + "version": "6.5.1", + "requires": {} }, "@svgr/babel-preset": { "version": "6.5.1", @@ -22339,19 +23021,22 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/info": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/serve": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true + "dev": true, + "requires": {} }, "@wordpress/a11y": { "version": "3.30.0", @@ -22405,7 +23090,8 @@ "@wordpress/babel-plugin-import-jsx-pragma": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-4.13.0.tgz", - "integrity": "sha512-IK8s2xbxLwWSD4COQICbTgbFziKc9Ed8fpWuxtQl3n+2xpyFIfWHvDEt5nGbotj96OEcxQ16h+aTqIcdon/fwQ==" + "integrity": "sha512-IK8s2xbxLwWSD4COQICbTgbFziKc9Ed8fpWuxtQl3n+2xpyFIfWHvDEt5nGbotj96OEcxQ16h+aTqIcdon/fwQ==", + "requires": {} }, "@wordpress/babel-preset-default": { "version": "7.14.0", @@ -23299,7 +23985,8 @@ "@wordpress/npm-package-json-lint-config": { "version": "4.15.0", "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.15.0.tgz", - "integrity": "sha512-lqCiOw4kdBLiHuhZ0AKpUAL0bZUmMu+go4BjM/s5IKocm/PIFUSM21CuaBaOla3IHaU8d0mzv0ZoRg8WpLAdjA==" + "integrity": "sha512-lqCiOw4kdBLiHuhZ0AKpUAL0bZUmMu+go4BjM/s5IKocm/PIFUSM21CuaBaOla3IHaU8d0mzv0ZoRg8WpLAdjA==", + "requires": {} }, "@wordpress/nux": { "version": "6.0.0", @@ -23389,7 +24076,8 @@ "@wordpress/prettier-config": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-2.13.0.tgz", - "integrity": "sha512-+/CiiWR2QKBkJcshyA6qTpCIo56U8cN9817Yb61dbd5WprDAGf5vFG0i2qsjovER+9r3DHi5iqtjv2qr752NRw==" + "integrity": "sha512-+/CiiWR2QKBkJcshyA6qTpCIo56U8cN9817Yb61dbd5WprDAGf5vFG0i2qsjovER+9r3DHi5iqtjv2qr752NRw==", + "requires": {} }, "@wordpress/primitives": { "version": "3.28.0", @@ -23528,7 +24216,8 @@ }, "dependencies": { "@webpack-cli/configtest": { - "version": "1.2.0" + "version": "1.2.0", + "requires": {} }, "@webpack-cli/info": { "version": "1.5.0", @@ -23537,7 +24226,8 @@ } }, "@webpack-cli/serve": { - "version": "1.7.0" + "version": "1.7.0", + "requires": {} }, "@wordpress/stylelint-config": { "version": "21.13.0", @@ -23814,7 +24504,8 @@ "stylelint-config-recommended": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz", - "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==" + "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==", + "requires": {} }, "stylelint-config-recommended-scss": { "version": "5.0.2", @@ -24031,7 +24722,8 @@ "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==" + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "requires": {} }, "acorn-walk": { "version": "8.2.0" @@ -24057,7 +24749,8 @@ "ajv-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==" + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "requires": {} }, "ajv-formats": { "version": "2.1.1", @@ -24080,7 +24773,8 @@ } }, "ajv-keywords": { - "version": "3.5.2" + "version": "3.5.2", + "requires": {} }, "ansi-escapes": { "version": "4.3.2", @@ -24352,6 +25046,56 @@ "resolve": "^1.19.0" } }, + "babel-plugin-module-resolver": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.0.tgz", + "integrity": "sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==", + "dev": true, + "peer": true, + "requires": { + "find-babel-config": "^2.0.0", + "glob": "^8.0.3", + "pkg-up": "^3.1.0", + "reselect": "^4.1.7", + "resolve": "^1.22.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "peer": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "peer": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "babel-plugin-polyfill-corejs2": { "version": "0.3.3", "requires": { @@ -24979,7 +25723,8 @@ "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==" }, "css-declaration-sorter": { - "version": "6.3.1" + "version": "6.3.1", + "requires": {} }, "css-functions-list": { "version": "3.2.1", @@ -25097,7 +25842,8 @@ } }, "cssnano-utils": { - "version": "3.1.0" + "version": "3.1.0", + "requires": {} }, "csso": { "version": "4.2.0", @@ -25206,7 +25952,8 @@ "dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==" + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "requires": {} }, "deep-equal": { "version": "2.2.0", @@ -25850,7 +26597,8 @@ "eslint-config-prettier": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", - "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==" + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "requires": {} }, "eslint-import-resolver-babel-module": { "version": "5.3.2", @@ -26113,7 +26861,8 @@ } }, "eslint-plugin-react-hooks": { - "version": "4.6.0" + "version": "4.6.0", + "requires": {} }, "eslint-scope": { "version": "5.1.1", @@ -26417,6 +27166,17 @@ } } }, + "find-babel-config": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.0.0.tgz", + "integrity": "sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==", + "dev": true, + "peer": true, + "requires": { + "json5": "^2.1.1", + "path-exists": "^4.0.0" + } + }, "find-cache-dir": { "version": "3.3.2", "requires": { @@ -26940,7 +27700,8 @@ } }, "icss-utils": { - "version": "5.1.0" + "version": "5.1.0", + "requires": {} }, "ieee754": { "version": "1.2.1" @@ -27639,7 +28400,8 @@ "jest-pnp-resolver": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==" + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "requires": {} }, "jest-regex-util": { "version": "29.6.3", @@ -27923,7 +28685,8 @@ "ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==" + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "requires": {} } } }, @@ -27984,6 +28747,12 @@ "klona": { "version": "2.0.5" }, + "known-css-properties": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", + "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==", + "peer": true + }, "language-subtag-registry": { "version": "0.3.22" }, @@ -28971,16 +29740,20 @@ } }, "postcss-discard-comments": { - "version": "5.1.2" + "version": "5.1.2", + "requires": {} }, "postcss-discard-duplicates": { - "version": "5.1.0" + "version": "5.1.0", + "requires": {} }, "postcss-discard-empty": { - "version": "5.1.1" + "version": "5.1.1", + "requires": {} }, "postcss-discard-overridden": { - "version": "5.1.0" + "version": "5.1.0", + "requires": {} }, "postcss-loader": { "version": "6.2.1", @@ -29063,7 +29836,8 @@ } }, "postcss-modules-extract-imports": { - "version": "3.0.0" + "version": "3.0.0", + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -29086,7 +29860,8 @@ } }, "postcss-normalize-charset": { - "version": "5.1.0" + "version": "5.1.0", + "requires": {} }, "postcss-normalize-display-values": { "version": "5.1.0", @@ -29162,12 +29937,14 @@ "version": "0.1.1" }, "postcss-safe-parser": { - "version": "6.0.0" + "version": "6.0.0", + "requires": {} }, "postcss-scss": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz", - "integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==" + "integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==", + "requires": {} }, "postcss-selector-parser": { "version": "6.0.13", @@ -29364,7 +30141,8 @@ } }, "re-resizable": { - "version": "6.9.9" + "version": "6.9.9", + "requires": {} }, "react": { "version": "18.2.0", @@ -29383,7 +30161,8 @@ } }, "react-colorful": { - "version": "5.6.1" + "version": "5.6.1", + "requires": {} }, "react-dom": { "version": "18.2.0", @@ -29433,7 +30212,8 @@ "react-multi-select-component": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/react-multi-select-component/-/react-multi-select-component-4.3.4.tgz", - "integrity": "sha512-Ui/bzCbROF4WfKq3OKWyQJHmy/bd1mW7CQM+L83TfiltuVvHElhKEyPM3JzO9urIcWplBUKv+kyxqmEnd9jPcA==" + "integrity": "sha512-Ui/bzCbROF4WfKq3OKWyQJHmy/bd1mW7CQM+L83TfiltuVvHElhKEyPM3JzO9urIcWplBUKv+kyxqmEnd9jPcA==", + "requires": {} }, "react-refresh": { "version": "0.10.0" @@ -29521,7 +30301,8 @@ } }, "reakit-utils": { - "version": "0.15.2" + "version": "0.15.2", + "requires": {} }, "reakit-warning": { "version": "0.6.2", @@ -29650,6 +30431,13 @@ "requires-port": { "version": "1.0.0" }, + "reselect": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz", + "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==", + "dev": true, + "peer": true + }, "resolve": { "version": "1.22.1", "requires": { @@ -30422,6 +31210,334 @@ "postcss-selector-parser": "^6.0.4" } }, + "stylelint": { + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.11.0.tgz", + "integrity": "sha512-78O4c6IswZ9TzpcIiQJIN49K3qNoXTM8zEJzhaTE/xRTCZswaovSEVIa/uwbOltZrk16X4jAxjaOhzz/hTm1Kw==", + "peer": true, + "requires": { + "@csstools/css-parser-algorithms": "^2.3.1", + "@csstools/css-tokenizer": "^2.2.0", + "@csstools/media-query-list-parser": "^2.1.4", + "@csstools/selector-specificity": "^3.0.0", + "balanced-match": "^2.0.0", + "colord": "^2.9.3", + "cosmiconfig": "^8.2.0", + "css-functions-list": "^3.2.1", + "css-tree": "^2.3.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.1", + "fastest-levenshtein": "^1.0.16", + "file-entry-cache": "^7.0.0", + "global-modules": "^2.0.0", + "globby": "^11.1.0", + "globjoin": "^0.1.4", + "html-tags": "^3.3.1", + "ignore": "^5.2.4", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.29.0", + "mathml-tag-names": "^2.1.3", + "meow": "^10.1.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.28", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^6.0.0", + "postcss-selector-parser": "^6.0.13", + "postcss-value-parser": "^4.2.0", + "resolve-from": "^5.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "style-search": "^0.1.0", + "supports-hyperlinks": "^3.0.0", + "svg-tags": "^1.0.0", + "table": "^6.8.1", + "write-file-atomic": "^5.0.1" + }, + "dependencies": { + "@csstools/selector-specificity": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz", + "integrity": "sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==", + "peer": true, + "requires": {} + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true + }, + "balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "peer": true + }, + "camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "peer": true, + "requires": { + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" + } + }, + "cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "peer": true, + "requires": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + } + }, + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "peer": true, + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, + "decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "peer": true + }, + "file-entry-cache": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.1.tgz", + "integrity": "sha512-uLfFktPmRetVCbHe5UPuekWrQ6hENufnA46qEGbfACkK5drjTTdQYUragRgMjHldcbYG+nslUerqMPjbBSHXjQ==", + "peer": true, + "requires": { + "flat-cache": "^3.1.1" + } + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "peer": true, + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "peer": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "peer": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "peer": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "peer": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "peer": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "peer": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "peer": true + }, + "meow": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", + "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", + "peer": true, + "requires": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + } + }, + "normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "peer": true, + "requires": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + } + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "peer": true + }, + "read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "peer": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + } + }, + "read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "peer": true, + "requires": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + } + }, + "redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "peer": true, + "requires": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "peer": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "peer": true + }, + "strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "peer": true, + "requires": { + "min-indent": "^1.0.1" + } + }, + "trim-newlines": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz", + "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==", + "peer": true + }, + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "peer": true + }, + "write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "peer": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "peer": true + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "peer": true + } + } + }, + "stylelint-config-sass-guidelines": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-sass-guidelines/-/stylelint-config-sass-guidelines-10.0.0.tgz", + "integrity": "sha512-+Rr2Dd4b72CWA4qoj1Kk+y449nP/WJsrD0nzQAWkmPPIuyVcy2GMIcfNr0Z8JJOLjRvtlkKxa49FCNXMePBikQ==", + "dev": true, + "peer": true, + "requires": { + "postcss-scss": "^4.0.6", + "stylelint-scss": "^4.4.0" + } + }, "stylelint-scss": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.6.0.tgz", @@ -30443,6 +31559,16 @@ "has-flag": "^4.0.0" } }, + "supports-hyperlinks": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", + "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", + "peer": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, "supports-preserve-symlinks-flag": { "version": "1.0.0" }, @@ -30661,7 +31787,8 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", - "dev": true + "dev": true, + "requires": {} }, "ts-jest": { "version": "29.1.1", @@ -30981,12 +32108,14 @@ } }, "use-memo-one": { - "version": "1.1.3" + "version": "1.1.3", + "requires": {} }, "use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==" + "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "requires": {} }, "util-deprecate": { "version": "1.0.2" @@ -31126,7 +32255,8 @@ }, "dependencies": { "acorn-import-assertions": { - "version": "1.8.0" + "version": "1.8.0", + "requires": {} }, "enhanced-resolve": { "version": "5.12.0", @@ -31158,7 +32288,8 @@ "version": "7.2.0" }, "ws": { - "version": "7.5.9" + "version": "7.5.9", + "requires": {} } } }, @@ -31510,7 +32641,8 @@ } }, "ws": { - "version": "8.5.0" + "version": "8.5.0", + "requires": {} }, "xml-name-validator": { "version": "4.0.0", diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index c8d576ca..00000000 --- a/phpunit.xml +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 75e8e4a2..00000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,16 +0,0 @@ -maybe_rsync_plugin() - ->with_sqlite() - // Load the main file of the plugin. - ->loaded( fn () => require_once __DIR__ . '/../plugin.php' ) - ->install(); diff --git a/tests/class-test-case.php b/tests/class-test-case.php deleted file mode 100644 index 0d74e781..00000000 --- a/tests/class-test-case.php +++ /dev/null @@ -1,17 +0,0 @@ -