diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 00000000..a6b186b9 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,213 @@ +name: Run tests + +on: [pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - name: Setup PHP with PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + tools: composer + env: + fail-fast: true + + - name: Software versions + id: versions + uses: cafuego/command-output@main + with: + run: | + php --version && composer --version + + - name: Checkout Code + id: checkout + uses: actions/checkout@v3 + + - name: Composer Validate + id: validate + uses: cafuego/command-output@main + with: + run: | + composer validate + env: + fail-fast: true + + - name: Code Lint + id: lint + uses: cafuego/command-output@main + with: + run: | + test ! -d ./html/modules/custom || find -L ./html/modules/custom -iregex '.*\.\(php\|module\|inc\|install\)$' -print0 | xargs -0 -n 1 -P 4 php -l + env: + fail-fast: true + + - name: Configure AWS Credentials + id: aws + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + + - name: Login to Public ECR + id: aws-login + uses: docker/login-action@v2.1.0 + with: + registry: public.ecr.aws + username: ${{ secrets.ECR_AWS_ACCESS_KEY_I }} + password: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} + env: + AWS_REGION: us-east-1 + + - name: Build Image + id: build + uses: cafuego/command-output@main + with: + run: | + make + env: + fail-fast: true + + - name: Setup Environment + id: docker + uses: cafuego/command-output@main + with: + run: | + docker-compose -f tests/docker-compose.yml up -d + sleep 10 + docker ps -a + docker-compose -f tests/docker-compose.yml exec -w /srv/www -T drupal composer install + env: + fail-fast: true + + - name: PHPCS + id: phpcs + uses: cafuego/command-output@main + with: + run: | + docker-compose -f tests/docker-compose.yml exec -u appuser -w /srv/www -T drupal phpcs -p --report=full --standard=phpcs.xml ./html/modules/custom + env: + fail-fast: true + + - name: Install Environment + id: install + uses: cafuego/command-output@main + with: + run: | + docker-compose -f tests/docker-compose.yml exec -T drupal drush -y si --existing-config + env: + fail-fast: true + + - name: Run tests + id: tests + uses: cafuego/command-output@main + with: + run: | + docker-compose -f tests/docker-compose.yml exec -T drupal drush -y en dblog + docker-compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/html/sites/default/files /srv/www/html/sites/default/private + docker-compose -f tests/docker-compose.yml exec -T drupal mkdir -p /srv/www/html/build/logs + docker-compose -f tests/docker-compose.yml exec -T drupal chmod -R 777 /srv/www/html/build/logs + docker-compose -f tests/docker-compose.yml exec -T -w /srv/www -e XDEBUG_MODE=coverage -e BROWSERTEST_OUTPUT_DIRECTORY=/srv/www/html/sites/default/files/browser_output -e DTT_BASE_URL=http://127.0.0.1 drupal ./vendor/bin/phpunit --coverage-clover /srv/www/html/build/logs/clover.xml --debug + docker cp "$(docker-compose -f tests/docker-compose.yml ps -q drupal)":/srv/www/html/build/logs/clover.xml . + env: + fail-fast: true + + - name: Monitor coverage + uses: slavcodev/coverage-monitor-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + coverage_path: "clover.xml" + threshold_alert: 10 + threshold_warning: 50 + threshold_metric: "lines" + comment_footer: false + + - name: Find Comment + uses: peter-evans/find-comment@v2 + id: fc + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: Build output + + - name: Create or update comment + uses: peter-evans/create-or-update-comment@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + ### Build output + #### Composer Validate \`${{ steps.validate.outcome }}\` + #### PHP Lint \`${{ steps.lint.outcome }}\` + #### Docker Build \`${{ steps.build.outcome }}\` + #### Environment Setup \`${{ steps.docker.outcome }}\` + #### Site Install \`${{ steps.install.outcome }}\` + #### PHP Code Sniffer \`${{ steps.phpcs.outcome }}\` + +
Software Versions + + \`\`\`${{ steps.versions.outputs.stdout }}\`\`\` + +
+ + *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`*`; + edit-mode: replace + + - name: Slack Success Notification + id: slack_success + if: success() + uses: slackapi/slack-github-action@v1.23.0 + with: + channel-id: '${{ secrets.SLACK_CHANNEL }}' + payload: | + { + "text": "Tests passed for a pull request on ${{ github.repository }}", + "attachments": [ + { + "color": "#00FF00", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Pull request by @${{ github.triggering_actor }} to merge _${{ github.head_ref }}_ into _${{ github.base_ref }}_ on <${{ github.repositoryUrl }}|${{ github.repository }}> passed tests (<${{ github.event.pull_request.html_url }}|Review>)" + } + } + ] + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + + - name: Slack Failure Notification + id: slack_failure + if: failure() + uses: slackapi/slack-github-action@v1.23.0 + with: + channel-id: '${{ secrets.SLACK_CHANNEL }}' + payload: | + { + "text": "Tests failed for a pull request on ${{ github.repository }}", + "attachments": [ + { + "color": "#FF0000", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Pull request by @${{ github.triggering_actor }} to merge _${{ github.head_ref }}_ into _${{ github.base_ref }}_ on <${{ github.repositoryUrl }}|${{ github.repository }}> failed tests ()" + } + } + ] + } + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ba428b41..00000000 --- a/.travis.yml +++ /dev/null @@ -1,83 +0,0 @@ -dist: focal -language: php - -php: - - 8.0 - -# Make sure we have a recent version of docker-compose. -addons: - apt: - packages: - - docker-compose - -before_script: - # Ensure the PHP environment is ready. - - phpenv rehash - - # Install the AWS CLI and login to the ECR. Credentials are secrets set via the UI. - - if ! [ -x "$(command -v aws)" ]; then curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" ; unzip awscliv2.zip ; sudo ./aws/install ; fi - - aws ecr-public get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin public.ecr.aws/unocha - -script: - # Get docker information. - - docker version - - docker-compose version - - # PHP linting - - test ! -d ./html/modules/custom || find -L ./html/modules/custom -iregex '.*\.\(php\|module\|inc\|install\)$' -print0 | xargs -0 -n 1 -P 4 php -l - - # Build local image. - - make - - # Create the site, redis and mysql containers. - - docker-compose -p response-test -f tests/docker-compose.yml up -d - - # Dump some information about the created containers. - - docker ps -a - - # Wait a bit for everything to be ready. - - sleep 10 - - # Install the dev dependencies. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal composer install - - # Ensure the drupal coding standards config is installed. - # - docker exec -it -u appuser -w /srv/www response-test-site ./vendor/bin/phpcs --config-set installed_paths vendor/drupal/coder/coder_sniffer - - # Check coding standards. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal ./vendor/bin/phpcs -p --report=full ./html/modules/custom ./html/themes/custom - - # Run unit tests. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal mkdir -p /srv/www/html/sites/default/files/browser_output - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -e BROWSERTEST_OUTPUT_DIRECTORY=/srv/www/html/sites/default/files/browser_output -T drupal ./vendor/bin/phpunit --testsuite Unit --debug - - # Install the site with the existing config. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal drush -y si --existing-config - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal drush -y en dblog - - # Ensure the file directories are writable. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal chmod -R 777 /srv/www/html/sites/default/files /srv/www/html/sites/default/private - - # Create the build logs directory and make sure it's writable. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal mkdir -p /srv/www/html/build/logs - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -T drupal chmod -R 777 /srv/www/html/build/logs - - # Run all tests and generate coverage report. - - docker-compose -p response-test -f tests/docker-compose.yml exec -w /srv/www -e XDEBUG_MODE=coverage -e BROWSERTEST_OUTPUT_DIRECTORY=/srv/www/html/sites/default/files/browser_output -e DTT_BASE_URL=http://127.0.0.1 -T drupal ./vendor/bin/phpunit --coverage-clover /srv/www/html/build/logs/clover.xml --debug - -after_success: - - echo "The tests completed without errors." - # Create directory for clover. - - mkdir -p ./build/logs - - chmod -R 777 ./build/logs - - docker cp response-test-site:/srv/www/html/build/logs/clover.xml ./build/logs/ - # Fix source files path. - - sed -i 's#/srv/www#.#g' build/logs/clover.xml - # Get coveralls and execute. - - wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar - - chmod +x php-coveralls.phar - - ./php-coveralls.phar -vv - -after_failure: - - echo "The tests failed. Please check the output above for problems." - - docker-compose -p response-test -f tests/docker-compose.yml exec -T drupal drush watchdog:show --count=50 --extended diff --git a/CHANGELOG.md b/CHANGELOG.md index 05fa7e8b..4ff551cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file. +## [0.3.10](https://github.com/UN-OCHA/response-site/compare/v0.3.9...v0.3.10) (2023-02-09) + +### Features + +* Handle tableau size [#RWR-314](https://https://humanitarian.atlassian.net/browse/RWR-314) ([c92c14](https://github.com/UN-OCHA/response-site/commit/c92c1467d383cf6cbaa1da98f337e83e65a720aa)) +* Handle tableau url [#RWR-314](https://https://humanitarian.atlassian.net/browse/RWR-314) ([4c1cb7](https://github.com/UN-OCHA/response-site/commit/4c1cb744155ee3d5f30fbd9b8781a69c39901e4f)) +* List use of H1 [#RWR-315](https://https://humanitarian.atlassian.net/browse/RWR-315) ([ebb617](https://github.com/UN-OCHA/response-site/commit/ebb61737f07a578a62c1b111c969d8bcc269514a)) +* Remove H1 in editor [#RWR-315](https://https://humanitarian.atlassian.net/browse/RWR-315), [#RWR-315](https://https://humanitarian.atlassian.net/browse/RWR-315) ([2de6a1](https://github.com/UN-OCHA/response-site/commit/2de6a1687b8c79dcb98f18e909e23e22d91e2084), [f3a453](https://github.com/UN-OCHA/response-site/commit/f3a45351b5bd428557ab677c57578288c38fee24)) + +### Chores + +* Coverage report ([0d4d66](https://github.com/UN-OCHA/response-site/commit/0d4d663b56109f51643e787c3ed1009be98ffec9), [0a4140](https://github.com/UN-OCHA/response-site/commit/0a414050fd5bf11566afe3822a89e99c42cf46da), [fb19b4](https://github.com/UN-OCHA/response-site/commit/fb19b4ad70919a30f5e69c0bb899950abfb992eb)) +* Disable footer ([74a726](https://github.com/UN-OCHA/response-site/commit/74a726f0c7389a03456b6dccea3ae730f2feeb82)) +* Fix yml ([1ce6e0](https://github.com/UN-OCHA/response-site/commit/1ce6e06eb4e1053ed8362752a59518e0430b8829)) +* Remove travis ([ed9545](https://github.com/UN-OCHA/response-site/commit/ed9545b43a93147ba262a439c2d724c0f6037c6b)) +* Replace issue comments ([01150e](https://github.com/UN-OCHA/response-site/commit/01150edc4288f1082df6ac35d7b1f2016e0ef8cb), [0d5756](https://github.com/UN-OCHA/response-site/commit/0d5756c0d462e08adef5a4f4729c9893f656e2fb)) +* Switch to GH actions ([5d4ac8](https://github.com/UN-OCHA/response-site/commit/5d4ac87c630d27c1bbf018461b72ce9427408a4e), [203a72](https://github.com/UN-OCHA/response-site/commit/203a72a64e0d7aec0584c1f417181656e908b988), [4ad6ec](https://github.com/UN-OCHA/response-site/commit/4ad6eca63b17d06ac0145ceba4bbdcb5b7ce9dc3), [667362](https://github.com/UN-OCHA/response-site/commit/667362f628bd07d493c485baf22dd3d94ced26b8), [adf2bb](https://github.com/UN-OCHA/response-site/commit/adf2bb32d91ed6c88198fea80fb1d3d7c2a9ec26), [820f91](https://github.com/UN-OCHA/response-site/commit/820f91325750e44b6026afe5a237a6f01da36d00), [124ad5](https://github.com/UN-OCHA/response-site/commit/124ad5b9994f03776ce9b44f676eda3e83fa31af), [c39c90](https://github.com/UN-OCHA/response-site/commit/c39c9099e3632a8a6ee56d0448b9448b21a99891), [0a0ef5](https://github.com/UN-OCHA/response-site/commit/0a0ef58879f3e0f0e9a2352e9ec8ae7243c3a9c7), [2dc832](https://github.com/UN-OCHA/response-site/commit/2dc83291793b8eba2324a7852ffe570edd80b095)) +* Typo in comment ([3f9e8f](https://github.com/UN-OCHA/response-site/commit/3f9e8f1a96f0f21d72471e815d4060a3b232fcb4)) +* Update all outdated drupal/* packages. ([55b90e](https://github.com/UN-OCHA/response-site/commit/55b90e28a18e1ef3785253be14ad68afeb7267d6)) +* Use local patches ([dba7e7](https://github.com/UN-OCHA/response-site/commit/dba7e7d544943d0cec35407d3ab9cb70f1c844b6)) + ## [0.3.9](https://github.com/UN-OCHA/response-site/compare/v0.3.8...v0.3.9) (2023-02-01) ### Features diff --git a/PATCHES/linkchecker-unconfirmed-but-eligible-field-list-3244743.patch b/PATCHES/linkchecker-unconfirmed-but-eligible-field-list-3244743.patch new file mode 100644 index 00000000..06cd739f --- /dev/null +++ b/PATCHES/linkchecker-unconfirmed-but-eligible-field-list-3244743.patch @@ -0,0 +1,207 @@ +diff --git a/linkchecker.links.task.yml b/linkchecker.links.task.yml +index 288b455c037e7d1b0bd18a84bc521a23f87636a2..a23ddf8cdb7da0236ef915dcf0a1d03f29b8def9 100644 +--- a/linkchecker.links.task.yml ++++ b/linkchecker.links.task.yml +@@ -2,3 +2,7 @@ linkchecker.admin_settings_form_tab: + route_name: linkchecker.admin_settings_form + title: Settings + base_route: linkchecker.admin_settings_form ++linkchecker.fields_tab: ++ route_name: linkchecker.fields ++ title: Configurable Fields ++ base_route: linkchecker.admin_settings_form +diff --git a/linkchecker.routing.yml b/linkchecker.routing.yml +index ae2b4cf65cb08bf076879ad49ade07e15d7859fc..af850ca4b4b799bece9b967d1f0f142500354b33 100644 +--- a/linkchecker.routing.yml ++++ b/linkchecker.routing.yml +@@ -5,3 +5,10 @@ linkchecker.admin_settings_form: + _title: 'Link checker' + requirements: + _permission: 'administer linkchecker' ++linkchecker.fields: ++ path: '/admin/config/content/linkchecker/fields' ++ defaults: ++ _title: 'Configurable Fields' ++ _controller: '\Drupal\linkchecker\Controller\ConfigurableFieldsListController::build' ++ requirements: ++ _permission: 'administer linkchecker' +diff --git a/src/Controller/ConfigurableFieldsListController.php b/src/Controller/ConfigurableFieldsListController.php +new file mode 100644 +index 0000000000000000000000000000000000000000..4dd9b216b963be6391f9690ff2baa8f3b89ea17f +--- /dev/null ++++ b/src/Controller/ConfigurableFieldsListController.php +@@ -0,0 +1,174 @@ ++entityFieldManager = $entity_field_manager; ++ $this->extractorManager = $extractor_manager; ++ } ++ ++ /** ++ * {@inheritdoc} ++ */ ++ public static function create(ContainerInterface $container) { ++ return new static( ++ $container->get('entity_field.manager'), ++ $container->get('plugin.manager.link_extractor') ++ ); ++ } ++ ++ /** ++ * Builds the response. ++ */ ++ public function build() { ++ $eligible_fields = $this->getConfigurableFields(); ++ if (empty($eligible_fields)) { ++ return [ ++ '#markup' => $this->t('

No configurable fields were found.

'), ++ ]; ++ } ++ ++ $text = [ ++ '#markup' => $this->t('

This is a list of all fields that are eligible for Link Checker configuration.

'), ++ ]; ++ ++ $table = [ ++ '#theme' => 'table', ++ '#header' => [ ++ 'entity_type' => $this->t('Entity type'), ++ 'bundle' => $this->t('Bundle'), ++ 'field_name' => $this->t('Field name'), ++ 'enabled' => $this->t('Scan broken links'), ++ 'configure_link' => '', ++ ], ++ '#rows' => [], ++ ]; ++ ++ foreach ($eligible_fields as $entity_type => $bundles) { ++ foreach ($bundles as $bundle => $fields) { ++ foreach ($fields as $field_name => $config) { ++ $table['#rows'][] = [ ++ 'entity_type' => $entity_type, ++ 'bundle' => $bundle, ++ 'field_name' => $field_name, ++ 'enabled' => $config['enabled'] ? $this->t('Yes') : '', ++ 'configure_link' => Link::fromTextAndUrl('configure', $config['config_url']), ++ ]; ++ } ++ } ++ } ++ $build = [ ++ 'content' => $text, ++ 'table' => $table, ++ ]; ++ ++ return $build; ++ } ++ ++ /** ++ * Get a list of fields that can be configured to use Link Checker. ++ * ++ * @return array ++ * An associative array of data (enabled, config_url), keyed by entity type, ++ * then bundle, then field name. ++ */ ++ protected function getConfigurableFields() { ++ $field_list = []; ++ $ignore_entity_types = [ ++ 'shortcut', ++ ]; ++ ++ $valid_types = []; ++ foreach ($this->extractorManager->getDefinitions() as $definition) { ++ $valid_types = array_unique(array_merge($valid_types, $definition['field_types']), SORT_REGULAR); ++ } ++ ++ $field_map = $this->entityFieldManager->getFieldMap(); ++ foreach ($field_map as $entity_type => $fields) { ++ if (in_array($entity_type, $ignore_entity_types)) { ++ continue; ++ } ++ $bundle_entity_type = $this->entityTypeManager()->getDefinition($entity_type)->getBundleEntityType(); ++ if (empty($bundle_entity_type)) { ++ continue; ++ } ++ ++ foreach ($fields as $field_name => $definition) { ++ if (in_array($definition['type'], $valid_types)) { ++ foreach ($definition['bundles'] as $bundle) { ++ $bundle_links = $this->entityTypeManager()->getDefinition($bundle_entity_type)->get('links'); ++ switch ($entity_type) { ++ case 'taxonomy_term': ++ $bundle_edit_link = preg_replace('/\{.+\}\/overview$/', $bundle . '/overview', $bundle_links['overview-form']); ++ break; ++ ++ default: ++ $bundle_edit_link = preg_replace('/\{.+\}$/', $bundle, $bundle_links['edit-form']); ++ } ++ ++ // Get the configure URL. ++ $field_config_uri = sprintf('internal:%s/fields/%s.%s.%s', $bundle_edit_link, $entity_type, $bundle, $field_name); ++ $field_config_url = Url::fromUri($field_config_uri); ++ ++ $bundle_fields = $this->entityFieldManager->getFieldDefinitions($entity_type, $bundle); ++ ++ if (isset($bundle_fields[$field_name]) and $bundle_fields[$field_name] instanceof FieldConfigInterface) { ++ /** @var Drupal\field\Entity\FieldConfigInterface $field_config */ ++ $field_config = $bundle_fields[$field_name]; ++ // Whether linkchecker is configured for this field or not. ++ $enabled = (bool) $field_config->getThirdPartySetting('linkchecker', 'scan'); ++ if (!array_key_exists($entity_type, $field_list)) { ++ $field_list[$entity_type] = []; ++ } ++ if (!array_key_exists($bundle, $field_list[$entity_type])) { ++ $field_list[$entity_type][$bundle] = []; ++ } ++ $field_list[$entity_type][$bundle][$field_name] = [ ++ 'enabled' => $enabled, ++ 'config_url' => $field_config_url, ++ ]; ++ } ++ } ++ } ++ } ++ } ++ ++ return $field_list; ++ } ++ ++} diff --git a/PATCHES/user_expire-customize-notification-email.patch b/PATCHES/user_expire-customize-notification-email.patch new file mode 100644 index 00000000..db8c845c --- /dev/null +++ b/PATCHES/user_expire-customize-notification-email.patch @@ -0,0 +1,187 @@ +diff --git a/config/install/user_expire.settings.yml b/config/install/user_expire.settings.yml +index 62f9e8c7d5a064d87448b0faf5811a08709370c7..ea9fb144d2add8031bcafc516fb46cca209eb6c9 100644 +--- a/config/install/user_expire.settings.yml ++++ b/config/install/user_expire.settings.yml +@@ -1,3 +1,7 @@ + frequency: 172800 + offset: 604800 + user_expire_roles: {} ++send_mail: true ++mail: ++ subject: "[site:name]: Account expiration warning" ++ body: "Hello [user:display-name]\r\n\r\nBecause you have not logged in recently, your account at [site:name] will be blocked in the near future. If you still use this site, please log in [site:login-url] to prevent your account being blocked.\r\n\r\n-- [site:name] team" +diff --git a/config/schema/user_expire.schema.yml b/config/schema/user_expire.schema.yml +index a46bc68eeea8b41fa1e7bde72008daf77d54032d..f8e9e2e101f58d8f5a5cbfb87483bc9821a6a7a6 100644 +--- a/config/schema/user_expire.schema.yml ++++ b/config/schema/user_expire.schema.yml +@@ -7,9 +7,21 @@ user_expire.settings: + frequency: + type: integer + label: 'Frequency time in seconds' ++ mail: ++ type: mapping ++ mapping: ++ subject: ++ type: string ++ label: 'Subject line for the notification email' ++ body: ++ type: string ++ label: 'Body for the notification email' + offset: + type: integer + label: 'Warning offset time in seconds' ++ send_mail: ++ type: integer ++ label: 'Flag that enables or disables expiry emails' + user_expire_roles: + type: sequence + label: 'Roles and expire value' +diff --git a/src/Form/UserExpireSettingsForm.php b/src/Form/UserExpireSettingsForm.php +index 8d7e2d0d0f01265abce72f018b8b32facf76087a..d8d9cb6671b29364c0ba198e893e823261079412 100644 +--- a/src/Form/UserExpireSettingsForm.php ++++ b/src/Form/UserExpireSettingsForm.php +@@ -111,6 +111,50 @@ class UserExpireSettingsForm extends ConfigFormBase { + ]; + } + ++ // Enable or disable email notifications. ++ $form['send_mail'] = [ ++ '#type' => 'checkbox', ++ '#title' => $this->t('Send notifiation emails'), ++ '#default_value' => $config->get('send_mail') ?: true, ++ '#description' => $this->t('Send a notification email to the user, starting at the defined offset time before account expiry.'), ++ ]; ++ ++ // Notification email template. ++ $form['mail'] = [ ++ '#type' => 'fieldset', ++ '#title' => $this->t('Notification email'), ++ ]; ++ ++ $form['mail']['settings'] = [ ++ '#type' => 'container', ++ '#states' => [ ++ // Hide the additional settings when this email is disabled. ++ 'invisible' => [ ++ 'input[name="send_mail"]' => ['checked' => FALSE], ++ ], ++ ], ++ ]; ++ ++ $form['mail']['settings']['notification_subject'] = [ ++ '#type' => 'textfield', ++ '#title' => $this->t('Subject'), ++ '#default_value' => $config->get('mail.subject') ?: '', ++ '#description' => $this->t('Subject line for the notification email.'), ++ '#maxlength' => 180, ++ ]; ++ ++ $form['mail']['settings']['notification_body'] = [ ++ '#type' => 'textarea', ++ '#title' => $this->t('Body'), ++ '#default_value' => $config->get('mail.body') ?: '', ++ '#description' => $this->t('Body for the notifiction email.'), ++ '#rows' => 15, ++ ]; ++ ++ $form['mail']['settings']['help'] = [ ++ '#markup' => $this->t('Available token variables for use in the email are: [site:name], [site:url], [site:mail], [user:display-name], [user:account-name], [user:mail], [site:login-url], [site:url-brief], [user:edit-url], [user:one-time-login-url], [user:cancel-url]'), ++ ]; ++ + return parent::buildForm($form, $form_state); + } + +@@ -162,6 +206,13 @@ class UserExpireSettingsForm extends ConfigFormBase { + } + + $config->set('user_expire_roles', $rules); ++ ++ // The notification email. ++ $config->set('send_mail', $form_state->getValue('send_mail')); ++ ++ $config->set('mail.subject', $form_state->getValue('notification_subject')); ++ $config->set('mail.body', $form_state->getValue('notification_body')); ++ + $config->save(); + } + +diff --git a/user_expire.module b/user_expire.module +index 26beacd1c168d92962fae31090470698f753ff47..34f61dc939b476aa6a93323f6aff2801fab64891 100644 +--- a/user_expire.module ++++ b/user_expire.module +@@ -12,6 +12,7 @@ use Drupal\Core\Datetime\DrupalDateTime; + use Drupal\user\RoleInterface; + use Drupal\Core\Url; + use Drupal\Core\Routing\RouteMatchInterface; ++use Drupal\Component\Render\PlainTextOutput; + + /** + * Implements hook_help(). +@@ -332,18 +333,21 @@ function user_expire_expire_by_role_warning() { + if ($uids_to_warn) { + foreach ($uids_to_warn as $uid) { + $account = \Drupal::entityTypeManager()->getStorage('user')->load($uid->uid); +- if ($account) { ++ if (!$account) { + $logger->debug('Skipping warning @uid as it failed to load a valid user', [ + '@uid' => $uid->uid, + ]); + } + else { +- $logger->info('Warning about expiring account @name by role', ['@name' => $account->getAccountName()]); +- \Drupal::service('plugin.manager.mail')->mail('user_expire', 'expiration_warning', $account->getEmail(), $account->getPreferredLangcode(), +- [ +- 'account' => $account, +- ] +- ); ++ // Send a notification email if configured to do so. ++ if ($config->get('send_mail')) { ++ $logger->info('Sending warning about expiring account @name by role', ['@name' => $account->getAccountName()]); ++ \Drupal::service('plugin.manager.mail')->mail('user_expire', 'expiration_warning', $account->getEmail(), $account->getPreferredLangcode(), ++ [ ++ 'account' => $account, ++ ] ++ ); ++ } + } + } + } +@@ -445,20 +449,23 @@ function user_expire_get_role_rules() { + */ + function user_expire_mail($key, &$message, $params) { + if ($key == 'expiration_warning') { +- $site_name = \Drupal::config('system.site')->get('name'); +- // The subject. +- $message['subject'] = t('@site_name: Account expiration warning', ['@site_name' => $site_name]); +- // The body. +- $message['body'][] = t('Hello @user', ['@user' => $params['account']->getAccountName()]); +- // An empty string gives a newline. +- $message['body'][] = ''; +- $message['body'][] = t('Because you have not logged in recently, your account at @site_name will be blocked in the near future. If you still use this site, please log in @login_url to avoid having your account blocked.', +- [ +- '@site_name' => $site_name, +- '@login_url' => Url::fromRoute('entity.user.canonical', ['user' => \Drupal::currentUser()->id()], ['absolute' => TRUE]), +- ] +- ); +- $message['body'][] = ''; +- $message['body'][] = t('Thanks, @site_name', ['@site_name' => $site_name]); ++ ++ $token_service = \Drupal::token(); ++ $language_manager = \Drupal::languageManager(); ++ $langcode = $message['langcode']; ++ $variables = ['user' => $params['account']]; ++ ++ $language = $language_manager->getLanguage($params['account']->getPreferredLangcode()); ++ $original_language = $language_manager->getConfigOverrideLanguage(); ++ $language_manager->setConfigOverrideLanguage($language); ++ ++ $config_factory = \Drupal::configFactory(); ++ $config = $config_factory->get('user_expire.settings'); ++ ++ $token_options = ['langcode' => $langcode, 'callback' => 'user_mail_tokens', 'clear' => TRUE]; ++ $message['subject'] .= PlainTextOutput::renderFromHtml($token_service->replace($config->get('mail.subject'), $variables, $token_options)); ++ $message['body'][] = $token_service->replace($config->get('mail.body'), $variables, $token_options); ++ ++ $language_manager->setConfigOverrideLanguage($original_language); + } + } diff --git a/PATCHES/user_expire-reset-expiration-on-reactivation.patch b/PATCHES/user_expire-reset-expiration-on-reactivation.patch new file mode 100644 index 00000000..6f8bbc9a --- /dev/null +++ b/PATCHES/user_expire-reset-expiration-on-reactivation.patch @@ -0,0 +1,51 @@ +diff --git a/tests/src/Functional/UserExpireTest.php b/tests/src/Functional/UserExpireTest.php +index fb5180d8bc697603e46a4cf8debba8f07ef7552c..6bc1bb618ebfad3726fb0e0d5163f21aabbae3d1 100644 +--- a/tests/src/Functional/UserExpireTest.php ++++ b/tests/src/Functional/UserExpireTest.php +@@ -161,6 +161,18 @@ class UserExpireTest extends BrowserTestBase { + // Ensure they are disabled. + $this->drupalGet("user/" . $new_basic_account->id() . "/edit"); + $this->assertSession()->responseContains('type="radio" id="edit-status-0" name="status" value="0" checked="checked" class="form-radio"', $this->t('User account is currently disabled.')); ++ ++ // Manually unblock the user. ++ $edit = []; ++ $edit['status'] = 1; ++ $this->drupalPostForm("user/" . $new_basic_account->id() . "/edit", $edit, $this->t('Save')); ++ ++ // Process it. ++ user_expire_expire_by_role(); ++ ++ // Ensure they are still active. ++ $this->drupalGet("user/" . $new_basic_account->id() . "/edit"); ++ $this->assertSession()->responseContains('type="radio" id="edit-status-1" name="status" value="1" checked="checked" class="form-radio"', $this->t('User account is currently active.')); + } + + } +diff --git a/user_expire.module b/user_expire.module +index cb2958708e8063270d4765ec999009ea51f81ee9..9d7e157fbd908763521551237a7e2cc8d9a4abad 100644 +--- a/user_expire.module ++++ b/user_expire.module +@@ -9,6 +9,7 @@ use Drupal\Core\Form\FormStateInterface; + use Drupal\Core\Entity\EntityInterface; + use Drupal\Core\Database\Query\Condition; + use Drupal\Core\Datetime\DrupalDateTime; ++use Drupal\user\Entity\User; + use Drupal\user\RoleInterface; + use Drupal\Core\Url; + use Drupal\Core\Routing\RouteMatchInterface; +@@ -462,3 +463,15 @@ function user_expire_mail($key, &$message, $params) { + $message['body'][] = t('Thanks, @site_name', ['@site_name' => $site_name]); + } + } ++ ++/** ++ * Implements hook_ENTITY_TYPE_presave() for user entities. ++ * ++ * If the account was blocked but is now active, update the expiry so it is ++ * not re-blocked by the next cron run. ++ */ ++function user_expire_user_presave(User $account) { ++ if (!empty($account->original) && $account->original->isBlocked() && $account->isActive()) { ++ $account->setLastAccessTime(\Drupal::time()->getRequestTime()); ++ } ++} diff --git a/composer.json b/composer.json index e159be53..1e2ddec5 100644 --- a/composer.json +++ b/composer.json @@ -208,5 +208,5 @@ "phpunit/phpunit": "^9.5", "weitzman/drupal-test-traits": "^1.5" }, - "version": "0.3.9" + "version": "0.3.10" } \ No newline at end of file diff --git a/composer.lock b/composer.lock index f717d7ec..65e4967e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c6fe6c37351093f032f33faa38acac1", + "content-hash": "97cb2e48c45f4bb9e7eebec9671445dc", "packages": [ { "name": "asm89/stack-cors", @@ -64,16 +64,16 @@ }, { "name": "chi-teck/drupal-code-generator", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/Chi-teck/drupal-code-generator.git", - "reference": "3bffb204d29bd6136167f9f03b59f31cf5d5e6d2" + "reference": "22ed1cc02dc47814e8239de577da541e9b9bd980" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Chi-teck/drupal-code-generator/zipball/3bffb204d29bd6136167f9f03b59f31cf5d5e6d2", - "reference": "3bffb204d29bd6136167f9f03b59f31cf5d5e6d2", + "url": "https://api.github.com/repos/Chi-teck/drupal-code-generator/zipball/22ed1cc02dc47814e8239de577da541e9b9bd980", + "reference": "22ed1cc02dc47814e8239de577da541e9b9bd980", "shasum": "" }, "require": { @@ -119,9 +119,9 @@ "description": "Drupal code generator", "support": { "issues": "https://github.com/Chi-teck/drupal-code-generator/issues", - "source": "https://github.com/Chi-teck/drupal-code-generator/tree/2.6.1" + "source": "https://github.com/Chi-teck/drupal-code-generator/tree/2.6.2" }, - "time": "2022-09-15T09:13:57+00:00" + "time": "2022-11-11T15:34:04+00:00" }, { "name": "commerceguys/addressing", @@ -1588,16 +1588,16 @@ }, { "name": "drupal/core", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "2ce2d9dbc3d248d7fd6bf9c9a50cce7e8dc799a6" + "reference": "67e34a5e8f48cafdd5c26e778a9570860e2d44a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/2ce2d9dbc3d248d7fd6bf9c9a50cce7e8dc799a6", - "reference": "2ce2d9dbc3d248d7fd6bf9c9a50cce7e8dc799a6", + "url": "https://api.github.com/repos/drupal/core/zipball/67e34a5e8f48cafdd5c26e778a9570860e2d44a5", + "reference": "67e34a5e8f48cafdd5c26e778a9570860e2d44a5", "shasum": "" }, "require": { @@ -1749,13 +1749,13 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.5.2" + "source": "https://github.com/drupal/core/tree/9.5.3" }, - "time": "2023-01-18T12:48:20+00:00" + "time": "2023-02-01T19:47:31+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -1799,13 +1799,13 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/9.5.2" + "source": "https://github.com/drupal/core-composer-scaffold/tree/9.5.3" }, "time": "2022-06-19T16:14:18+00:00" }, { "name": "drupal/core-project-message", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/drupal/core-project-message.git", @@ -1840,22 +1840,22 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-project-message/tree/9.5.2" + "source": "https://github.com/drupal/core-project-message/tree/9.5.3" }, "time": "2022-02-24T17:40:53+00:00" }, { "name": "drupal/core-recommended", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "eab84e96280017f11e0dfba7f9995facaa803d13" + "reference": "3dc8d9757c6c4a0457d32dd58a755532504ad959" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/eab84e96280017f11e0dfba7f9995facaa803d13", - "reference": "eab84e96280017f11e0dfba7f9995facaa803d13", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/3dc8d9757c6c4a0457d32dd58a755532504ad959", + "reference": "3dc8d9757c6c4a0457d32dd58a755532504ad959", "shasum": "" }, "require": { @@ -1864,7 +1864,7 @@ "doctrine/annotations": "~1.13.3", "doctrine/lexer": "~1.2.3", "doctrine/reflection": "~1.2.3", - "drupal/core": "9.5.2", + "drupal/core": "9.5.3", "egulias/email-validator": "~3.2.1", "guzzlehttp/guzzle": "~6.5.8", "guzzlehttp/promises": "~1.5.2", @@ -1895,7 +1895,7 @@ "symfony/event-dispatcher-contracts": "~v1.1.13", "symfony/http-client-contracts": "~v2.5.2", "symfony/http-foundation": "~v4.4.49", - "symfony/http-kernel": "~v4.4.49", + "symfony/http-kernel": "~v4.4.50", "symfony/mime": "~v5.4.13", "symfony/polyfill-ctype": "~v1.27.0", "symfony/polyfill-iconv": "~v1.27.0", @@ -1911,7 +1911,7 @@ "symfony/translation": "~v4.4.47", "symfony/translation-contracts": "~v2.5.2", "symfony/validator": "~v4.4.48", - "symfony/var-dumper": "~v5.4.14", + "symfony/var-dumper": "~v5.4.19", "symfony/yaml": "~v4.4.45", "twig/twig": "~v2.15.4", "typo3/phar-stream-wrapper": "~v3.1.7" @@ -1926,9 +1926,9 @@ ], "description": "Core and its dependencies with known-compatible minor versions. Require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/9.5.2" + "source": "https://github.com/drupal/core-recommended/tree/9.5.3" }, - "time": "2023-01-18T12:48:20+00:00" + "time": "2023-02-01T19:47:31+00:00" }, { "name": "drupal/csp", @@ -3425,17 +3425,17 @@ }, { "name": "drupal/link_allowed_hosts", - "version": "1.0.0-beta3", + "version": "1.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/link_allowed_hosts.git", - "reference": "1.0.0-beta3" + "reference": "1.0.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/link_allowed_hosts-1.0.0-beta3.zip", - "reference": "1.0.0-beta3", - "shasum": "d0eafc5443148f7653a22c96e1022b2dd17daf7d" + "url": "https://ftp.drupal.org/files/projects/link_allowed_hosts-1.0.0.zip", + "reference": "1.0.0", + "shasum": "2dce18e1431cd4b837b5212a8ddaeb581a642821" }, "require": { "drupal/core": "^8.8 || ^9 || ^10" @@ -3443,11 +3443,11 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "1.0.0-beta3", - "datestamp": "1673475628", + "version": "1.0.0", + "datestamp": "1675519517", "security-coverage": { - "status": "not-covered", - "message": "Beta releases are not covered by Drupal security advisories." + "status": "covered", + "message": "Covered by Drupal's security advisory policy" } } }, @@ -3477,17 +3477,17 @@ }, { "name": "drupal/linkchecker", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/linkchecker.git", - "reference": "8.x-1.0" + "reference": "8.x-1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/linkchecker-8.x-1.0.zip", - "reference": "8.x-1.0", - "shasum": "7e5225bef113f84f204ece3365e8b92d368a6b0a" + "url": "https://ftp.drupal.org/files/projects/linkchecker-8.x-1.1.zip", + "reference": "8.x-1.1", + "shasum": "c23eeb94023da2da28678cc8d1de4f9a0d1a2797" }, "require": { "drupal/core": "^8.9 || ^9.2", @@ -3499,8 +3499,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.0", - "datestamp": "1674443849", + "version": "8.x-1.1", + "datestamp": "1674834761", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -5508,16 +5508,16 @@ }, { "name": "itamair/geophp", - "version": "1.3", + "version": "1.4", "source": { "type": "git", "url": "https://github.com/itamair/geoPHP.git", - "reference": "d7bccf9902a62430ceb2ac0771bb1e9d1deac4e9" + "reference": "ced300d09ddda1b7212ebe1a9a53aa065e5f9585" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itamair/geoPHP/zipball/d7bccf9902a62430ceb2ac0771bb1e9d1deac4e9", - "reference": "d7bccf9902a62430ceb2ac0771bb1e9d1deac4e9", + "url": "https://api.github.com/repos/itamair/geoPHP/zipball/ced300d09ddda1b7212ebe1a9a53aa065e5f9585", + "reference": "ced300d09ddda1b7212ebe1a9a53aa065e5f9585", "shasum": "" }, "require-dev": { @@ -5548,9 +5548,9 @@ "description": "GeoPHP is a open-source native PHP library for doing geometry operations. It is written entirely in PHP and can therefore run on shared hosts. It can read and write a wide variety of formats: WKT (including EWKT), WKB (including EWKB), GeoJSON, KML, GPX, GeoRSS). It works with all Simple-Feature geometries (Point, LineString, Polygon, GeometryCollection etc.) and can be used to get centroids, bounding-boxes, area, and a wide variety of other useful information.", "homepage": "https://github.com/itamair/geoPHP", "support": { - "source": "https://github.com/itamair/geoPHP/tree/1.3" + "source": "https://github.com/itamair/geoPHP/tree/1.4" }, - "time": "2022-07-04T23:09:18+00:00" + "time": "2023-02-05T00:00:51+00:00" }, { "name": "laminas/laminas-diactoros", @@ -7044,16 +7044,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.11", + "version": "v0.11.12", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "ba67f2d26278ec9266a5cfe0acba33a8ca1277ae" + "reference": "52cb7c47d403c31c0adc9bf7710fc355f93c20f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ba67f2d26278ec9266a5cfe0acba33a8ca1277ae", - "reference": "ba67f2d26278ec9266a5cfe0acba33a8ca1277ae", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/52cb7c47d403c31c0adc9bf7710fc355f93c20f7", + "reference": "52cb7c47d403c31c0adc9bf7710fc355f93c20f7", "shasum": "" }, "require": { @@ -7114,9 +7114,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.11" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.12" }, - "time": "2023-01-23T16:14:59+00:00" + "time": "2023-01-29T21:24:40+00:00" }, { "name": "ralouphie/getallheaders", @@ -8144,16 +8144,16 @@ }, { "name": "symfony/http-kernel", - "version": "v4.4.49", + "version": "v4.4.50", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4e36db8103062c62b3882b1bd297b02de6b021c4" + "reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4e36db8103062c62b3882b1bd297b02de6b021c4", - "reference": "4e36db8103062c62b3882b1bd297b02de6b021c4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aa6df6c045f034aa13ac752fc234bb300b9488ef", + "reference": "aa6df6c045f034aa13ac752fc234bb300b9488ef", "shasum": "" }, "require": { @@ -8228,7 +8228,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v4.4.49" + "source": "https://github.com/symfony/http-kernel/tree/v4.4.50" }, "funding": [ { @@ -8244,7 +8244,7 @@ "type": "tidelift" } ], - "time": "2022-11-28T17:58:43+00:00" + "time": "2023-02-01T08:01:31+00:00" }, { "name": "symfony/mime", @@ -10196,16 +10196,16 @@ }, { "name": "unocha/common_design", - "version": "v7.4.0", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/UN-OCHA/common_design.git", - "reference": "c349f709576eda763ddce2f7578457dd8508b8cb" + "reference": "b803f6b303bfcc2a46b5d2d531189832679d820a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/UN-OCHA/common_design/zipball/c349f709576eda763ddce2f7578457dd8508b8cb", - "reference": "c349f709576eda763ddce2f7578457dd8508b8cb", + "url": "https://api.github.com/repos/UN-OCHA/common_design/zipball/b803f6b303bfcc2a46b5d2d531189832679d820a", + "reference": "b803f6b303bfcc2a46b5d2d531189832679d820a", "shasum": "" }, "require": { @@ -10219,9 +10219,9 @@ "description": "OCHA Common Design base theme for Drupal 8", "support": { "issues": "https://github.com/UN-OCHA/common_design/issues", - "source": "https://github.com/UN-OCHA/common_design/tree/v7.4.0" + "source": "https://github.com/UN-OCHA/common_design/tree/v7.4.1" }, - "time": "2022-12-21T10:16:39+00:00" + "time": "2023-01-10T14:13:58+00:00" }, { "name": "unocha/ocha_search", @@ -10746,16 +10746,16 @@ }, { "name": "composer/composer", - "version": "2.2.18", + "version": "2.2.19", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "84175907664ca8b73f73f4883e67e886dfefb9f5" + "reference": "30ff21a9af9a10845436abaeeb0bb7276e996d24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/84175907664ca8b73f73f4883e67e886dfefb9f5", - "reference": "84175907664ca8b73f73f4883e67e886dfefb9f5", + "url": "https://api.github.com/repos/composer/composer/zipball/30ff21a9af9a10845436abaeeb0bb7276e996d24", + "reference": "30ff21a9af9a10845436abaeeb0bb7276e996d24", "shasum": "" }, "require": { @@ -10825,7 +10825,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.18" + "source": "https://github.com/composer/composer/tree/2.2.19" }, "funding": [ { @@ -10841,7 +10841,7 @@ "type": "tidelift" } ], - "time": "2022-08-20T09:33:38+00:00" + "time": "2023-02-04T13:54:48+00:00" }, { "name": "composer/metadata-minifier", @@ -11579,16 +11579,16 @@ }, { "name": "doctrine/persistence", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "920da294b4bb0bb527f2a91ed60c18213435880f" + "reference": "8bf8ab15960787f1a49d405f6eb8c787b4841119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/920da294b4bb0bb527f2a91ed60c18213435880f", - "reference": "920da294b4bb0bb527f2a91ed60c18213435880f", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/8bf8ab15960787f1a49d405f6eb8c787b4841119", + "reference": "8bf8ab15960787f1a49d405f6eb8c787b4841119", "shasum": "" }, "require": { @@ -11657,7 +11657,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/3.1.3" + "source": "https://github.com/doctrine/persistence/tree/3.1.4" }, "funding": [ { @@ -11673,7 +11673,7 @@ "type": "tidelift" } ], - "time": "2023-01-19T13:39:42+00:00" + "time": "2023-02-03T11:13:07+00:00" }, { "name": "drupal/coder", @@ -12075,7 +12075,7 @@ }, { "name": "drupal/core-dev", - "version": "9.5.2", + "version": "9.5.3", "source": { "type": "git", "url": "https://github.com/drupal/core-dev.git", @@ -12119,7 +12119,7 @@ ], "description": "require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.", "support": { - "source": "https://github.com/drupal/core-dev/tree/9.5.2" + "source": "https://github.com/drupal/core-dev/tree/9.5.3" }, "time": "2022-07-27T00:23:55+00:00" }, @@ -12924,21 +12924,21 @@ }, { "name": "mglaman/phpstan-drupal", - "version": "1.1.25", + "version": "1.1.29", "source": { "type": "git", "url": "https://github.com/mglaman/phpstan-drupal.git", - "reference": "480245d5d0bd1858e01c43d738718dab85be0ad2" + "reference": "e6f6191c53b159013fcbd186d7f85511f3f96ff8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/480245d5d0bd1858e01c43d738718dab85be0ad2", - "reference": "480245d5d0bd1858e01c43d738718dab85be0ad2", + "url": "https://api.github.com/repos/mglaman/phpstan-drupal/zipball/e6f6191c53b159013fcbd186d7f85511f3f96ff8", + "reference": "e6f6191c53b159013fcbd186d7f85511f3f96ff8", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^1.6.0", + "phpstan/phpstan": "^1.9.0", "symfony/finder": "~3.4.5 ||^4.2 || ^5.0 || ^6.0", "symfony/yaml": "~3.4.5 || ^4.2|| ^5.0 || ^6.0", "webflo/drupal-finder": "^1.2" @@ -13008,7 +13008,7 @@ "description": "Drupal extension and rules for PHPStan", "support": { "issues": "https://github.com/mglaman/phpstan-drupal/issues", - "source": "https://github.com/mglaman/phpstan-drupal/tree/1.1.25" + "source": "https://github.com/mglaman/phpstan-drupal/tree/1.1.29" }, "funding": [ { @@ -13024,7 +13024,7 @@ "type": "tidelift" } ], - "time": "2022-07-18T17:17:55+00:00" + "time": "2023-02-08T21:44:03+00:00" }, { "name": "mikey179/vfsstream", @@ -13138,25 +13138,25 @@ }, { "name": "nette/neon", - "version": "v3.3.3", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/nette/neon.git", - "reference": "22e384da162fab42961d48eb06c06d3ad0c11b95" + "reference": "372d945c156ee7f35c953339fb164538339e6283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/neon/zipball/22e384da162fab42961d48eb06c06d3ad0c11b95", - "reference": "22e384da162fab42961d48eb06c06d3ad0c11b95", + "url": "https://api.github.com/repos/nette/neon/zipball/372d945c156ee7f35c953339fb164538339e6283", + "reference": "372d945c156ee7f35c953339fb164538339e6283", "shasum": "" }, "require": { "ext-json": "*", - "php": ">=7.1" + "php": ">=8.0 <8.3" }, "require-dev": { - "nette/tester": "^2.0", - "phpstan/phpstan": "^0.12", + "nette/tester": "^2.4", + "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.7" }, "bin": [ @@ -13165,7 +13165,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -13200,9 +13200,9 @@ ], "support": { "issues": "https://github.com/nette/neon/issues", - "source": "https://github.com/nette/neon/tree/v3.3.3" + "source": "https://github.com/nette/neon/tree/v3.4.0" }, - "time": "2022-03-10T02:04:26+00:00" + "time": "2023-01-13T03:08:29+00:00" }, { "name": "phar-io/manifest", @@ -13544,20 +13544,20 @@ }, { "name": "phpspec/prophecy", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359" + "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be8cac52a0827776ff9ccda8c381ac5b71aeb359", - "reference": "be8cac52a0827776ff9ccda8c381ac5b71aeb359", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/15873c65b207b07765dbc3c95d20fdf4a320cbe2", + "reference": "15873c65b207b07765dbc3c95d20fdf4a320cbe2", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", + "doctrine/instantiator": "^1.2 || ^2.0", "php": "^7.2 || 8.0.* || 8.1.* || 8.2.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", @@ -13565,6 +13565,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0 || ^7.0", + "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", @@ -13605,9 +13606,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.16.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.17.0" }, - "time": "2022-11-29T15:06:56+00:00" + "time": "2023-02-02T15:41:36+00:00" }, { "name": "phpspec/prophecy-phpunit", @@ -13708,16 +13709,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.4", + "version": "1.9.17", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" + "reference": "204e459e7822f2c586463029f5ecec31bb45a1f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", - "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/204e459e7822f2c586463029f5ecec31bb45a1f2", + "reference": "204e459e7822f2c586463029f5ecec31bb45a1f2", "shasum": "" }, "require": { @@ -13747,7 +13748,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.4" + "source": "https://github.com/phpstan/phpstan/tree/1.9.17" }, "funding": [ { @@ -13763,7 +13764,7 @@ "type": "tidelift" } ], - "time": "2022-12-17T13:33:52+00:00" + "time": "2023-02-08T12:25:00+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -13815,16 +13816,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "shasum": "" }, "require": { @@ -13880,7 +13881,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" }, "funding": [ { @@ -13888,7 +13889,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-01-26T08:26:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -14133,16 +14134,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.28", + "version": "9.6.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" + "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555", + "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555", "shasum": "" }, "require": { @@ -14184,7 +14185,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -14215,7 +14216,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3" }, "funding": [ { @@ -14231,7 +14232,7 @@ "type": "tidelift" } ], - "time": "2023-01-14T12:32:24+00:00" + "time": "2023-02-04T13:37:15+00:00" }, { "name": "react/promise", @@ -14675,16 +14676,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -14726,7 +14727,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -14734,7 +14735,7 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", @@ -15048,16 +15049,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -15096,10 +15097,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -15107,7 +15108,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -15166,16 +15167,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -15210,7 +15211,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -15218,7 +15219,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", diff --git a/composer.patches.json b/composer.patches.json index 10749aba..5c20ad00 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -17,13 +17,13 @@ "Async translation - https://www.drupal.org/project/layout_paragraphs/issues/3178277": "./PATCHES/layout-paragraphs-translations-14.patch" }, "drupal/linkchecker": { - "Provide a list of unconfigured but eligible fields - https://www.drupal.org/project/linkchecker/issues/3244743": "https://git.drupalcode.org/project/linkchecker/-/merge_requests/34.diff", + "Provide a list of unconfigured but eligible fields - https://www.drupal.org/project/linkchecker/issues/3244743": "PATCHES/linkchecker-unconfirmed-but-eligible-field-list-3244743.patch", "Do not break admin denied": "./PATCHES/linkchecker_use_uid.patch", "Avoid null links": "./PATCHES/linkchecker_null_link.patch" }, "drupal/user_expire": { - "Allow the notification email to be customised": "https://git.drupalcode.org/project/user_expire/-/merge_requests/5.diff", - "Reset expiration when user is reactivated": "https://git.drupalcode.org/project/user_expire/-/merge_requests/6.diff" + "Allow the notification email to be customised": "PATCHES/user_expire-customize-notification-email.patch", + "Reset expiration when user is reactivated": "PATCHES/user_expire-reset-expiration-on-reactivation.patch" } } } diff --git a/config/dashboards.dashboard.groups.yml b/config/dashboards.dashboard.groups.yml index 08aca863..1e64ede9 100644 --- a/config/dashboards.dashboard.groups.yml +++ b/config/dashboards.dashboard.groups.yml @@ -158,4 +158,17 @@ sections: items_per_page: none weight: 1 additional: { } + f9d48407-3e71-4c03-8849-625c4842fad7: + uuid: f9d48407-3e71-4c03-8849-625c4842fad7 + region: second + configuration: + id: 'views_block:db_h1_used-block_1' + label: '' + label_display: visible + provider: views + context_mapping: { } + views_label: '' + items_per_page: none + weight: 10 + additional: { } third_party_settings: { } diff --git a/config/dashboards.dashboard.pages.yml b/config/dashboards.dashboard.pages.yml index 79e0becf..1d97807d 100644 --- a/config/dashboards.dashboard.pages.yml +++ b/config/dashboards.dashboard.pages.yml @@ -40,4 +40,17 @@ sections: items_per_page: none weight: 1 additional: { } + 04e4d095-ae62-48e8-86e2-349f9d12ca6e: + uuid: 04e4d095-ae62-48e8-86e2-349f9d12ca6e + region: content + configuration: + id: 'views_block:db_h1_on_pages-block_1' + label: '' + label_display: visible + provider: views + context_mapping: { } + views_label: '' + items_per_page: none + weight: 2 + additional: { } third_party_settings: { } diff --git a/config/filter.format.basic_html.yml b/config/filter.format.basic_html.yml index c8d2fa7d..204fe64d 100644 --- a/config/filter.format.basic_html.yml +++ b/config/filter.format.basic_html.yml @@ -43,3 +43,9 @@ filters: status: true weight: 11 settings: { } + filter_htmlcorrector: + id: filter_htmlcorrector + provider: filter + status: true + weight: 10 + settings: { } diff --git a/config/views.view.db_h1_on_pages.yml b/config/views.view.db_h1_on_pages.yml new file mode 100644 index 00000000..5403519e --- /dev/null +++ b/config/views.view.db_h1_on_pages.yml @@ -0,0 +1,663 @@ +uuid: d8d3817e-4fb9-42c1-82fd-5e3f78a4a91f +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_text + - field.storage.paragraph.field_title + module: + - csv_serialization + - group + - node + - paragraphs + - rest + - serialization + - text + - user + - views_data_export +id: db_h1_on_pages +label: 'DB H1 on pages' +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'H1 on pages' + fields: + gid: + id: gid + table: group_content_field_data + field: gid + relationship: group_content + group_type: group + admin_label: '' + entity_type: group_content + entity_field: gid + plugin_id: field + label: 'Operation / Cluster or Working Group' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: true + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: Title + exclude: false + alter: + alter_text: false + make_link: false + absolute: false + word_boundary: false + ellipsis: false + strip_tags: false + trim: false + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_title: + id: field_title + table: paragraph__field_title + field: field_title + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_text: + id: field_text + table: paragraph__field_text + field: field_text + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: field + label: Text + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 100 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: true + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: mini + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + empty: { } + sorts: + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: created + plugin_id: date + order: DESC + expose: + label: '' + field_identifier: '' + exposed: false + granularity: second + arguments: { } + filters: + status: + id: status + table: node_field_data + field: status + entity_type: node + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: title_op + label: Title + description: '' + use_operator: false + operator: title_op + operator_limit_selection: false + operator_list: { } + identifier: title + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + administrator: '0' + global_editor: '0' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + field_text_value: + id: field_text_value + table: paragraph__field_text + field: field_text_value + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + gid: gid + title: title + used_paragraphs_value: used_paragraphs_value + changed: changed + default: '-1' + info: + gid: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + title: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + used_paragraphs_value: + align: '' + separator: '' + empty_column: false + responsive: '' + changed: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: + group_content: + id: group_content + table: node_field_data + field: group_content + relationship: none + group_type: group + admin_label: 'Content group content' + entity_type: node + plugin_id: group_content_to_entity_reverse + required: false + group_content_plugins: + 'group_node:landing_page': '0' + 'group_node:page': '0' + field_paragraphs: + id: field_paragraphs + table: node__field_paragraphs + field: field_paragraphs + relationship: none + group_type: group + admin_label: 'field_paragraphs: Paragraph' + plugin_id: standard + required: false + use_ajax: true + use_more: true + use_more_always: true + use_more_text: more + link_display: page_1 + link_url: '' + header: + result: + id: result + table: views + field: result + relationship: none + group_type: group + admin_label: '' + plugin_id: result + empty: false + content: 'Displaying @start - @end of @total' + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' + block_1: + id: block_1 + display_title: Block + display_plugin: block + position: 1 + display_options: + display_extenders: { } + block_category: 'Dashboards: Response' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' + data_export_1: + id: data_export_1 + display_title: 'Data export' + display_plugin: data_export + position: 3 + display_options: + access: + type: perm + options: + perm: 'administer nodes' + style: + type: data_export + options: + formats: + csv: csv + csv_settings: + delimiter: ',' + enclosure: '"' + escape_char: \ + strip_tags: true + trim: true + encoding: utf8 + utf8_bom: '0' + use_serializer_encode_only: false + defaults: + access: false + display_extenders: { } + path: admin/content/reports/h1-used-pages.csv + displays: + page_1: page_1 + default: '0' + block_1: '0' + filename: h1-used-pages.csv + automatic_download: true + export_method: batch + export_batch_size: 100 + store_in_public_file_directory: null + custom_redirect_path: false + redirect_to_display: page_1 + include_query_params: false + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - request_format + - url + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 2 + display_options: + pager: + type: full + options: + offset: 0 + items_per_page: 50 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + first: '« First' + last: 'Last »' + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + quantity: 9 + access: + type: perm + options: + perm: 'administer nodes' + defaults: + pager: false + use_more: false + use_more_always: false + use_more_text: false + use_more: false + use_more_always: true + use_more_text: more + display_extenders: { } + path: admin/content/reports/h1-used-pages + menu: + type: tab + title: 'Used paragraph types on pages' + description: '' + weight: 0 + expanded: false + menu_name: main + parent: '' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' diff --git a/config/views.view.db_h1_used.yml b/config/views.view.db_h1_used.yml new file mode 100644 index 00000000..01e1716f --- /dev/null +++ b/config/views.view.db_h1_used.yml @@ -0,0 +1,577 @@ +uuid: 2892e171-0484-42f0-b03e-752a005fdbae +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_text + - field.storage.paragraph.field_title + module: + - csv_serialization + - group + - paragraphs + - rest + - serialization + - text + - views_data_export +id: db_h1_used +label: 'DB H1 used' +module: views +description: '' +tag: '' +base_table: groups_field_data +base_field: id +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'H1 used' + fields: + label: + id: label + table: groups_field_data + field: label + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: label + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + type: + id: type + table: paragraphs_item_field_data + field: type + relationship: field_paragraphs + group_type: group + admin_label: '' + entity_type: paragraph + entity_field: type + plugin_id: field + label: 'Paragraph type' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: false + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_title: + id: field_title + table: paragraph__field_title + field: field_title + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: field + label: Title + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_text: + id: field_text + table: paragraph__field_text + field: field_text + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: field + label: Text + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 100 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: true + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: text_default + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: mini + options: + offset: 0 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: none + options: { } + cache: + type: tag + options: { } + empty: { } + sorts: { } + arguments: { } + filters: + field_text_value: + id: field_text_value + table: paragraph__field_text + field: field_text_value + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + field_title_value: + id: field_title_value + table: paragraph__field_title + field: field_title_value + relationship: field_paragraphs + group_type: group + admin_label: '' + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: OR + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + label: label + field_hdx_dataset_link: field_hdx_dataset_link + default: '-1' + info: + label: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + field_hdx_dataset_link: + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: + field_paragraphs: + id: field_paragraphs + table: group__field_paragraphs + field: field_paragraphs + relationship: none + group_type: group + admin_label: 'field_paragraphs: Paragraph' + plugin_id: standard + required: false + use_ajax: true + header: + result: + id: result + table: views + field: result + relationship: none + group_type: group + admin_label: '' + plugin_id: result + empty: false + content: 'Displaying @start - @end of @total occurrences of "ext_cod=1" which should be updated. ' + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' + block_1: + id: block_1 + display_title: Block + display_plugin: block + position: 1 + display_options: + defaults: + use_more: false + use_more_always: false + use_more_text: false + link_display: false + link_url: false + use_more: true + use_more_always: true + use_more_text: more + link_display: page_1 + link_url: '' + display_extenders: { } + block_category: 'Dashboards: Response' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' + data_export_1: + id: data_export_1 + display_title: 'Data export' + display_plugin: data_export + position: 1 + display_options: + style: + type: data_export + options: + formats: + csv: csv + csv_settings: + delimiter: ',' + enclosure: '"' + escape_char: \ + strip_tags: true + trim: true + encoding: utf8 + utf8_bom: '0' + use_serializer_encode_only: false + display_extenders: { } + path: admin/content/reports/h1-used-group/export + displays: + page_1: page_1 + default: '0' + block_1: '0' + filename: '' + automatic_download: false + store_in_public_file_directory: null + custom_redirect_path: false + redirect_to_display: none + include_query_params: false + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - request_format + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + display_extenders: { } + path: admin/content/reports/h1-used-group + menu: + type: tab + title: 'H1 used (group)' + description: '' + weight: 0 + expanded: false + menu_name: main + parent: '' + context: '0' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + tags: + - 'config:field.storage.paragraph.field_text' + - 'config:field.storage.paragraph.field_title' diff --git a/html/modules/custom/hr_paragraphs/hr_paragraphs.module b/html/modules/custom/hr_paragraphs/hr_paragraphs.module index b5f80df7..c5ae49ce 100644 --- a/html/modules/custom/hr_paragraphs/hr_paragraphs.module +++ b/html/modules/custom/hr_paragraphs/hr_paragraphs.module @@ -84,6 +84,14 @@ function hr_paragraphs_theme($existing, $type, $theme, $path) { 'ratio' => NULL, ], ], + 'hr_paragraphs_iframe_tableau' => [ + 'template' => 'hr-paragraphs-iframe-tableau', + 'variables' => [ + 'embed_url' => NULL, + 'width' => NULL, + 'ratio' => NULL, + ], + ], 'group_children' => [ 'template' => 'group-children', 'variables' => [ @@ -528,14 +536,29 @@ function hr_paragraphs_preprocess_paragraph__iframe(&$variables) { $ratio = 'ratio-16-9'; } - $variables['content']['embed'] = [ - '#theme' => 'hr_paragraphs_iframe', - '#embed_url' => $embed_url, - '#width' => $width, - '#height' => $height, - '#ratio' => $ratio, - '#weight' => 99, - ]; + if (strpos($embed_url, 'https://public.tableau.com/views') === 0) { + if (strpos($embed_url, '?') !== FALSE) { + $embed_url = substr($embed_url, 0, strpos($embed_url, '?')); + } + + $variables['content']['embed'] = [ + '#theme' => 'hr_paragraphs_iframe_tableau', + '#embed_url' => $embed_url, + '#width' => $width, + '#ratio' => $ratio, + '#weight' => 99, + ]; + } + else { + $variables['content']['embed'] = [ + '#theme' => 'hr_paragraphs_iframe', + '#embed_url' => $embed_url, + '#width' => $width, + '#height' => $height, + '#ratio' => $ratio, + '#weight' => 99, + ]; + } } /** @@ -2332,3 +2355,20 @@ function hr_paragraphs_node_presave(EntityInterface $entity) { } } } + +/** + * Implements hook_editor_js_settings_alter(). + */ +function hr_paragraphs_editor_js_settings_alter(array &$settings) { + if (isset($settings['editor']['formats']['full_html']['editorSettings']['format_tags']) + && strpos($settings['editor']['formats']['full_html']['editorSettings']['format_tags'], 'h1;')) { + $format_tags = str_replace('h1;', '', $settings['editor']['formats']['full_html']['editorSettings']['format_tags']); + $settings['editor']['formats']['full_html']['editorSettings']['format_tags'] = $format_tags; + } + + if (isset($settings['editor']['formats']['basic_html']['editorSettings']['format_tags']) + && strpos($settings['editor']['formats']['basic_html']['editorSettings']['format_tags'], 'h1;')) { + $format_tags = str_replace('h1;', '', $settings['editor']['formats']['basic_html']['editorSettings']['format_tags']); + $settings['editor']['formats']['basic_html']['editorSettings']['format_tags'] = $format_tags; + } +} diff --git a/html/modules/custom/hr_paragraphs/src/Controller/IcalController.php b/html/modules/custom/hr_paragraphs/src/Controller/IcalController.php index 41f956d0..22b74419 100644 --- a/html/modules/custom/hr_paragraphs/src/Controller/IcalController.php +++ b/html/modules/custom/hr_paragraphs/src/Controller/IcalController.php @@ -94,6 +94,11 @@ public function getIcalEvents(Group $group, string $range_start = NULL, string $ } } + // Make sure DTEND is set. + if (!isset($event['DTEND'])) { + $event['DTEND'] = $event['DTSTART']; + } + if (isset($event['RRULE'])) { $iterationCount = 0; $maxIterations = 40; diff --git a/html/modules/custom/hr_paragraphs/templates/hr-paragraphs-iframe-tableau.html.twig b/html/modules/custom/hr_paragraphs/templates/hr-paragraphs-iframe-tableau.html.twig new file mode 100644 index 00000000..759321bb --- /dev/null +++ b/html/modules/custom/hr_paragraphs/templates/hr-paragraphs-iframe-tableau.html.twig @@ -0,0 +1,14 @@ +{% + set classes = [ + 'hri-iframe', + 'hri-iframe-tableau', + 'hri-iframe--' ~ ratio, + ] +%} + +
+ diff --git a/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml b/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml index 6ad1f5b4..f4043d68 100644 --- a/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml +++ b/html/themes/custom/common_design_subtheme/common_design_subtheme.libraries.yml @@ -117,6 +117,12 @@ hri-iframe: js: components/hri-iframe/hri-iframe.js: {} +tableau: + js: + components/hri-iframe/tableau-2.9.1.min.js: {} + components/hri-iframe/tableau-2.min.js: {} + components/hri-iframe/tableau.js: {} + hri-layout: css: component: diff --git a/html/themes/custom/common_design_subtheme/components/hri-iframe/tableau-2.9.1.min.js b/html/themes/custom/common_design_subtheme/components/hri-iframe/tableau-2.9.1.min.js new file mode 100644 index 00000000..43558064 --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/hri-iframe/tableau-2.9.1.min.js @@ -0,0 +1,10 @@ +/*! tableau-2.9.1 */ +(function(){ +/*! BEGIN MscorlibSlim */ +var global={};(function(global){'use strict';var ss={__assemblies:{}};ss.initAssembly=function(obj,name,res){res=res||{};obj.name=name;obj.toString=function(){return this.name};obj.__types={};obj.getResourceNames=function(){return Object.keys(res)};obj.getResourceDataBase64=function(name){return res[name]||null};obj.getResourceData=function(name){var r=res[name];return r?ss.dec64(r):null};ss.__assemblies[name]=obj};ss.initAssembly(ss,'mscorlib');ss.getAssemblies=function(){return Object.keys(ss.__assemblies).map(function(n){return ss.__assemblies[n]})};ss.isNullOrUndefined=function(o){return(o===null)||(o===undefined)};ss.isValue=function(o){return(o!==null)&&(o!==undefined)};ss.referenceEquals=function(a,b){return ss.isValue(a)?a===b:!ss.isValue(b)};ss.mkdict=function(){var a=(arguments.length!==1?arguments:arguments[0]);var r={};for(var i=0;i=0};ss.isArrayOrTypedArray=function(obj){return ss.isArray(obj)||ss.isTypedArrayType(ss.getInstanceType(obj))};ss.equals=function(a,b){if(!ss.isValue(a))throw new ss_NullReferenceException('Object is null');else if(a!==ss&&typeof(a.equals)==='function')return a.equals(b);if(ss.isDate(a)&&ss.isDate(b))return a.valueOf()===b.valueOf();else if(typeof(a)==='function'&&typeof(b)==='function')return ss.delegateEquals(a,b);else if(ss.isNullOrUndefined(a)&&ss.isNullOrUndefined(b))return true;else return a===b};ss.compare=function(a,b){if(!ss.isValue(a))throw new ss_NullReferenceException('Object is null');else if(typeof(a)==='number'||typeof(a)==='string'||typeof(a)==='boolean')return ss.isValue(b)?(ab?1:0)):1;else if(ss.isDate(a))return ss.isValue(b)?ss.compare(a.valueOf(),b.valueOf()):1;else return a.compareTo(b)};ss.equalsT=function(a,b){if(!ss.isValue(a))throw new ss_NullReferenceException('Object is null');else if(typeof(a)==='number'||typeof(a)==='string'||typeof(a)==='boolean')return a===b;else if(ss.isDate(a))return a.valueOf()===b.valueOf();else return a.equalsT(b)};ss.staticEquals=function(a,b){if(!ss.isValue(a))return!ss.isValue(b);else return ss.isValue(b)?ss.equals(a,b):false};ss.shallowCopy=(function(){try{var x=Object.getOwnPropertyDescriptor({a:0},'a').value;return true}catch(ex){return false}})()?function(source,target){var keys=Object.keys(source);for(var i=0,l=keys.length;i';var type=ss.__anonymousCache[name];if(!type){type=new Function(members.map(function(m){return m[1]}).join(','),members.map(function(m){return'this.'+m[1]+'='+m[1]+';'}).join(''));type.__typeName=name;var infos=members.map(function(m){return{name:m[1],typeDef:type,type:16,returnType:m[0],getter:{name:'get_'+m[1],typeDef:type,params:[],returnType:m[0],fget:m[1]}}});infos.push({name:'.ctor',typeDef:type,type:1,params:members.map(function(m){return m[0]})});type.__metadata={members:infos};ss.__anonymousCache[name]=type}return type};ss.setMetadata=function(type,metadata){if(metadata.members){for(var i=0;i=0?bIndex:fullName.length);return nsIndex>0?fullName.substr(nsIndex+1):fullName};ss.getTypeNamespace=function(type){var fullName=ss.getTypeFullName(type);var bIndex=fullName.indexOf('[');var nsIndex=fullName.lastIndexOf('.',bIndex>=0?bIndex:fullName.length);return nsIndex>0?fullName.substr(0,nsIndex):''};ss.getTypeAssembly=function(type){if(ss.contains([Date,Number,Boolean,String,Function,Array],type))return ss;else return type.__assembly||null};ss._getAssemblyType=function(asm,name){if(asm.__types){return asm.__types[name]||null}else{var a=name.split('.');for(var i=0;i0?typeName.substring(m.index+1,re.lastIndex-1):typeName.substring(m.index+1)).trim()]))return null}break;case']':break;case',':re.exec(typeName);if(!(asm=ss.__assemblies[(re.lastIndex>0?typeName.substring(m.index+1,re.lastIndex-1):typeName.substring(m.index+1)).trim()]))return null;break}}else{tname=typeName.substring(last)}if(outer&&re.lastIndex)return null;t=ss._getAssemblyType(asm,tname.trim());return targs.length?ss.makeGenericType(t,targs):t};ss.getType=function(typeName,asm){return typeName?ss._getType(typeName,asm||global):null};ss.getDefaultValue=function(type){if(typeof(type.getDefaultValue)==='function')return type.getDefaultValue();else if(type===Boolean)return false;else if(type===Date)return new Date(0);else if(type===Number)return 0;return null};ss.createInstance=function(type){if(typeof(type.createInstance)==='function')return type.createInstance();else if(type===Boolean)return false;else if(type===Date)return new Date(0);else if(type===Number)return 0;else if(type===String)return'';else return new type};var ss_IFormattable=ss.IFormattable=ss.mkType(ss,'ss.IFormattable');ss.initInterface(ss_IFormattable,{format:null});var ss_IComparable=ss.IComparable=ss.mkType(ss,'ss.IComparable');ss.initInterface(ss_IComparable,{compareTo:null});var ss_IEquatable=ss.IEquatable=ss.mkType(ss,'ss.IEquatable');ss.initInterface(ss_IEquatable,{equalsT:null});ss.isNullOrEmptyString=function(s){return!s||!s.length};if(!String.prototype.trim){String.prototype.trim=function(){return ss.trimStartString(ss.trimEndString(this))}}ss.trimEndString=function(s,chars){return s.replace(chars?new RegExp('['+String.fromCharCode.apply(null,chars)+']+$'):/\s*$/,'')};ss.trimStartString=function(s,chars){return s.replace(chars?new RegExp('^['+String.fromCharCode.apply(null,chars)+']+'):/^\s*/,'')};ss.trimString=function(s,chars){return ss.trimStartString(ss.trimEndString(s,chars),chars)};ss.arrayClone=function(arr){if(arr.length===1){return[arr[0]]}else{return Array.apply(null,arr)}};if(!Array.prototype.map){Array.prototype.map=function(callback,instance){var length=this.length;var mapped=new Array(length);for(var i=0;i>>0;if(typeof callback!=='function'){throw new TypeError(callback+' is not a function')}if(arguments.length>1){T=thisArg}k=0;while(k>>0;if(typeof fun!=='function'){throw new TypeError}var res=[];var thisArg=arguments.length>=2?arguments[1]:void 0;for(var i=0;i=0){obj.splice(index,1);return true}return false}else throw new ss_NotSupportedException};ss.contains=function(obj,item){if(obj.contains)return obj.contains(item);else return ss.indexOf(obj,item)>=0};var ss_IReadOnlyCollection=ss.IReadOnlyCollection=ss.mkType(ss,'ss.IReadOnlyCollection');ss.initInterface(ss_IReadOnlyCollection,{get_count:null,contains:null},[ss_IEnumerable]);var ss_IEqualityComparer=ss.IEqualityComparer=ss.mkType(ss,'ss.IEqualityComparer');ss.initInterface(ss_IEqualityComparer,{areEqual:null,getObjectHashCode:null});var ss_IComparer=ss.IComparer=ss.mkType(ss,'ss.IComparer');ss.initInterface(ss_IComparer,{compare:null});ss.unbox=function(instance){if(!ss.isValue(instance))throw new ss_InvalidOperationException('Nullable object must have a value.');return instance};var ss_Nullable$1=ss.Nullable$1=ss.mkType(ss,'ss.Nullable$1',function(T){var $type=ss.registerGenericClassInstance(ss_Nullable$1,[T],null,{},{isInstanceOfType:function(instance){return ss.isInstanceOfType(instance,T)}});return $type},null,{eq:function(a,b){return!ss.isValue(a)?!ss.isValue(b):(a===b)},ne:function(a,b){return!ss.isValue(a)?ss.isValue(b):(a!==b)},le:function(a,b){return ss.isValue(a)&&ss.isValue(b)&&a<=b},ge:function(a,b){return ss.isValue(a)&&ss.isValue(b)&&a>=b},lt:function(a,b){return ss.isValue(a)&&ss.isValue(b)&&ab},sub:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a-b:null},add:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a+b:null},mod:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a%b:null},div:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a/b:null},mul:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a*b:null},band:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a&b:null},bor:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a|b:null},bxor:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a^b:null},shl:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a<>b:null},sru:function(a,b){return ss.isValue(a)&&ss.isValue(b)?a>>>b:null},and:function(a,b){if(a===true&&b===true)return true;else if(a===false||b===false)return false;else return null},or:function(a,b){if(a===true||b===true)return true;else if(a===false&&b===false)return false;else return null},xor:function(a,b){return ss.isValue(a)&&ss.isValue(b)?!!(a^b):null},not:function(a){return ss.isValue(a)?!a:null},neg:function(a){return ss.isValue(a)?-a:null},pos:function(a){return ss.isValue(a)?+a:null},cpl:function(a){return ss.isValue(a)?~a:null},lift1:function(f,o){return ss.isValue(o)?f(o):null},lift2:function(f,a,b){return ss.isValue(a)&&ss.isValue(b)?f(a,b):null},liftcmp:function(f,a,b){return ss.isValue(a)&&ss.isValue(b)?f(a,b):false},lifteq:function(f,a,b){var va=ss.isValue(a),vb=ss.isValue(b);return(!va&&!vb)||(va&&vb&&f(a,b))},liftne:function(f,a,b){var va=ss.isValue(a),vb=ss.isValue(b);return(va!==vb)||(va&&f(a,b))}});ss.initGenericClass(ss_Nullable$1,1);var ss_IList=ss.IList=ss.mkType(ss,'ss.IList');ss.initInterface(ss_IList,{get_item:null,set_item:null,indexOf:null,insert:null,removeAt:null},[ss_ICollection,ss_IEnumerable]);ss.getItem=function(obj,index){return obj.get_item?obj.get_item(index):obj[index]};ss.setItem=function(obj,index,value){obj.set_item?obj.set_item(index,value):(obj[index]=value)};ss.indexOf=function(obj,item){if((!item||typeof(item.equals)!=='function')&&typeof(obj.indexOf)==='function'){return obj.indexOf(item)}else if(ss.isArrayOrTypedArray(obj)){for(var i=0;i=min&&instance<=max},createInstance:function(){return 0}});ss.initStruct(type,[ss_IEquatable,ss_IComparable,ss_IFormattable]);return type};var ss_Byte=defInt('Byte',0,255);var ss_SByte=defInt('SByte',-128,127);var ss_Int16=defInt('Int16',-32768,32767);var ss_UInt16=defInt('UInt16',0,65535);var ss_Int32=defInt('Int32',-2147483648,2147483647);var ss_UInt32=defInt('UInt32',0,4294967295);var ss_Int64=defInt('Int64',-9223372036854775808,9223372036854775807);var ss_UInt64=defInt('UInt64',0,18446744073709551615);var ss_Char=defInt('Char',0,65535);ss.sxb=function(x){return x|(x&0x80?0xffffff00:0)};ss.sxs=function(x){return x|(x&0x8000?0xffff0000:0)};ss.clip8=function(x){return ss.isValue(x)?ss.sxb(x&0xff):null};ss.clipu8=function(x){return ss.isValue(x)?x&0xff:null};ss.clip16=function(x){return ss.isValue(x)?ss.sxs(x&0xffff):null};ss.clipu16=function(x){return ss.isValue(x)?x&0xffff:null};ss.clip32=function(x){return ss.isValue(x)?x|0:null};ss.clipu32=function(x){return ss.isValue(x)?x>>>0:null};ss.clip64=function(x){return ss.isValue(x)?(Math.floor(x/0x100000000)|0)*0x100000000+(x>>>0):null};ss.clipu64=function(x){return ss.isValue(x)?(Math.floor(x/0x100000000)>>>0)*0x100000000+(x>>>0):null};ss.ck=function(x,tp){if(ss.isValue(x)&&!tp.isInstanceOfType(x))throw new ss_OverflowException;return x};ss.trunc=function(n){return ss.isValue(n)?(n>0?Math.floor(n):Math.ceil(n)):null};ss.idiv=function(a,b){if(!ss.isValue(a)||!ss.isValue(b))return null;if(!b)throw new ss_DivideByZeroException;return ss.trunc(a/b)};ss.imod=function(a,b){if(!ss.isValue(a)||!ss.isValue(b))return null;if(!b)throw new ss_DivideByZeroException;return a%b};var ss_JsDate=ss.JsDate=ss.mkType(ss,'ss.JsDate',function(){},null,{createInstance:function(){return new Date},isInstanceOfType:function(instance){return instance instanceof Date}});ss.initClass(ss_JsDate,null,[ss_IEquatable,ss_IComparable]);var ss_ArrayEnumerator=ss.ArrayEnumerator=ss.mkType(ss,'ss.ArrayEnumerator',function(array){this._array=array;this._index=-1},{moveNext:function(){this._index++;return(this._index=this._array.length)throw'Invalid operation';return this._array[this._index]},dispose:function(){}});ss.initClass(ss_ArrayEnumerator,null,[ss_IEnumerator,ss_IDisposable]);var ss_ObjectEnumerator=ss.ObjectEnumerator=ss.mkType(ss,'ss.ObjectEnumerator',function(o){this._keys=Object.keys(o);this._index=-1;this._object=o},{moveNext:function(){this._index++;return(this._index=this._keys.length)throw new ss_InvalidOperationException('Invalid operation');var k=this._keys[this._index];return{key:k,value:this._object[k]}},dispose:function(){}});ss.initClass(ss_ObjectEnumerator,null,[ss_IEnumerator,ss_IDisposable]);var ss_EqualityComparer=ss.EqualityComparer=ss.mkType(ss,'ss.EqualityComparer',function(){},{areEqual:function(x,y){return ss.staticEquals(x,y)},getObjectHashCode:function(obj){return ss.isValue(obj)?ss.getHashCode(obj):0}});ss.initClass(ss_EqualityComparer,null,[ss_IEqualityComparer]);ss_EqualityComparer.def=new ss_EqualityComparer;var ss_Comparer=ss.Comparer=ss.mkType(ss,'ss.Comparer',function(f){this.f=f},{compare:function(x,y){return this.f(x,y)}});ss.initClass(ss_Comparer,null,[ss_IComparer]);ss_Comparer.def=new ss_Comparer(function(a,b){if(!ss.isValue(a))return!ss.isValue(b)?0:-1;else if(!ss.isValue(b))return 1;else return ss.compare(a,b)});var ss_IDisposable=ss.IDisposable=ss.mkType(ss,'ss.IDisposable');ss.initInterface(ss_IDisposable,{dispose:null});var ss_StringBuilder=ss.StringBuilder=ss.mkType(ss,'ss.StringBuilder',function(s){this._parts=(ss.isValue(s)&&s!=='')?[s]:[];this.length=ss.isValue(s)?s.length:0},{append:function(o){if(ss.isValue(o)){var s=o.toString();ss.add(this._parts,s);this.length+=s.length}return this},appendChar:function(c){return this.append(String.fromCharCode(c))},appendLine:function(s){this.append(s);this.append('\r\n');return this},appendLineChar:function(c){return this.appendLine(String.fromCharCode(c))},clear:function(){this._parts=[];this.length=0},toString:function(){return this._parts.join('')}});ss.initClass(ss_StringBuilder);var ss_EventArgs=ss.EventArgs=ss.mkType(ss,'ss.EventArgs',function(){});ss.initClass(ss_EventArgs);ss_EventArgs.Empty=new ss_EventArgs;var ss_Exception=ss.Exception=ss.mkType(ss,'ss.Exception',function(message,innerException){this._message=message||'An error occurred.';this._innerException=innerException||null;this._error=new Error},{get_message:function(){return this._message},get_innerException:function(){return this._innerException},get_stack:function(){return this._error.stack},toString:function(){var message=this._message;var exception=this;if(ss.isNullOrEmptyString(message)){if(ss.isValue(ss.getInstanceType(exception))&&ss.isValue(ss.getTypeFullName(ss.getInstanceType(exception)))){message=ss.getTypeFullName(ss.getInstanceType(exception))}else{message='[object Exception]'}}return message}},{wrap:function(o){if(ss.isInstanceOfType(o,ss_Exception)){return o}else if(o instanceof TypeError){return new ss_NullReferenceException(o.message,new ss_JsErrorException(o))}else if(o instanceof RangeError){return new ss_ArgumentOutOfRangeException(null,o.message,new ss_JsErrorException(o))}else if(o instanceof Error){return new ss_JsErrorException(o)}else{return new ss_Exception(o.toString())}}});ss.initClass(ss_Exception);var ss_NotImplementedException=ss.NotImplementedException=ss.mkType(ss,'ss.NotImplementedException',function(message,innerException){ss_Exception.call(this,message||'The method or operation is not implemented.',innerException)});ss.initClass(ss_NotImplementedException,ss_Exception);var ss_NotSupportedException=ss.NotSupportedException=ss.mkType(ss,'ss.NotSupportedException',function(message,innerException){ss_Exception.call(this,message||'Specified method is not supported.',innerException)});ss.initClass(ss_NotSupportedException,ss_Exception);var ss_JsErrorException=ss.JsErrorException=ss.mkType(ss,'ss.JsErrorException',function(error,message,innerException){ss_Exception.call(this,message||error.message,innerException);this.error=error},{get_stack:function(){return this.error.stack}});ss.initClass(ss_JsErrorException,ss_Exception);var ss_ArgumentException=ss.ArgumentException=ss.mkType(ss,'ss.ArgumentException',function(message,paramName,innerException){ss_Exception.call(this,message||'Value does not fall within the expected range.',innerException);this.paramName=paramName||null});ss.initClass(ss_ArgumentException,ss_Exception);var ss_ArgumentNullException=ss.ArgumentNullException=ss.mkType(ss,'ss.ArgumentNullException',function(paramName,message,innerException){if(!message){message='Value cannot be null.';if(paramName)message+='\nParameter name: '+paramName}ss_ArgumentException.call(this,message,paramName,innerException)});ss.initClass(ss_ArgumentNullException,ss_ArgumentException);var ss_ArgumentOutOfRangeException=ss.ArgumentOutOfRangeException=ss.mkType(ss,'ss.ArgumentOutOfRangeException',function(paramName,message,innerException,actualValue){if(!message){message='Value is out of range.';if(paramName)message+='\nParameter name: '+paramName}ss_ArgumentException.call(this,message,paramName,innerException);this.actualValue=actualValue||null});ss.initClass(ss_ArgumentOutOfRangeException,ss_ArgumentException);var ss_FormatException=ss.FormatException=ss.mkType(ss,'ss.FormatException',function(message,innerException){ss_Exception.call(this,message||'Invalid format.',innerException)});ss.initClass(ss_FormatException,ss_Exception);var ss_ArithmeticException=ss.ArithmeticException=ss.mkType(ss,'ss.ArithmeticException',function(message,innerException){ss_Exception.call(this,message||'Overflow or underflow in the arithmetic operation.',innerException)});ss.initClass(ss_ArithmeticException,ss_Exception);var ss_OverflowException=ss.OverflowException=ss.mkType(ss,'ss.OverflowException',function(message,innerException){ss_ArithmeticException.call(this,message||'Arithmetic operation resulted in an overflow.',innerException)});ss.initClass(ss_OverflowException,ss_ArithmeticException);var ss_DivideByZeroException=ss.DivideByZeroException=ss.mkType(ss,'ss.DivideByZeroException',function(message,innerException){ss_ArithmeticException.call(this,message||'Division by 0.',innerException)});ss.initClass(ss_DivideByZeroException,ss_ArithmeticException);var ss_InvalidCastException=ss.InvalidCastException=ss.mkType(ss,'ss.InvalidCastException',function(message,innerException){ss_Exception.call(this,message||'The cast is not valid.',innerException)});ss.initClass(ss_InvalidCastException,ss_Exception);var ss_InvalidOperationException=ss.InvalidOperationException=ss.mkType(ss,'ss.InvalidOperationException',function(message,innerException){ss_Exception.call(this,message||'Operation is not valid due to the current state of the object.',innerException)});ss.initClass(ss_InvalidOperationException,ss_Exception);var ss_NullReferenceException=ss.NullReferenceException=ss.mkType(ss,'ss.NullReferenceException',function(message,innerException){ss_Exception.call(this,message||'Object is null.',innerException)});ss.initClass(ss_NullReferenceException,ss_Exception);var ss_KeyNotFoundException=ss.KeyNotFoundException=ss.mkType(ss,'ss.KeyNotFoundException',function(message,innerException){ss_Exception.call(this,message||'Key not found.',innerException)});ss.initClass(ss_KeyNotFoundException,ss_Exception);var ss_AmbiguousMatchException=ss.AmbiguousMatchException=ss.mkType(ss,'ss.AmbiguousMatchException',function(message,innerException){ss_Exception.call(this,message||'Ambiguous match.',innerException)});ss.initClass(ss_AmbiguousMatchException,ss_Exception);global.ss=ss})(global);var ss=global.ss; +/*! BEGIN CoreSlim */ +(function(){'dont use strict';var a={};global.tab=global.tab||{};ss.initAssembly(a,'tabcoreslim');var b=global.tab.BaseLogAppender=ss.mkType(a,'tab.BaseLogAppender',function(){this.$0=null;this.$0=[]},{clearFilters:function(){ss.clear(this.$0)},addFilter:function(m){this.$0.push(m)},removeFilter:function(m){ss.remove(this.$0,m)},log:function(m,n,o,p){},logInternal:null,formatMessage:function(m,n){if(ss.isNullOrUndefined(n)||n.length===0){return m}var o=new ss.StringBuilder;var p=0;var q=false;for(var r=0;rp)?n[p]:''));p++;break}}}else{o.appendChar(s)}q=false}}return o.toString()}});var c=global.tab.ConsoleLogAppender=ss.mkType(a,'tab.ConsoleLogAppender',function(){this.$2=null;b.call(this)},{logInternal:function(m,n,o,p){if(typeof(window.console)!=='object'){return}o=m.get_name()+': '+o;var q=[];var r=q.concat(o);q=r.concat.apply(r,p);try{Function.prototype.apply.call(this.$1(n),window.console,q)}catch(s){}},$1:function(m){var n=window.self['console'];if(ss.isNullOrUndefined(this.$2)){this.$2={};this.$2[(1).toString()]=n.log;this.$2[(4).toString()]=n.error;this.$2[(2).toString()]=n.info;this.$2[(3).toString()]=n.warn}var o=this.$2[m.toString()];if(ss.isNullOrUndefined(o)){o=n.log}return o}});var d=global.tab.EscapingUtil=ss.mkType(a,'tab.EscapingUtil',null,null,{escapeHtml:function(m){var n=ss.coalesce(m,'');n=n.replace(new RegExp('&','g'),'&');n=n.replace(new RegExp('<','g'),'<');n=n.replace(new RegExp('>','g'),'>');n=n.replace(new RegExp('"','g'),'"');n=n.replace(new RegExp("'",'g'),''');n=n.replace(new RegExp('/','g'),'/');if((new RegExp('^ +$')).test(n)){n=n.replace(new RegExp(' ','g'),' ')}return n}});var e=global.tab.Log=ss.mkType(a,'tab.Log',function(){},null,{get:function(m){return g.lazyGetLogger(ss.getInstanceType(m))},get$1:function(m){return g.lazyGetLogger(m)}});var f=global.tab.LogAppenderInstance=ss.mkType(a,'tab.LogAppenderInstance',function(m){this.$0=null;this.$1$1=null;this.$0=m},{get_instance:function(){return this.$1$1},set_instance:function(m){this.$1$1=m},enableLogging:function(m){if(ss.isNullOrUndefined(this.get_instance())){this.set_instance(this.$0());g.addAppender(this.get_instance())}else if(!g.hasAppender(this.get_instance())){g.addAppender(this.get_instance())}this.get_instance().addFilter(ss.coalesce(m,function(n,o){return true}))},disableLogging:function(){if(ss.isNullOrUndefined(this.get_instance())){return}g.removeAppender(this.get_instance());this.set_instance(null)}});var g=global.tab.Logger=ss.mkType(a,'tab.Logger',function(m){this.$1=null;this.$1=m},{get_name:function(){return this.$1},debug:function(m,n){},info:function(m,n){},warn:function(m,n){},error:function(m,n){},log:function(m,n,o){},$0:function(m,n,o){try{for(var p=0;p=n})},filterByType:function(m,n){n=n||0;g.$0(function(o,p){return p>=n&&ss.referenceEquals(o.get_name(),ss.getTypeName(m))})},filterByName:function(m,n){n=n||0;var o=new RegExp(m,'i');g.$0(function(p,q){return q>=n&&ss.isValue(p.get_name().match(o))})},clearAppenders:function(){g.$3.splice(0,g.$4.length)},hasAppender:function(m){return g.$3.indexOf(m)>-1},addAppender:function(m){for(var n=0;n-1){g.$3.splice(n,1)}},lazyGetLogger:function(m){var n='_logger';var o=m[n];if(ss.isNullOrUndefined(o)){o=g.getLogger(m,null);m[n]=o}return o},getLogger:function(m,n){var o=g.getLoggerWithName(ss.getTypeName(m));if(ss.isValue(n)){}return o},getLoggerWithName:function(m){return g.$6},$1:function(){var m=k.getUriQueryParameters(window.self.location.search);if(!ss.keyExists(m,':log')){return}var n=m[':log'];if(n.length===0){}for(var o=0;o0&&ss.isValue(q[1])){var s=q[1].toLowerCase();var t=g.loggerLevelNames.indexOf(s);if(t>=0){r=t}}}},$0:function(m){g.$4.push(m);for(var n=0;n=0){p=p.substr(0,q)}if(ss.isNullOrEmptyString(p)){return n}var r=p.split('&');for(var s=0;s1){w.push(j.decodeUriComponentCorrectly(u[1]))}}return n}});var l=global.tab.WindowHelper=ss.mkType(a,'tab.WindowHelper',function(m){this.$0=null;this.$0=m},{get_pageXOffset:function(){return l.$9(this.$0)},get_pageYOffset:function(){return l.$a(this.$0)},get_clientWidth:function(){return l.$4(this.$0)},get_clientHeight:function(){return l.$3(this.$0)},get_innerWidth:function(){return l.$6(this.$0)},get_outerWidth:function(){return l.$8(this.$0)},get_innerHeight:function(){return l.$5(this.$0)},get_outerHeight:function(){return l.$7(this.$0)},get_screenLeft:function(){return l.$b(this.$0)},get_screenTop:function(){return l.$c(this.$0)},isQuirksMode:function(){return document.compatMode==='BackCompat'}},{get_windowSelf:function(){return window.self},get_windowParent:function(){return window.parent},get_selection:function(){if(typeof(window['getSelection'])==='function'){return window.getSelection()}if(typeof(document['getSelection'])==='function'){return document.getSelection()}return null},close:function(m){m.close()},getOpener:function(m){return m.opener},getLocation:function(m){return m.location},getOrigin:function(m,n){return m.location.protocol+'//'+(n?m.location.host:m.location.hostname)},getPathAndSearch:function(m){return m.location.pathname+m.location.search},setLocationHref:function(m,n){m.location.href=n},locationReplace:function(m,n){m.location.replace(n)},open:function(m,n,o){return window.open(m,n,o)},reload:function(m,n){m.location.reload(n)},requestAnimationFrame:function(m){return l.$d(m)},cancelAnimationFrame:function(m){if(ss.isValue(m)){l.$2(m)}},setTimeout:function(m,n){return window.setTimeout(m,n)},setInterval:function(m,n){return window.setInterval(m,n)},addListener:function(m,n,o){if('addEventListener'in m){m.addEventListener(n,o,false)}else{m.attachEvent('on'+n,o)}},removeListener:function(m,n,o){if('removeEventListener'in m){m.removeEventListener(n,o,false)}else{m.detachEvent('on'+n,o)}},$0:function(){var m=0;l.$d=function(n){var o=(new Date).getTime();var p=Math.max(0,16-(o-m));m=o+p;var q=window.setTimeout(n,p);return q}},clearSelection:function(){var m=l.get_selection();if(ss.isValue(m)){if(typeof(m['removeAllRanges'])==='function'){m.removeAllRanges()}else if(typeof(m['empty'])==='function'){m['empty']()}}}});ss.initClass(b);ss.initClass(c,b);ss.initClass(d);ss.initClass(e);ss.initClass(f);ss.initClass(g);ss.initClass(i);ss.initClass(j);ss.initClass(k);ss.initClass(l);(function(){g.global=g.getLoggerWithName('global');g.loggerLevelNames=[];g.$5=':log';g.$3=[];g.$4=[];g.$6=new g('');g.loggerLevelNames[0]='all';g.loggerLevelNames[1]='debug';g.loggerLevelNames[2]='info';g.loggerLevelNames[3]='warn';g.loggerLevelNames[4]='error';g.loggerLevelNames[5]='off'})();(function(){c.globalAppender=new f(function(){return new c})})();(function(){l.blank='_blank';l.$6=null;l.$5=null;l.$4=null;l.$3=null;l.$9=null;l.$a=null;l.$b=null;l.$c=null;l.$8=null;l.$7=null;l.$d=null;l.$2=null;if('innerWidth'in window){l.$6=function(u){return u.innerWidth}}else{l.$6=function(u){return u.document.documentElement.offsetWidth}}if('outerWidth'in window){l.$8=function(u){return u.outerWidth}}else{l.$8=l.$6}if('innerHeight'in window){l.$5=function(u){return u.innerHeight}}else{l.$5=function(u){return u.document.documentElement.offsetHeight}}if('outerHeight'in window){l.$7=function(u){return u.outerHeight}}else{l.$7=l.$5}if('clientWidth'in window){l.$4=function(u){return u['clientWidth']}}else{l.$4=function(u){return u.document.documentElement.clientWidth}}if('clientHeight'in window){l.$3=function(u){return u['clientHeight']}}else{l.$3=function(u){return u.document.documentElement.clientHeight}}if(ss.isValue(window.self.pageXOffset)){l.$9=function(u){return u.pageXOffset}}else{l.$9=function(u){return u.document.documentElement.scrollLeft}}if(ss.isValue(window.self.pageYOffset)){l.$a=function(u){return u.pageYOffset}}else{l.$a=function(u){return u.document.documentElement.scrollTop}}if('screenLeft'in window){l.$b=function(u){return u.screenLeft}}else{l.$b=function(u){return u.screenX}}if('screenTop'in window){l.$c=function(u){return u.screenTop}}else{l.$c=function(u){return u.screenY}}{var m='requestAnimationFrame';var n='cancelAnimationFrame';var o=['ms','moz','webkit','o'];var p=null;var q=null;if(m in window){p=m}if(n in window){q=n}for(var r=0;r128){throw o.createMaxCharStringArgumentException(bj,128)}},verifyValue:function(e,bj){if(ss.isNullOrUndefined(e)){throw o.createInternalNullArgumentException(bj)}}});var m=global.tab._PromiseImpl=ss.mkType(a,'tab._PromiseImpl',function(e){this.then=null;this.then=e},{always:function(e){return this.then(e,e)},otherwise:function(e){return this.then(null,e)}});var n=global.tab._Rect=ss.mkType(a,'tab._Rect',function(e,bj,bk,bl){this.left=0;this.top=0;this.width=0;this.height=0;this.left=e;this.top=bj;this.width=bk;this.height=bl},{intersect:function(e){var bj=Math.max(this.left,e.left);var bk=Math.max(this.top,e.top);var bl=Math.min(this.left+this.width,e.left+e.width);var bm=Math.min(this.top+this.height,e.top+e.height);if(bl<=bj||bm<=bk){return new n(0,0,0,0)}return new n(bj,bk,bl-bj,bm-bk)}});var o=global.tab._TableauException=ss.mkType(a,'tab._TableauException',null,null,{create:function(e,bj){var bk=new ss.Exception(bj);bk['tableauSoftwareErrorCode']=e;return bk},createInternalError:function(e){if(ss.isValue(e)){return o.create('internalError','Internal error. Please contact Tableau support with the following information: '+e)}else{return o.create('internalError','Internal error. Please contact Tableau support')}},createInternalNullArgumentException:function(e){return o.createInternalError("Null/undefined argument '"+e+"'.")},createInternalStringArgumentException:function(e){return o.createInternalError("Invalid string argument '"+e+"'.")},createMaxCharStringArgumentException:function(e,bj){return o.createInternalError("Argument '"+e+"' exceeds char limit of '"+bj+"'.")},createServerError:function(e){return o.create('serverError',e)},createNotActiveSheet:function(){return o.create('notActiveSheet','Operation not allowed on non-active sheet')},createInvalidCustomViewName:function(e){return o.create('invalidCustomViewName','Invalid custom view name: '+e)},createInvalidParameter:function(e){return o.create('invalidParameter','Invalid parameter: '+e)},createInvalidFilterFieldNameOrValue:function(e){return o.create('invalidFilterFieldNameOrValue','Invalid filter field name or value: '+e)},createInvalidDateParameter:function(e){return o.create('invalidDateParameter','Invalid date parameter: '+e)},createNullOrEmptyParameter:function(e){return o.create('nullOrEmptyParameter','Parameter cannot be null or empty: '+e)},createMissingMaxSize:function(){return o.create('missingMaxSize','Missing maxSize for SheetSizeBehavior.ATMOST')},createMissingMinSize:function(){return o.create('missingMinSize','Missing minSize for SheetSizeBehavior.ATLEAST')},createMissingMinMaxSize:function(){return o.create('missingMinMaxSize','Missing minSize or maxSize for SheetSizeBehavior.RANGE')},createInvalidRangeSize:function(){return o.create('invalidSize','Missing minSize or maxSize for SheetSizeBehavior.RANGE')},createInvalidSizeValue:function(){return o.create('invalidSize','Size value cannot be less than zero')},createInvalidSheetSizeParam:function(){return o.create('invalidSize','Invalid sheet size parameter')},createSizeConflictForExactly:function(){return o.create('invalidSize','Conflicting size values for SheetSizeBehavior.EXACTLY')},createInvalidSizeBehaviorOnWorksheet:function(){return o.create('invalidSizeBehaviorOnWorksheet','Only SheetSizeBehavior.AUTOMATIC is allowed on Worksheets')},createNoUrlForHiddenWorksheet:function(){return o.create('noUrlForHiddenWorksheet','Hidden worksheets do not have a URL.')},createInvalidAggregationFieldName:function(e){return o.create('invalidAggregationFieldName',"Invalid aggregation type for field '"+e+"'")},createInvalidToolbarButtonName:function(e){return o.create('invalidToolbarButtonName',"Invalid toolbar button name: '"+e+"'")},createIndexOutOfRange:function(e){return o.create('indexOutOfRange',"Index '"+e+"' is out of range.")},createUnsupportedEventName:function(e){return o.create('unsupportedEventName',"Unsupported event '"+e+"'.")},createBrowserNotCapable:function(){return o.create('browserNotCapable','This browser is incapable of supporting the Tableau JavaScript API.')}});var p=global.tab._Utility=ss.mkType(a,'tab._Utility',null,null,{isNullOrEmpty:function(e){return ss.isNullOrUndefined(e)||(e['length']||0)<=0},isString:function(e){return typeof(e)==='string'},isNumber:function(e){return typeof(e)==='number'},isDate:function(e){if(typeof(e)==='object'&&ss.isInstanceOfType(e,ss.JsDate)){return true}else if(Object.prototype.toString.call(e)!=='[object Date]'){return false}return!isNaN(e.getTime())},isDateValid:function(e){return!isNaN(e.getTime())},indexOf:function(e,bj,bk){if(ss.isValue(Array.prototype['indexOf'])){return e['indexOf'](bj,bk)}bk=bk||0;var bl=e.length;if(bl>0){for(var bm=bk;bm=0},getTopmostWindow:function(){var e=window.self;while(ss.isValue(e.parent)&&!ss.referenceEquals(e.parent,e)){e=e.parent}return e},toInt:function(e){if(p.isNumber(e)){return ss.trunc(e)}var bj=parseInt(e.toString(),10);if(isNaN(bj)){return 0}return bj},hasClass:function(e,bj){var bk=new RegExp('[\\n\\t\\r]','g');return ss.isValue(e)&&(' '+e.className+' ').replace(bk,' ').indexOf(' '+bj+' ')>-1},findParentWithClassName:function(e,bj,bk){var bl=(ss.isValue(e)?e.parentNode:null);bk=bk||document.body;while(ss.isValue(bl)){if(p.hasClass(bl,bj)){return bl}if(ss.referenceEquals(bl,bk)){bl=null}else{bl=bl.parentNode}}return bl},hasJsonParse:function(){return ss.isValue(JSON)&&ss.isValue(JSON.parse)},hasWindowPostMessage:function(){return ss.isValue(window.postMessage)},isPostMessageSynchronous:function(){if(p.isIE()){var e=new RegExp('(msie) ([\\w.]+)');var bj=e.exec(window.navigator.userAgent.toLowerCase());var bk=bj[2]||'0';var bl=parseInt(bk,10);return bl<=8}return false},hasDocumentAttachEvent:function(){return ss.isValue(document.attachEvent)},hasWindowAddEventListener:function(){return ss.isValue(window.addEventListener)},isElementOfTag:function(e,bj){return ss.isValue(e)&&e.nodeType===1&&ss.referenceEquals(e.tagName.toLowerCase(),bj.toLowerCase())},elementToString:function(e){var bj=new ss.StringBuilder;bj.append(e.tagName.toLowerCase());if(!p.isNullOrEmpty(e.id)){bj.append('#').append(e.id)}if(!p.isNullOrEmpty(e.className)){var bk=e.className.split(' ');bj.append('.').append(bk.join('.'))}return bj.toString()},tableauGCS:function(e){if(typeof(window['getComputedStyle'])==='function'){return window.getComputedStyle(e)}else{return e['currentStyle']}},isIE:function(){return window.navigator.userAgent.indexOf('MSIE')>-1&&ss.isNullOrUndefined(window.opera)},isSafari:function(){var e=window.navigator.userAgent;var bj=e.indexOf('Chrome')>=0;return e.indexOf('Safari')>=0&&!bj},mobileDetect:function(){var e=window.navigator.userAgent;if(e.indexOf('iPad')!==-1){return true}if(e.indexOf('Android')!==-1){return true}if(e.indexOf('AppleWebKit')!==-1&&e.indexOf('Mobile')!==-1){return true}return false},visibleContentRectInDocumentCoordinates:function(e){var bj=p.contentRectInDocumentCoordinates(e);for(var bk=e.parentElement;ss.isValue(bk)&&ss.isValue(bk.parentElement);bk=bk.parentElement){var bl=p.$0(bk).overflow;if(bl==='auto'||bl==='scroll'||bl==='hidden'){bj=bj.intersect(p.contentRectInDocumentCoordinates(bk))}}var bm=p.$1();return bj.intersect(bm)},getVisualViewportRect:function(e){var bj=e.visualViewport;if(ss.isValue(bj)){return new n(ss.trunc(bj.pageLeft),ss.trunc(bj.pageTop),ss.trunc(bj.width),ss.trunc(bj.height))}else{return null}},$1:function(){var e=p.getVisualViewportRect(window.self);if(ss.isValue(e)){return e}else{var bj=p.contentRectInDocumentCoordinates(document.documentElement);var bk=new tab.WindowHelper(window.self);if(bk.isQuirksMode()){bj.height=document.body.clientHeight-bj.left;bj.width=document.body.clientWidth-bj.top}bj.left+=bk.get_pageXOffset();bj.top+=bk.get_pageYOffset();return bj}},contentRectInDocumentCoordinates:function(e){var bj=p.getBoundingClientRect(e);var bk=p.$0(e);var bl=p.toInt(bk.paddingLeft);var bm=p.toInt(bk.paddingTop);var bn=p.toInt(bk.borderLeftWidth);var bo=p.toInt(bk.borderTopWidth);var bp=p.computeContentSize(e);var bq=new tab.WindowHelper(window.self);var br=bj.left+bl+bn+bq.get_pageXOffset();var bs=bj.top+bm+bo+bq.get_pageYOffset();return new n(br,bs,bp.width,bp.height)},getBoundingClientRect:function(e){var bj=e.getBoundingClientRect();var bk=ss.trunc(bj.top);var bl=ss.trunc(bj.left);var bm=ss.trunc(bj.right);var bn=ss.trunc(bj.bottom);return new n(bl,bk,bm-bl,bn-bk)},convertRawValue:function(e,bj){if(ss.isNullOrUndefined(e)){return null}switch(bj){case'bool':{return e}case'date':case'number':{if(ss.isNullOrUndefined(e)){return Number.NaN}return e}default:case'string':{return e}}},getDataValue:function(e){if(ss.isNullOrUndefined(e)){return R.$ctor(null,null,null)}return R.$ctor(p.convertRawValue(e.value,e.type),e.formattedValue,e.aliasedValue)},serializeDateForServer:function(e){var bj='';if(ss.isValue(e)&&p.isDate(e)){var bk=e.getUTCFullYear();var bl=e.getUTCMonth()+1;var bm=e.getUTCDate();var bn=e.getUTCHours();var bo=e.getUTCMinutes();var bp=e.getUTCSeconds();bj=bk+'-'+bl+'-'+bm+' '+bn+':'+bo+':'+bp}return bj},computeContentSize:function(e){var bj=p.$0(e);var bk=parseFloat(bj.paddingLeft);var bl=parseFloat(bj.paddingTop);var bm=parseFloat(bj.paddingRight);var bn=parseFloat(bj.paddingBottom);var bo=e.clientWidth-Math.round(bk+bm);var bp=e.clientHeight-Math.round(bl+bn);return bd.$ctor(bo,bp)},$0:function(e){if(typeof(window['getComputedStyle'])==='function'){if(ss.isValue(e.ownerDocument.defaultView.opener)){return e.ownerDocument.defaultView.getComputedStyle(e)}return window.getComputedStyle(e)}else if(ss.isValue(e['currentStyle'])){return e['currentStyle']}return e.style},roundVizSizeInPixels:function(e){if(ss.isNullOrUndefined(e)||!(e.indexOf('px')!==-1)){return e}var bj=parseFloat(e.split('px')[0]);return Math.round(bj)+'px'},noResultPromiseHelper:function(e,bj,bk){var bl=new tab._Deferred;var bm=new(ss.makeGenericType(O,[Object]))(e,1,function(bn){bl.resolve()},function(bn,bo){bl.reject(o.createServerError(bo))});bk.sendCommand(Object).call(bk,bj,bm);return bl.get_promise()},clone:function(e){return function(bj){return JSON.parse(JSON.stringify(bj))}}});var q=ss.mkType(a,'tab.$0',function(){this.$2=null;this.$1$1=null},{add_stateReadyForQuery:function(e){this.$1$1=ss.delegateCombine(this.$1$1,e)},remove_stateReadyForQuery:function(e){this.$1$1=ss.delegateRemove(this.$1$1,e)},get_iframe:function(){return null},get_hostId:function(){return this.$2},set_hostId:function(e){this.$2=e},$0:function(){return'*'},handleEventNotification:function(e,bj){},$1:function(){this.$1$1(null)}});var r=ss.mkType(a,'tab.$1',null,null,{$0:function(e){var bj;if(e instanceof tableauSoftware.Promise){bj=e}else{if(ss.isValue(e)&&typeof(e['valueOf'])==='function'){e=e['valueOf']()}if(r.$1(e)){var bk=new j;e.then(ss.mkdel(bk,bk.resolve),ss.mkdel(bk,bk.reject));bj=bk.get_promise()}else{bj=r.$4(e)}}return bj},$2:function(e){return r.$0(e).then(function(bj){return r.$3(bj)},null)},$4:function(bj){var bk=new m(function(bl,bm){try{return r.$0((ss.isValue(bl)?bl(bj):bj))}catch(bn){var e=ss.Exception.wrap(bn);return r.$3(e)}});return bk},$3:function(bj){var bk=new m(function(bl,bm){try{return(ss.isValue(bm)?r.$0(bm(bj)):r.$3(bj))}catch(bn){var e=ss.Exception.wrap(bn);return r.$3(e)}});return bk},$1:function(e){return ss.isValue(e)&&typeof(e['then'])==='function'}});var s=global.tab.ApiDashboardObjectType=ss.mkEnum(a,'tab.ApiDashboardObjectType',{blank:'blank',worksheet:'worksheet',quickFilter:'quickFilter',parameterControl:'parameterControl',pageFilter:'pageFilter',legend:'legend',title:'title',text:'text',image:'image',webPage:'webPage',addIn:'addIn'},true);var t=global.tab.ApiDateRangeType=ss.mkEnum(a,'tab.ApiDateRangeType',{last:'last',lastn:'lastn',next:'next',nextn:'nextn',curr:'curr',todate:'todate'},true);var u=global.tab.ApiDeviceType=ss.mkEnum(a,'tab.ApiDeviceType',{default:'default',desktop:'desktop',tablet:'tablet',phone:'phone'},true);var v=global.tab.ApiEnumConverter=ss.mkType(a,'tab.ApiEnumConverter',null,null,{convertDashboardObjectType:function(e){switch(e){case'blank':{return'blank'}case'image':{return'image'}case'legend':{return'legend'}case'pageFilter':{return'pageFilter'}case'parameterControl':{return'parameterControl'}case'quickFilter':{return'quickFilter'}case'text':{return'text'}case'title':{return'title'}case'webPage':{return'webPage'}case'worksheet':{return'worksheet'}default:{throw o.createInternalError('Unknown ApiCrossDomainDashboardObjectType: '+e)}}},convertDateRange:function(e){switch(e){case'curr':{return'curr'}case'last':{return'last'}case'lastn':{return'lastn'}case'next':{return'next'}case'nextn':{return'nextn'}case'todate':{return'todate'}default:{throw o.createInternalError('Unknown ApiCrossDomainDateRangeType: '+e)}}},convertFieldAggregation:function(e){switch(e){case'ATTR':{return'ATTR'}case'AVG':{return'AVG'}case'COLLECT':{return'COLLECT'}case'COUNT':{return'COUNT'}case'COUNTD':{return'COUNTD'}case'DAY':{return'DAY'}case'END':{return'END'}case'HOUR':{return'HOUR'}case'INOUT':{return'INOUT'}case'KURTOSIS':{return'KURTOSIS'}case'MAX':{return'MAX'}case'MDY':{return'MDY'}case'MEDIAN':{return'MEDIAN'}case'MIN':{return'MIN'}case'MINUTE':{return'MINUTE'}case'MONTH':{return'MONTH'}case'MONTHYEAR':{return'MONTHYEAR'}case'NONE':{return'NONE'}case'PERCENTILE':{return'PERCENTILE'}case'QUART1':{return'QUART1'}case'QUART3':{return'QUART3'}case'QTR':{return'QTR'}case'SECOND':{return'SECOND'}case'SKEWNESS':{return'SKEWNESS'}case'STDEV':{return'STDEV'}case'STDEVP':{return'STDEVP'}case'SUM':{return'SUM'}case'SUM_XSQR':{return'SUM_XSQR'}case'TRUNC_DAY':{return'TRUNC_DAY'}case'TRUNC_HOUR':{return'TRUNC_HOUR'}case'TRUNC_MINUTE':{return'TRUNC_MINUTE'}case'TRUNC_MONTH':{return'TRUNC_MONTH'}case'TRUNC_QTR':{return'TRUNC_QTR'}case'TRUNC_SECOND':{return'TRUNC_SECOND'}case'TRUNC_WEEK':{return'TRUNC_WEEK'}case'TRUNC_YEAR':{return'TRUNC_YEAR'}case'USER':{return'USER'}case'VAR':{return'VAR'}case'VARP':{return'VARP'}case'WEEK':{return'WEEK'}case'WEEKDAY':{return'WEEKDAY'}case'YEAR':{return'YEAR'}default:{throw o.createInternalError('Unknown ApiCrossDomainFieldAggregationType: '+e)}}},convertFieldRole:function(e){switch(e){case'dimension':{return'dimension'}case'measure':{return'measure'}case'unknown':{return'unknown'}default:{throw o.createInternalError('Unknown ApiCrossDomainFieldRoleType: '+e)}}},convertFilterType:function(e){switch(e){case'categorical':{return'categorical'}case'hierarchical':{return'hierarchical'}case'quantitative':{return'quantitative'}case'relativedate':{return'relativedate'}default:{throw o.createInternalError('Unknown ApiCrossDomainFilterType: '+e)}}},convertParameterAllowableValuesType:function(e){switch(e){case'all':{return'all'}case'list':{return'list'}case'range':{return'range'}default:{throw o.createInternalError('Unknown ApiCrossDomainParameterAllowableValuesType: '+e)}}},convertParameterDataType:function(e){switch(e){case'boolean':{return'boolean'}case'date':{return'date'}case'datetime':{return'datetime'}case'float':{return'float'}case'integer':{return'integer'}case'string':{return'string'}default:{throw o.createInternalError('Unknown ApiCrossDomainParameterDataType: '+e)}}},convertPeriodType:function(e){switch(e){case'year':{return'year'}case'quarter':{return'quarter'}case'month':{return'month'}case'week':{return'week'}case'day':{return'day'}case'hour':{return'hour'}case'minute':{return'minute'}case'second':{return'second'}default:{throw o.createInternalError('Unknown ApiCrossDomainPeriodType: '+e)}}},convertSheetType:function(e){switch(e){case'worksheet':{return'worksheet'}case'dashboard':{return'dashboard'}case'story':{return'story'}default:{throw o.createInternalError('Unknown ApiCrossDomainSheetType: '+e)}}},convertDataType:function(e){switch(e){case'boolean':{return'boolean'}case'date':{return'date'}case'datetime':{return'datetime'}case'float':{return'float'}case'integer':{return'integer'}case'string':{return'string'}default:{throw o.createInternalError('Unknown ApiCrossDomainParameterDataType: '+e)}}}});var w=global.tab.ApiErrorCode=ss.mkEnum(a,'tab.ApiErrorCode',{internalError:'internalError',serverError:'serverError',invalidAggregationFieldName:'invalidAggregationFieldName',invalidToolbarButtonName:'invalidToolbarButtonName',invalidParameter:'invalidParameter',invalidUrl:'invalidUrl',staleDataReference:'staleDataReference',vizAlreadyInManager:'vizAlreadyInManager',noUrlOrParentElementNotFound:'noUrlOrParentElementNotFound',invalidFilterFieldName:'invalidFilterFieldName',invalidFilterFieldValue:'invalidFilterFieldValue',invalidFilterFieldNameOrValue:'invalidFilterFieldNameOrValue',filterCannotBePerformed:'filterCannotBePerformed',notActiveSheet:'notActiveSheet',invalidCustomViewName:'invalidCustomViewName',missingRangeNForRelativeDateFilters:'missingRangeNForRelativeDateFilters',missingMaxSize:'missingMaxSize',missingMinSize:'missingMinSize',missingMinMaxSize:'missingMinMaxSize',invalidSize:'invalidSize',invalidSizeBehaviorOnWorksheet:'invalidSizeBehaviorOnWorksheet',sheetNotInWorkbook:'sheetNotInWorkbook',indexOutOfRange:'indexOutOfRange',downloadWorkbookNotAllowed:'downloadWorkbookNotAllowed',nullOrEmptyParameter:'nullOrEmptyParameter',browserNotCapable:'browserNotCapable',unsupportedEventName:'unsupportedEventName',invalidDateParameter:'invalidDateParameter',invalidSelectionFieldName:'invalidSelectionFieldName',invalidSelectionValue:'invalidSelectionValue',invalidSelectionDate:'invalidSelectionDate',noUrlForHiddenWorksheet:'noUrlForHiddenWorksheet',maxVizResizeAttempts:'maxVizResizeAttempts'},true);var x=global.tab.ApiFieldAggregationType=ss.mkEnum(a,'tab.ApiFieldAggregationType',{SUM:'SUM',AVG:'AVG',MIN:'MIN',MAX:'MAX',STDEV:'STDEV',STDEVP:'STDEVP',VAR:'VAR',VARP:'VARP',COUNT:'COUNT',COUNTD:'COUNTD',MEDIAN:'MEDIAN',ATTR:'ATTR',NONE:'NONE',PERCENTILE:'PERCENTILE',YEAR:'YEAR',QTR:'QTR',MONTH:'MONTH',DAY:'DAY',HOUR:'HOUR',MINUTE:'MINUTE',SECOND:'SECOND',WEEK:'WEEK',WEEKDAY:'WEEKDAY',MONTHYEAR:'MONTHYEAR',MDY:'MDY',END:'END',TRUNC_YEAR:'TRUNC_YEAR',TRUNC_QTR:'TRUNC_QTR',TRUNC_MONTH:'TRUNC_MONTH',TRUNC_WEEK:'TRUNC_WEEK',TRUNC_DAY:'TRUNC_DAY',TRUNC_HOUR:'TRUNC_HOUR',TRUNC_MINUTE:'TRUNC_MINUTE',TRUNC_SECOND:'TRUNC_SECOND',QUART1:'QUART1',QUART3:'QUART3',SKEWNESS:'SKEWNESS',KURTOSIS:'KURTOSIS',INOUT:'INOUT',SUM_XSQR:'SUM_XSQR',USER:'USER',COLLECT:'COLLECT'},true);var y=global.tab.ApiFieldRoleType=ss.mkEnum(a,'tab.ApiFieldRoleType',{dimension:'dimension',measure:'measure',unknown:'unknown'},true);var z=global.tab.ApiFilterType=ss.mkEnum(a,'tab.ApiFilterType',{categorical:'categorical',quantitative:'quantitative',hierarchical:'hierarchical',relativedate:'relativedate'},true);var A=global.tab.ApiFilterUpdateType=ss.mkEnum(a,'tab.ApiFilterUpdateType',{all:'all',replace:'replace',add:'add',remove:'remove'},true);var B=global.tab.ApiMenuType=ss.mkEnum(a,'tab.ApiMenuType',{ubertip:'ubertip'},true);var C=global.tab.ApiMessageHandler=ss.mkType(a,'tab.ApiMessageHandler',function(){},{handleEventNotification:function(e,bj){throw new ss.NotImplementedException}});var D=global.tab.ApiMessagingOptions=ss.mkType(a,'tab.ApiMessagingOptions',function(e,bj){this.$1=null;this.$0=null;l.verifyValue(e,'router');this.$1=e;this.$0=bj},{get_handler:function(){return this.$0},get_router:function(){return this.$1},sendCommand:function(e){return function(bj,bk){this.$1.sendCommand(e).call(this.$1,this.$0,bj,bk)}},dispose:function(){this.$1.unregisterHandler(this.$0)}});var E=global.tab.ApiNullOption=ss.mkEnum(a,'tab.ApiNullOption',{nullValues:'nullValues',nonNullValues:'nonNullValues',allValues:'allValues'},true);var F=global.tab.ApiParameterAllowableValuesType=ss.mkEnum(a,'tab.ApiParameterAllowableValuesType',{all:'all',list:'list',range:'range'},true);var G=global.tab.ApiParameterDataType=ss.mkEnum(a,'tab.ApiParameterDataType',{float:'float',integer:'integer',string:'string',boolean:'boolean',date:'date',datetime:'datetime'},true);var H=global.tab.ApiPeriodType=ss.mkEnum(a,'tab.ApiPeriodType',{year:'year',quarter:'quarter',month:'month',week:'week',day:'day',hour:'hour',minute:'minute',second:'second'},true);var I=global.tab.ApiSelectionUpdateType=ss.mkEnum(a,'tab.ApiSelectionUpdateType',{replace:'replace',add:'add',remove:'remove'},true);var J=global.tab.ApiSheetSizeBehavior=ss.mkEnum(a,'tab.ApiSheetSizeBehavior',{automatic:'automatic',exactly:'exactly',range:'range',atleast:'atleast',atmost:'atmost'},true);var K=global.tab.ApiSheetType=ss.mkEnum(a,'tab.ApiSheetType',{worksheet:'worksheet',dashboard:'dashboard',story:'story'},true);var L=global.tab.ApiTableauEventName=ss.mkEnum(a,'tab.ApiTableauEventName',{custommarkcontextmenu:'custommarkcontextmenu',customviewload:'customviewload',customviewremove:'customviewremove',customviewsave:'customviewsave',customviewsetdefault:'customviewsetdefault',filterchange:'filterchange',firstinteractive:'firstinteractive',firstvizsizeknown:'firstvizsizeknown',marksselection:'marksselection',markshighlight:'markshighlight',parametervaluechange:'parametervaluechange',storypointswitch:'storypointswitch',tabswitch:'tabswitch',toolbarstatechange:'toolbarstatechange',urlaction:'urlaction',vizresize:'vizresize'},true);var M=global.tab.ApiToolbarButtonName=ss.mkEnum(a,'tab.ApiToolbarButtonName',{redo:'redo',undo:'undo'},true);var N=global.tab.ApiToolbarPosition=ss.mkEnum(a,'tab.ApiToolbarPosition',{top:'top',bottom:'bottom'},true);var O=global.tab.CommandReturnHandler$1=ss.mkType(a,'tab.CommandReturnHandler$1',function(e){var bj=ss.registerGenericClassInstance(O,[e],function(bk,bl,bm,bn){this.$0=null;this.$3=0;this.$2=null;this.$1=null;this.$0=bk;this.$2=bm;this.$3=bl;this.$1=bn},{get_commandName:function(){return this.$0},get_successCallback:function(){return this.$2},get_successCallbackTiming:function(){return this.$3},get_errorCallback:function(){return this.$1}});return bj});ss.initGenericClass(O,1);var P=global.tab.CrossDomainMessager=ss.mkType(a,'tab.CrossDomainMessager',function(e){this.$8=0;this.$6={};this.$4={};this.$5={};this.$7=null;this.$7=e;if(p.hasWindowAddEventListener()){window.addEventListener('message',ss.mkdel(this,this.$1),false)}else if(p.hasDocumentAttachEvent()){var bj=ss.mkdel(this,this.$1);document.attachEvent('onmessage',bj);window.attachEvent('onmessage',bj)}else{window.onmessage=ss.mkdel(this,this.$1)}this.$8=0},{registerHandler:function(e){var bj='host'+this.$8;if(ss.isValue(e.get_hostId())||ss.isValue(this.$6[e.get_hostId()])){throw o.createInternalError("Host '"+e.get_hostId()+"' is already registered.")}this.$8++;e.set_hostId(bj);this.$6[bj]=e;e.add_stateReadyForQuery(ss.mkdel(this,this.$3))},unregisterHandler:function(e){if(ss.isValue(e.get_hostId())||ss.isValue(this.$6[e.get_hostId()])){delete this.$6[e.get_hostId()];e.remove_stateReadyForQuery(ss.mkdel(this,this.$3))}},sendCommand:function(e){return function(bj,bk,bl){var bm=bj.get_iframe();var bn=bj.get_hostId();if(!p.hasWindowPostMessage()||ss.isNullOrUndefined(bm)||ss.isNullOrUndefined(bm.contentWindow)){return}var bo=b.generateNextCommandId();var bp=this.$4[bn];if(ss.isNullOrUndefined(bp)){bp={};this.$4[bn]=bp}bp[bo]=bl;var bq=bl.get_commandName();var br=null;if(ss.isValue(bk)){br=JSON.stringify(bk)}var bs=new b(bq,bo,bn,br);var bt=bs.serialize();if(p.isPostMessageSynchronous()){window.setTimeout(function(){bm.contentWindow.postMessage(bt,'*')},0)}else{bm.contentWindow.postMessage(bt,'*')}}},$3:function(e){var bj=this.$5[e.get_hostId()];if(p.isNullOrEmpty(bj)){return}while(bj.length>0){var bk=bj.pop();if(ss.isValue(bk)){bk()}}},$1:function(e){var bj=e;if(ss.isNullOrUndefined(bj.data)){return}var bk=b.parse(bj.data.toString());var bl=bk.get_hostId();var bm=this.$6[bl];if(ss.isNullOrUndefined(bm)||!ss.referenceEquals(bm.get_hostId(),bk.get_hostId())){bm=this.$0(bj)}if(bk.get_isApiCommandName()){if(bk.get_commandId()==='xdomainSourceId'){bm.handleEventNotification(bk.get_name(),bk.get_parameters());if(bk.get_name()==='api.FirstVizSizeKnownEvent'){var bn=new X('tableau.bootstrap',[]);bj.source.postMessage(bn.serialize(),'*')}}else{this.$2(bk)}}else if(!ss.isNullOrUndefined(this.$7)){var bo=X.parse(bj.data.toString());this.$7(bo,bm)}},$2:function(e){var bj=this.$4[e.get_hostId()];var bk=(ss.isValue(bj)?bj[e.get_commandId()]:null);if(ss.isNullOrUndefined(bk)){return}delete bj[e.get_commandId()];if(e.get_name()!==bk.get_commandName()){return}var bl=new f(e.get_parameters());var bm=bl.get_data();if(bl.get_result()==='api.success'){switch(bk.get_successCallbackTiming()){case 0:{if(ss.isValue(bk.get_successCallback())){bk.get_successCallback()(bm)}break}case 1:{var bn=function(){if(ss.isValue(bk.get_successCallback())){bk.get_successCallback()(bm)}};var bo=this.$5[e.get_hostId()];if(ss.isNullOrUndefined(bo)){bo=[];this.$5[e.get_hostId()]=bo}bo.push(bn);break}default:{throw o.createInternalError('Unknown timing value: '+bk.get_successCallbackTiming())}}}else if(ss.isValue(bk.get_errorCallback())){var bp=bl.get_result()==='api.remotefailed';var bq=(ss.isValue(bm)?bm.toString():'');bk.get_errorCallback()(bp,bq)}},$0:function(e){var bj=new ss.ObjectEnumerator(this.$6);try{while(bj.moveNext()){var bk=bj.current();if(this.$6.hasOwnProperty(bk.key)&&ss.referenceEquals(bk.value.get_iframe().contentWindow,e.source)){return bk.value}}}finally{bj.dispose()}return new q}});var Q=global.tab.DataType=ss.mkEnum(a,'tab.DataType',{float:'float',integer:'integer',string:'string',boolean:'boolean',date:'date',datetime:'datetime'},true);var R=global.tab.DataValue=ss.mkType(a,'tab.DataValue',null,null,{$ctor:function(e,bj,bk){var bl=new Object;bl.value=null;bl.formattedValue=null;bl.value=e;if(p.isNullOrEmpty(bk)){bl.formattedValue=bj}else{bl.formattedValue=bk}return bl},isInstanceOfType:function(){return true}});var S=global.tab.FilterCommandsBuilder=ss.mkType(a,'tab.FilterCommandsBuilder',function(){},{buildApplyFiltersCommandParams:function(e,bj,bk,bl){if(p.isNullOrEmpty(e)){throw o.createNullOrEmptyParameter('fieldName')}bk=Z.normalizeEnum(A).call(null,bk,'updateType');var bm=[];if(k.isArray(bj)){for(var bn=0;bn0){bn='exactly';bo=bd.$ctor(bk,bj);bp=bd.$ctor(bk,bj)}else{bn='range';if(bk===0&&bm===0){bm=2147483647}bo=bd.$ctor(bk,bj);bp=bd.$ctor(bm,bl)}return bb.$ctor(bn,bo,bp)}});var bd=global.tab.Size=ss.mkType(a,'tab.Size',null,null,{$ctor:function(e,bj){var bk=new Object;bk.width=0;bk.height=0;bk.width=e;bk.height=bj;return bk},isInstanceOfType:function(){return true}});var be=global.tableauSoftware.Column=ss.mkType(a,'tableauSoftware.Column',function(e){this.$0=null;this.$0=e},{getFieldName:function(){return this.$0.get_fieldName()},getDataType:function(){return this.$0.get_dataType()},getIsReferenced:function(){return this.$0.get_isReferenced()},getIndex:function(){return this.$0.get_index()}});var bf=global.tableauSoftware.DataTable=ss.mkType(a,'tableauSoftware.DataTable',function(e){this.$0=null;this.$0=e},{getName:function(){return this.$0.get_name()},getData:function(){return this.$0.get_rows()},getColumns:function(){return this.$0.get_columns()},getTotalRowCount:function(){return this.$0.get_totalRowCount()},getIsSummaryData:function(){return this.$0.get_isSummaryData()}});var bg=global.tableauSoftware.LogicalTable=ss.mkType(a,'tableauSoftware.LogicalTable',function(e,bj){this.$1=null;this.$0=null;this.$1=e;this.$0=bj},{getTableId:function(){return this.$1},getCaption:function(){return this.$0}});var bh=global.tableauSoftware.Mark=ss.mkType(a,'tableauSoftware.Mark',function(e){this.impl=null;this.impl=new W(e)},{getPairs:function(){return this.impl.$1()}});var bi=global.tableauSoftware.Pair=ss.mkType(a,'tableauSoftware.Pair',function(e,bj){this.fieldName=null;this.value=null;this.formattedValue=null;this.fieldName=e;this.value=bj;this.formattedValue=(ss.isValue(bj)?bj.toString():'')});ss.initClass(b);ss.initClass(c);ss.initClass(d);ss.initClass(f);ss.initClass(g);ss.initClass(h);ss.initClass(i);ss.initClass(j);ss.initClass(k);ss.initClass(l);ss.initClass(m);ss.initClass(n);ss.initClass(o);ss.initClass(p);ss.initClass(q);ss.initClass(r);ss.initClass(v);ss.initClass(C);ss.initClass(D);ss.initClass(P);ss.initClass(R,Object);ss.initClass(S);ss.initClass(T);ss.initClass(U,C);ss.initClass(V);ss.initClass(W);ss.initClass(X);ss.initClass(Y,Object);ss.initClass(Z);ss.initClass(ba);ss.initClass(bb,Object);ss.initClass(bc);ss.initClass(bd,Object);ss.initClass(be);ss.initClass(bf);ss.initClass(bg);ss.initClass(bh);ss.initClass(bi);(function(){b.crossDomainEventNotificationId='xdomainSourceId';b.$0=0})();(function(){var e=window['_ApiObjectRegistryGlobalState'];var bj=e;if(ss.isNullOrUndefined(bj)){bj=new Object}window['_ApiObjectRegistryGlobalState']=bj;window._ApiObjectRegistryGlobalState.creationRegistry=window._ApiObjectRegistryGlobalState.creationRegistry||{};window._ApiObjectRegistryGlobalState.singletonInstanceRegistry=window._ApiObjectRegistryGlobalState.singletonInstanceRegistry||{}})();(function(){l.$0=128})();(function(){k.$1='array';k.$2='boolean';k.$3='date';k.$4='function';k.$5='number';k.$6='object';k.$7='regexp';k.$8='string';k.$9=ss.mkdict(['[object Boolean]','boolean','[object Number]','number','[object String]','string','[object Function]','function','[object Array]','array','[object Date]','date','[object RegExp]','regexp','[object Object]','object']);k.$f=String.prototype['trim'];k.$e=Object.prototype['toString'];k.$g=new RegExp('^[\\s\\xA0]+');k.$h=new RegExp('[\\s\\xA0]+$');k.$b=new RegExp('^[\\],:{}\\s]*$');k.$c=new RegExp('\\\\(?:["\\\\\\/bfnrt]|u[0-9a-fA-F]{4})','g');k.$d=new RegExp('"[^"\\\\\\n\\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?','g');k.$a=new RegExp('(?:^|:|,)(?:\\s*\\[)+','g')})();(function(){var e=global.tableauSoftware;e.DeviceType={DEFAULT:'default',DESKTOP:'desktop',TABLET:'tablet',PHONE:'phone'};e.DashboardObjectType={BLANK:'blank',WORKSHEET:'worksheet',QUICK_FILTER:'quickFilter',PARAMETER_CONTROL:'parameterControl',PAGE_FILTER:'pageFilter',LEGEND:'legend',TITLE:'title',TEXT:'text',IMAGE:'image',WEB_PAGE:'webPage',ADDIN:'addIn'};e.DataType={FLOAT:'float',INTEGER:'integer',STRING:'string',BOOLEAN:'boolean',DATE:'date',DATETIME:'datetime'};e.DateRangeType={LAST:'last',LASTN:'lastn',NEXT:'next',NEXTN:'nextn',CURR:'curr',TODATE:'todate'};e.ErrorCode={INTERNAL_ERROR:'internalError',SERVER_ERROR:'serverError',INVALID_AGGREGATION_FIELD_NAME:'invalidAggregationFieldName',INVALID_TOOLBAR_BUTTON_NAME:'invalidToolbarButtonName',INVALID_PARAMETER:'invalidParameter',INVALID_URL:'invalidUrl',STALE_DATA_REFERENCE:'staleDataReference',VIZ_ALREADY_IN_MANAGER:'vizAlreadyInManager',NO_URL_OR_PARENT_ELEMENT_NOT_FOUND:'noUrlOrParentElementNotFound',INVALID_FILTER_FIELDNAME:'invalidFilterFieldName',INVALID_FILTER_FIELDVALUE:'invalidFilterFieldValue',INVALID_FILTER_FIELDNAME_OR_VALUE:'invalidFilterFieldNameOrValue',FILTER_CANNOT_BE_PERFORMED:'filterCannotBePerformed',NOT_ACTIVE_SHEET:'notActiveSheet',INVALID_CUSTOM_VIEW_NAME:'invalidCustomViewName',MISSING_RANGEN_FOR_RELATIVE_DATE_FILTERS:'missingRangeNForRelativeDateFilters',MISSING_MAX_SIZE:'missingMaxSize',MISSING_MIN_SIZE:'missingMinSize',MISSING_MINMAX_SIZE:'missingMinMaxSize',INVALID_SIZE:'invalidSize',INVALID_SIZE_BEHAVIOR_ON_WORKSHEET:'invalidSizeBehaviorOnWorksheet',SHEET_NOT_IN_WORKBOOK:'sheetNotInWorkbook',INDEX_OUT_OF_RANGE:'indexOutOfRange',DOWNLOAD_WORKBOOK_NOT_ALLOWED:'downloadWorkbookNotAllowed',NULL_OR_EMPTY_PARAMETER:'nullOrEmptyParameter',BROWSER_NOT_CAPABLE:'browserNotCapable',UNSUPPORTED_EVENT_NAME:'unsupportedEventName',INVALID_DATE_PARAMETER:'invalidDateParameter',INVALID_SELECTION_FIELDNAME:'invalidSelectionFieldName',INVALID_SELECTION_VALUE:'invalidSelectionValue',INVALID_SELECTION_DATE:'invalidSelectionDate',NO_URL_FOR_HIDDEN_WORKSHEET:'noUrlForHiddenWorksheet',MAX_VIZ_RESIZE_ATTEMPTS:'maxVizResizeAttempts'};e.FieldAggregationType={SUM:'SUM',AVG:'AVG',MIN:'MIN',MAX:'MAX',STDEV:'STDEV',STDEVP:'STDEVP',VAR:'VAR',VARP:'VARP',COUNT:'COUNT',COUNTD:'COUNTD',MEDIAN:'MEDIAN',ATTR:'ATTR',NONE:'NONE',PERCENTILE:'PERCENTILE',YEAR:'YEAR',QTR:'QTR',MONTH:'MONTH',DAY:'DAY',HOUR:'HOUR',MINUTE:'MINUTE',SECOND:'SECOND',WEEK:'WEEK',WEEKDAY:'WEEKDAY',MONTHYEAR:'MONTHYEAR',MDY:'MDY',END:'END',TRUNC_YEAR:'TRUNC_YEAR',TRUNC_QTR:'TRUNC_QTR',TRUNC_MONTH:'TRUNC_MONTH',TRUNC_WEEK:'TRUNC_WEEK',TRUNC_DAY:'TRUNC_DAY',TRUNC_HOUR:'TRUNC_HOUR',TRUNC_MINUTE:'TRUNC_MINUTE',TRUNC_SECOND:'TRUNC_SECOND',QUART1:'QUART1',QUART3:'QUART3',SKEWNESS:'SKEWNESS',KURTOSIS:'KURTOSIS',INOUT:'INOUT',SUM_XSQR:'SUM_XSQR',USER:'USER',COLLECT:'COLLECT'};e.FieldRoleType={DIMENSION:'dimension',MEASURE:'measure',UNKNOWN:'unknown'};e.FilterUpdateType={ALL:'all',REPLACE:'replace',ADD:'add',REMOVE:'remove'};e.FilterType={CATEGORICAL:'categorical',QUANTITATIVE:'quantitative',HIERARCHICAL:'hierarchical',RELATIVEDATE:'relativedate'};e.NullOption={NULL_VALUES:'nullValues',NON_NULL_VALUES:'nonNullValues',ALL_VALUES:'allValues'};e.ParameterAllowableValuesType={ALL:'all',LIST:'list',RANGE:'range'};e.ParameterDataType={FLOAT:'float',INTEGER:'integer',STRING:'string',BOOLEAN:'boolean',DATE:'date',DATETIME:'datetime'};e.PeriodType={YEAR:'year',QUARTER:'quarter',MONTH:'month',WEEK:'week',DAY:'day',HOUR:'hour',MINUTE:'minute',SECOND:'second'};e.SelectionUpdateType={REPLACE:'replace',ADD:'add',REMOVE:'remove'};e.SheetSizeBehavior={AUTOMATIC:'automatic',EXACTLY:'exactly',RANGE:'range',ATLEAST:'atleast',ATMOST:'atmost'};e.SheetType={WORKSHEET:'worksheet',DASHBOARD:'dashboard',STORY:'story'};e.TableauEventName={CUSTOM_MARK_CONTEXT_MENU:'custommarkcontextmenu',CUSTOM_VIEW_LOAD:'customviewload',CUSTOM_VIEW_REMOVE:'customviewremove',CUSTOM_VIEW_SAVE:'customviewsave',CUSTOM_VIEW_SET_DEFAULT:'customviewsetdefault',FILTER_CHANGE:'filterchange',FIRST_INTERACTIVE:'firstinteractive',FIRST_VIZ_SIZE_KNOWN:'firstvizsizeknown',MARKS_SELECTION:'marksselection',MARKS_HIGHLIGHT:'markshighlight',PARAMETER_VALUE_CHANGE:'parametervaluechange',STORY_POINT_SWITCH:'storypointswitch',TAB_SWITCH:'tabswitch',TOOLBAR_STATE_CHANGE:'toolbarstatechange',URL_ACTION:'urlaction',VIZ_RESIZE:'vizresize'};e.ToolbarPosition={TOP:'top',BOTTOM:'bottom'};e.ToolbarButtonName={REDO:'redo',UNDO:'undo'};e.MenuType={UBERTIP:'ubertip'}})()})(); +/*! API */ +(function(){'use strict';var a={};global.tab=global.tab||{};global.tableauSoftware=global.tableauSoftware||{};ss.initAssembly(a,'Tableau.JavaScript.Vql.Api');var b=global.tab._ApiBootstrap=ss.mkType(a,'tab._ApiBootstrap',null,null,{initialize:function(){tab._ApiObjectRegistry.registerApiMessageRouter(function(){return new E})}});var c=global.tab._CustomViewImpl=ss.mkType(a,'tab._CustomViewImpl',function(e,bo,bp){this.$a=null;this.$h=null;this.$j=null;this.$e=null;this.$f=null;this.$g=null;this.$i=null;this.$c=false;this.$b=false;this.$d=false;this.$j=e;this.$f=bo;this.$e=bp;this.$c=false;this.$b=false;this.$d=false},{$3:function(){if(ss.isNullOrUndefined(this.$a)){this.$a=new T(this)}return this.$a},$9:function(){return this.$j.get_workbook()},$8:function(){return this.$i},$5:function(){return this.$f},$6:function(e){if(this.$d){throw tab._TableauException.create('staleDataReference','Stale data')}this.$f=e},$7:function(){return this.$g},$1:function(){return this.$c},$2:function(e){if(this.$d){throw tab._TableauException.create('staleDataReference','Stale data')}this.$c=e},$4:function(){return this.$b},saveAsync:function(){if(this.$d||ss.isNullOrUndefined(this.$h)){throw tab._TableauException.create('staleDataReference','Stale data')}this.$h.isPublic=this.$c;this.$h.name=this.$f;var e=new tab._Deferred;var bo={};bo['api.customViewParam']=this.$h;var bp=c.$0('api.UpdateCustomViewCommand',e,ss.mkdel(this,function(bq){c._processCustomViewUpdate(this.$j,this.$e,bq,true);e.resolve(this.$3())}));this.$e.sendCommand(Object).call(this.$e,bo,bp);return e.get_promise()},$0:function(){var e=new tab._Deferred;var bo={};bo['api.customViewParam']=this.$h;var bp=c.$0('api.RemoveCustomViewCommand',e,ss.mkdel(this,function(bq){this.$d=true;c._processCustomViews(this.$j,this.$e,bq);e.resolve(this.$3())}));this.$e.sendCommand(Object).call(this.$e,bo,bp);return e.get_promise()},_showAsync:function(){if(this.$d||ss.isNullOrUndefined(this.$h)){throw tab._TableauException.create('staleDataReference','Stale data')}return c._showCustomViewAsync(this.$j,this.$e,this.$h)}},{_getAsync:function(e){var bo=new tab._Deferred;bo.resolve(e.get__customViewImpl().$3());return bo.get_promise()},_createNew:function(e,bo,bp,bq){var br=new c(e,bp.name,bo);br.$c=bp.isPublic;br.$i=bp.url;br.$g=bp.owner.friendlyName;br.$b=ss.isValue(bq)&&ss.unbox(bq)===bp.id;br.$h=bp;return br},_saveNewAsync:function(e,bo,bp){var bq=new tab._Deferred;var br={};br['api.customViewName']=bp;var bs=c.$0('api.SaveNewCustomViewCommand',bq,function(bt){c._processCustomViewUpdate(e,bo,bt,true);var bu=null;if(ss.isValue(e.$k())){bu=e.$k().get_item(0)}bq.resolve(bu)});bo.sendCommand(Object).call(bo,br,bs);return bq.get_promise()},_showCustomViewAsync:function(e,bo,bp){var bq=new tab._Deferred;var br={};if(ss.isValue(bp)){br['api.customViewParam']=bp}var bs=c.$0('api.ShowCustomViewCommand',bq,function(bt){var bu=e.get_activeCustomView();bq.resolve(bu)});bo.sendCommand(Object).call(bo,br,bs);return bq.get_promise()},_makeCurrentCustomViewDefaultAsync:function(e,bo){var bp=new tab._Deferred;var bq={};var br=c.$0('api.MakeCurrentCustomViewDefaultCommand',bp,function(bs){var bt=e.get_activeCustomView();bp.resolve(bt)});bo.sendCommand(Object).call(bo,bq,br);return bp.get_promise()},_getCustomViewsAsync:function(e,bo){var bp=new tab._Deferred;var bq=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.FetchCustomViewsCommand',0,function(br){c._processCustomViews(e,bo,br);bp.resolve(e.$d()._toApiCollection())},function(br,bs){bp.reject(tab._TableauException.create('serverError',bs))});bo.sendCommand(Object).call(bo,null,bq);return bp.get_promise()},_processCustomViews:function(e,bo,bp){c._processCustomViewUpdate(e,bo,bp,false)},_processCustomViewUpdate:function(e,bo,bp,bq){e.$c(null);e.$j(e.$d());e.$e(new tab._Collection);if(bq){e.$l(new tab._Collection);if(ss.isValue(bp.newView)){c.$1(e,bo,bp,bp.newView,bq)}}if(ss.isValue(bp.customViews)){for(var br=0;bre.maxSize.width||e.minSize.height>e.maxSize.height){throw tab._TableauException.createInvalidRangeSize()}bt['api.minWidth']=e.minSize.width;bt['api.minHeight']=e.minSize.height;bt['api.maxWidth']=e.maxSize.width;bt['api.maxHeight']=e.maxSize.height;bo=tab.SheetSize.$ctor('range',e.minSize,e.maxSize)}else if(e.behavior==='exactly'){if(ss.isValue(e.minSize)&&ss.isValue(e.maxSize)&&ss.isValue(e.minSize.width)&&ss.isValue(e.maxSize.width)&&ss.isValue(e.minSize.height)&&ss.isValue(e.maxSize.height)){bp=e.minSize.width;bq=e.minSize.height;br=e.maxSize.width;bs=e.maxSize.height;if(bp!==br||bq!==bs){throw tab._TableauException.createSizeConflictForExactly()}}else if(ss.isValue(e.minSize)&&ss.isValue(e.minSize.width)&&ss.isValue(e.minSize.height)){bp=e.minSize.width;bq=e.minSize.height;br=bp;bs=bq}else if(ss.isValue(e.maxSize)&&ss.isValue(e.maxSize.width)&&ss.isValue(e.maxSize.height)){br=e.maxSize.width;bs=e.maxSize.height;bp=br;bq=bs}bt['api.minWidth']=bp;bt['api.minHeight']=bq;bt['api.maxWidth']=br;bt['api.maxHeight']=bs;bo=tab.SheetSize.$ctor('exactly',tab.Size.$ctor(bp,bq),tab.Size.$ctor(br,bs))}this.$8=bo;return bt}},{$0:function(e){if(ss.isValue(e)){return tab._Utility.toInt(e)}return e},$1:function(e){var bo=tab.PublicEnums.normalizeEnum(tab.ApiSheetSizeBehavior).call(null,e.behavior,'size.behavior');var bp=e.minSize;if(ss.isValue(bp)){bp=tab.Size.$ctor(g.$0(e.minSize.width),g.$0(e.minSize.height))}var bq=e.maxSize;if(ss.isValue(bq)){bq=tab.Size.$ctor(g.$0(e.maxSize.width),g.$0(e.maxSize.height))}return tab.SheetSize.$ctor(bo,bp,bq)}});var h=global.tab._SheetInfoImpl=ss.mkType(a,'tab._SheetInfoImpl',null,null,{$ctor:function(e,bo,bp,bq,br,bs,bt,bu,bv){var bw=new Object;bw.name=null;bw.index=0;bw.workbook=null;bw.url=null;bw.isHidden=false;bw.sheetType=null;bw.zoneId=0;bw.size=null;bw.isActive=false;bw.name=e;bw.sheetType=bo;bw.index=bp;bw.size=bq;bw.workbook=br;bw.url=bs;bw.isActive=bt;bw.isHidden=bu;bw.zoneId=bv;return bw},isInstanceOfType:function(){return true}});var i=global.tab._StoryImpl=ss.mkType(a,'tab._StoryImpl',function(e,bo,bp,bq,br){this.$g=null;this.$h=null;this.$i=null;this.$j=null;this.$2$1=null;g.call(this,e,bo,bp);tab._Param.verifyValue(bq,'storyPm');tab._Param.verifyValue(br,'findSheetFunc');this.$h=br;this.update(bq)},{add_activeStoryPointChange:function(e){this.$2$1=ss.delegateCombine(this.$2$1,e)},remove_activeStoryPointChange:function(e){this.$2$1=ss.delegateRemove(this.$2$1,e)},get_activeStoryPointImpl:function(){return this.$g},get_sheet:function(){return this.get_story()},get_story:function(){if(ss.isNullOrUndefined(this.$i)){this.$i=new bf(this)}return this.$i},get_storyPointsInfo:function(){return this.$j},update:function(e){var bo=null;var bp=null;this.$j=this.$j||new Array(e.storyPoints.length);for(var bq=0;bq=this.$j.length){throw tab._TableauException.createIndexOutOfRange(e)}var bp={};bp['api.storyPointIndex']=e;var bq=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.ActivateStoryPoint',0,ss.mkdel(this,function(br){this.$e(br);bo.resolve(this.$g.get_storyPoint())}),function(br,bs){bo.reject(tab._TableauException.createServerError(bs))});this.sendCommand(Object).call(this,bp,bq);return bo.get_promise()},revertStoryPointAsync:function(e){e=e||this.$g.get_index();if(e<0||e>=this.$j.length){throw tab._TableauException.createIndexOutOfRange(e)}var bo=new tab._Deferred;var bp={};bp['api.storyPointIndex']=e;var bq=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.RevertStoryPoint',0,ss.mkdel(this,function(br){this.$f(e,br);bo.resolve(this.$j[e])}),function(br,bs){bo.reject(tab._TableauException.createServerError(bs))});this.sendCommand(Object).call(this,bp,bq);return bo.get_promise()},$c:function(e){if(e!=='api.ActivatePreviousStoryPoint'&&e!=='api.ActivateNextStoryPoint'){throw tab._TableauException.createInternalError("commandName '"+e+"' is invalid.")}var bo=new tab._Deferred;var bp={};var bq=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))(e,0,ss.mkdel(this,function(br){this.$e(br);bo.resolve(this.$g.get_storyPoint())}),function(br,bs){bo.reject(tab._TableauException.createServerError(bs))});this.sendCommand(Object).call(this,bp,bq);return bo.get_promise()},$f:function(e,bo){var bp=this.$j[e]._impl;if(bp.storyPointId!==bo.storyPointId){throw tab._TableauException.createInternalError("We should not be updating a story point where the IDs don't match. Existing storyPointID="+bp.storyPointId+', newStoryPointID='+bo.storyPointId)}bp.caption=bo.caption;bp.isUpdated=bo.isUpdated;if(bo.storyPointId===this.$g.get_storyPointId()){this.$g.set_isUpdated(bo.isUpdated)}},$e:function(e){var bo=this.$g;var bp=e.index;if(bo.get_index()===bp){return}var bq=this.$j[bo.get_index()];var br=this.$j[bp]._impl;var bs=j.createContainedSheet(e.containedSheetInfo,this.get_workbookImpl(),this.get_messagingOptions(),this.$h);br.isActive=true;this.$g=new j(br,bs);bo.set_isActive(false);bq._impl.isActive=false;this.$d(bq,this.$g.get_storyPoint())},$d:function(e,bo){if(!ss.staticEquals(this.$2$1,null)){this.$2$1(e,bo)}}});var j=global.tab._StoryPointImpl=ss.mkType(a,'tab._StoryPointImpl',function(e,bo){this.$1=null;this.$3=0;this.$4=false;this.$5=false;this.$2=null;this.$6=null;this.$7=null;this.$8=0;this.$4=e.isActive;this.$5=e.isUpdated;this.$1=e.caption;this.$3=e.index;this.$6=e.parentStoryImpl;this.$8=e.storyPointId;this.$2=bo;if(ss.isValue(bo)){this.$2.set_parentStoryPointImpl(this);if(bo.get_sheetType()==='dashboard'){var bp=this.$2;for(var bq=0;bq0){e.push(this.userSuppliedParameters);e.push('&')}var bo=!this.fixedSize&&!(this.userSuppliedParameters.indexOf(':size=')!==-1)&&this.parentElement.clientWidth*this.parentElement.clientHeight>0;if(bo){e.push(':size=');e.push(this.parentElement.clientWidth+','+this.parentElement.clientHeight);e.push('&')}if(!(this.userSuppliedParameters.indexOf(':embed=y')!==-1)){e.push(':embed=y')}e.push('&:showVizHome=n');if(!this.fixedSize){e.push('&:bootstrapWhenNotified=y')}if(!this.tabs){e.push('&:tabs=n')}if(this.displayStaticImage){e.push('&:display_static_image=y')}if(this.$1){e.push('&:disableUrlActionsPopups=y')}if(!this.toolbar){e.push('&:toolbar=n')}else if(!ss.isNullOrUndefined(this.toolBarPosition)){e.push('&:toolbar=');e.push(this.toolBarPosition.toString())}if(ss.isValue(this.device)){e.push('&:device=');e.push(this.device.toString())}var bp=this.$2;var bq=new ss.ObjectEnumerator(bp);try{while(bq.moveNext()){var br=bq.current();if(br.key!=='embed'&&br.key!=='height'&&br.key!=='width'&&br.key!=='device'&&br.key!=='autoSize'&&br.key!=='hideTabs'&&br.key!=='hideToolbar'&&br.key!=='onFirstInteractive'&&br.key!=='onFirstVizSizeKnown'&&br.key!=='toolbarPosition'&&br.key!=='instanceIdToClone'&&br.key!=='navType'&&br.key!=='display_static_image'&&br.key!=='disableUrlActionsPopups'){e.push('&');e.push(encodeURIComponent(br.key));e.push('=');e.push(encodeURIComponent(br.value.toString()))}}}finally{bq.dispose()}e.push('&:apiID='+this.hostId);e.push('#');if(ss.isValue(this.$2.instanceIdToClone)){e.push(this.$2.instanceIdToClone+'&')}if(ss.isValue(this.$2.navType)&&this.$2.navType.length>0){e.push('navType='+this.$2.navType.toString()+'&');e.push('navSrc='+'Opt'.toString())}else{e.push('navType='+window.performance.navigation.type.toString()+'&');e.push('navSrc='+'Parse'.toString())}return e.join('')}});var o=global.tab._WorkbookImpl=ss.mkType(a,'tab._WorkbookImpl',function(e,bo,bp){this.$E=null;this.$D=null;this.$y=null;this.$s=null;this.$r=null;this.$A=new tab._Collection;this.$v=false;this.$x=null;this.$t=null;this.$u=new tab._Collection;this.$C=new tab._Collection;this.$B=new tab._Collection;this.$z=null;this.$w=null;this.$D=e;this.$x=bo;this.$n(bp)},{get_workbook:function(){if(ss.isNullOrUndefined(this.$E)){this.$E=new bm(this)}return this.$E},get_viz:function(){return this.$D.$y()},get_publishedSheets:function(){return this.$A},get_name:function(){return this.$y},get_activeSheetImpl:function(){return this.$s},get_activeCustomView:function(){return this.$t},get_isDownloadAllowed:function(){return this.$v},$3:function(e){if(ss.isNullOrUndefined(this.$s)){return null}var bo=o.$1(e);if(ss.isNullOrUndefined(bo)){return null}if(ss.referenceEquals(bo,this.$s.get_name())){return this.$s}if(this.$s.get_isDashboard()){var bp=this.$s;var bq=bp.get_worksheets()._get(bo);if(ss.isValue(bq)){return bq._impl}}return null},_setActiveSheetAsync:function(e){if(tab._Utility.isNumber(e)){var bo=e;if(bo=0){return this.$1(this.$A.get_item(bo).$0)}else{throw tab._TableauException.createIndexOutOfRange(bo)}}var bp=o.$1(e);var bq=this.$A._get(bp);if(ss.isValue(bq)){return this.$1(bq.$0)}else if(this.$s.get_isDashboard()){var br=this.$s;var bs=br.get_worksheets()._get(bp);if(ss.isValue(bs)){this.$r=null;var bt='';if(bs.getIsHidden()){this.$r=bs._impl}else{bt=bs._impl.get_url()}return this.$0(bs._impl.get_name(),bt)}}throw tab._TableauException.create('sheetNotInWorkbook','Sheet is not found in Workbook')},_revertAllAsync:function(){var e=new tab._Deferred;var bo=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.RevertAllCommand',1,function(bp){e.resolve()},function(bp,bq){e.reject(tab._TableauException.createServerError(bq))});this.$q(Object).call(this,null,bo);return e.get_promise()},_update:function(e){this.$n(e)},$1:function(e){return this.$0(e.name,e.url)},$0:function(e,bo){var bp=new tab._Deferred;if(ss.isValue(this.$s)&&ss.referenceEquals(e,this.$s.get_name())){bp.resolve(this.$s.get_sheet());return bp.get_promise()}var bq={};bq['api.switchToSheetName']=e;bq['api.switchToRepositoryUrl']=bo;bq['api.oldRepositoryUrl']=this.$s.get_url();var br=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.SwitchActiveSheetCommand',0,ss.mkdel(this,function(bs){this.$D.$B=ss.mkdel(this,function(){this.$D.$B=null;bp.resolve(this.$s.get_sheet())})}),function(bs,bt){bp.reject(tab._TableauException.createServerError(bt))});this.$q(Object).call(this,bq,br);return bp.get_promise()},_updateActiveSheetAsync:function(){var e=new tab._Deferred;var bo={};bo['api.switchToSheetName']=this.$s.get_name();bo['api.switchToRepositoryUrl']=this.$s.get_url();bo['api.oldRepositoryUrl']=this.$s.get_url();var bp=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.UpdateActiveSheetCommand',0,ss.mkdel(this,function(bq){e.resolve(this.$s.get_sheet())}),function(bq,br){e.reject(tab._TableauException.createServerError(br))});this.$q(Object).call(this,bo,bp);return e.get_promise()},$q:function(e){return function(bo,bp){this.$x.sendCommand(e).call(this.$x,bo,bp)}},$n:function(e){var bo=new(ss.makeGenericType(tab.CommandReturnHandler$1,[Object]))('api.GetClientInfoCommand',0,ss.mkdel(this,function(bp){this.$p(bp);if(ss.isValue(e)){e()}}),function(bp,bq){throw tab._TableauException.createInternalError(bq)});this.$q(Object).call(this,null,bo)},$p:function(e){this.$y=e.workbookName;this.$v=e.isDownloadAllowed;this.$D.$f(!e.isAutoUpdate);this.$D.set_instanceId(e.instanceId);this.$m(e);this.$o(e)},$o:function(e){var bo=e.currentSheetName;var bp=this.$A._get(bo);if(ss.isNullOrUndefined(bp)&&ss.isNullOrUndefined(this.$r)){throw tab._TableauException.createInternalError('The active sheet was not specified in baseSheets')}if(ss.isValue(this.$s)&&ss.referenceEquals(this.$s.get_name(),bo)){return}if(ss.isValue(this.$s)){this.$s.set_isActive(false);var bq=this.$A._get(this.$s.get_name());if(ss.isValue(bq)){bq.$0.isActive=false}if(this.$s.get_sheetType()==='story'){var br=this.$s;br.remove_activeStoryPointChange(ss.mkdel(this.$D,this.$D.raiseStoryPointSwitch))}}if(ss.isValue(this.$r)){var bs=h.$ctor(this.$r.get_name(),'worksheet',-1,this.$r.get_size(),this.get_workbook(),'',true,true,4294967295);this.$r=null;this.$s=new p(bs,this,this.$x,null)}else{var bt=null;for(var bu=0,bv=e.publishedSheets.length;bu0){bv.push(bx.impl.get_tupleId())}else{var by=bx.impl.get_pairs();for(var bz=0;bz0){var bp=ss.getItem(e.get_parameters(),0);bo.sendScaleFactor(bp)}}}}});var F=global.tab.JsApiMessagingOptions=ss.mkType(a,'tab.JsApiMessagingOptions',function(e,bo){this.$1=null;this.$0=null;tab._Param.verifyValue(e,'router');tab._Param.verifyValue(bo,'handler');this.$1=e;this.$0=bo},{get_handler:function(){return this.$0},get_router:function(){return this.$1},sendCommand:function(e){return function(bo,bp){this.$1.sendCommand(e).call(this.$1,this.$0,bo,bp)}},dispose:function(){this.$1.unregisterHandler(this.$0)}});var G=global.tab.MarksEvent=ss.mkType(a,'tab.MarksEvent',function(e,bo,bp){this.$3=null;R.call(this,e,bo,bp);this.$3=new t(bo._impl.get__workbookImpl(),bp)},{getMarksAsync:function(){var e=this.$3.get__worksheetImpl();if(ss.isValue(e.get_selectedMarks())){var bo=new tab._Deferred;return bo.resolve(e.get_selectedMarks()._toApiCollection())}return e.$r()}});var H=global.tab.ParameterEvent=ss.mkType(a,'tab.ParameterEvent',function(e,bo,bp){this.$2=null;K.call(this,e,bo);this.$2=new u(bo._impl.get__workbookImpl(),bp)},{getParameterName:function(){return this.$2.get__parameterName()},getParameterAsync:function(){return this.$2.get__workbookImpl().$6(this.$2.get__parameterName())}});var I=global.tab.StoryPointInfoImplUtil=ss.mkType(a,'tab.StoryPointInfoImplUtil',null,null,{clone:function(e){return k.$ctor(e.caption,e.index,e.storyPointId,e.isActive,e.isUpdated,e.parentStoryImpl)}});var J=global.tab.StoryPointSwitchEvent=ss.mkType(a,'tab.StoryPointSwitchEvent',function(e,bo,bp,bq){this.$3=null;this.$2=null;K.call(this,e,bo);this.$3=bp;this.$2=bq},{getOldStoryPointInfo:function(){return this.$3},getNewStoryPoint:function(){return this.$2}});var K=global.tab.TableauEvent=ss.mkType(a,'tab.TableauEvent',function(e,bo){this.$1=null;this.$0=null;this.$1=bo;this.$0=e},{getViz:function(){return this.$1},getEventName:function(){return this.$0}});var L=global.tab.TabSwitchEvent=ss.mkType(a,'tab.TabSwitchEvent',function(e,bo,bp,bq){this.$3=null;this.$2=null;K.call(this,e,bo);this.$3=bp;this.$2=bq},{getOldSheetName:function(){return this.$3},getNewSheetName:function(){return this.$2}});var M=global.tab.ToolbarStateEvent=ss.mkType(a,'tab.ToolbarStateEvent',function(e,bo,bp){this.$2=null;K.call(this,e,bo);this.$2=bp},{getToolbarState:function(){return this.$2.get_toolbarState()}});var N=global.tab.UrlActionEvent=ss.mkType(a,'tab.UrlActionEvent',function(e,bo,bp,bq){this.$3=null;this.$2=null;K.call(this,e,bo);this.$3=bp;this.$2=bq},{getUrl:function(){return this.$3},getTarget:function(){return this.$2}});var O=global.tab.VizImpl=ss.mkType(a,'tab.VizImpl',function(e,bo,bp,bq,br){this.$B=null;this.$1w=null;this.$1l=null;this.$1v=null;this.$1u=null;this.$1m=null;this.$1o=null;this.$1z=null;this.$1s=null;this.$1t=null;this.$1r=false;this.$1k=false;this.$1p=false;this.$1j=false;this.$1q=null;this.$1x=null;this.$1y=null;this.$1n=false;this.$1$1=null;this.$1$2=null;this.$1$3=null;this.$1$4=null;this.$1$5=null;this.$1$6=null;this.$1$7=null;this.$1$8=null;this.$1$9=null;this.$1$10=null;this.$1$11=null;this.$1$12=null;this.$1$13=null;this.$1$14=null;this.$1$15=null;this.$1$16=null;if(!tab._Utility.hasWindowPostMessage()||!tab._Utility.hasJsonParse()){throw tab._TableauException.createBrowserNotCapable()}this.$1q=new F(e,this);this.$1w=bo;if(ss.isNullOrUndefined(bp)||bp.nodeType!==1){bp=document.body}this.$1u=new n(bp,bq,br);if(ss.isValue(br)){this.$1s=br.onFirstInteractive;this.$1t=br.onFirstVizSizeKnown}},{add_customViewsListLoad:function(e){this.$1$1=ss.delegateCombine(this.$1$1,e)},remove_customViewsListLoad:function(e){this.$1$1=ss.delegateRemove(this.$1$1,e)},add_stateReadyForQuery:function(e){this.$1$2=ss.delegateCombine(this.$1$2,e)},remove_stateReadyForQuery:function(e){this.$1$2=ss.delegateRemove(this.$1$2,e)},$1O:function(e){this.$1$3=ss.delegateCombine(this.$1$3,e)},$1P:function(e){this.$1$3=ss.delegateRemove(this.$1$3,e)},$1M:function(e){this.$1$4=ss.delegateCombine(this.$1$4,e)},$1N:function(e){this.$1$4=ss.delegateRemove(this.$1$4,e)},$1K:function(e){this.$1$5=ss.delegateCombine(this.$1$5,e)},$1L:function(e){this.$1$5=ss.delegateRemove(this.$1$5,e)},$1Q:function(e){this.$1$6=ss.delegateCombine(this.$1$6,e)},$1R:function(e){this.$1$6=ss.delegateRemove(this.$1$6,e)},$1C:function(e){this.$1$7=ss.delegateCombine(this.$1$7,e)},$1D:function(e){this.$1$7=ss.delegateRemove(this.$1$7,e)},$1G:function(e){this.$1$8=ss.delegateCombine(this.$1$8,e)},$1H:function(e){this.$1$8=ss.delegateRemove(this.$1$8,e)},$1E:function(e){this.$1$9=ss.delegateCombine(this.$1$9,e)},$1F:function(e){this.$1$9=ss.delegateRemove(this.$1$9,e)},$1I:function(e){this.$1$10=ss.delegateCombine(this.$1$10,e)},$1J:function(e){this.$1$10=ss.delegateRemove(this.$1$10,e)},$1U:function(e){this.$1$11=ss.delegateCombine(this.$1$11,e)},$1V:function(e){this.$1$11=ss.delegateRemove(this.$1$11,e)},$1W:function(e){this.$1$12=ss.delegateCombine(this.$1$12,e)},$1X:function(e){this.$1$12=ss.delegateRemove(this.$1$12,e)},$1S:function(e){this.$1$13=ss.delegateCombine(this.$1$13,e)},$1T:function(e){this.$1$13=ss.delegateRemove(this.$1$13,e)},$20:function(e){this.$1$14=ss.delegateCombine(this.$1$14,e)},$21:function(e){this.$1$14=ss.delegateRemove(this.$1$14,e)},$1Y:function(e){this.$1$15=ss.delegateCombine(this.$1$15,e)},$1Z:function(e){this.$1$15=ss.delegateRemove(this.$1$15,e)},$1A:function(e){this.$1$16=ss.delegateCombine(this.$1$16,e)},$1B:function(e){this.$1$16=ss.delegateRemove(this.$1$16,e)},get_hostId:function(){return this.$1u.hostId},set_hostId:function(e){this.$1u.hostId=e},get_iframe:function(){return this.$1l},get_instanceId:function(){return this.$1o},set_instanceId:function(e){this.$1o=e},$y:function(){return this.$1w},$t:function(){return this.$1k},$v:function(){return this.$1p},$u:function(){return this.$1l.style.display==='none'},$w:function(){return this.$1u.parentElement},$x:function(){return this.$1u.get_baseUrl()},$A:function(){return this.$1z.get_workbook()},get__workbookImpl:function(){return this.$1z},$s:function(){return this.$1j},$z:function(){return this.$1x},getCurrentUrlAsync:function(){var e=new tab._Deferred;var bo=new(ss.makeGenericType(tab.CommandReturnHandler$1,[String]))('api.GetCurrentUrlCommand',0,function(bp){e.resolve(bp)},function(bp,bq){e.reject(tab._TableauException.createInternalError(bq))});this._sendCommand(String).call(this,null,bo);return e.get_promise()},handleVizListening:function(){this.$3()},handleVizLoad:function(){if(ss.isNullOrUndefined(this.$1x)){this.$1h(this.$1m.width+'px',this.$1m.height+'px');this.$h()}if(ss.isValue(this.$1v)){this.$1v.style.display='none'}if(ss.isNullOrUndefined(this.$1z)){this.$1z=new o(this,this.$1q,ss.mkdel(this,function(){this.$15(null)}))}else if(!this.$1n){this.$1z._update(ss.mkdel(this,function(){this.$15(null)}))}this.sendScaleFactor('-1')},$D:function(e){var bo=this.$1x.chromeHeight;var bp=this.$1x.sheetSize;var bq=0;var br=0;if(bp.behavior==='exactly'){bq=bp.maxSize.width;br=bp.maxSize.height+bo}else{var bs;var bt;var bu;var bv;switch(bp.behavior){case'range':{bs=bp.minSize.width;bt=bp.maxSize.width;bu=bp.minSize.height+bo;bv=bp.maxSize.height+bo;bq=Math.max(bs,Math.min(bt,e.width));br=Math.max(bu,Math.min(bv,e.height));break}case'atleast':{bs=bp.minSize.width;bu=bp.minSize.height+bo;bq=Math.max(bs,e.width);br=Math.max(bu,e.height);break}case'atmost':{bt=bp.maxSize.width;bv=bp.maxSize.height+bo;bq=Math.min(bt,e.width);br=Math.min(bv,e.height);break}case'automatic':{bq=e.width;br=Math.max(e.height,bo);break}default:{throw tab._TableauException.createInternalError('Unknown SheetSizeBehavior for viz: '+bp.behavior.toString())}}}return tab.Size.$ctor(bq,br)},$J:function(){var e;if(ss.isValue(this.$1m)){e=this.$1m;this.$1m=null}else{e=tab._Utility.computeContentSize(this.$w())}this.$1f(e);return this.$D(e)},$b:function(){if(!ss.isValue(this.$1x)){return}var e=this.$J();if(e.height===this.$1x.chromeHeight){return}this.$1h(e.width+'px',e.height+'px');var bo=10;for(var bp=0;bp5*60*1000){throw tab._TableauException.createInternalError('Timed out while waiting for the viz to become interactive')}else{window.setTimeout(bp,10)}});bp()},$E:function(){if(tab._Utility.isIE()){if(this.$1l['readyState']==='complete'){this.handleVizLoad()}}else{this.handleVizLoad()}},$13:function(){window.setTimeout(ss.mkdel(this,this.$E),3000)},$G:function(e,bo){var bp=document.createElement('div');bp.style.background="transparent url('"+this.$1u.staticImageUrl+"') no-repeat scroll 0 0";bp.style.left='8px';bp.style.top=(this.$1u.tabs?'31px':'9px');bp.style.position='absolute';bp.style.width=e;bp.style.height=bo;this.$0().appendChild(bp);return bp},$F:function(){if(ss.isNullOrUndefined(this.$0())){return null}var e=document.createElement('IFrame');e.frameBorder='0';e.setAttribute('allowTransparency','true');e.setAttribute('allowFullScreen','true');e.setAttribute('title',this.$I());e.marginHeight='0';e.marginWidth='0';e.style.display='block';if(this.$1u.fixedSize){e.style.width=this.$1u.width;e.style.height=this.$1u.height;e.setAttribute('scrolling','no')}else{e.style.width='1px';e.style.height='1px';e.setAttribute('scrolling','no')}if(tab._Utility.isSafari()){e.addEventListener('mousewheel',ss.mkdel(this,this.$14),false)}this.$0().appendChild(e);return e},$I:function(){var e;if(ss.isValue(window.navigator.language)){e=window.navigator.language}else if(ss.isValue(window.navigator['userLanguage'])){e=window.navigator['userLanguage']}else if(ss.isValue(window.navigator['browserLanguage'])){e=window.navigator['browserLanguage']}else{e='en-US'}switch(e){case'zh-CN':{return'数据可视化'}case'zh-TW':{return'資料可視化'}case'en-GB':{return'Data Visualisation'}case'fr-CA':{return'Visualisation de données'}}switch(e.substr(0,2)){case'fr':{return'Visualisation de données'}case'es':{return'Visualización de datos'}case'it':{return'Visualizzazione dati'}case'pt':{return'Visualização de dados'}case'ja':{return'データ ビジュアライゼーション'}case'de':{return'Datenvisualisierung'}case'sv':{return'Datavisualisering'}case'th':{return'การแสดงข้อมูลเป็นภาพ'}case'ko':{return'데이터 비주얼리제이션'}case'en':default:{return'Data Visualization'}}},$14:function(e){},$K:function(){return ss.mkdel(this,function(e){this.$13()})},$S:function(e){var bo=tab.SheetSizeFactory.fromSizeConstraints(e.sizeConstraints);this.$1x=Q.$ctor(bo,e.chromeHeight);if(ss.isValue(this.$1t)){this.$1t(new B('firstvizsizeknown',this.$1w,this.$1x))}if(this.$1u.fixedSize){return}this.$b();this.$C();this.$h()},$1g:function(){if(ss.isNullOrUndefined(this.$1y)){return}if(tab._Utility.hasWindowAddEventListener()){window.removeEventListener('resize',this.$1y,false)}else{window.self.detachEvent('onresize',this.$1y)}this.$1y=null},$C:function(){if(ss.isValue(this.$1y)){return}this.$1y=ss.mkdel(this,function(){this.$b()});if(tab._Utility.hasWindowAddEventListener()){window.addEventListener('resize',this.$1y,false)}else{window.self.attachEvent('onresize',this.$1y)}}});var P=global.tab.VizResizeEvent=ss.mkType(a,'tab.VizResizeEvent',function(e,bo,bp){this.$2=null;K.call(this,e,bo);this.$2=bp},{getAvailableSize:function(){return this.$2}});var Q=global.tab.VizSize=ss.mkType(a,'tab.VizSize',null,null,{$ctor:function(e,bo){var bp=new Object;bp.sheetSize=null;bp.chromeHeight=0;bp.sheetSize=e;bp.chromeHeight=bo;return bp},isInstanceOfType:function(){return true}});var R=global.tab.WorksheetEvent=ss.mkType(a,'tab.WorksheetEvent',function(e,bo,bp){this.$2=null;K.call(this,e,bo);this.$2=bp},{getWorksheet:function(){return this.$2.get_worksheet()}});var S=global.tableauSoftware.CategoricalFilter=ss.mkType(a,'tableauSoftware.CategoricalFilter',function(e,bo){this.$c=false;this.$b=false;this.$a=null;Y.call(this,e,bo);this.$9(bo)},{getIsExcludeMode:function(){return this.$c},getIsAllSelected:function(){return this.$b},getAppliedValues:function(){return this.$a},_updateFromJson:function(e){this.$9(e)},$9:function(e){this.$c=e.isExclude;this.$b=e.isAllSelected;if(ss.isValue(e.appliedValues)){this.$a=[];for(var bo=0;bo0){e+='-'+this.$1}return e}},{getCurrent:function(){return bj.$1}});var bk=global.tableauSoftware.Viz=ss.mkType(a,'tableauSoftware.Viz',function(e,bo,bp){this._impl=null;var bq=tab._ApiObjectRegistry.getApiMessageRouter();this._impl=new O(bq,this,e,bo,bp);this._impl.$1()},{getAreTabsHidden:function(){return this._impl.$t()},getIsToolbarHidden:function(){return this._impl.$v()},getIsHidden:function(){return this._impl.$u()},getInstanceId:function(){return this._impl.get_instanceId()},getParentElement:function(){return this._impl.$w()},getUrl:function(){return this._impl.$x()},getVizSize:function(){return this._impl.$z()},getWorkbook:function(){return this._impl.$A()},getAreAutomaticUpdatesPaused:function(){return this._impl.$s()},getCurrentUrlAsync:function(){return this._impl.getCurrentUrlAsync()},addEventListener:function(e,bo){this._impl.addEventListener(e,bo)},removeEventListener:function(e,bo){this._impl.removeEventListener(e,bo)},dispose:function(){this._impl.$2()},show:function(){this._impl.$h()},hide:function(){this._impl.$5()},showExportDataDialog:function(e){this._impl.$l(e)},showDownloadDialog:function(){this._impl.$i()},showExportCrossTabDialog:function(e){this._impl.$k(e)},showExportImageDialog:function(){this._impl.$m()},showExportPDFDialog:function(){this._impl.$n()},showExportPowerPointDialog:function(){this._impl.$o()},exportCrossTabToExcel:function(e){this._impl.$4(e)},revertAllAsync:function(){return this._impl.$d()},refreshDataAsync:function(){return this._impl.$a()},showShareDialog:function(){this._impl.$p()},showDownloadWorkbookDialog:function(){this._impl.$j()},pauseAutomaticUpdatesAsync:function(){return this._impl.$7()},resumeAutomaticUpdatesAsync:function(){return this._impl.$c()},toggleAutomaticUpdatesAsync:function(){return this._impl.$q()},refreshSize:function(){this._impl.$b()},setFrameSize:function(e,bo){var bp=e;var bq=bo;if(tab._Utility.isNumber(e)){bp=e.toString()+'px'}if(tab._Utility.isNumber(bo)){bq=bo.toString()+'px'}this._impl.$g(bp,bq)},redoAsync:function(){return this._impl.$9()},undoAsync:function(){return this._impl.$r()}});var bl=global.tableauSoftware.VizManager=ss.mkType(a,'tableauSoftware.VizManager',null,null,{getVizs:function(){return m.$3()}});var bm=global.tableauSoftware.Workbook=ss.mkType(a,'tableauSoftware.Workbook',function(e){this.$0=null;this.$0=e},{getViz:function(){return this.$0.get_viz()},getPublishedSheetsInfo:function(){return this.$0.get_publishedSheets()._toApiCollection()},getName:function(){return this.$0.get_name()},getActiveSheet:function(){return this.$0.get_activeSheetImpl().get_sheet()},getActiveCustomView:function(){return this.$0.get_activeCustomView()},activateSheetAsync:function(e){return this.$0._setActiveSheetAsync(e)},revertAllAsync:function(){return this.$0._revertAllAsync()},getCustomViewsAsync:function(){return this.$0.$4()},showCustomViewAsync:function(e){return this.$0.$a(e)},removeCustomViewAsync:function(e){return this.$0.$8(e)},rememberCustomViewAsync:function(e){return this.$0.$7(e)},setActiveCustomViewAsDefaultAsync:function(){return this.$0.$9()},getParametersAsync:function(){return this.$0.$5()},changeParameterValueAsync:function(e,bo){return this.$0.$2(e,bo)}});var bn=global.tableauSoftware.Worksheet=ss.mkType(a,'tableauSoftware.Worksheet',function(e){this._impl=null;bd.call(this,e)},{getParentDashboard:function(){return this._impl.get_parentDashboard()},getParentStoryPoint:function(){return this._impl.get_parentStoryPoint()},getDataSourcesAsync:function(){return this._impl.$n()},getFilterAsync:function(e,bo){return this._impl.$o(null,e,bo)},getFiltersAsync:function(e){return this._impl.$p(e)},applyFilterAsync:function(e,bo,bp,bq){return this._impl.$d(e,bo,bp,bq)},clearFilterAsync:function(e){return this._impl.$h(e)},applyRangeFilterAsync:function(e,bo){return this._impl.$f(e,bo)},applyRelativeDateFilterAsync:function(e,bo){return this._impl.$g(e,bo)},applyHierarchicalFilterAsync:function(e,bo,bp,bq){return this._impl.$e(e,bo,bp,bq)},clearSelectedMarksAsync:function(){return this._impl.$j()},selectMarksAsync:function(e,bo,bp){return this._impl.$z(e,bo,bp)},getSelectedMarksAsync:function(){return this._impl.$r()},getSummaryDataAsync:function(e){return this._impl.$s(e)},getUnderlyingDataAsync:function(e){console.warn('Method getUnderlyingDataAsync is deprecated. Please use getUnderlyingTableDataAsync instead.');return this._impl.$t(e)},getUnderlyingTablesAsync:function(){return this._impl.$v()},getUnderlyingTableDataAsync:function(e,bo){return this._impl.$u(e,bo)},clearHighlightedMarksAsync:function(){return this._impl.$i()},highlightMarksAsync:function(e,bo){return this._impl.$w(e,bo)},highlightMarksByPatternMatchAsync:function(e,bo){return this._impl.$x(e,bo)},getHighlightedMarksAsync:function(){return this._impl.$q()},appendContextMenuAsync:function(e,bo){return this._impl.$c(this.getName(),e,bo)},removeContextMenuAsync:function(e,bo){return this._impl.$y(this.getName(),e,bo)},executeContextMenuAsync:function(e,bo){return this._impl.$k(this.getName(),e,bo)}});ss.initClass(b);ss.initClass(c);ss.initClass(g);ss.initClass(d,g);ss.initClass(f);ss.initClass(h,Object);ss.initClass(i,g);ss.initClass(j);ss.initClass(k,Object);ss.initClass(l);ss.initClass(m);ss.initClass(n);ss.initClass(o);ss.initClass(p,g);ss.initClass(z);ss.initClass(q,z);ss.initClass(r,z);ss.initClass(s,z);ss.initClass(t,z);ss.initClass(u,z);ss.initClass(v);ss.initClass(w);ss.initClass(K);ss.initClass(x,K);ss.initClass(y,K);ss.initClass(R,K);ss.initClass(A,R);ss.initClass(B,K);ss.initClass(C,R);ss.initInterface(D,{add_customViewsListLoad:null,remove_customViewsListLoad:null,handleVizLoad:null,handleVizListening:null,sendScaleFactor:null});ss.initClass(E);ss.initClass(F);ss.initClass(G,R);ss.initClass(H,K);ss.initClass(I);ss.initClass(J,K);ss.initClass(L,K);ss.initClass(M,K);ss.initClass(N,K);ss.initClass(O,null,[D]);ss.initClass(P,K);ss.initClass(Q,Object);ss.initClass(Y);ss.initClass(S,Y);ss.initClass(T);ss.initClass(bd);ss.initClass(U,bd);ss.initClass(V);ss.initClass(W);ss.initClass(X);ss.initClass(Z,Y);ss.initClass(ba);ss.initClass(bb,Y);ss.initClass(bc,Y);ss.initClass(be);ss.initClass(bf,bd);ss.initClass(bg);ss.initClass(bh);ss.initClass(bi);ss.initClass(bj);ss.initClass(bk);ss.initClass(bl);ss.initClass(bm);ss.initClass(bn,bd);(function(){m.$6=[]})();(function(){g.noZoneId=4294967295})();(function(){p.$3=new RegExp('\\[[^\\]]+\\]\\.','g')})();(function(){bj.$1=new bj(2,9,1,'null')})()})();window.tableau=window.tableauSoftware=global.tableauSoftware;tableauSoftware.Promise=tab._PromiseImpl;tab._Deferred=tab._DeferredImpl;tab._Collection=tab._CollectionImpl;tab._ApiBootstrap.initialize();window.tableau._apiLoaded=true})(); \ No newline at end of file diff --git a/html/themes/custom/common_design_subtheme/components/hri-iframe/tableau-2.min.js b/html/themes/custom/common_design_subtheme/components/hri-iframe/tableau-2.min.js new file mode 100644 index 00000000..1f30466a --- /dev/null +++ b/html/themes/custom/common_design_subtheme/components/hri-iframe/tableau-2.min.js @@ -0,0 +1 @@ +window.tableau=window.tableau||{},function(){function n(n){for(var t,r,u=document.getElementsByTagName("script"),i=0;i0&&(r=t.lastIndexOf("/"),r>=0))return t.substring(0,r+1);return""}function t(n){document.write('