diff --git a/.gitignore b/.gitignore index 5101aeaf..82bff889 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ !/pages !/images !/themes +!/Dockerfile +!/docker-compose.yml +!/dev/plugins /themes/learn4 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c6b0b266 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,82 @@ +FROM php:7.4-apache +LABEL maintainer="Andy Miller (@rhukster)" + +RUN usermod --uid 1000 www-data +RUN groupmod --gid 1000 www-data +# Enable Apache Rewrite + Expires Module +RUN a2enmod rewrite expires && \ + sed -i 's/ServerTokens OS/ServerTokens ProductOnly/g' \ + /etc/apache2/conf-available/security.conf + +# Install dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + unzip \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + libyaml-dev \ + libzip4 \ + libzip-dev \ + zlib1g-dev \ + libicu-dev \ + g++ \ + git \ + cron \ + vim \ + && docker-php-ext-install opcache \ + && docker-php-ext-configure intl \ + && docker-php-ext-install intl \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd \ + && docker-php-ext-install zip \ + && rm -rf /var/lib/apt/lists/* + +# set recommended PHP.ini settings +# see https://secure.php.net/manual/en/opcache.installation.php +RUN { \ + echo 'opcache.memory_consumption=128'; \ + echo 'opcache.interned_strings_buffer=8'; \ + echo 'opcache.max_accelerated_files=4000'; \ + echo 'opcache.revalidate_freq=2'; \ + echo 'opcache.fast_shutdown=1'; \ + echo 'opcache.enable_cli=1'; \ + echo 'upload_max_filesize=128M'; \ + echo 'post_max_size=128M'; \ + echo 'expose_php=off'; \ + } > /usr/local/etc/php/conf.d/php-recommended.ini + +RUN pecl install apcu \ + && pecl install yaml-2.0.4 \ + && docker-php-ext-enable apcu yaml + +CMD ["sh", "-c", "usermod --uid 1000 www-data"] +CMD ["sh", "-c", "groupmod --gid 1000 www-data"] +# Set user to www-data +RUN chown www-data:www-data /var/www +USER www-data + +# Define Grav specific version of Grav or use latest stable +ARG GRAV_VERSION=latest + +# Install grav +WORKDIR /var/www +RUN curl -o grav-admin.zip -SL https://getgrav.org/download/core/grav-admin/${GRAV_VERSION} && \ + unzip grav-admin.zip && \ + mv -T /var/www/grav-admin /var/www/html && \ + rm grav-admin.zip + +# Create cron job for Grav maintenance scripts +RUN (crontab -l; echo "* * * * * cd /var/www/html;/usr/local/bin/php bin/grav scheduler 1>> /dev/null 2>&1") | crontab - + +# Return to root user +USER root + +# Copy init scripts +# COPY docker-entrypoint.sh /entrypoint.sh + +# provide container inside image for data persistence +VOLUME ["/var/www/html/backup", "/var/www/html/logs", "/var/www/html/user/themes", "/var/www/html/user/pages", "/var/www/html/user/config", "/var/www/html/user/images"] + +# ENTRYPOINT ["/entrypoint.sh"] +# CMD ["apache2-foreground"] +CMD ["sh", "-c", "cron && apache2-foreground"] diff --git a/README.md b/README.md index 31d94298..23d454b6 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ Please report [issues on YunoHost bugtracker](https://github.com/YunoHost/issues You can refer to the page on [writing documentation](https://yunohost.org/write_documentation). +If you know docker, you can run: +``` +docker-compose up +``` + ## Regenerate the css We use scss to manage the css. If you want to change it, you must rebuild it. diff --git a/dev/plugins/admin/.gitattributes b/dev/plugins/admin/.gitattributes new file mode 100644 index 00000000..c5ef7313 --- /dev/null +++ b/dev/plugins/admin/.gitattributes @@ -0,0 +1,8 @@ +# Linguist Normalizer +*.yaml linguistic-language=PHP +*.twig linguistic-language=PHP +**/gulpfile.babel.js linguist-vendored +**/webpack.conf.js linguist-vendored +**/js/*.js linguist-vendored +**/js/*.json linguist-vendored +**/css-compiled/*.css linguist-vendored diff --git a/dev/plugins/admin/.github/FUNDING.yml b/dev/plugins/admin/.github/FUNDING.yml new file mode 100644 index 00000000..e84f52bf --- /dev/null +++ b/dev/plugins/admin/.github/FUNDING.yml @@ -0,0 +1,8 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: grav +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +custom: # Replace with a single custom sponsorship URL diff --git a/dev/plugins/admin/CHANGELOG.md b/dev/plugins/admin/CHANGELOG.md new file mode 100644 index 00000000..54bd2066 --- /dev/null +++ b/dev/plugins/admin/CHANGELOG.md @@ -0,0 +1,2510 @@ +# v1.10.31 +## 03/14/2022 + +1. [](#new) + * Added new local Multiavatar (local generation). **This will be default in Grav 1.8** +2. [](#bugfix) + * Patch `collection.js` [#2235](https://github.com/getgrav/grav-plugin-admin/issues/2235) + +# v1.10.30.2 +## 02/09/2022 + +2. [](#bugfix) + * Fixed regression preventing new `elements` field from saving its state + +# v1.10.30.1 +## 02/09/2022 + +1. [](#improved) + * List field items will now require confirmation before getting deleted + +# v1.10.30 +## 02/07/2022 + +1. [](#new) + * Require **Grav 1.7.30** + * Updated SCSS compiler to v1.10 + * PageMedia can now be collapsed and thumbnails previewed smaller, in order to save room on the page. Selection will be remembered. + * DEPRECATED: Admin field `pages_list_display_field` is no longer available as an option [#2191](https://github.com/getgrav/grav-plugin-admin/issues/2191) + * When listing installable themes/plugins, it is now possible to sort them by [Premium](https://getgrav.org/premium) +2. [](#improved) + * Updated JavaScript dependencies + * Cleaned up JavaScript unused dependencies and warnings + * Removed unused style assets + * Plugins list rows now properly highlight on hover, no more guessing when wanting to disable a plugin! +3. [](#bugfix) + * Fixed `elements` field when it's used inside `list` field + * Fixed issue uploading non-images media when Resolution setting enabled in Admin [#2172](https://github.com/getgrav/grav-plugin-admin/issues/2172) + * Prevent fields from being toggled incorrectly by adding originalValue to childs of fieldset. [#2218](https://github.com/getgrav/grav-plugin-admin/pull/2218) + * Fixed persistent focus on Folder field when Adding page (Safari) [#2209](https://github.com/getgrav/grav-plugin-admin/issues/2209) + * Fixed performance of Plugins / Themes sort in the installation table + * Fixed list field with key/value pairs throwing an exception due to bad value [#2199](https://github.com/getgrav/grav-plugin-admin/issues/2199) + * Fixed disabling/enabling plugin from the list breaking the plugin configuration + +# v1.10.29 +## 01/28/2022 + +1. [](#new) + * Require **Grav 1.7.29** +3. [](#improved) + * Made path handling unicode-safe, use new `Utils::basename()` and `Utils::pathinfo()` everywhere + +# v1.10.28 +## 01/24/2022 + +1. [](#bugfix) + * Clean file names before displaying errors/metadata modals + * Recompiled JS for production [#2225](https://github.com/getgrav/grav-plugin-admin/issues/2225) + +# v1.10.27 +## 01/12/2022 + +1. [](#new) + * Support for `YubiKey OTP` 2-Factor authenticator + * New `elements` container field that shows/hides children fields based on boolean trigger value + * Requires Grav `v1.7.27` and Login `v3.6.2` +2. [](#improved) + * Added new asset language strings + +# v1.10.26.1 +## 01/03/2022 + +3. [](#bugfix) + * Fixed an issue with missing files reference by cached autoloader + +# v1.10.26 +## 01/03/2022 + +2. [](#improved) + * Updated SCSS compiler to v1.9 and other vendor libraries + * Fixed various deprecation warnings + * Localized dialog buttons and icons [#2207](https://github.com/getgrav/grav-plugin-admin/pull/2207) + * Updated copyright year + +# v1.10.25 +## 11/16/2021 + +3. [](#bugfix) + * Fixed unescaped messages in JSON responses + +# v1.10.24 +## 10/26/2021 + +1. [](#new) + * Require **Grav 1.7.24** +2. [](#improved) + * Use new `Http\Response` rather than deprecated `GPM\Response` +3. [](#bugfix) + * Fixed an issue with invalid HTML throwing errors on HTML security scanning + * Clear cache when installing plugins + +# v1.10.23 +## 09/29/2021 + +1. [](#new) + * Updated SCSS compiler to v1.8 +2. [](#improved) + * Updated with latest language strings from Crowdin.com +3. [](#bugfix) + * Fixed images from plugins/themes disappearing when saving twice + +# v1.10.22 +## 09/16/2021 + +1. [](#new) + * Updated SCSS compiler to v1.7 + +# v1.10.21 +## 09/14/2021 + +1. [](#new) + * Require **Grav 1.7.21** +2. [](#improved) + * Added a note about UTC times in scheduler AT syntax help + * Now using a monospaced text-based scheduler AT field in scheduler for simplicity + * Improved `Admin:data()` and `Admin::getConfigurationData()` to be more strict +3. [](#bugfix) + * Fixed configuration save location to point to existing config folder [#2176](https://github.com/getgrav/grav-plugin-admin/issues/2176) + +# v1.10.20 +## 09/01/2021 + +1. [](#bugfix) + * Fixed regression `Argument 4 passed to Grav\Plugin\Form\TwigExtension::prepareFormField() must be of the type array` [#2177](https://github.com/getgrav/grav-plugin-admin/issues/2177) + * Fixed `X-Frame-Options` to be `DENY` in all admin pages to prevent a clickjacking attack + +# v1.10.19 +## 08/31/2021 + +1. [](#new) + * Require **Grav 1.7.19** and **Form 5.1.0** and **Login 3.5.0** + * Updated SCSS compiler to v1.6 +2. [](#improved) + * Updated forms and nested fields to use new form logic + * Admin form now use layout `admin`, meaning you can create admin specific field templates by `forms/fields/myfield/admin-field.html.twig` + * Stop using `|tu` filter, Grav already has the same logic in `|t` for admin + * Remove unneeded escapes + * Allow removal of plugin when disabled [#2167](https://github.com/getgrav/grav-plugin-admin/issues/2167) +3. [](#bugfix) + * Fixed missing values in `fieldset` form field + +# v1.10.18 +## 07/19/2021 + +1. [](#improved) + * Add logic to allow fieldset form field inside a list field [#2159](https://github.com/getgrav/grav-plugin-admin/pull/2159) + +# v1.10.17 +## 06/15/2021 + +1. [](#improved) + * Added timestamp as title in logs date [#2141](https://github.com/getgrav/grav-plugin-admin/issues/2141) + * Use `base64_encode` filter rather than function + * Composer update +1. [](#bugfix) + * Fixed missing `Remove Theme` button when the theme is inactive + * Update taskGetChildTypes() to use Flex Pages (works without the plugin) [#2087](https://github.com/getgrav/grav-plugin-admin/issues/2087) + +# v1.10.16 +## 06/02/2021 + +1. [](#bugfix) + * Fixed issue with some elements overflowing closed list items [#2146](https://github.com/getgrav/grav-plugin-admin/issues/2146) + * Fixed configuration not fully updating on save [#2149](https://github.com/getgrav/grav-plugin-admin/issues/2149) + * Fixed display issue with "+ Add Page" and picking a different route [#2136](https://github.com/getgrav/grav-plugin-admin/issues/2136), [#2145](https://github.com/getgrav/grav-plugin-admin/issues/2145) + * Treat WebP as image when inserting / drag & dropping [#2150](https://github.com/getgrav/grav-plugin-admin/issues/2150) + +# v1.10.15 +## 05/19/2021 + +1. [](#new) + * Updated SCSS compiler to v1.5 +1. [](#improved) + * Updated node modules dev dependencies + * Package.json scripts cleanup + * Recompiled JS for production + * Use `base645_encode` filter rather than function + * Editor: Do not assume images URLs are going to be `http://` (wrong assumption plus not SSL) [#2127](https://github.com/getgrav/grav-plugin-admin/issues/2127) + * Improved Theme Activation + Plugin Enabled logic to ensure configuration is not displayed unless activation/enabled state. Fixes [#2140](https://github.com/getgrav/grav-plugin-admin/issues/2140) +1. [](#bugfix) + * Fixed issue with slugify where single curly quotes in titles would translate to straight single quote [#2101](https://github.com/getgrav/grav-plugin-admin/issues/2101) + * Fix z-index issue with fullscreeen editor (and toolips) [#2143](https://github.com/getgrav/grav-plugin-admin/issues/2143) + +# v1.10.14 +## 04/29/2021 + +1. [](#improved) + * Added a `min_height:` option for list field +1. [](#bugfix) + * Fixed z-index issue for tooltips in sidebar + * Fixed custom files being overridden during theme update [#2135](https://github.com/getgrav/grav-plugin-admin/issues/2135) + +# v1.10.13 +## 04/23/2021 + +1. [](#new) + * Added refresh action button for Folder to ease the regeneration of the slug based on the title. Available also as API entry `Grav.default.Forms.Fields.FolderField.Regenerate()` [#1738](https://github.com/getgrav/grav-plugin-admin/issues/1738) +1. [](#improved) + * Removed sourcemaps references from fork-awesome.min.css [#2122](https://github.com/getgrav/grav-plugin-admin/issues/2122) + * Support native spell checkers in CodeMirror editor [#1266](https://github.com/getgrav/grav-plugin-admin/issues/1266) + * Added new 'Content Highlight' color to presets + * Copying Pages now prompts a dedicated modal that allows for picking title, folder name, parent location, page template and visibility [#1738](https://github.com/getgrav/grav-plugin-admin/issues/1738) + * Updated with latest language translations from Crowdin.com +1. [](#bugfix) + * Moved preset CSS compile to earlier in the process to ensure compilation happens in time. + * Prevent Save actions from Flex Objects to trigger the unsaved unload notice [#2125](https://github.com/getgrav/grav-plugin-admin/issues/2125) + * Fixed audit vulnerabilities in module dependencies and house cleanup [#2096](https://github.com/getgrav/grav-plugin-admin/issues/2096) + * Fixed issue preventing Drag & Drop of media files while in Expert Mode [#1927](https://github.com/getgrav/grav-plugin-admin/issues/1927) + * Fixed broken link colors in `preset.css` which was causing issues with tabs and dropdowns + * Fixed permissions for page related tasks and actions + * Fixed permission check for configuration save [#2130](https://github.com/getgrav/grav-plugin-admin/issues/2130) + * Fixed missing/wrong page categories and tags when multi-language support is enabled [#2107](https://github.com/getgrav/grav-plugin-admin/issues/2107) + +# v1.10.12 +## 04/15/2021 + +1. [](#bugfix) + * Regression: Fixed broken plugin/theme installer in admin + * Fixed error reporting for AJAX tasks if user has no permissions + * Fixed missing slash in password reset URL [#2119](https://github.com/getgrav/grav-plugin-admin/issues/2119) + +# v1.10.11 +## 04/13/2021 + +1. [](#bugfix) + * **IMPORTANT** Fixed security vulnerability that allows installation of plugins with minimal admin privileges [GHSA-wg37-cf5x-55hq](https://github.com/getgrav/grav-plugin-admin/security/advisories/GHSA-wg37-cf5x-55hq) + * Fixed `You have been logged out` message when entering to 2FA authentication due to `/admin/task:getNotifications` AJAX call + * Fixed broken 2FA login when site is not configured to use Flex Users [#2109](https://github.com/getgrav/grav-plugin-admin/issues/2109) + * Fixed error message when user clicks logout link after the session has been expired + +# v1.10.10 +## 04/07/2021 + +1. [](#bugfix) + * Fixed missing `admin-preset.css` in multisite environments + * Regression: Fixed broken 2FA form [#2109](https://github.com/getgrav/grav-plugin-admin/issues/2109) + +# v1.10.9 +## 04/06/2021 + +1. [](#new) + * Requires **Grav 1.7.10** +1. [](#improved) + * Better isolate admin to prevent session related vulnerabilities + * Removed support for custom login redirects for improved security + * Shorten forgot password link lifetime from 7 days to 1 hour + * Updated with latest language translations from Crowdin.com +1. [](#bugfix) + * Fixed issue where Adding a new page and canceling from within Editing would alter the Parent location of the edited page [#2067](https://github.com/getgrav/grav-plugin-admin/issues/2067) + * Fixed and enhanced Range field to be Lists compatible [#2062](https://github.com/getgrav/grav-plugin-admin/issues/2062) + * Fixed ERR_TOO_MANY_REDIRECTS with HTTPS = 'On' [#2100](https://github.com/getgrav/grav-plugin-admin/issues/2100) + * Prevent expert editing mode from anyone else than super users [#2094](https://github.com/getgrav/grav-plugin-admin/issues/2094) + * Fixed login related pages being accessible from admin when user has logged in + * Fixed admin user creation and password reset allowing unsafe passwords + * Fixed missing validation when registering the first admin user + * Fixed reset password email not to have session specific token in it + * Fixed admin controller running before setting `$grav['page']` + +# v1.10.8 +## 03/19/2021 + +1. [](#improved) + * Include alt text and title for images added to the editor [#2098](https://github.com/getgrav/grav-plugin-admin/issues/2098) +1. [](#bugfix) + * Fixed issue replacing `wildcard` field names in flex collections [#2092](https://github.com/getgrav/grav-plugin-admin/pull/2092) + * Fixed legacy Pages having old `modular` reference instead of `module` [#2093](https://github.com/getgrav/grav-plugin-admin/issues/2093) + * Fixed issue where Add New modal would close if selecting an item outside of the modal window. It is now necessary go through the Cancel button and clicking the overlay won't trigger the closing of the modal [#2089](https://github.com/getgrav/grav-plugin-admin/issues/2089), [#2065](https://github.com/getgrav/grav-plugin-admin/issues/2065) + +# v1.10.7 +## 03/17/2021 + +1. [](#improved) + * Force height of Flex pages admin to fit available space + * Updated languages from Crowdin.com + * Better field type definitions for file, pagemedia, filepicker and pagemediafield +1. [](#bugfix) + * Fixed error when checking missing log file [#2088](https://github.com/getgrav/grav-plugin-admin/issues/2088) + +# v1.10.6 +## 02/23/2021 + +1. [](#new) + * Vastly improved support for RTL languages [#2078](https://github.com/getgrav/grav-plugin-admin/pull/2078) +1. [](#improved) + * Flex pages admin better uses available space [#2075](https://github.com/getgrav/grav/issues/2075) +1. [](#bugfix) + * Regression: Fixed enabling/disabling plugin or theme corrupting configuration + * Fixed unnecessary closing bracket causing JS error [#2079](https://github.com/getgrav/grav-plugin-admin/issues/2079) + * Fixed wrong language in Admin Tools [#2077](https://github.com/getgrav/grav-plugin-admin/issues/2077) + +# v1.10.5 +## 02/18/2021 + +1. [](#bugfix) + * Regression: Fixed fatal error in admin if POST request has `data` in it [#2074](https://github.com/getgrav/grav-plugin-admin/issues/2074) + * Fixed Admin creating empty `user/config/info.yaml` file (the file can be safely removed, it is not in use) + * Fixed ACL for users with mixed case usernames [#2073](https://github.com/getgrav/grav-plugin-admin/issues/2073) + +# v1.10.4 +## 02/17/2021 + +1. [](#new) + * Added support to include new page creation modals in other pages by using `form_action` twig variable [#2024](https://github.com/getgrav/grav-plugin-admin/pull/2024) + * Updated all languages from [Crowdin](https://crowdin.com/project/grav-admin) - Please update any translations here +1. [](#improved) + * Removed `noscript` template, because 2021... + * List field: added new `placement` property to decide wether to add new items at the top, bottom or based on the *position* of the clicked button [#2055](https://github.com/getgrav/grav-plugin-admin/pull/2055) + * Ensure admin default CSS styles load **first**, and presets loads **last** + * Tweaked handling of uploaded files [#1429](https://github.com/getgrav/grav-plugin-admin/issues/1429) + * Provide media object and filename in `onAdminAfterDelMedia` event [#1905](https://github.com/getgrav/grav-plugin-admin/pull/1905) +1. [](#bugfix) + * Fixed case-sensitive `accept` in `filepicker` field + * Fixed HTML Entities in titles [#2028](https://github.com/getgrav/grav-plugin-admin/issues/2028) + * Fixed deleting list field options completely, didn't save changes [#2056](https://github.com/getgrav/grav-plugin-admin/issues/2056) + * Fixed `onAdminAfterAddMedia` and `onAdminAfterDelMedia` events always pointing to the home page + * Fixed ACL for Configuration tabs [#771](https://github.com/getgrav/grav-plugin-admin/issues/771) + * Fixed changelog button showing up in Info page even if user cannot access it + * Fixed toggleable checkboxes being unchecked in fieldset columns [#2063](https://github.com/getgrav/grav-plugin-admin/issues/2063) + * Fixed issue with max backups of zero [#2070](https://github.com/getgrav/grav-plugin-admin/issues/2070) + +# v1.10.3 +## 02/01/2021 + +1. [](#new) + * Requires **Grav 1.7.4** (SemVer library moved to Grav) + * Added back special fonts (including Gantry) +2. [](#bugfix) + * Fixed field type `range` not taking into account legitimate `0` values + * Fixed `Call to a member function trackHit() on null` [#2049](https://github.com/getgrav/grav-plugin-admin/issues/2049) + +# v1.10.2 +## 01/21/2021 + +2. [](#bugfix) + * Fixed admin style compilation failing to save CSS if assets folder does not exist + +# v1.10.1 +## 01/20/2021 + +1. [](#improved) + * Added `watch.sh` for compiling SCSS with native sass compiler +2. [](#bugfix) + * Fixed issue with overlapping sidebar when using fullscreen editor [#2022](https://github.com/getgrav/grav-plugin-admin/issues/2022) + +# v1.10.0 +## 01/19/2021 + +1. [](#new) + * Requires **Grav 1.7 and PHP 7.3.6** + * Read about this release in the [Grav 1.7 Released](https://getgrav.org/blog/grav-1.7-released) blog post + * Read the full list of changes in the [Changelog on GitHub](https://github.com/getgrav/grav-plugin-admin/blob/1.10.0/CHANGELOG.md) + * Please read [Grav 1.7 Upgrade Guide](https://learn.getgrav.org/17/advanced/grav-development/grav-17-upgrade-guide) before upgrading! +1. [](#improved) + * Various notifications improvements +1. [](#bugfix) + * Fixed missed highlight on the selected page in Parents field + * Fixed notifications that would not be remembered as hidden + * Fixed taxonomy field not listing existing options in Flex Pages + * Fixed taxonomy field not working outside pages + * Fixed fatal error when moving a page using the old implementation [#2019](https://github.com/getgrav/grav-plugin-admin/issues/2019) + * Fixed evaluating default value in `hidden` field (thanks @NicoHood) + +# v1.10.0-rc.20 +## 12/14/2020 + +1. [](#improved) + * Cookies now explicitly set `SameSite` to `Lax` unless otherwise specified [#1998](https://github.com/getgrav/grav-plugin-admin/issues/1998) + * Exposed **Cookies** class (`Grav.default.Utils.Cookies`) for developers that need it in Admin. +1. [](#bugfix) + * Fixed Plugins references in Themes details page. + * Fixed issue preventing purchase of Themes within Admin and redirecting instead. + * Regression: Values inside Fieldset do not display [#1995](https://github.com/getgrav/grav-plugin-admin/issues/1995) + +# v1.10.0-rc.19 +## 12/02/2020 + +1. [](#improved) + * Just keeping sync with Grav rc.19 + +# v1.10.0-rc.18 +## 12/02/2020 + +1. [](#new) + * Retired "Secure Delete" and "Warn on page delete". You are now always warned and asked to confirm a deletion. +1. [](#improved) + * Auto-link a plugin/theme license in details if it starts with `http` + * Allow to fallback to `docs:` instead of `readme:` + * Forward a `sid` to GPM when downloading a premium package + * Better support for array field key/value when either key or value is stored empty [#1972](https://github.com/getgrav/grav-plugin-admin/issues/1972) + * Remember the open state of the sidebar [#1973](https://github.com/getgrav/grav-plugin-admin/issues/1973) + * Upgraded node dependencies to latest version. Improved speed of JS compilation. + * Added modal to confirm updating Grav as well as cool down counter before enabling Update button [#1257](https://github.com/getgrav/grav-plugin-admin/issues/1257) + * Better handling of offline/intranet mode when the repository index is missing. Faster admin. [#1916](https://github.com/getgrav/grav-plugin-admin/issues/1916) + * Statistics is now Page View Statistics [#1885](https://github.com/getgrav/grav-plugin-admin/issues/1885) + * It is now possible to use regex as values for "Hide page types in Admin" and "Hide modular page types in Admin" settings [#1828](https://github.com/getgrav/grav-plugin-admin/issues/1828) + * Default to `disabled` state for all cron-jobs +1. [](#bugfix) + * Fixed Safari issue with new ACL picker field [#1955](https://github.com/getgrav/grav-plugin-admin/issues/1955) + * Stop propagation of ACL add button in ACL picker [flex-objects#83](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/83) + * Fixed missing special groups `authors` and `defaults` for pages + * Fixed Page Move action and selection highlight in Parents selector modal [flex-objects#80](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/80) + * Fixed folder auto-naming in Add Module [#1937](https://github.com/getgrav/grav-plugin-admin/issues/1937) + * Fixed remodal issue triggering close when selecting a dropdown item ending outside of scope [#1682](https://github.com/getgrav/grav-plugin-admin/issues/1682) + * Reworked how collapsed lists work so the tooltip is not cut off [#1928](https://github.com/getgrav/grav-plugin-admin/issues/1928) + * Fixed KeepAlive issue where too large of a session value would fire the keep alive immediately [#1860](https://github.com/getgrav/grav-plugin-admin/issues/1860) + * Fixed stringable objects breaking the inputs + * Fixed filepicker, pagemediaselect fields with `multiple: true` and `array: true` [#1580](https://github.com/getgrav/grav-plugin-admin/issues/1580) + +# v1.10.0-rc.17 +## 10/07/2020 + +1. [](#new) + * Support premium themes +1. [](#improved) + * Improved some error messages for better readability + * Strip tags from browser title +1. [](#bugfix) + * More multi-site routing fixes + * Fixed issue that would force a page reload when failing to install/update a plugin or theme. + * Fixed proxy/browser caching issues in admin pages + +# v1.10.0-rc.16 +## 09/01/2020 + +1. [](#improved) + * Made all the `onAdmin*` CRUD events to pass `object` (and backwards compatible `page`) to make them easier to use + * Updated vendor libraries including `SCSSPHP` to v1.2 +1. [](#bugfix) + * Fixed issue with File field being used in Theme/Plugins + * Fixed bad redirection after successful admin login in subdirectory multisite [#1487](https://github.com/getgrav/grav-plugin-admin/issues/1487) + +# v1.10.0-rc.15 +## 07/22/2020 + +1. [](#bugfix) + * Disabled the EXIF library for Dropzone for fixing the orientation as it was getting applied twice [#1923](https://github.com/getgrav/grav-plugin-admin/issues/1923) + * Forked Dropzone fo fix issue with Resize + Exif orientation [#1923](https://github.com/getgrav/grav-plugin-admin/issues/1923) + * Fixed URI encode for the preview of images names + +# v1.10.0-rc.14 +## 07/09/2020 + +1. [](#improved) + * Completely removed old Google font support for upgrade compatibility +1. [](#bugfix) + * Fixed bad `use` reference to `UserObject` + +# v1.10.0-rc.13 +## 07/01/2020 + +1. [](#improved) + * Improved color picker field + * Trim login route for safety + * Composer update to grab latest vendor libs + +# v1.10.0-rc.12 +## 06/08/2020 + +1. [](#new) + * Added ability to set a preferred markdown editor in user profile + * Added new `onAdminListContentEditors` event to add a custom editor to the list of available +1. [](#bugfix) + * Fixed issue deleting file from a plugin's configuration + * Use `Pages::find()` instead of `Pages::dispatch()` as we do not want to redirect out of admin + * Fixed broken `parent` field when using the old pages + * Fixed broken `file` field preview when using streams in the path + +# v1.10.0-rc.11 +## 05/14/2020 + +1. [](#new) + * Major enhancements to "White Label" functionality including ability to export/import presets + * New horizontal scroller for theme presets + * Codemirror Fontsize / Preset / Font preference options +1. [](#improved) + * Fixed lots of styling issues related to "White Label" presets + * Changed out "One Light" theme for new "Firewatch Light" theme + * New scrolling system based on `SimpleBar` + native CSS scrollbar styling + +# v1.10.0-rc.10 +## 04/30/2020 + +1. [](#new) + * Addd new `taskConvertUrls` method for use with 3rd party editors + +# v1.10.0-rc.9 +## 04/27/2020 + +1. [](#new) + * Added new "White Label" functionality to customize admin colors + logos + * Added badge count for children in the Parents field +1. [](#improved) + * Added markdown support to `text` in `section` field +1. [](#bugfix) + * Prevent loading Pages in Parents field if they don't have children + * Fixed custom folder in `mediapicker` field not working with streams + * Fixed language redirect adding extra language prefix in Flex + * Fixed `Invalid input in "Parent"` when saving page in raw mode [#1869](https://github.com/getgrav/grav-plugin-admin/issues/1869) + +# v1.10.0-rc.8 +## 03/19/2020 + +1. [](#new) + * Added `has-children` flag in parent field data response + * Added `RESET` en lang string +1. [](#bugfix) + * Fixed parent field not working with regular pages + +# v1.10.0-rc.7 +## 03/05/2020 + +1. [](#new) + * Enable admin cache by default (for existing sites, check `Plugins > Admin Panel > Enable Admin Caching`) +1. [](#improved) + * Removed old `scss.sh` and `watch.sh` scripts, use `gulp watch-css` + * Added keysOnly parameter to `AdminPlugin::pagesTypes()` and `AdminPlugin::pagesModularTypes()` methods + * Added ignore parameter to `Admin::types()` and `Admin::modularTypes()` methods + * Improved configuration fields for hiding page types in Admin +1. [](#bugfix) + * Fixed minor UI padding in Flex pages [#1825](https://github.com/getgrav/grav-plugin-admin/issues/1825) + * Fixed `column` and `section` fields loosing user entered value when form submit fails + * Fixed `order` field not working with a new Flex Page + +# v1.10.0-rc.6 +## 02/11/2020 + +1. [](#new) + * Pass phpstan level 1 tests + * Updated semver library to v1.5 + * Require flex-objects plugin +1. [](#improved) + * Added some debugging messages (turned off by default) + +# v1.10.0-rc.5 +## 02/03/2020 + +1. [](#new) + * No changes, just keeping things in sync with Grav RC version + +# v1.10.0-rc.4 +## 02/03/2020 + +1. [](#new) + * Added message to dashboard to install Flex Objects plugin if it is missing + * Updated `permissions` field to use new `$grav['permissions']` + * DEPRECATED `onAdminRegisterPermissions` event, use `PermissionsRegisterEvent::class` event instead + * DEPRECATED `Admin::setPermissions()` and `Admin::addPermissions()`, use `PermissionsRegisterEvent::class` event instead + * DEPRECATED `Admin::getPermissions()`, use `$grav['permissions']->getInstances()` instead +1. [](#improved) + * Added `field.show_label` and `field.label` display logic from frontend forms +1. [](#bugfix) + * Fixed user profile when using `Flex Users` only in admin + * Fixed saving data with empty field, default value (from config, plugin, theme) was used instead + * Fixed JS bug is using empty Grav URI param key + * Fixed bug in toggleable field being disabled with empty value (`''` `0`, `false`, `[]`...) + * Fixed `admin_route()` twig function to work properly with Grav 1.7.0-rc.4, which fixes `Route` base + * Fixed misleading 'Show sensitive data' configuration option wording [#1818](https://github.com/getgrav/grav-plugin-admin/issues/1818) + +# v1.10.0-rc.3 +## 01/02/2020 + +1. [](#new) + * Added ability to display **Changelogs** for `Grav`, `Plugins` and `Themes` + * Added raw root page support for `Flex Pages` + +# v1.10.0-rc.2 +## 12/04/2019 + +1. [](#new) + * Added support for hiding parts of admin by `Deny` permissions (`Flex Users` only) + * Optimized `parent` field for Flex Pages +1. [](#improved) + * Improved `permissions` field to add support for displaying calculated permissions + * Grav 1.7: Updated deprecated `$page->modular()` method calls to `$page->isModule()` + * Output the current process user name in Scheduler instructions + * Translations: rename MODULAR to MODULE everywhere +1. [](#bugfix) + * Fixed `permissions` field with nested permissions + * Fixed Save Shortcut (CTRL + S / CMD + S) not working with new Flex Pages [#1787](https://github.com/getgrav/grav-plugin-admin/issues/1787) + +# v1.10.0-rc.1 +## 11/06/2019 + +1. [](#new) + * Added a new `onAdminLogFiles()` event for 3rd party plugins to register log files for log viewer [#1765](https://github.com/getgrav/grav-plugin-admin/issues/1765) +1. [](#improved) + * Improved delete button UI [#1769](https://github.com/getgrav/grav-plugin-admin/issues/1769) + * Ability to configure display of 3rd party dashboard widgets [#1766](https://github.com/getgrav/grav-plugin-admin/issues/1766) +1. [](#bugfix) + * Fixed administrator user creation when `Flex Users` is enabled + * Fixed minor button alignment in FF [#1760](https://github.com/getgrav/grav-plugin-admin/issues/1760) + +# v1.10.0-beta.10 +## 10/03/2019 + +1. [](#bugfix) + * Regression: Fixed language assignments for the pages without set language + +# v1.10.0-beta.9 +## 09/26/2019 + +1. [](#bugfix) + * Make pages field to work with Flex Pages + +# v1.10.0-beta.8 +## 09/19/2019 + +1. [](#new) + * Add ability to Sanitize SVGs on file upload + * Add ability to Sanitize SVGs in Page media +1. [](#improved) + * YAML linter report now supports multi-language + * Better colors/placement of toolbar buttons in page edit view +1. [](#bugfix) + * Fixed missing language for AJAX requests + * Fixed redirect with absolute language URL + * Fixed issue with user avatar reference not being deleted when image removed + +# v1.10.0-beta.7 +## 08/30/2019 + +1. [](#bugfix) + * Fixed regression: Do not require Flex Objects plugin [grav#2653](https://github.com/getgrav/grav/issues/2653) + +# v1.10.0-beta.6 +## 08/29/2019 + +1. [](#improved) + * Optimized admin for speed (only load frontend pages on demand) + * Updated navigation menu to be fully controlled and overrideable by `onAdminMenu` event + * Lots of Flex Page speed improvements + +# v1.10.0-beta.5 +## 08/11/2019 + +1. [](#new) + * Added `data()` twig function to create data object from an array +1. [](#improved) + * Better support for `array` field into `list` field + * Made RAW blueprints (expert mode) to work properly with Flex Form + * Better support for `clockwork` logs +1. [](#bugfix) + * Fixed issue with nested `list` fields both utilizing the custom `key` functionality + * Regression: Page Preview not working, bad url [#1715](https://github.com/getgrav/grav-plugin-admin/issues/1715) + * Fixed '+New Folder' to work with new parent picker + * Fixed missing XSS check field when editing modular page as raw + * Fixed minor CSS layout issue [#1717](https://github.com/getgrav/grav-plugin-admin/issues/1717) + +# v1.10.0-beta.4 +## 07/01/2019 + +1. [](#new) + * Added `Admin::redirect()` method to allow redirects to be used outside of controllers + * Added `$admin->adminRoute()` method and `admin_route()` twig function to create language aware admin page links + * Renamed `Admin::route()` to `Admin::getCurrentRoute()` and deprecated the old call +1. [](#improved) + * Much improved multi-language support for pages + * Admin redirects should now work better with multiple languages enabled +1. [](#bugfix) + * Fixed default language being renamed to `page.en.md` (English) instead of keeping existing `page.md` filename + * Fixed possibility to override already existing translation by `Save As Language` + * Fixed missing default translation if page used plain `.md` file extension without language code + * Fixed wrong translation showing up as page fallback language + * Integrated Admin 1.9.8 bug fixes + +# v1.10.0-beta.3 +## 06/24/2019 + +1. [](#improved) + * Smarter handling of symlinks in parent field +1. [](#bugfix) + * Fixed issue with windows paths in `parent` field [#1699](https://github.com/getgrav/grav-plugin-admin/issues/1699) + +# v1.10.0-beta.2 +## 06/21/2019 + +1. [](#improved) + * Moved Remodal in-house and added support for stackable modals [#1698](https://github.com/getgrav/grav-plugin-admin/issues/1698), [#1699](https://github.com/getgrav/grav-plugin-admin/issues/1699) +1. [](#bugfix) + * Fixed missing check for maximum allowed files in `files` field + +# v1.10.0-beta.1 +## 06/14/2019 + +1. [](#new) + * New Parent/Move field using Ajax for better performance + * Improvements to cache clearing when admin cache is enabled + * Require Grav v1.7 + * Use PSR-4 for plugin classes + * Added support for Twig 2.11 (compatible with Twig 1.40+) +1. [](#improved) + * Various admin performance improvements +1. [](#bugfix) + * Fixed admin caching issues + +# v1.9.19 +## 12/14/2020 + +1. [](#bugfix) + * Fixed `pages` field escaping issues, needs Grav update, too [#1990](https://github.com/getgrav/grav-plugin-admin/issues/1990) + * Fixed Plugins references in Themes details page. + * Fixed issue preventing purchase of Themes within Admin and redirecting instead. + * Fixed Page Picker not passing admin token + +# v1.9.18 +## 12/02/2020 + +1. [](#new) + * Never allow Admin pages to be rendered in ``, `'); + return true; + } + + return false; + } + + /** + * Generate HTML from item URL + * + * @access public + * @param Item $item + * @return bool + */ + public function generateHtmlFromUrl(Item $item) + { + if (preg_match('/youtube\.com\/watch\?v=(.*)/', $item->getUrl(), $matches)) { + $item->setContent(''); + return true; + } + + return false; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Logging/Logger.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Logging/Logger.php new file mode 100644 index 00000000..caec463f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Logging/Logger.php @@ -0,0 +1,114 @@ +format('Y-m-d H:i:s').'] '.$message; + } + } + + /** + * Get all logged messages. + * + * @static + * + * @return array + */ + public static function getMessages() + { + return self::$messages; + } + + /** + * Remove all logged messages. + * + * @static + */ + public static function deleteMessages() + { + self::$messages = array(); + } + + /** + * Set a different timezone. + * + * @static + * + * @see http://php.net/manual/en/timezones.php + * + * @param string $timezone Timezone + */ + public static function setTimeZone($timezone) + { + self::$timezone = $timezone ?: self::$timezone; + } + + /** + * Get all messages serialized into a string. + * + * @static + * + * @return string + */ + public static function toString() + { + return implode(PHP_EOL, self::$messages).PHP_EOL; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Atom.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Atom.php new file mode 100644 index 00000000..0496869c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Atom.php @@ -0,0 +1,395 @@ + 'http://www.w3.org/2005/Atom', + ); + + /** + * Get the path to the items XML tree. + * + * @param SimpleXMLElement $xml Feed xml + * @return SimpleXMLElement[] + */ + public function getItemsTree(SimpleXMLElement $xml) + { + return XmlParser::getXPathResult($xml, 'atom:entry', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'entry'); + } + + /** + * Find the feed url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedUrl(SimpleXMLElement $xml, Feed $feed) + { + $feed->setFeedUrl($this->getUrl($xml, 'self')); + } + + /** + * Find the site url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findSiteUrl(SimpleXMLElement $xml, Feed $feed) + { + $feed->setSiteUrl($this->getUrl($xml, 'alternate', true)); + } + + /** + * Find the feed description. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) + { + $description = XmlParser::getXPathResult($xml, 'atom:subtitle', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'subtitle'); + + $feed->setDescription(XmlParser::getValue($description)); + } + + /** + * Find the feed logo url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedLogo(SimpleXMLElement $xml, Feed $feed) + { + $logo = XmlParser::getXPathResult($xml, 'atom:logo', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'logo'); + + $feed->setLogo(XmlParser::getValue($logo)); + } + + /** + * Find the feed icon. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedIcon(SimpleXMLElement $xml, Feed $feed) + { + $icon = XmlParser::getXPathResult($xml, 'atom:icon', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'icon'); + + $feed->setIcon(XmlParser::getValue($icon)); + } + + /** + * Find the feed title. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedTitle(SimpleXMLElement $xml, Feed $feed) + { + $title = XmlParser::getXPathResult($xml, 'atom:title', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'title'); + + $feed->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($title)) ?: $feed->getSiteUrl()); + } + + /** + * Find the feed language. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed) + { + $language = XmlParser::getXPathResult($xml, '*[not(self::atom:entry)]/@xml:lang', $this->namespaces) + ?: XmlParser::getXPathResult($xml, '@xml:lang'); + + $feed->setLanguage(XmlParser::getValue($language)); + } + + /** + * Find the feed id. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedId(SimpleXMLElement $xml, Feed $feed) + { + $id = XmlParser::getXPathResult($xml, 'atom:id', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'id'); + + $feed->setId(XmlParser::getValue($id)); + } + + /** + * Find the feed date. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedDate(SimpleXMLElement $xml, Feed $feed) + { + $updated = XmlParser::getXPathResult($xml, 'atom:updated', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'updated'); + + $feed->setDate($this->getDateParser()->getDateTime(XmlParser::getValue($updated))); + } + + /** + * Find the item published date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemPublishedDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $date = XmlParser::getXPathResult($entry, 'atom:published', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'published'); + + $item->setPublishedDate(!empty($date) ? $this->getDateParser()->getDateTime((string) current($date)) : null); + } + + /** + * Find the item updated date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemUpdatedDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $date = XmlParser::getXPathResult($entry, 'atom:updated', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'updated'); + + $item->setUpdatedDate(!empty($date) ? $this->getDateParser()->getDateTime((string) current($date)) : null); + } + + /** + * Find the item title. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + */ + public function findItemTitle(SimpleXMLElement $entry, Item $item) + { + $title = XmlParser::getXPathResult($entry, 'atom:title', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'title'); + + $item->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($title)) ?: $item->getUrl()); + } + + /** + * Find the item author. + * + * @param SimpleXMLElement $xml Feed + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) + { + $author = XmlParser::getXPathResult($entry, 'atom:author/atom:name', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'author/name') + ?: XmlParser::getXPathResult($xml, 'atom:author/atom:name', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'author/name'); + + $item->setAuthor(XmlParser::getValue($author)); + } + + /** + * Find the item author URL. + * + * @param SimpleXMLElement $xml Feed + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemAuthorUrl(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) + { + $authorUrl = XmlParser::getXPathResult($entry, 'atom:author/atom:uri', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'author/uri') + ?: XmlParser::getXPathResult($xml, 'atom:author/atom:uri', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'author/uri'); + + $item->setAuthorUrl(XmlParser::getValue($authorUrl)); + } + + /** + * Find the item content. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemContent(SimpleXMLElement $entry, Item $item) + { + $item->setContent($this->getContent($entry)); + } + + /** + * Find the item URL. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemUrl(SimpleXMLElement $entry, Item $item) + { + $item->setUrl($this->getUrl($entry, 'alternate', true)); + } + + /** + * Genereate the item id. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $id = XmlParser::getXPathResult($entry, 'atom:id', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'id'); + + if (!empty($id)) { + $item->setId($this->generateId(XmlParser::getValue($id))); + } else { + $item->setId($this->generateId( + $item->getTitle(), $item->getUrl(), $item->getContent() + )); + } + } + + /** + * Find the item enclosure. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $enclosure = $this->findLink($entry, 'enclosure'); + + if ($enclosure) { + $item->setEnclosureUrl(Url::resolve((string) $enclosure['href'], $feed->getSiteUrl())); + $item->setEnclosureType((string) $enclosure['type']); + } + } + + /** + * Find the item language. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $language = XmlParser::getXPathResult($entry, './/@xml:lang'); + $item->setLanguage(XmlParser::getValue($language) ?: $feed->getLanguage()); + } + + /** + * Find the item categories. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param Feed $feed Feed object + */ + public function findItemCategories(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $categories = XmlParser::getXPathResult($entry, 'atom:category/@term', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'category/@term'); + $item->setCategoriesFromXml($categories); + } + + /** + * Get the URL from a link tag. + * + * @param SimpleXMLElement $xml XML tag + * @param string $rel Link relationship: alternate, enclosure, related, self, via + * @return string + */ + private function getUrl(SimpleXMLElement $xml, $rel, $fallback = false) + { + $link = $this->findLink($xml, $rel); + + if ($link) { + return (string) $link['href']; + } + + if ($fallback) { + $link = $this->findLink($xml, ''); + return $link ? (string) $link['href'] : ''; + } + + return ''; + } + + /** + * Get a link tag that match a relationship. + * + * @param SimpleXMLElement $xml XML tag + * @param string $rel Link relationship: alternate, enclosure, related, self, via + * @return SimpleXMLElement|null + */ + private function findLink(SimpleXMLElement $xml, $rel) + { + $links = XmlParser::getXPathResult($xml, 'atom:link', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'link'); + + foreach ($links as $link) { + if ($rel === (string) $link['rel']) { + return $link; + } + } + + return null; + } + + /** + * Get the entry content. + * + * @param SimpleXMLElement $entry XML Entry + * @return string + */ + private function getContent(SimpleXMLElement $entry) + { + $content = current( + XmlParser::getXPathResult($entry, 'atom:content', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'content') + ); + + if (!empty($content) && count($content->children())) { + $xml_string = ''; + + foreach ($content->children() as $child) { + $xml_string .= $child->asXML(); + } + + return $xml_string; + } elseif (trim((string) $content) !== '') { + return (string) $content; + } + + $summary = XmlParser::getXPathResult($entry, 'atom:summary', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'summary'); + + return (string) current($summary); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php new file mode 100644 index 00000000..0e5b80e3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php @@ -0,0 +1,128 @@ + length ]. + * + * @var array + */ + public $formats = array( + DATE_ATOM => null, + DATE_RSS => null, + DATE_COOKIE => null, + DATE_ISO8601 => null, + DATE_RFC822 => null, + DATE_RFC850 => null, + DATE_RFC1036 => null, + DATE_RFC1123 => null, + DATE_RFC2822 => null, + DATE_RFC3339 => null, + 'l, d M Y H:i:s' => null, + 'D, d M Y H:i:s' => 25, + 'D, d M Y h:i:s' => 25, + 'D M d Y H:i:s' => 24, + 'j M Y H:i:s' => 20, + 'Y-m-d H:i:s' => 19, + 'Y-m-d\TH:i:s' => 19, + 'd/m/Y H:i:s' => 19, + 'D, d M Y' => 16, + 'Y-m-d' => 10, + 'd-m-Y' => 10, + 'm-d-Y' => 10, + 'd.m.Y' => 10, + 'm.d.Y' => 10, + 'd/m/Y' => 10, + 'm/d/Y' => 10, + ); + + /** + * Try to parse all date format for broken feeds. + * + * @param string $value Original date format + * + * @return DateTime + */ + public function getDateTime($value) + { + $value = trim($value); + + foreach ($this->formats as $format => $length) { + $truncated_value = $value; + if ($length !== null) { + $truncated_value = substr($truncated_value, 0, $length); + } + + $date = $this->getValidDate($format, $truncated_value); + if ($date !== false) { + return $date; + } + } + + return $this->getCurrentDateTime(); + } + + /** + * Get a valid date from a given format. + * + * @param string $format Date format + * @param string $value Original date value + * + * @return DateTime|bool + */ + public function getValidDate($format, $value) + { + $date = DateTime::createFromFormat($format, $value, $this->getTimeZone()); + + if ($date !== false) { + $errors = DateTime::getLastErrors(); + + if ($errors['error_count'] === 0 && $errors['warning_count'] === 0) { + return $date; + } + } + + return false; + } + + /** + * Get the current datetime. + * + * @return DateTime + */ + public function getCurrentDateTime() + { + return new DateTime('now', $this->getTimeZone()); + } + + /** + * Get DateTimeZone instance + * + * @access public + * @return DateTimeZone + */ + public function getTimeZone() + { + return new DateTimeZone($this->config->getTimezone() ?: $this->timezone); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Feed.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Feed.php new file mode 100644 index 00000000..a56e71c3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Feed.php @@ -0,0 +1,315 @@ +$property.PHP_EOL; + } + + $output .= 'Feed::date = '.$this->date->format(DATE_RFC822).PHP_EOL; + $output .= 'Feed::isRTL() = '.($this->isRTL() ? 'true' : 'false').PHP_EOL; + $output .= 'Feed::items = '.count($this->items).' items'.PHP_EOL; + + foreach ($this->items as $item) { + $output .= '----'.PHP_EOL; + $output .= $item; + } + + return $output; + } + + /** + * Get title. + */ + public function getTitle() + { + return $this->title; + } + + /** + * Get description. + */ + public function getDescription() + { + return $this->description; + } + + /** + * Get the logo url. + */ + public function getLogo() + { + return $this->logo; + } + + /** + * Get the icon url. + */ + public function getIcon() + { + return $this->icon; + } + + /** + * Get feed url. + */ + public function getFeedUrl() + { + return $this->feedUrl; + } + + /** + * Get site url. + */ + public function getSiteUrl() + { + return $this->siteUrl; + } + + /** + * Get date. + */ + public function getDate() + { + return $this->date; + } + + /** + * Get language. + */ + public function getLanguage() + { + return $this->language; + } + + /** + * Get id. + */ + public function getId() + { + return $this->id; + } + + /** + * Get feed items. + */ + public function getItems() + { + return $this->items; + } + + /** + * Return true if the feed is "Right to Left". + * + * @return bool + */ + public function isRTL() + { + return Parser::isLanguageRTL($this->language); + } + + /** + * Set feed items. + * + * @param Item[] $items + * @return Feed + */ + public function setItems(array $items) + { + $this->items = $items; + return $this; + } + + /** + * Set feed id. + * + * @param string $id + * @return Feed + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Set feed title. + * + * @param string $title + * @return Feed + */ + public function setTitle($title) + { + $this->title = $title; + return $this; + } + + /** + * Set feed description. + * + * @param string $description + * @return Feed + */ + public function setDescription($description) + { + $this->description = $description; + return $this; + } + + /** + * Set feed url. + * + * @param string $feedUrl + * @return Feed + */ + public function setFeedUrl($feedUrl) + { + $this->feedUrl = $feedUrl; + return $this; + } + + /** + * Set feed website url. + * + * @param string $siteUrl + * @return Feed + */ + public function setSiteUrl($siteUrl) + { + $this->siteUrl = $siteUrl; + return $this; + } + + /** + * Set feed date. + * + * @param \DateTime $date + * @return Feed + */ + public function setDate($date) + { + $this->date = $date; + return $this; + } + + /** + * Set feed language. + * + * @param string $language + * @return Feed + */ + public function setLanguage($language) + { + $this->language = $language; + return $this; + } + + /** + * Set feed logo. + * + * @param string $logo + * @return Feed + */ + public function setLogo($logo) + { + $this->logo = $logo; + return $this; + } + + /** + * Set feed icon. + * + * @param string $icon + * @return Feed + */ + public function setIcon($icon) + { + $this->icon = $icon; + return $this; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Item.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Item.php new file mode 100644 index 00000000..98214b8e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Item.php @@ -0,0 +1,562 @@ +namespaces); + } + + /** + * Get specific XML tag or attribute value. + * + * @param string $tag Tag name (examples: guid, media:content) + * @param string $attribute Tag attribute + * + * @return array|false Tag values or error + */ + public function getTag($tag, $attribute = '') + { + if ($attribute !== '') { + $attribute = '/@'.$attribute; + } + + $query = './/'.$tag.$attribute; + $elements = XmlParser::getXPathResult($this->xml, $query, $this->namespaces); + + if ($elements === false) { // xPath error + return false; + } + + return array_map(function ($element) { return (string) $element;}, $elements); + } + + /** + * Return item information. + * + * @return string + */ + public function __toString() + { + $output = ''; + + foreach (array('id', 'title', 'url', 'language', 'author', 'enclosureUrl', 'enclosureType') as $property) { + $output .= 'Item::'.$property.' = '.$this->$property.PHP_EOL; + } + + $publishedDate = $this->publishedDate != null ? $this->publishedDate->format(DATE_RFC822) : null; + $updatedDate = $this->updatedDate != null ? $this->updatedDate->format(DATE_RFC822) : null; + + $categoryString = $this->categories != null ? implode(',', $this->categories) : null; + + $output .= 'Item::date = '.$this->date->format(DATE_RFC822).PHP_EOL; + $output .= 'Item::publishedDate = '.$publishedDate.PHP_EOL; + $output .= 'Item::updatedDate = '.$updatedDate.PHP_EOL; + $output .= 'Item::isRTL() = '.($this->isRTL() ? 'true' : 'false').PHP_EOL; + $output .= 'Item::categories = ['.$categoryString.']'.PHP_EOL; + $output .= 'Item::content = '.strlen($this->content).' bytes'.PHP_EOL; + + return $output; + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Get URL + * + * @access public + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set URL + * + * @access public + * @param string $url + * @return Item + */ + public function setUrl($url) + { + $this->url = $url; + return $this; + } + + /** + * Get id. + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Get date. + * + * @return \DateTime + */ + public function getDate() + { + return $this->date; + } + + /** + * Get published date. + * + * @return \DateTime + */ + public function getPublishedDate() + { + return $this->publishedDate; + } + + /** + * Get updated date. + * + * @return \DateTime + */ + public function getUpdatedDate() + { + return $this->updatedDate; + } + + /** + * Get content. + * + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Set content + * + * @access public + * @param string $value + * @return Item + */ + public function setContent($value) + { + $this->content = $value; + return $this; + } + + /** + * Get enclosure url. + * + * @return string + */ + public function getEnclosureUrl() + { + return $this->enclosureUrl; + } + + /** + * Get enclosure type. + * + * @return string + */ + public function getEnclosureType() + { + return $this->enclosureType; + } + + /** + * Get language. + * + * @return string + */ + public function getLanguage() + { + return $this->language; + } + + /** + * Get categories. + * + * @return array + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Get author. + * + * @return string + */ + public function getAuthor() + { + return $this->author; + } + + /** + * Get author URL. + * + * @return string + */ + public function getAuthorUrl() + { + return $this->authorUrl; + } + + /** + * Return true if the item is "Right to Left". + * + * @return bool + */ + public function isRTL() + { + return Parser::isLanguageRTL($this->language); + } + + /** + * Set item id. + * + * @param string $id + * @return Item + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Set item title. + * + * @param string $title + * @return Item + */ + public function setTitle($title) + { + $this->title = $title; + return $this; + } + + /** + * Set author. + * + * @param string $author + * @return Item + */ + public function setAuthor($author) + { + $this->author = $author; + return $this; + } + + /** + * Set author URL. + * + * @param string $authorUrl + * @return Item + */ + public function setAuthorUrl($authorUrl) + { + $this->authorUrl = $authorUrl; + return $this; + } + + /** + * Set item date. + * + * @param \DateTime $date + * @return Item + */ + public function setDate($date) + { + $this->date = $date; + return $this; + } + + /** + * Set item published date. + * + * @param \DateTime $publishedDate + * @return Item + */ + public function setPublishedDate($publishedDate) + { + $this->publishedDate = $publishedDate; + return $this; + } + + /** + * Set item updated date. + * + * @param \DateTime $updatedDate + * @return Item + */ + public function setUpdatedDate($updatedDate) + { + $this->updatedDate = $updatedDate; + return $this; + } + + /** + * Set enclosure url. + * + * @param string $enclosureUrl + * @return Item + */ + public function setEnclosureUrl($enclosureUrl) + { + $this->enclosureUrl = $enclosureUrl; + return $this; + } + + /** + * Set enclosure type. + * + * @param string $enclosureType + * @return Item + */ + public function setEnclosureType($enclosureType) + { + $this->enclosureType = $enclosureType; + return $this; + } + + /** + * Set item language. + * + * @param string $language + * @return Item + */ + public function setLanguage($language) + { + $this->language = $language; + return $this; + } + + /** + * Set item categories. + * + * @param array $categories + * @return Item + */ + public function setCategories($categories) + { + $this->categories = $categories; + return $this; + } + + /** + * Set item categories from xml. + * + * @param |SimpleXMLElement[] $categories + * @return Item + */ + public function setCategoriesFromXml($categories) + { + if ($categories !== false) { + $this->setCategories( + array_map( + function ($element) { + return trim((string) $element); + }, + $categories + ) + ); + } + + return $this; + } + + /** + * Set raw XML. + * + * @param \SimpleXMLElement $xml + * @return Item + */ + public function setXml($xml) + { + $this->xml = $xml; + return $this; + } + + /** + * Get raw XML. + * + * @return \SimpleXMLElement + */ + public function getXml() + { + return $this->xml; + } + + /** + * Set XML namespaces. + * + * @param array $namespaces + * @return Item + */ + public function setNamespaces($namespaces) + { + $this->namespaces = $namespaces; + return $this; + } + + /** + * Get XML namespaces. + * + * @return array + */ + public function getNamespaces() + { + return $this->namespaces; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php new file mode 100644 index 00000000..efaf0ff1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/MalformedXmlException.php @@ -0,0 +1,13 @@ +fallback_url = $fallback_url; + $xml_encoding = XmlParser::getEncodingFromXmlTag($content); + + // Strip XML tag to avoid multiple encoding/decoding in the next XML processing + $this->content = Filter::stripXmlTag($content); + + // Encode everything in UTF-8 + Logger::setMessage(get_called_class().': HTTP Encoding "'.$http_encoding.'" ; XML Encoding "'.$xml_encoding.'"'); + $this->content = Encoding::convert($this->content, $xml_encoding ?: $http_encoding); + + $this->itemPostProcessor = new ItemPostProcessor($this->config); + $this->itemPostProcessor->register(new ContentGeneratorProcessor($this->config)); + $this->itemPostProcessor->register(new ContentFilterProcessor($this->config)); + } + + /** + * Parse the document. + * @return Feed + * @throws MalformedXmlException + */ + public function execute() + { + Logger::setMessage(get_called_class().': begin parsing'); + + $xml = XmlParser::getSimpleXml($this->content); + + if ($xml === false) { + Logger::setMessage(get_called_class().': Applying XML workarounds'); + $this->content = Filter::normalizeData($this->content); + $xml = XmlParser::getSimpleXml($this->content); + + if ($xml === false) { + Logger::setMessage(get_called_class().': XML parsing error'); + Logger::setMessage(XmlParser::getErrors()); + throw new MalformedXmlException('XML parsing error'); + } + } + + $this->used_namespaces = $xml->getNamespaces(true); + $xml = $this->registerSupportedNamespaces($xml); + + $feed = new Feed(); + + $this->findFeedUrl($xml, $feed); + $this->checkFeedUrl($feed); + + $this->findSiteUrl($xml, $feed); + $this->checkSiteUrl($feed); + + $this->findFeedTitle($xml, $feed); + $this->findFeedDescription($xml, $feed); + $this->findFeedLanguage($xml, $feed); + $this->findFeedId($xml, $feed); + $this->findFeedDate($xml, $feed); + $this->findFeedLogo($xml, $feed); + $this->findFeedIcon($xml, $feed); + + foreach ($this->getItemsTree($xml) as $entry) { + $entry = $this->registerSupportedNamespaces($entry); + + $item = new Item(); + $item->xml = $entry; + $item->namespaces = $this->used_namespaces; + + $this->findItemAuthor($xml, $entry, $item); + $this->findItemAuthorUrl($xml, $entry, $item); + + $this->findItemUrl($entry, $item); + $this->checkItemUrl($feed, $item); + + $this->findItemTitle($entry, $item); + $this->findItemContent($entry, $item); + + // Id generation can use the item url/title/content (order is important) + $this->findItemId($entry, $item, $feed); + $this->findItemDate($entry, $item, $feed); + $this->findItemEnclosure($entry, $item, $feed); + $this->findItemLanguage($entry, $item, $feed); + $this->findItemCategories($entry, $item, $feed); + + $this->itemPostProcessor->execute($feed, $item); + $feed->items[] = $item; + } + + Logger::setMessage(get_called_class().PHP_EOL.$feed); + + return $feed; + } + + /** + * Check if the feed url is correct. + * + * @param Feed $feed Feed object + */ + public function checkFeedUrl(Feed $feed) + { + if ($feed->getFeedUrl() === '') { + $feed->feedUrl = $this->fallback_url; + } else { + $feed->feedUrl = Url::resolve($feed->getFeedUrl(), $this->fallback_url); + } + } + + /** + * Check if the site url is correct. + * + * @param Feed $feed Feed object + */ + public function checkSiteUrl(Feed $feed) + { + if ($feed->getSiteUrl() === '') { + $feed->siteUrl = Url::base($feed->getFeedUrl()); + } else { + $feed->siteUrl = Url::resolve($feed->getSiteUrl(), $this->fallback_url); + } + } + + /** + * Check if the item url is correct. + * + * @param Feed $feed Feed object + * @param Item $item Item object + */ + public function checkItemUrl(Feed $feed, Item $item) + { + $item->url = Url::resolve($item->getUrl(), $feed->getSiteUrl()); + } + + /** + * Find the item date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $this->findItemPublishedDate($entry, $item, $feed); + $this->findItemUpdatedDate($entry, $item, $feed); + + if ($item->getPublishedDate() === null) { + // Use the updated date if available, otherwise use the feed date + $item->setPublishedDate($item->getUpdatedDate() ?: $feed->getDate()); + } + + if ($item->getUpdatedDate() === null) { + // Use the published date as fallback + $item->setUpdatedDate($item->getPublishedDate()); + } + + // Use the most recent of published and updated dates + $item->setDate(max($item->getPublishedDate(), $item->getUpdatedDate())); + } + + /** + * Get Item Post Processor instance + * + * @access public + * @return ItemPostProcessor + */ + public function getItemPostProcessor() + { + return $this->itemPostProcessor; + } + + /** + * Get DateParser instance + * + * @access public + * @return DateParser + */ + public function getDateParser() + { + if ($this->dateParser === null) { + $this->dateParser = new DateParser($this->config); + } + + return $this->dateParser; + } + + /** + * Generate a unique id for an entry (hash all arguments). + * + * @return string + */ + public function generateId() + { + return hash($this->hash_algo, implode(func_get_args())); + } + + /** + * Return true if the given language is "Right to Left". + * + * @static + * @param string $language Language: fr-FR, en-US + * @return bool + */ + public static function isLanguageRTL($language) + { + $language = strtolower($language); + + $rtl_languages = array( + 'ar', // Arabic (ar-**) + 'fa', // Farsi (fa-**) + 'ur', // Urdu (ur-**) + 'ps', // Pashtu (ps-**) + 'syr', // Syriac (syr-**) + 'dv', // Divehi (dv-**) + 'he', // Hebrew (he-**) + 'yi', // Yiddish (yi-**) + ); + + foreach ($rtl_languages as $prefix) { + if (strpos($language, $prefix) === 0) { + return true; + } + } + + return false; + } + + /** + * Set Hash algorithm used for id generation. + * + * @param string $algo Algorithm name + * @return \PicoFeed\Parser\Parser + */ + public function setHashAlgo($algo) + { + $this->hash_algo = $algo ?: $this->hash_algo; + return $this; + } + + /** + * Set config object. + * + * @param \PicoFeed\Config\Config $config Config instance + * @return \PicoFeed\Parser\Parser + */ + public function setConfig($config) + { + $this->config = $config; + $this->itemPostProcessor->setConfig($config); + return $this; + } + + /** + * Enable the content grabber. + * + * @return \PicoFeed\Parser\Parser + */ + public function disableContentFiltering() + { + $this->itemPostProcessor->unregister('PicoFeed\Processor\ContentFilterProcessor'); + return $this; + } + + /** + * Enable the content grabber. + * + * @param bool $needsRuleFile true if only pages with rule files should be + * scraped + * @param null|\Closure $scraperCallback Callback function that gets called for each + * scraper execution + * @return \PicoFeed\Parser\Parser + */ + public function enableContentGrabber($needsRuleFile = false, $scraperCallback = null) + { + $processor = new ScraperProcessor($this->config); + + if ($needsRuleFile) { + $processor->getScraper()->disableCandidateParser(); + } + + if ($scraperCallback !== null) { + $processor->setExecutionCallback($scraperCallback); + } + + $this->itemPostProcessor->register($processor); + return $this; + } + + /** + * Set ignored URLs for the content grabber. + * + * @param array $urls URLs + * @return \PicoFeed\Parser\Parser + */ + public function setGrabberIgnoreUrls(array $urls) + { + $this->itemPostProcessor->getProcessor('PicoFeed\Processor\ScraperProcessor')->ignoreUrls($urls); + return $this; + } + + /** + * Register all supported namespaces to be used within an xpath query. + * + * @param SimpleXMLElement $xml Feed xml + * @return SimpleXMLElement + */ + public function registerSupportedNamespaces(SimpleXMLElement $xml) + { + foreach ($this->namespaces as $prefix => $ns) { + $xml->registerXPathNamespace($prefix, $ns); + } + + return $xml; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/ParserException.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/ParserException.php new file mode 100644 index 00000000..b5fbb699 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/ParserException.php @@ -0,0 +1,15 @@ + 'http://purl.org/rss/1.0/', + 'dc' => 'http://purl.org/dc/elements/1.1/', + 'content' => 'http://purl.org/rss/1.0/modules/content/', + 'feedburner' => 'http://rssnamespace.org/feedburner/ext/1.0', + ); + + /** + * Get the path to the items XML tree. + * + * @param SimpleXMLElement $xml Feed xml + * @return SimpleXMLElement[] + */ + public function getItemsTree(SimpleXMLElement $xml) + { + return XmlParser::getXPathResult($xml, 'rss:item', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'item') + ?: $xml->item; + } + + /** + * Find the feed url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedUrl(SimpleXMLElement $xml, Feed $feed) + { + $feed->setFeedUrl(''); + } + + /** + * Find the site url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findSiteUrl(SimpleXMLElement $xml, Feed $feed) + { + $value = XmlParser::getXPathResult($xml, 'rss:channel/rss:link', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/link') + ?: $xml->channel->link; + + $feed->setSiteUrl(XmlParser::getValue($value)); + } + + /** + * Find the feed description. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) + { + $description = XmlParser::getXPathResult($xml, 'rss:channel/rss:description', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/description') + ?: $xml->channel->description; + + $feed->setDescription(XmlParser::getValue($description)); + } + + /** + * Find the feed logo url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedLogo(SimpleXMLElement $xml, Feed $feed) + { + $logo = XmlParser::getXPathResult($xml, 'rss:image/rss:url', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'image/url'); + + $feed->setLogo(XmlParser::getValue($logo)); + } + + /** + * Find the feed icon. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedIcon(SimpleXMLElement $xml, Feed $feed) + { + $feed->setIcon(''); + } + + /** + * Find the feed title. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedTitle(SimpleXMLElement $xml, Feed $feed) + { + $title = XmlParser::getXPathResult($xml, 'rss:channel/rss:title', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/title') + ?: $xml->channel->title; + + $feed->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($title)) ?: $feed->getSiteUrl()); + } + + /** + * Find the feed language. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed) + { + $language = XmlParser::getXPathResult($xml, 'rss:channel/dc:language', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/dc:language', $this->namespaces); + + $feed->setLanguage(XmlParser::getValue($language)); + } + + /** + * Find the feed id. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedId(SimpleXMLElement $xml, Feed $feed) + { + $feed->setId($feed->getFeedUrl() ?: $feed->getSiteUrl()); + } + + /** + * Find the feed date. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedDate(SimpleXMLElement $xml, Feed $feed) + { + $date = XmlParser::getXPathResult($xml, 'rss:channel/dc:date', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/dc:date', $this->namespaces); + + $feed->setDate($this->getDateParser()->getDateTime(XmlParser::getValue($date))); + } + + /** + * Find the item published date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemPublishedDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $date = XmlParser::getXPathResult($entry, 'dc:date', $this->namespaces); + + $item->setPublishedDate(!empty($date) ? $this->getDateParser()->getDateTime(XmlParser::getValue($date)) : null); + } + + /** + * Find the item updated date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemUpdatedDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + if ($item->publishedDate === null) { + $this->findItemPublishedDate($entry, $item, $feed); + } + $item->setUpdatedDate($item->getPublishedDate()); // No updated date in RSS 1.0 specifications + } + + /** + * Find the item title. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemTitle(SimpleXMLElement $entry, Item $item) + { + $title = XmlParser::getXPathResult($entry, 'rss:title', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'title') + ?: $entry->title; + + $item->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($title)) ?: $item->getUrl()); + } + + /** + * Find the item author. + * + * @param SimpleXMLElement $xml Feed + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) + { + $author = XmlParser::getXPathResult($entry, 'dc:creator', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'rss:channel/dc:creator', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/dc:creator', $this->namespaces); + + $item->setAuthor(XmlParser::getValue($author)); + } + + /** + * Find the item author URL. + * + * @param SimpleXMLElement $xml Feed + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemAuthorUrl(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) + { + // There appears to be no support for author URL in the dc: terms + $item->setAuthorUrl(''); + } + + /** + * Find the item content. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemContent(SimpleXMLElement $entry, Item $item) + { + $content = XmlParser::getXPathResult($entry, 'content:encoded', $this->namespaces); + + if (XmlParser::getValue($content) === '') { + $content = XmlParser::getXPathResult($entry, 'rss:description', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'description') + ?: $entry->description; + } + + $item->setContent(XmlParser::getValue($content)); + } + + /** + * Find the item URL. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemUrl(SimpleXMLElement $entry, Item $item) + { + $link = XmlParser::getXPathResult($entry, 'feedburner:origLink', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'rss:link', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'link') + ?: $entry->link; + + $item->setUrl(XmlParser::getValue($link)); + } + + /** + * Genereate the item id. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $item->setId($this->generateId( + $item->getTitle(), $item->getUrl(), $item->getContent() + )); + } + + /** + * Find the item enclosure. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed) + { + } + + /** + * Find the item language. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $language = XmlParser::getXPathResult($entry, 'dc:language', $this->namespaces); + + $item->setLanguage(XmlParser::getValue($language) ?: $feed->getLanguage()); + } + + /** + * Find the item categories. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param Feed $feed Feed object + */ + public function findItemCategories(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $categories = XmlParser::getXPathResult($entry, 'dc:subject', $this->namespaces); + $item->setCategoriesFromXml($categories); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Rss20.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Rss20.php new file mode 100644 index 00000000..da9c0d5f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Rss20.php @@ -0,0 +1,330 @@ + 'http://purl.org/dc/elements/1.1/', + 'content' => 'http://purl.org/rss/1.0/modules/content/', + 'feedburner' => 'http://rssnamespace.org/feedburner/ext/1.0', + 'atom' => 'http://www.w3.org/2005/Atom', + ); + + /** + * Get the path to the items XML tree. + * + * @param SimpleXMLElement $xml Feed xml + * @return SimpleXMLElement[] + */ + public function getItemsTree(SimpleXMLElement $xml) + { + return XmlParser::getXPathResult($xml, 'channel/item'); + } + + /** + * Find the feed url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedUrl(SimpleXMLElement $xml, Feed $feed) + { + $feed->setFeedUrl(''); + } + + /** + * Find the site url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findSiteUrl(SimpleXMLElement $xml, Feed $feed) + { + $value = XmlParser::getXPathResult($xml, 'channel/link'); + $feed->setSiteUrl(XmlParser::getValue($value)); + } + + /** + * Find the feed description. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedDescription(SimpleXMLElement $xml, Feed $feed) + { + $value = XmlParser::getXPathResult($xml, 'channel/description'); + $feed->setDescription(XmlParser::getValue($value)); + } + + /** + * Find the feed logo url. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedLogo(SimpleXMLElement $xml, Feed $feed) + { + $value = XmlParser::getXPathResult($xml, 'channel/image/url'); + $feed->setLogo(XmlParser::getValue($value)); + } + + /** + * Find the feed icon. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedIcon(SimpleXMLElement $xml, Feed $feed) + { + $feed->setIcon(''); + } + + /** + * Find the feed title. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedTitle(SimpleXMLElement $xml, Feed $feed) + { + $title = XmlParser::getXPathResult($xml, 'channel/title'); + $feed->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($title)) ?: $feed->getSiteUrl()); + } + + /** + * Find the feed language. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedLanguage(SimpleXMLElement $xml, Feed $feed) + { + $value = XmlParser::getXPathResult($xml, 'channel/language'); + $feed->setLanguage(XmlParser::getValue($value)); + } + + /** + * Find the feed id. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedId(SimpleXMLElement $xml, Feed $feed) + { + $feed->setId($feed->getFeedUrl() ?: $feed->getSiteUrl()); + } + + /** + * Find the feed date. + * + * @param SimpleXMLElement $xml Feed xml + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findFeedDate(SimpleXMLElement $xml, Feed $feed) + { + $publish_date = XmlParser::getXPathResult($xml, 'channel/pubDate'); + $update_date = XmlParser::getXPathResult($xml, 'channel/lastBuildDate'); + + $published = !empty($publish_date) ? $this->getDateParser()->getDateTime(XmlParser::getValue($publish_date)) : null; + $updated = !empty($update_date) ? $this->getDateParser()->getDateTime(XmlParser::getValue($update_date)) : null; + + if ($published === null && $updated === null) { + $feed->setDate($this->getDateParser()->getCurrentDateTime()); // We use the current date if there is no date for the feed + } elseif ($published !== null && $updated !== null) { + $feed->setDate(max($published, $updated)); // We use the most recent date between published and updated + } else { + $feed->setDate($updated ?: $published); + } + } + + /** + * Find the item published date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemPublishedDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $date = XmlParser::getXPathResult($entry, 'pubDate'); + + $item->setPublishedDate(!empty($date) ? $this->getDateParser()->getDateTime(XmlParser::getValue($date)) : null); + } + + /** + * Find the item updated date. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemUpdatedDate(SimpleXMLElement $entry, Item $item, Feed $feed) + { + if ($item->publishedDate === null) { + $this->findItemPublishedDate($entry, $item, $feed); + } + $item->setUpdatedDate($item->getPublishedDate()); // No updated date in RSS 2.0 specifications + } + + /** + * Find the item title. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemTitle(SimpleXMLElement $entry, Item $item) + { + $value = XmlParser::getXPathResult($entry, 'title'); + $item->setTitle(Filter::stripWhiteSpace(XmlParser::getValue($value)) ?: $item->getUrl()); + } + + /** + * Find the item author. + * + * @param SimpleXMLElement $xml Feed + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemAuthor(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) + { + $value = XmlParser::getXPathResult($entry, 'dc:creator', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'author') + ?: XmlParser::getXPathResult($xml, 'channel/dc:creator', $this->namespaces) + ?: XmlParser::getXPathResult($xml, 'channel/managingEditor'); + + $item->setAuthor(XmlParser::getValue($value)); + } + + /** + * Find the item author URL. + * + * @param SimpleXMLElement $xml Feed + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemAuthorUrl(SimpleXMLElement $xml, SimpleXMLElement $entry, Item $item) + { + // There appears to be no support for author URL in the dc: terms or author element + $item->setAuthorUrl(''); + } + + /** + * Find the item content. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemContent(SimpleXMLElement $entry, Item $item) + { + $content = XmlParser::getXPathResult($entry, 'content:encoded', $this->namespaces); + + if (XmlParser::getValue($content) === '') { + $content = XmlParser::getXPathResult($entry, 'description'); + } + + $item->setContent(XmlParser::getValue($content)); + } + + /** + * Find the item URL. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + */ + public function findItemUrl(SimpleXMLElement $entry, Item $item) + { + $link = XmlParser::getXPathResult($entry, 'feedburner:origLink', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'link') + ?: XmlParser::getXPathResult($entry, 'atom:link/@href', $this->namespaces); + + if (!empty($link)) { + $item->setUrl(XmlParser::getValue($link)); + } else { + $link = XmlParser::getXPathResult($entry, 'guid'); + $link = XmlParser::getValue($link); + + if (filter_var($link, FILTER_VALIDATE_URL) !== false) { + $item->setUrl($link); + } + } + } + + /** + * Genereate the item id. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemId(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $id = XmlParser::getValue(XmlParser::getXPathResult($entry, 'guid')); + + if ($id) { + $item->setId($this->generateId($id)); + } else { + $item->setId($this->generateId( + $item->getTitle(), $item->getUrl(), $item->getContent() + )); + } + } + + /** + * Find the item enclosure. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemEnclosure(SimpleXMLElement $entry, Item $item, Feed $feed) + { + if (isset($entry->enclosure)) { + $type = XmlParser::getXPathResult($entry, 'enclosure/@type'); + $url = XmlParser::getXPathResult($entry, 'feedburner:origEnclosureLink', $this->namespaces) + ?: XmlParser::getXPathResult($entry, 'enclosure/@url'); + + $item->setEnclosureUrl(Url::resolve(XmlParser::getValue($url), $feed->getSiteUrl())); + $item->setEnclosureType(XmlParser::getValue($type)); + } + } + + /** + * Find the item language. + * + * @param SimpleXMLElement $entry Feed item + * @param \PicoFeed\Parser\Item $item Item object + * @param \PicoFeed\Parser\Feed $feed Feed object + */ + public function findItemLanguage(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $language = XmlParser::getXPathResult($entry, 'dc:language', $this->namespaces); + $item->setLanguage(XmlParser::getValue($language) ?: $feed->getLanguage()); + } + + /** + * Find the item categories. + * + * @param SimpleXMLElement $entry Feed item + * @param Item $item Item object + * @param Feed $feed Feed object + */ + public function findItemCategories(SimpleXMLElement $entry, Item $item, Feed $feed) + { + $categories = XmlParser::getXPathResult($entry, 'category'); + $item->setCategoriesFromXml($categories); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Rss91.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Rss91.php new file mode 100644 index 00000000..058fca1b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/Rss91.php @@ -0,0 +1,13 @@ +childNodes->length === 0) { + return false; + } + + return $dom; + } + + /** + * Small wrapper around Laminas Xml to turn their exceptions into PicoFeed exceptions + * + * @static + * @access private + * @param string $input + * @param DOMDocument $dom + * @throws XmlEntityException + * @return SimpleXMLElement|DomDocument|boolean + */ + private static function scan($input, $dom = null) + { + try { + return Security::scan($input, $dom); + } catch(RuntimeException $e) { + throw new XmlEntityException($e->getMessage()); + } + } + + /** + * Load HTML document by using a DomDocument instance or return false on failure. + * + * @static + * @access public + * @param string $input XML content + * @return DOMDocument + */ + public static function getHtmlDocument($input) + { + $dom = new DomDocument(); + + if (empty($input)) { + return $dom; + } + + libxml_use_internal_errors(true); + + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + $dom->loadHTML($input, LIBXML_NONET); + } else { + $dom->loadHTML($input); + } + + self::$errors = []; + foreach (libxml_get_errors() as $error) { + self::$errors[] = sprintf('XML error: %s (Line: %d - Column: %d - Code: %d)', + $error->message, + $error->line, + $error->column, + $error->code + ); + } + + libxml_use_internal_errors(false); + + return $dom; + } + + /** + * Convert a HTML document to XML. + * + * @static + * @access public + * @param string $html HTML document + * @return string + */ + public static function htmlToXml($html) + { + $dom = self::getHtmlDocument(''.$html); + return $dom->saveXML($dom->getElementsByTagName('body')->item(0)); + } + + /** + * Get XML parser errors. + * + * @static + * @access public + * @return string + */ + public static function getErrors() + { + return implode(', ', self::$errors); + } + + /** + * Get the encoding from a xml tag. + * + * @static + * @access public + * @param string $data Input data + * @return string + */ + public static function getEncodingFromXmlTag($data) + { + $encoding = ''; + + if (strpos($data, '')); + $data = str_replace("'", '"', $data); + + $p1 = strpos($data, 'encoding='); + $p2 = strpos($data, '"', $p1 + 10); + + if ($p1 !== false && $p2 !== false) { + $encoding = substr($data, $p1 + 10, $p2 - $p1 - 10); + $encoding = strtolower($encoding); + } + } + + return $encoding; + } + + /** + * Get the charset from a meta tag. + * + * @static + * @access public + * @param string $data Input data + * @return string + */ + public static function getEncodingFromMetaTag($data) + { + $encoding = ''; + + if (preg_match('/;]+)/i', $data, $match) === 1) { + $encoding = strtolower($match[1]); + } + + return $encoding; + } + + /** + * Rewrite XPath query to use namespace-uri and local-name derived from prefix. + * + * @static + * @access public + * @param string $query XPath query + * @param array $ns Prefix to namespace URI mapping + * @return string + */ + public static function replaceXPathPrefixWithNamespaceURI($query, array $ns) + { + return preg_replace_callback('/([A-Z0-9]+):([A-Z0-9]+)/iu', function ($matches) use ($ns) { + // don't try to map the special prefix XML + if (strtolower($matches[1]) === 'xml') { + return $matches[0]; + } + + return '*[namespace-uri()="'.$ns[$matches[1]].'" and local-name()="'.$matches[2].'"]'; + }, + $query); + } + + /** + * Get the result elements of a XPath query. + * + * @static + * @access public + * @param SimpleXMLElement $xml XML element + * @param string $query XPath query + * @param array $ns Prefix to namespace URI mapping + * @return SimpleXMLElement[] + */ + public static function getXPathResult(SimpleXMLElement $xml, $query, array $ns = array()) + { + if (!empty($ns)) { + $query = static::replaceXPathPrefixWithNamespaceURI($query, $ns); + } + + return $xml->xpath($query); + } + + /** + * Get the first Xpath result or SimpleXMLElement value + * + * @static + * @access public + * @param mixed $value + * @return string + */ + public static function getValue($value) + { + $result = ''; + + if (is_array($value) && count($value) > 0) { + $result = (string) $value[0]; + } elseif (is_a($value, 'SimpleXMLElement')) { + return $result = (string) $value; + } + + return trim($result); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/PicoFeedException.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/PicoFeedException.php new file mode 100644 index 00000000..2de9e4b7 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/PicoFeedException.php @@ -0,0 +1,14 @@ +config->getContentFiltering(true)) { + $filter = Filter::html($item->getContent(), $feed->getSiteUrl()); + $filter->setConfig($this->config); + $item->setContent($filter->execute()); + } else { + Logger::setMessage(get_called_class().': Content filtering disabled'); + } + + return false; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ContentGeneratorProcessor.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ContentGeneratorProcessor.php new file mode 100644 index 00000000..49adf9cc --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ContentGeneratorProcessor.php @@ -0,0 +1,49 @@ +generators as $generator) { + $className = '\PicoFeed\Generator\\'.ucfirst($generator).'ContentGenerator'; + $object = new $className($this->config); + + if ($object->execute($item)) { + return true; + } + } + + return false; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php new file mode 100644 index 00000000..7b092b50 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ItemPostProcessor.php @@ -0,0 +1,106 @@ +processors as $processor) { + if ($processor->execute($feed, $item)) { + return true; + } + } + + return false; + } + + /** + * Register a new Item post-processor + * + * @access public + * @param ItemProcessorInterface $processor + * @return ItemPostProcessor + */ + public function register(ItemProcessorInterface $processor) + { + $this->processors[get_class($processor)] = $processor; + return $this; + } + + /** + * Remove Processor instance + * + * @access public + * @param string $class + * @return ItemPostProcessor + */ + public function unregister($class) + { + if (isset($this->processors[$class])) { + unset($this->processors[$class]); + } + + return $this; + } + + /** + * Checks whether a specific processor is registered or not + * + * @access public + * @param string $class + * @return bool + */ + public function hasProcessor($class) + { + return isset($this->processors[$class]); + } + + /** + * Get Processor instance + * + * @access public + * @param string $class + * @return ItemProcessorInterface|null + */ + public function getProcessor($class) + { + return isset($this->processors[$class]) ? $this->processors[$class] : null; + } + + public function setConfig(Config $config) + { + foreach ($this->processors as $processor) { + $processor->setConfig($config); + } + + return false; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ItemProcessorInterface.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ItemProcessorInterface.php new file mode 100644 index 00000000..5d532262 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Processor/ItemProcessorInterface.php @@ -0,0 +1,25 @@ +executionCallback = $executionCallback; + return $this; + } + + /** + * Execute Item Processor + * + * @access public + * @param Feed $feed + * @param Item $item + * @return bool + */ + public function execute(Feed $feed, Item $item) + { + if (!in_array($item->getUrl(), $this->ignoredUrls)) { + $scraper = $this->getScraper(); + $scraper->setUrl($item->getUrl()); + $scraper->execute(); + + if ($this->executionCallback && is_callable($this->executionCallback)) { + call_user_func($this->executionCallback, $feed, $item, $scraper); + } + + if ($scraper->hasRelevantContent()) { + $item->setContent($scraper->getFilteredContent()); + } + } + + return false; + } + + /** + * Ignore list of URLs + * + * @access public + * @param array $urls + * @return $this + */ + public function ignoreUrls(array $urls) + { + $this->ignoredUrls = $urls; + return $this; + } + + /** + * Returns Scraper instance + * + * @access public + * @return Scraper + */ + public function getScraper() + { + if ($this->scraper === null) { + $this->scraper = new Scraper($this->config); + } + + return $this->scraper; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/Favicon.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/Favicon.php new file mode 100644 index 00000000..d4ca07db --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/Favicon.php @@ -0,0 +1,186 @@ +content; + } + + /** + * Get the icon file type (available only after the download). + * + * @return string + */ + public function getType() + { + foreach ($this->types as $type) { + if (strpos($this->content_type, $type) === 0) { + return $type; + } + } + + return 'image/x-icon'; + } + + /** + * Get data URI (http://en.wikipedia.org/wiki/Data_URI_scheme). + * + * @return string + */ + public function getDataUri() + { + if (empty($this->content)) { + return ''; + } + + return sprintf( + 'data:%s;base64,%s', + $this->getType(), + base64_encode($this->content) + ); + } + + /** + * Download and check if a resource exists. + * + * @param string $url URL + * @return \PicoFeed\Client\Client Client instance + */ + public function download($url) + { + $client = Client::getInstance(); + $client->setConfig($this->config); + + Logger::setMessage(get_called_class().' Download => '.$url); + + try { + $client->execute($url); + } catch (ClientException $e) { + Logger::setMessage(get_called_class().' Download Failed => '.$e->getMessage()); + } + + return $client; + } + + /** + * Check if a remote file exists. + * + * @param string $url URL + * @return bool + */ + public function exists($url) + { + return $this->download($url)->getContent() !== ''; + } + + /** + * Get the icon link for a website. + * + * @param string $website_link URL + * @param string $favicon_link optional URL + * @return string + */ + public function find($website_link, $favicon_link = '') + { + $website = new Url($website_link); + + if ($favicon_link !== '') { + $icons = array($favicon_link); + } else { + $icons = $this->extract($this->download($website->getBaseUrl('/'))->getContent()); + $icons[] = $website->getBaseUrl('/favicon.ico'); + } + + foreach ($icons as $icon_link) { + $icon_link = Url::resolve($icon_link, $website); + $resource = $this->download($icon_link); + $this->content = $resource->getContent(); + $this->content_type = $resource->getContentType(); + + if ($this->content !== '') { + return $icon_link; + } elseif ($favicon_link !== '') { + return $this->find($website_link); + } + } + + return ''; + } + + /** + * Extract the icon links from the HTML. + * + * @param string $html HTML + * @return array + */ + public function extract($html) + { + $icons = array(); + + if (empty($html)) { + return $icons; + } + + $dom = XmlParser::getHtmlDocument($html); + + $xpath = new DOMXpath($dom); + $elements = $xpath->query('//link[@rel="icon" or @rel="shortcut icon" or @rel="Shortcut Icon" or @rel="icon shortcut"]'); + + for ($i = 0; $i < $elements->length; ++$i) { + $icons[] = $elements->item($i)->getAttribute('href'); + } + + return $icons; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/Reader.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/Reader.php new file mode 100644 index 00000000..596b02dc --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/Reader.php @@ -0,0 +1,189 @@ + '//feed', + 'Rss20' => '//rss[@version="2.0"]', + 'Rss92' => '//rss[@version="0.92"]', + 'Rss91' => '//rss[@version="0.91"]', + 'Rss10' => '//rdf', + ); + + /** + * Download a feed (no discovery). + * + * @param string $url Feed url + * @param string $last_modified Last modified HTTP header + * @param string $etag Etag HTTP header + * @param string $username HTTP basic auth username + * @param string $password HTTP basic auth password + * + * @return \PicoFeed\Client\Client + */ + public function download($url, $last_modified = '', $etag = '', $username = '', $password = '') + { + $url = $this->prependScheme($url); + + return Client::getInstance() + ->setConfig($this->config) + ->setLastModified($last_modified) + ->setEtag($etag) + ->setUsername($username) + ->setPassword($password) + ->execute($url); + } + + /** + * Discover and download a feed. + * + * @param string $url Feed or website url + * @param string $last_modified Last modified HTTP header + * @param string $etag Etag HTTP header + * @param string $username HTTP basic auth username + * @param string $password HTTP basic auth password + * @return Client + * @throws SubscriptionNotFoundException + */ + public function discover($url, $last_modified = '', $etag = '', $username = '', $password = '') + { + $client = $this->download($url, $last_modified, $etag, $username, $password); + + // It's already a feed or the feed was not modified + if (!$client->isModified() || $this->detectFormat($client->getContent())) { + return $client; + } + + // Try to find a subscription + $links = $this->find($client->getUrl(), $client->getContent()); + + if (empty($links)) { + throw new SubscriptionNotFoundException('Unable to find a subscription'); + } + + return $this->download($links[0], $last_modified, $etag, $username, $password); + } + + /** + * Find feed urls inside a HTML document. + * + * @param string $url Website url + * @param string $html HTML content + * + * @return array List of feed links + */ + public function find($url, $html) + { + Logger::setMessage(get_called_class().': Try to discover subscriptions'); + + $dom = XmlParser::getHtmlDocument($html); + $xpath = new DOMXPath($dom); + $links = array(); + + $queries = array( + '//link[@type="application/rss+xml"]', + '//link[@type="application/atom+xml"]', + ); + + foreach ($queries as $query) { + $nodes = $xpath->query($query); + + foreach ($nodes as $node) { + $link = $node->getAttribute('href'); + + if (!empty($link)) { + $feedUrl = new Url($link); + $siteUrl = new Url($url); + + $links[] = $feedUrl->getAbsoluteUrl($feedUrl->isRelativeUrl() ? $siteUrl->getBaseUrl() : ''); + } + } + } + + Logger::setMessage(get_called_class().': '.implode(', ', $links)); + + return $links; + } + + /** + * Get a parser instance. + * + * @param string $url Site url + * @param string $content Feed content + * @param string $encoding HTTP encoding + * @return \PicoFeed\Parser\Parser + * @throws UnsupportedFeedFormatException + */ + public function getParser($url, $content, $encoding) + { + $format = $this->detectFormat($content); + + if (empty($format)) { + throw new UnsupportedFeedFormatException('Unable to detect feed format'); + } + + $className = '\PicoFeed\Parser\\'.$format; + + $parser = new $className($content, $encoding, $url); + $parser->setHashAlgo($this->config->getParserHashAlgo()); + $parser->setConfig($this->config); + + return $parser; + } + + /** + * Detect the feed format. + * + * @param string $content Feed content + * @return string + */ + public function detectFormat($content) + { + $dom = XmlParser::getHtmlDocument($content); + $xpath = new DOMXPath($dom); + + foreach ($this->formats as $parser_name => $query) { + $nodes = $xpath->query($query); + + if ($nodes->length === 1) { + return $parser_name; + } + } + + return ''; + } + + /** + * Add the prefix "http://" if the end-user just enter a domain name. + * + * @param string $url Url + * @return string + */ + public function prependScheme($url) + { + if (!preg_match('%^https?://%', $url)) { + $url = 'http://'.$url; + } + + return $url; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/ReaderException.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/ReaderException.php new file mode 100644 index 00000000..4f03dbe0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Reader/ReaderException.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://combat.blog.lemonde.fr/2013/08/31/teddy-riner-le-rookie-devenu-rambo/#xtor=RSS-3208', + 'body' => array( + '//div[@class="entry-content"]', + ), + 'strip' => array( + '//*[contains(@class, "fb-like") or contains(@class, "social")]' + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php new file mode 100644 index 00000000..ee641b09 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.blogs.nytimes.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'title' => '//header/h1', + 'test_url' => 'http://bits.blogs.nytimes.com/2012/01/16/wikipedia-plans-to-go-dark-on-wednesday-to-protest-sopa/', + 'body' => array( + '//div[@class="postContent"]', + ), + 'strip' => array( + '//*[@class="shareToolsBox"]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.igen.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.igen.fr.php new file mode 100644 index 00000000..f2028f4e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.igen.fr.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.igen.fr/ailleurs/2014/05/nvidia-va-delaisser-les-smartphones-grand-public-86031', + 'body' => array( + '//div[contains(@class, "field-name-body")]' + ), + 'strip' => array( + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.nytimes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.nytimes.com.php new file mode 100644 index 00000000..8ff921ce --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.nytimes.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nytimes.com/2011/05/15/world/middleeast/15prince.html', + 'body' => array( + '//p[contains(@class, "story-content")] | //div[@class="image"]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.over-blog.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.over-blog.com.php new file mode 100644 index 00000000..cc5d83c7 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.over-blog.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://eliascarpe.over-blog.com/2015/12/re-upload-projets-d-avenir.html', + 'body' => array( + '//div[contains(concat(" ", normalize-space(@class), " "), " ob-section ")]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.phoronix.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.phoronix.com.php new file mode 100644 index 00000000..66713f71 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.phoronix.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.phoronix.com/scan.php?page=article&item=amazon_ec2_bare&num=1', + 'body' => array( + '//div[@class="content"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.slate.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.slate.com.php new file mode 100644 index 00000000..a795bca3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.slate.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.slate.com/articles/business/moneybox/2013/08/microsoft_ceo_steve_ballmer_retires_a_firsthand_account_of_the_company_s.html', + 'body' => array( + '//div[@class="sl-art-body"]', + ), + 'strip' => array( + '//*[contains(@class, "social") or contains(@class, "comments") or contains(@class, "sl-article-floatin-tools") or contains(@class, "sl-art-pag")]', + '//*[@id="mys_slate_logged_in"]', + '//*[@id="sl_article_tools_myslate_bottom"]', + '//*[@id="mys_myslate"]', + '//*[@class="sl-viral-container"]', + '//*[@class="sl-art-creds-cntr"]', + '//*[@class="sl-art-ad-midflex"]', + ) + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.theguardian.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.theguardian.com.php new file mode 100644 index 00000000..e0d6f3fd --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.theguardian.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.theguardian.com/sustainable-business/2015/feb/02/2015-hyper-transparency-global-business', + 'body' => array( + '//div[contains(@class, "content__main-column--article")]', + ), + 'strip' => array( + '//div[contains(@class, "meta-container")]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php new file mode 100644 index 00000000..7b8f76e5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wikipedia.org.php @@ -0,0 +1,29 @@ + array( + '%.*%' => array( + 'test_url' => 'https://en.wikipedia.org/wiki/Grace_Hopper', + 'body' => array( + '//div[@id="bodyContent"]', + ), + 'strip' => array( + "//div[@id='toc']", + "//div[@id='catlinks']", + "//div[@id='jump-to-nav']", + "//div[@class='thumbcaption']//div[@class='magnify']", + "//table[@class='navbox']", + "//table[contains(@class, 'infobox')]", + "//div[@class='dablink']", + "//div[@id='contentSub']", + "//div[@id='siteSub']", + "//table[@id='persondata']", + "//table[contains(@class, 'metadata')]", + "//*[contains(@class, 'noprint')]", + "//*[contains(@class, 'printfooter')]", + "//*[contains(@class, 'editsection')]", + "//*[contains(@class, 'error')]", + "//span[@title='pronunciation:']", + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wired.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wired.com.php new file mode 100644 index 00000000..952b09ac --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wired.com.php @@ -0,0 +1,44 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.wired.com/gamelife/2013/09/ouya-free-the-games/', + 'body' => array( + '//div[@data-js="gallerySlides"]', + '//div[starts-with(@class,"post")]', + ), + 'strip' => array( + '//h1', + '//nav', + '//button', + '//figure[starts-with(@class,"rad-slide")]', + '//figure[starts-with(@class,"end-slate")]', + '//div[contains(@class,"mobile-")]', + '//div[starts-with(@class,"mob-gallery-launcher")]', + '//div[contains(@id,"mobile-")]', + '//span[contains(@class,"slide-count")]', + '//div[contains(@class,"show-ipad")]', + '//img[contains(@id,"-hero-bg")]', + '//div[@data-js="overlayWrap"]', + '//ul[contains(@class,"metadata")]', + '//div[@class="opening center"]', + '//p[contains(@class="byline-mob"]', + '//div[@id="o-gallery"]', + '//div[starts-with(@class,"sm-col")]', + '//div[contains(@class,"pad-b-huge")]', + '//a[contains(@class,"visually-hidden")]', + '//*[@class="social"]', + '//i', + '//div[@data-js="mobGalleryAd"]', + '//div[contains(@class,"footer")]', + '//div[contains(@data-js,"fader")]', + '//div[@id="sharing"]', + '//div[contains(@id,"related")]', + '//div[@id="most-pop"]', + '//ul[@id="article-tags"]', + '//style', + '//section[contains(@class,"footer")]' + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wsj.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wsj.com.php new file mode 100644 index 00000000..f6e6cc12 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/.wsj.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://online.wsj.com/article/SB10001424127887324108204579023143974408428.html', + 'body' => array( + '//div[@class="articlePage"]', + ), + 'strip' => array( + '//*[@id="articleThumbnail_2"]', + '//*[@class="socialByline"]', + ) + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/01net.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/01net.com.php new file mode 100644 index 00000000..6d144f05 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/01net.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.01net.com/editorial/624550/twitter-rachete-madbits-un-specialiste-francais-de-lanalyse-dimages/', + 'body' => array( + '//div[@class="article_ventre_box"]', + ), + 'strip' => array( + '//link', + '//*[contains(@class, "article_navigation")]', + '//h1', + '//*[contains(@class, "article_toolbarMain")]', + '//*[contains(@class, "article_imagehaute_box")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/24.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/24.hu.php new file mode 100644 index 00000000..6c269db0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/24.hu.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://24.hu/belfold/2017/10/20/millios-lehuzasok-miatt-razziaztak-egy-budapesti-barban-videoval/', + 'body' => array( + '//div[@class="post-title-wrapper"]/h1', + '//div[@class="post-header-wrapper has-img"]/img', + '//div[@class="post-body"]' + + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/444.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/444.hu.php new file mode 100644 index 00000000..e65bad18 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/444.hu.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'https://444.hu/2017/10/20/tulszamlazo-helyen-utottek-rajta-budapest-belvarosaban', + 'body' => array( + '//div[@id="headline"]/h1', + '//article' + ), + 'strip' => array( + '//article/footer', + '//article/div[@class="jeti-roadblock ad"]', + '//figcaption', + '//noscript', + '//ul[@class="widget-stream-items"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/888.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/888.hu.php new file mode 100644 index 00000000..68cfe056 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/888.hu.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'https://888.hu/article-a-budapesti-szocik-nem-szeretik-a-videki-szocikat', + 'body' => array( + '//div[@id="cikkholder"]/h1', + '//div[@class="maincontent8"]' + ), + 'strip' => array( + '//div[@class="AdW"]', + '//h1[@class="olvastadmar"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php new file mode 100644 index 00000000..752d0413 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/abstrusegoose.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%alt="(.+)" title="(.+)" */>%' => '/>
$1
$2', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/achgut.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/achgut.com.php new file mode 100644 index 00000000..1e61fe68 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/achgut.com.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.achgut.com/artikel/deutscher_herbst_wg_reichsstrasse_106', + 'body' => array( + '//div[@class="headerpict_half"]/div/img', + '//div[@class="beitrag"]/div[@class="teaser_blog_text"]' + ), + 'strip' => array( + '//div[@class="footer_blog_text"]', + '//div[@class="beitrag"]/div[@class="teaser_blog_text"]/h2[1]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/adventuregamers.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/adventuregamers.com.php new file mode 100644 index 00000000..98d384e6 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/adventuregamers.com.php @@ -0,0 +1,23 @@ + array( + '%^/news.*%' => array( + 'test_url' => 'http://www.adventuregamers.com/news/view/31079', + 'body' => array( + '//div[@class="bodytext"]', + ) + ), + '%^/videos.*%' => array( + 'test_url' => 'http://www.adventuregamers.com/videos/view/31056', + 'body' => array( + '//iframe', + ) + ), + '%^/articles.*%' => array( + 'test_url' => 'http://www.adventuregamers.com/articles/view/31049', + 'body' => array( + '//div[@class="cleft"]', + ) + ) + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/alainonline.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/alainonline.net.php new file mode 100644 index 00000000..f440b234 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/alainonline.net.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.alainonline.net/news_details.php?lang=arabic&sid=18907', + 'body' => array( + '//div[@class="news_details"]', + ), + 'strip' => array( + '//div[@class="news_details"]/div/div[last()]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/aljazeera.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/aljazeera.com.php new file mode 100644 index 00000000..c02eb219 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/aljazeera.com.php @@ -0,0 +1,25 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.aljazeera.com/news/2015/09/xi-jinping-seattle-china-150922230118373.html', + 'body' => array( + '//article[@id="main-story"]', + ), + 'strip' => array( + '//script', + '//header', + '//ul', + '//section[contains(@class,"profile")]', + '//a[@target="_self"]', + '//div[contains(@id,"_2")]', + '//div[contains(@id,"_3")]', + '//img[@class="viewMode"]', + '//table[contains(@class,"in-article-item")]', + '//div[@data-embed-type="Brightcove"]', + '//div[@class="QuoteContainer"]', + '//div[@class="BottomByLine"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/allafrica.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/allafrica.com.php new file mode 100644 index 00000000..e8a506d4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/allafrica.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.aljazeera.com/news/2015/09/xi-jinping-seattle-china-150922230118373.html', + 'body' => array( + '//div[@class="story-body"]', + ), + 'strip' => array( + '//p[@class="kindofstory"]', + '//cite[@class="byline"]', + '//div[@class="useful-top"]', + '//div[contains(@class,"related-topics")]', + '//links', + '//sharebar', + '//related-topics', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php new file mode 100644 index 00000000..8ede99b1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/allgemeine-zeitung.de.php @@ -0,0 +1,23 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.allgemeine-zeitung.de/lokales/polizei/mainz-gonsenheim-unbekannte-rauben-esso-tankstelle-in-kurt-schumacher-strasse-aus_14913147.htm', + 'body' => array( + '//div[contains(@class, "article")][1]', + ), + 'strip' => array( + '//read/h1', + '//*[@id="t-map"]', + '//*[contains(@class, "modules")]', + '//*[contains(@class, "adsense")]', + '//*[contains(@class, "linkbox")]', + '//*[contains(@class, "info")]', + '//*[@class="skip"]', + '//*[@class="funcs"]', + '//span[@class="nd address"]', + '//a[contains(@href, "abo-und-services")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php new file mode 100644 index 00000000..3214c62a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/amazingsuperpowers.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php new file mode 100644 index 00000000..51247f76 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/anythingcomic.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'body' => array( + '//img[@id="comic_image"]', + '//div[@class="comment-wrapper"][position()=1]', + ), + 'strip' => array(), + 'test_url' => 'http://www.anythingcomic.com/comics/2108929/stress-free/', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ap.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ap.org.php new file mode 100644 index 00000000..5bb2bb6c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ap.org.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://hosted.ap.org/dynamic/stories/A/AS_CHINA_GAO_ZHISHENG?SITE=AP&SECTION=HOME&TEMPLATE=DEFAULT', + 'body' => array( + '//img[@class="ap-smallphoto-img"]', + '//span[@class="entry-content"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/areadvd.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/areadvd.de.php new file mode 100644 index 00000000..fc569220 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/areadvd.de.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.areadvd.de/news/daily-deals-angebote-bei-lautsprecher-teufel-3/', + 'body' => array('//div[contains(@class,"entry")]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/arstechnica.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/arstechnica.com.php new file mode 100644 index 00000000..55e01ce3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/arstechnica.com.php @@ -0,0 +1,25 @@ + array( + '%.*%' => array( + 'test_url' => 'http://arstechnica.com/tech-policy/2015/09/judge-warners-2m-happy-birthday-copyright-is-bogus/', + 'body' => array( + '//article', + ), + 'strip' => array( + '//h4[@class="post-upperdek"]', + '//h1', + '//ul[@class="lSPager lSGallery"]', + '//div[@class="lSAction"]', + '//section[@class="post-meta"]', + '//figcaption', + '//aside', + '//div[@class="gallery-image-credit"]', + '//section[@class="article-author"]', + '//*[contains(@id,"social-")]', + '//div[contains(@id,"footer")]', + ), + ), + ), +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/atv.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/atv.hu.php new file mode 100644 index 00000000..170ec4db --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/atv.hu.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.atv.hu/belfold/20171020-tobb-millio-forintot-csalt-ki-egy-idos-ferfitol-a-budapesti-no', + 'body' => array( + '//article' + ), + 'strip' => array( + '//span[@class="date"]', + '//div[@class="fb-like db_iframe_widget"]', + '//div[@class="ad-wrapper dashed-border"]', + '//div[@class="footer-meta-wrapper"]', + '//div[@class="image-wrapper "]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php new file mode 100644 index 00000000..5ab70514 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/awkwardzombie.com.php @@ -0,0 +1,10 @@ + array( + '%/index.php.*comic=.*%' => array( + 'test_url' => 'http://www.awkwardzombie.com/index.php?comic=041315', + 'body' => array('//*[@id="comic"]/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/backchannel.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/backchannel.com.php new file mode 100644 index 00000000..bc5932a2 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/backchannel.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'https://medium.com/lessons-learned/917b8b63ae3e', + 'body' => array( + '//div[contains(@class,"section-inner")]', + ), + 'strip' => array( + '//div[contains(@class,"metabar")]', + '//img[contains(@class,"thumbnail")]', + '//h1', + '//blockquote', + '//p[contains(@class,"graf-after--h4")]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php new file mode 100644 index 00000000..165515bb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bangkokpost.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bangkokpost.com/news/politics/704204/new-us-ambassador-arrives-in-bangkok', + 'body' => array( + '//article/div[@class="articleContents"]', + ), + 'strip' => array( + '//h2', + '//h4', + '//div[@class="text-size"]', + '//div[@class="relate-story"]', + '//div[@class="text-ads"]', + '//ul', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bauerwilli.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bauerwilli.com.php new file mode 100644 index 00000000..b191a6ed --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bauerwilli.com.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bauerwilli.com/intuitive-eating/', + 'body' => array( + '//div[@class="entry-thumbnail"]', + '//div[@class="entry-content"]', + ), + 'strip' => array( + '//div[@class="tptn_counter"]', + '//div[contains(@class, "sharedaddy")]' + ), + ), + ), +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bgr.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bgr.com.php new file mode 100644 index 00000000..7507a2f1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bgr.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://bgr.com/2015/09/27/iphone-6s-waterproof-testing/', + 'body' => array( + '//img[contains(@class,"img")]', + '//div[@class="text-column"]', + ), + 'strip' => array( + '//strong', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php new file mode 100644 index 00000000..d06ed124 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bigfootjustice.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%-150x150%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bigpicture.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bigpicture.ru.php new file mode 100644 index 00000000..55c40894 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bigpicture.ru.php @@ -0,0 +1,31 @@ + array( + '%.*%' => array( + 'test_url' => 'http://bigpicture.ru/?p=556658', + 'body' => array( + '//div[@class="article container"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//h1', + '//*[@class="wp-smiley"]', + '//div[@class="ipmd"]', + '//div[@class="tags"]', + '//div[@class="social-button"]', + '//div[@class="bottom-share"]', + '//div[@class="raccoonbox"]', + '//div[@class="yndadvert"]', + '//div[@class="we-recommend"]', + '//div[@class="relap-bigpicture_ru-wrapper"]', + '//div[@id="mmail"]', + '//div[@id="mobile-ads-cut"]', + '//div[@id="liquidstorm-alt-html"]', + '//div[contains(@class, "post-tags")]', + '//*[contains(text(),"Смотрите также")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bizjournals.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bizjournals.com.php new file mode 100644 index 00000000..d1cc3da9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bizjournals.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bizjournals.com/milwaukee/news/2015/09/30/bucks-will-hike-prices-on-best-seats-at-new-arena.html', + 'body' => array( + '//figure/div/a/img', + '//p[@class="content__segment"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/biztimes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/biztimes.com.php new file mode 100644 index 00000000..d21aa98c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/biztimes.com.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.biztimes.com/2017/02/10/settlement-would-revive-fowler-lake-condo-project-in-oconomowoc/', + 'body' => array( + '//h2/span[@class="subhead"]', + '//div[contains(@class,"article-content")]', + ), + 'strip' => array( + '//script', + '//div[contains(@class,"mobile-article-content")]', + '//div[contains(@class,"sharedaddy")]', + '//div[contains(@class,"author-details")]', + '//div[@class="row ad"]', + '//div[contains(@class,"relatedposts")]', + '//div[@class="col-lg-12"]', + '//div[contains(@class,"widget")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bleepingcomputer.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bleepingcomputer.com.php new file mode 100644 index 00000000..7b740600 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bleepingcomputer.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.bleepingcomputer.com/news/google/chromes-sandbox-feature-infringes-on-three-patents-so-google-must-now-pay-20m/', + 'body' => array( + '//div[@class="article_section"]', + ), + 'strip' => array( + '//*[@itemprop="headline"]', + '//div[@class="cz-news-story-title-section"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php new file mode 100644 index 00000000..39c88ae4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/blog.fefe.de.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://blog.fefe.de/?ts=ad706a73', + 'body' => array( + '/html/body/ul', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php new file mode 100644 index 00000000..ce016510 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/blog.mapillary.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://blog.mapillary.com/update/2015/08/26/traffic-sign-updates.html', + 'body' => array( + '//div[contains(@class, "blog-post__content")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/brewers.mlb.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/brewers.mlb.com.php new file mode 100644 index 00000000..be406faf --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/brewers.mlb.com.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'http://m.brewers.mlb.com/news/article/161364798', + 'body' => array( + '//article[contains(@class,"article")]', + ), + 'strip' => array( + '//div[contains(@class,"ad-slot")]', + '//h1', + '//span[@class="timestamp"]', + '//div[contains(@class,"contributor-bottom")]', + '//div[contains(@class,"video")]', + '//ul[contains(@class,"social")]', + '//p[@class="tagline"]', + '//div[contains(@class,"social")]', + '//div[@class="button-wrap"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php new file mode 100644 index 00000000..4e73e79f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/buenosairesherald.com.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.buenosairesherald.com/article/199344/manzur-named-next-governor-of-tucum%C3%A1n', + 'body' => array( + '//div[@style="float:none"]', + ), + 'strip' => array( + '//div[contains(@class, "bz_alias_short_desc_container"]', + '//td[@id="bz_show_bug_column_1"]', + '//table[@id="attachment_table"]', + '//table[@class="bz_comment_table"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bunicomic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bunicomic.com.php new file mode 100644 index 00000000..ad83e436 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/bunicomic.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bunicomic.com/comic/buni-623/', + 'body' => array( + '//div[@class="comic-table"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/buttersafe.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/buttersafe.com.php new file mode 100644 index 00000000..1f313cd0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/buttersafe.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://buttersafe.com/2015/04/21/the-incredible-flexible-man/', + 'body' => array( + '//div[@id="comic"]', + '//div[@class="post-comic"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cad-comic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cad-comic.com.php new file mode 100644 index 00000000..a631c97f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cad-comic.com.php @@ -0,0 +1,12 @@ + array( + '%/cad/.+%' => array( + 'test_url' => 'http://www.cad-comic.com/cad/20150417', + 'body' => array( + '//*[@id="content"]/img', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php new file mode 100644 index 00000000..ea6191e8 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/chaoslife.findchaos.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://chaoslife.findchaos.com/pets-in-the-wild', + 'body' => array('//div[@id="comic"]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/chinafile.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/chinafile.com.php new file mode 100644 index 00000000..450117b3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/chinafile.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.chinafile.com/books/shanghai-faithful?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+chinafile%2FAll+%28ChinaFile%29', + 'body' => array( + '//div[contains(@class,"pane-featured-photo-panel-pane-1")]', + '//div[contains(@class,"video-above-fold")]', + '//div[@class="sc-media"]', + '//div[contains(@class,"field-name-body")]', + ), + 'strip' => array( + '//div[contains(@class,"cboxes")]', + '//div[contains(@class,"l-middle")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cicero.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cicero.de.php new file mode 100644 index 00000000..2cd1b709 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cicero.de.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'https://cicero.de/innenpolitik/plaene-der-eu-kommission-der-ganz-normale-terror', + 'body' => array( + '//p[@class="lead"]', + '//article/div[2]/div[contains(@class, "field--name-field-cc-image")]', + '//article/div[2]/div[contains(@class, "image-description")]', + '//div[@class="field field-name-field-cc-body"]', + ), + 'strip' => array( + '//*[contains(@class, "urban-ad-sign")]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php new file mode 100644 index 00000000..9dcc7e54 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cliquerefresh.com.php @@ -0,0 +1,10 @@ + array( + '%/comic.*%' => array( + 'test_url' => 'http://cliquerefresh.com/comic/078-stating-the-obvious/', + 'body' => array('//div[@class="comicImg"]/img | //div[@class="comicImg"]/a/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cnet.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cnet.com.php new file mode 100644 index 00000000..60767a53 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cnet.com.php @@ -0,0 +1,37 @@ + array( + '%^/products.*%' => array( + 'test_url' => 'http://www.cnet.com/products/fibaro-flood-sensor/#ftag=CADf328eec', + 'body' => array( + '//li[contains(@class,"slide first"] || //figure[contains(@class,(promoFigure))]', + '//div[@class="quickInfo"]', + '//div[@class="col-6 ratings"]', + '//div[@id="editorReview"]', + ), + 'strip' => array( + '//script', + '//a[@class="clickToEnlarge"]', + '//div[@section="topSharebar"]', + '//div[contains(@class,"related")]', + '//div[contains(@class,"ad-")]', + '//div[@section="shortcodeGallery"]', + ), + ), + '%.*%' => array( + 'test_url' => 'http://cnet.com.feedsportal.com/c/34938/f/645093/s/4a340866/sc/28/l/0L0Scnet0N0Cnews0Cman0Eclaims0Eonline0Epsychic0Emade0Ehim0Ebuy0E10Emillion0Epowerball0Ewinning0Eticket0C0Tftag0FCAD590Aa51e/story01.htm', + 'body' => array( + '//p[@itemprop="description"]', + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + '//script', + '//a[@class="clickToEnlarge"]', + '//div[@section="topSharebar"]', + '//div[contains(@class,"related")]', + '//div[contains(@class,"ad-")]', + '//div[@section="shortcodeGallery"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/coinwelt.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/coinwelt.de.php new file mode 100644 index 00000000..28a8bbab --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/coinwelt.de.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://coinwelt.de/2017/08/bitcache-kreierer-kim-dotcom-bietet-arbeitsplaetze-fuer-blockchain-goetter/', + 'body' => array( + '//div[@class="post-inner"]//div[@class="entry"]', + ), + 'strip' => array( + '//div[contains(@class, "shariff")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/consomac.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/consomac.fr.php new file mode 100644 index 00000000..9209f9cb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/consomac.fr.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://consomac.fr/news-2430-l-iphone-6-toujours-un-secret-bien-garde.html', + 'body' => array( + '//div[contains(@id, "newscontent")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php new file mode 100644 index 00000000..3214c62a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/cowbirdsinlove.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/crash.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/crash.net.php new file mode 100644 index 00000000..88cef141 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/crash.net.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.crash.net/motogp/news/885102/1/dovizioso-mugello-win-was-catalyst-for-title-challenge', + 'body' => array( + '//*[@id="block-system-main"]', + ), + 'strip' => array( + '//script', + '//style', + '//*[@class="social-bar"]', + '//*[@id="below-headline-image-ad"]', + '//*[@class="advert-"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/csmonitor.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/csmonitor.com.php new file mode 100644 index 00000000..481e4b09 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/csmonitor.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.csmonitor.com/USA/Politics/2015/0925/John-Boehner-steps-down-Self-sacrificing-but-will-it-lead-to-better-government', + 'body' => array( + '//h2[@id="summary"]', + '//div[@class="flex-video youtube"]', + '//div[contains(@class,"eza-body")]', + ), + 'strip' => array( + '//span[@id="breadcrumb"]', + '//div[@id="byline-wrapper"]', + '//div[@class="injection"]', + '//*[contains(@class,"promo_link")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailyjs.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailyjs.com.php new file mode 100644 index 00000000..20eb1d75 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailyjs.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://dailyjs.com/2014/08/07/p5js/', + 'body' => array( + '//div[@id="post"]', + ), + 'strip' => array( + '//h2[@class="post"]', + '//div[@class="meta"]', + '//*[contains(@class, "addthis_toolbox")]', + '//*[contains(@class, "addthis_default_style")]', + '//*[@class="navigation small"]', + '//*[@id="related"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php new file mode 100644 index 00000000..db3fc0e1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailyreporter.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://dailyreporter.com/2016/01/09/us-supreme-court-case-could-weaken-government-workers-unions/', + 'body' => array( + '//div[contains(@class, "entry-content")]', + ), + 'strip' => array( + '//div[@class="dmcss_login_form"]', + '//*[contains(@class, "sharedaddy")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailytech.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailytech.com.php new file mode 100644 index 00000000..5d1df4a9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dailytech.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.dailytech.com/Apples+First+Fixes+to+iOS+9+Land+w+iOS++901+Release/article37495.htm', + 'body' => array( + '//div[@class="NewsBodyImage"]', + '//span[@id="lblSummary"]', + '//span[@id="lblBody"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/degroupnews.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/degroupnews.com.php new file mode 100644 index 00000000..91f5c56e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/degroupnews.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.degroupnews.com/medias/vodsvod/amazon-concurrence-la-chromecast-de-google-avec-fire-tv-stick', + 'body' => array( + '//div[@class="contenu"]', + ), + 'strip' => array( + '//div[contains(@class, "a2a")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/derstandard.at.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/derstandard.at.php new file mode 100644 index 00000000..7e95a51f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/derstandard.at.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://derstandard.at/2000010267354/The-Witcher-3-Hohe-Hardware-Anforderungen-fuer-PC-Spieler?ref=rss', + 'body' => array( + '//div[@class="copytext"]', + '//ul[@id="media-list"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dilbert.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dilbert.com.php new file mode 100644 index 00000000..b8e9b3d6 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dilbert.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'body' => array( + '//img[@class="img-responsive img-comic"]', + ), + 'test_url' => 'http://dilbert.com/strip/2016-01-28', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php new file mode 100644 index 00000000..ae0dfe71 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/discovermagazine.com.php @@ -0,0 +1,26 @@ + array( + '%.*%' => array( + 'test_url' => 'http://blogs.discovermagazine.com/neuroskeptic/2017/01/25/publishers-jeffrey-beall/', + 'body' => array( + '//div[@class="contentWell"]', + ), + 'strip' => array( + '//h1', + '//div[@class="breadcrumbs"]', + '//div[@class="mobile"]', + '//div[@class="fromIssue"]', + '//div[contains(@class,"belowDeck")]', + '//div[@class="meta"]', + '//div[@class="shareIcons"]', + '//div[@class="categories"]', + '//div[@class="navigation"]', + '//div[@class="heading"]', + '//div[contains(@id,"-ad")]', + '//div[@class="relatedArticles"]', + '//div[@id="disqus_thread"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/distrowatch.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/distrowatch.com.php new file mode 100644 index 00000000..aefc8f81 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/distrowatch.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://distrowatch.com/?newsid=08355', + 'body' => array( + '//td[@class="NewsText"][1]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dozodomo.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dozodomo.com.php new file mode 100644 index 00000000..e1166957 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/dozodomo.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://dozodomo.com/bento/2014/03/04/lart-des-maki-de-takayo-kiyota/', + 'body' => array( + '//div[@class="joke"]', + '//div[@class="story-cover"]', + '//div[@class="story-content"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php new file mode 100644 index 00000000..cd30f2e0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/drawingboardcomic.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'body' => array('//img[@id="comicimage"]'), + 'strip' => array(), + 'test_url' => 'http://drawingboardcomic.com/index.php?comic=208', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/e-w-e.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/e-w-e.ru.php new file mode 100644 index 00000000..8139cc9a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/e-w-e.ru.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'http://e-w-e.ru/16-prekrasnyx-izobretenij-zhenshhin/', + 'body' => array( + '//div[contains(@class, "post_text")]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//*[@class="views_post"]', + '//*[@class="adman_mobile"]', + '//*[@class="adman_desctop"]', + '//*[contains(@rel, "nofollow")]', + '//*[contains(@class, "wp-smiley")]', + '//*[contains(text(),"ИÑточник:")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/economist.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/economist.com.php new file mode 100644 index 00000000..522032fd --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/economist.com.php @@ -0,0 +1,25 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.economist.com/blogs/buttonwood/2017/02/mixed-signals?fsrc=rss', + 'body' => array( + '//article', + ), + 'strip' => array( + '//span[@class="blog-post__siblings-list-header "]', + '//h1', + '//aside', + '//div[@class="blog-post__asideable-wrapper"]', + '//div[@class="share_inline_header"]', + '//div[@id="column-right"]', + '//div[contains(@class,"blog-post__siblings-list-aside")]', + '//div[@class="video-player__wrapper"]', + '//div[@class="blog-post__bottom-panel"]', + '//div[contains(@class,"latest-updates-panel__container")]', + '//div[contains(@class,"blog-post__asideable-content")]', + '//div[@aria-label="Advertisement"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/encyclopedie.naheulbeuk.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/encyclopedie.naheulbeuk.com.php new file mode 100644 index 00000000..19bcbdef --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/encyclopedie.naheulbeuk.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://encyclopedie.naheulbeuk.com/article.php3?id_article=352', + 'body' => array( + '//td//h1[@class="titre-texte"]', + '//td//div[@class="surtitre"]', + '//td//div[@class="texte"]', + ), + ) + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php new file mode 100644 index 00000000..d06ed124 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/endlessorigami.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%-150x150%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/engadget.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/engadget.com.php new file mode 100644 index 00000000..cf9e4485 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/engadget.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.engadget.com/2015/04/20/dark-matter-discovery/?ncid=rss_truncated', + 'body' => array('//div[@id="page_body"]/div[@class="container@m-"]'), + 'strip' => array('//aside[@role="banner"]'), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php new file mode 100644 index 00000000..e86b59cb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/escapistmagazine.com.php @@ -0,0 +1,45 @@ + array( + '%/articles/view/comicsandcosplay/comics/critical-miss.*%' => array( + 'body' => array('//*[@class="body"]/span/img | //div[@class="folder_nav_links"]/following::p'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/critical-miss/13776-Critical-Miss-on-Framerates?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/comicsandcosplay/comics/namegame.*%' => array( + 'body' => array('//*[@class="body"]/span/p/img[@height != "120"]'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/namegame/9759-Leaving-the-Nest?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/comicsandcosplay/comics/stolen-pixels.*%' => array( + 'body' => array('//*[@class="body"]/span/p[2]/img'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/stolen-pixels/8866-Stolen-Pixels-258-Where-the-Boys-Are?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/comicsandcosplay/comics/bumhugparade.*%' => array( + 'body' => array('//*[@class="body"]/span/p[2]/img'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/bumhugparade/8262-Bumhug-Parade-13?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/comicsandcosplay.*/comics/escapistradiotheater%' => array( + 'body' => array('//*[@class="body"]/span/p[2]/img'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/escapistradiotheater/8265-The-Escapist-Radio-Theater-13?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/comicsandcosplay/comics/paused.*%' => array( + 'body' => array('//*[@class="body"]/span/p[2]/img | //*[@class="body"]/span/div/img'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/paused/8263-Paused-16?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/comicsandcosplay/comics/fraughtwithperil.*%' => array( + 'body' => array('//*[@class="body"]'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/comicsandcosplay/comics/fraughtwithperil/12166-The-Escapist-Presents-Escapist-Comics-Critical-Miss-B-lyeh-Fhlop?utm_source=rss&utm_medium=rss&utm_campaign=articles', + 'strip' => array(), + ), + '%/articles/view/video-games/columns/.*%' => array( + 'body' => array('//*[@id="article_content"]'), + 'test_url' => 'http://www.escapistmagazine.com/articles/view/video-games/columns/experienced-points/13971-What-50-Shades-and-Batman-Have-in-Common.2', + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/espn.go.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/espn.go.com.php new file mode 100644 index 00000000..76a20f74 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/espn.go.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://espn.go.com/nfl/story/_/id/13388208/jason-whitlock-chip-kelly-controversy', + 'body' => array( + '//p', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/exocomics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/exocomics.com.php new file mode 100644 index 00000000..5adc59f8 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/exocomics.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'body' => array('//a[@class="comic"]/img'), + 'strip' => array(), + 'test_url' => 'http://www.exocomics.com/379', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/explosm.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/explosm.net.php new file mode 100644 index 00000000..3fdf02c0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/explosm.net.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://explosm.net/comics/3803/', + 'body' => array( + '//div[@id="comic-container"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php new file mode 100644 index 00000000..12697ccb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/extrafabulouscomics.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%-150x150%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/factroom.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/factroom.ru.php new file mode 100644 index 00000000..a572061d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/factroom.ru.php @@ -0,0 +1,27 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.factroom.ru/life/20-facts-about-oil', + 'body' => array( + '//div[@class="post"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//h1', + '//div[@id="yandex_ad2"]', + '//*[@class="jp-relatedposts"]', + '//div[contains(@class, "likely-desktop")]', + '//div[contains(@class, "likely-mobile")]', + '//p[last()]', + '//div[contains(@class, "facebook")]', + '//div[contains(@class, "desktop-underpost-direct")]', + '//div[contains(@class, "source-box")]', + '//div[contains(@class, "under-likely-desktop")]', + '//div[contains(@class, "mobile-down-post")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php new file mode 100644 index 00000000..74e70a86 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcodesign.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.fastcodesign.com/3026548/exposure/peek-inside-the-worlds-forbidden-subway-tunnels', + 'body' => array( + '//article[contains(@class, "body prose")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php new file mode 100644 index 00000000..6916f280 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcoexist.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.fastcoexist.com/3026114/take-a-seat-on-this-gates-funded-future-toilet-that-will-change-how-we-think-about-poop', + 'body' => array( + '//article[contains(@class, "body prose")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcompany.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcompany.com.php new file mode 100644 index 00000000..e0869a29 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fastcompany.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.fastcompany.com/3026712/fast-feed/elon-musk-an-apple-tesla-merger-is-very-unlikely', + 'body' => array( + '//article[contains(@class, "body prose")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ffworld.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ffworld.com.php new file mode 100644 index 00000000..20a47b2d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ffworld.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.ffworld.com/?rub=news&page=voir&id=2709', + 'body' => array( + '//div[@class="news_body"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php new file mode 100644 index 00000000..3cbcddc4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/foreignpolicy.com.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://foreignpolicy.com/2016/01/09/networking-giant-pulls-nsa-linked-code-exploited-by-hackers/', + 'body' => array( + '//article', + ), + 'strip' => array( + '//div[@id="post-category"]', + '//div[@id="desktop-right"]', + '//h1', + '//section[@class="article-meta"]', + '//div[@class="side-panel-wrapper"]', + '//*[contains(@class, "share-")]', + '//*[contains(@id, "taboola-")]', + '//div[@class="comments"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fossbytes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fossbytes.com.php new file mode 100644 index 00000000..6ce47256 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fossbytes.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://fossbytes.com/fbi-hacked-1000-computers-to-shut-down-largest-child-pornography-site-on-the-dark-web/', + 'body' => array( + '//div[@class="entry-inner"]', + ), + 'strip' => array( + '//*[@class="at-above-post addthis_default_style addthis_toolbox at-wordpress-hide"]', + '//*[@class="at-below-post addthis_default_style addthis_toolbox at-wordpress-hide"]', + '//*[@class="at-below-post-recommended addthis_default_style addthis_toolbox at-wordpress-hide"]', + '//*[@class="code-block code-block-12 ai-desktop"]', + '//*[@class="code-block code-block-13 ai-tablet-phone"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fototelegraf.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fototelegraf.ru.php new file mode 100644 index 00000000..ca2f85aa --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fototelegraf.ru.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://fototelegraf.ru/?p=348232', + 'body' => array( + '//div[@class="post-content"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//div[@class="imageButtonsBlock"]', + '//div[@class="adOnPostBtwImg"]', + '//div[contains(@class, "post-tags")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php new file mode 100644 index 00000000..3f62f071 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/fowllanguagecomics.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'body' => array('//*[@id="comic"] | //*[@class="post-image"]'), + 'strip' => array(), + 'test_url' => 'http://www.fowllanguagecomics.com/comic/working-out/', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gamechannel.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gamechannel.hu.php new file mode 100644 index 00000000..8ab9c5ca --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gamechannel.hu.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.gamechannel.hu/cikk/hirblock/a-legacy-of-kain-feltamasztasara-keszul-a-crystal-dynamics', + 'body' => array( + '//div[@class="post"]/div[@class="entry"]' + ), + 'strip' => array( + '//div[@class="valaszto"]', + '//center/blockquote' // as we can't grab iframe here + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gamestar.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gamestar.hu.php new file mode 100644 index 00000000..56a4c728 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gamestar.hu.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.gamestar.hu/hir/horizon-zero-dawn-the-frozen-wilds-vedjegy-239019.html', + 'body' => array( + '//article/header/h1', + '//div[@class="section section-2-3"]/div[@class="image"]/img', + '//article/p[@class="lead"]', + '//article/div[@class="content"]' + ), + 'strip' => array( + '//div[@class="ad ad-article-inside"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/geek.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/geek.com.php new file mode 100644 index 00000000..d9ccecc2 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/geek.com.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.geek.com/news/the-11-best-ways-to-eat-eggs-1634076/', + 'body' => array( + '//div[@class="articleinfo"]/figure', + '//div[@class="articleinfo"]/article', + '//span[@class="by"]', + ), + 'strip' => array( + '//span[@class="red"]', + '//div[@class="on-target"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/geektimes.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/geektimes.ru.php new file mode 100644 index 00000000..19541386 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/geektimes.ru.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'https://geektimes.ru/post/289151/', + 'body' => array( + "//div[contains(concat(' ',normalize-space(@class),' '),' content ')]" + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php new file mode 100644 index 00000000..44013b3b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gerbilwithajetpack.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'body' => array( + '//div[@id="comic-1"]', + '//div[@class="entry"]', + ), + 'test_url' => 'http://gerbilwithajetpack.com/passing-the-digital-buck/', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/giantitp.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/giantitp.com.php new file mode 100644 index 00000000..d9c3ae5d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/giantitp.com.php @@ -0,0 +1,12 @@ + array( + '%/comics/oots.*%' => array( + 'test_url' => 'http://www.giantitp.com/comics/oots0989.html', + 'body' => array( + '//td[@align="center"]/img', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/github.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/github.com.php new file mode 100644 index 00000000..726634f9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/github.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'https://github.com/audreyr/favicon-cheat-sheet', + 'body' => array( + '//article[contains(@class, "entry-content")]', + ), + 'strip' => array( + '//h1', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gocomics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gocomics.com.php new file mode 100644 index 00000000..32960f0e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gocomics.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.gocomics.com/pearlsbeforeswine/2015/05/30', + 'body' => array( + '//div[1]/p[1]/a[1]/img', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/golem.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/golem.de.php new file mode 100644 index 00000000..87312853 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/golem.de.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.golem.de/news/breko-telekom-verzoegert-gezielt-den-vectoring-ausbau-1311-102974.html', + 'body' => array( + '//header[@class="cluster-header"]', + '//header[@class="paged-cluster-header"]', + '//div[@class="formatted"]', + ), + 'next_page' => array( + '//a[@id="atoc_next"]' + ), + 'strip' => array( + '//header[@class="cluster-header"]/a', + '//header[@class="cluster-header"]/h1', + '//div[@id="iqadtile4"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gondola.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gondola.hu.php new file mode 100644 index 00000000..62b1e3c9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gondola.hu.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'https://gondola.hu/hirek/213754-A_budapesti_fejlesztesek_kerdese_mar_nem_zsakbamacska.html', + 'body' => array( + '//div[@id="cikk"]/div[@class="cim"]', + '//br[1]', + '//div[@class="alcim"]', + '//div[@class="lead"]', + '//div[@class="szoveg"]' + ), + 'strip' => array( + '//div[@class="ikonok"]', + '//div[@class="linkekblokk"]', + '//div[@id="billboardbanner"]', + '//div[@class="szerzo"]', + '//div[@class="kulcsszavak"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gorabbit.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gorabbit.ru.php new file mode 100644 index 00000000..4e432481 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/gorabbit.ru.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://gorabbit.ru/article/10-oshchushcheniy-za-rulem-kogda-tolko-poluchil-voditelskie-prava', + 'body' => array( + '//div[@class="detail_text"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//div[@class="socials"]', + '//div[@id="cr_1"]', + '//div[@class="related_items"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/habrahabr.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/habrahabr.ru.php new file mode 100644 index 00000000..3f1ec165 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/habrahabr.ru.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'https://habrahabr.ru/company/pentestit/blog/328606/', + 'body' => array( + "//div[contains(concat(' ',normalize-space(@class),' '),' content ')]" + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/happletea.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/happletea.com.php new file mode 100644 index 00000000..75b0b83d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/happletea.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'body' => array( + '//div[@id="comic"]', + '//div[@class="entry"]', + ), + 'strip' => array('//div[@class="ssba"]'), + 'test_url' => 'http://www.happletea.com/comic/mans-best-friend/', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hardware.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hardware.fr.php new file mode 100644 index 00000000..56aec4f4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hardware.fr.php @@ -0,0 +1,11 @@ + array( + '%^/news.*%' => array( + 'test_url' => 'http://www.hardware.fr/news/14760/intel-lance-nouveaux-ssd-nand-3d.html', + 'body' => array( + '//div[@class="content_actualite"]/div[@class="md"]', + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/heise.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/heise.de.php new file mode 100644 index 00000000..0ee69150 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/heise.de.php @@ -0,0 +1,79 @@ + array( + '%^/tp.*%' => array( + 'test_url' => 'https://www.heise.de/tp/features/Macrons-Vermoegenssteuer-Der-Staat-verzichtet-auf-3-2-Milliarden-3863931.html', + 'body' => array( + '//main/article' + ), + 'strip' => array( + '//header', + '//aside', + '//nav[@class="pre-akwa-toc"]', + '//*[@class="seite_zurueck"]', + '//*[@class="pagination"]', + '//a[@class="kommentare_lesen_link"]', + '//div[contains(@class, "shariff")]', + '//a[@class="beitragsfooter_permalink"]', + '//a[@class="beitragsfooter_fehlermelden"]', + '//a[@class="beitragsfooter_printversion"]' + ), + 'next_page' => array( + '//a[@class="seite_weiter"]' + ), + ), + '%^/newsticker/meldung.*%' => array( + 'test_url' => 'https://www.heise.de/newsticker/meldung/DragonFly-BSD-5-0-mit-experimentellem-HAMMER2-veroeffentlicht-3864731.html', + 'body' => array( + '//div[@class="article-content"]', + ), + 'strip' => array( + '//*[contains(@class, "gallery")]', + '//*[contains(@class, "video")]', + ), + ), + '%^/autos/artikel.*%' => array( + 'test_url' => 'https://www.heise.de/autos/artikel/Bericht-Mazda-baut-Range-Extender-mit-Wankelmotor-3864760.html', + 'body' => array( + '//section[@id="artikel_text"]' + ), + 'strip' => array( + '//p[@id="content_foren"]', + '//div[contains(@class, "shariff")]', + '//p[@class="permalink"]', + '//p[@class="printversion"]' + ), + ), + '%^/foto/meldung.*%' => array( + 'test_url' => 'https://www.heise.de/foto/meldung/Wildlife-Fotograf-des-Jahres-Gewinnerbild-zeigt-getoetetes-Nashorn-3864311.html', + 'body' => array( + '//div[@class="article-content"]' + ), + ), + '%^/ct.*%' => array( + 'test_url' => 'https://www.heise.de/ct/artikel/Google-Pixel-2-und-Pixel-2-XL-im-Test-3863842.html', + 'body' => array( + '//main/div[1]/div[1]/section' + ), + 'strip' => array( + '//header' + ) + ), + '%^/developer.*%' => array( + 'test_url' => 'https://www.heise.de/developer/meldung/Container-Docker-unterstuetzt-Kubernetes-3863625.html', + 'body' => array( + '//div[@class="article-content"]' + ) + ), + '%.*%' => array( + 'test_url' => 'https://www.heise.de/mac-and-i/meldung/iOS-App-Nude-findet-mittels-ML-Nacktbilder-und-versteckt-sie-3864217.html', + 'body' => array( + '//article/div[@class="meldung_wrapper"]', + ), + 'strip' => array( + '//*[contains(@class, "gallery")]', + '//*[contains(@class, "video")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hirek.prim.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hirek.prim.hu.php new file mode 100644 index 00000000..1a388094 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hirek.prim.hu.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://hirek.prim.hu/cikk/2017/10/02/atadtak_a_6_fenntarthatosagi_sajtodijat', + 'body' => array( + '//div[@class="boxbody article_box"]/h2', + '//div[@class="text_body"]' + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hotshowlife.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hotshowlife.com.php new file mode 100644 index 00000000..faf01f3d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hotshowlife.com.php @@ -0,0 +1,23 @@ + array( + '%.*%' => array( + 'test_url' => 'https://hotshowlife.com/top-10-chempionov-produktov-po-szhiganiyu-kalorij/', + 'body' => array( + '//div[@class="entry-content"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//div[@class="ads2"]', + '//div[@class="mistape_caption"]', + '//div[contains(@class, "et_social_media_hidden")]', + '//div[contains(@class, "et_social_inline_bottom")]', + '//div[contains(@class, "avatar")]', + '//ul[contains(@class, "entry-tags")]', + '//div[contains(@class, "entry-meta")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php new file mode 100644 index 00000000..b52b07b5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/huffingtonpost.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.huffingtonpost.com/2014/02/20/centscere-social-media-syracuse_n_4823848.html', + 'body' => array( + '//article[@class="content")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hvg.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hvg.hu.php new file mode 100644 index 00000000..efc93713 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/hvg.hu.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://hvg.hu/brandchannel/mastercardbch_20171006_Egyetlen_mobillal_erintettuk_Budapest_legjobb_gasztrohelyeit', + 'body' => array( + '//div[@class="article-title article-title"]', + '//div[@class="article-cover-img"]', + '//div[@class="article-main"]' + ), + 'strip' => array( + '//figcaption', + '//div[@class="article-info byline"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/idokep.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/idokep.hu.php new file mode 100644 index 00000000..06cae09a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/idokep.hu.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.idokep.hu/hirek/4-es-erossegu-tajfun-tart-japan-fele', + 'body' => array( + '//div[@class="cikk-title"]/h3', + '//div[@class="lead"]', + '//div[@class="atvett_tartalom"]', + '//div[@class="cikk-tartalom"]' + ), + 'strip' => array( + '//div[@class="cimkes-doboz"]', + '//div[@class="komment-wrap"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/imogenquest.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/imogenquest.net.php new file mode 100644 index 00000000..3214c62a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/imogenquest.net.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/index.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/index.hu.php new file mode 100644 index 00000000..727d7b7f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/index.hu.php @@ -0,0 +1,29 @@ + array( + '%.*%' => array( + 'test_url' => 'http://index.hu/mindekozben/poszt/2017/10/20/art_deco_budapest_varosnezo_zsebkonyv_bolla_zoltan/', + 'body' => array( + '//div[@class="mindenkozben_post_content content"]', + '//div[@id="content"]' + ), + 'strip' => array( + '//div[@class="topszponzor_wrapper"]', + '//ul[@class="cikk-cimkek"]', + '//div[@class="author-share-date-container"]', + '//div[@class="pp-list"]', + '//div[@class="social-stripe cikk-bottom-box"]', + '//div[@class="cikk-bottom-text-ad"]', + '//a[@name="hozzaszolasok"]', + '//div[@class="cikk-vegi-ajanlo-reklamok-container"]', + '//div[@id="comments"]', + '//div[@class="comments"]', + '//div[@class="linkpreview-box bekezdes_utan"]', + '//div[@class="lapozo"]', + '//div[@class="szelso-jobb"]', + '//div[@class="social cikk-bottom-box"]', + '//input' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/indiehaven.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/indiehaven.com.php new file mode 100644 index 00000000..a40ce694 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/indiehaven.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://indiehaven.com/no-mans-sky-is-a-solo-space-adventure-and-im-ok-with-that/', + 'body' => array( + '//section[contains(@class, "entry-content")]', + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/inforadio.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/inforadio.hu.php new file mode 100644 index 00000000..569013d3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/inforadio.hu.php @@ -0,0 +1,25 @@ + array( + '%.*%' => array( + 'test_url' => 'http://inforadio.hu/belfold/2017/10/20/fontos_valtozas_vegleg_lezarnak_tobb_villamosatjarot_budapesten/', + 'body' => array( + '//div[@class="content-title"]', + '//div[@class="szelso-jobb-lead_container"]', + '//div[@class="cikk-torzs"]' + ), + 'strip' => array( + '//div[@id="microsite_microsite"]', + '//div[@class="cikk-bottom-text-ad"]', + '//div[@class="social-stripe_container"]', + '//div[@class="facebook-like-box"]', + '//div[@class="rovat sargabg rovatdobozcim"]', + '//div[@class="m-okosradio_magazin arenaMagazineItem"]', + '//header[@class="m-okosradio_header"]', + '//div[@class="m-okosradio_elo"]', + '//div[@class="m-okosradio_container"]', + '//form' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ing.dk.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ing.dk.php new file mode 100644 index 00000000..5a021a08 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ing.dk.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://ing.dk/artikel/smart-husisolering-og-styring-skal-mindske-japans-energikrise-164517', + 'body' => array( + '//section[contains(@class, "teaser")]', + '//section[contains(@class, "body")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php new file mode 100644 index 00000000..90f87597 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/invisiblebread.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%()%' => '$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ir.amd.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ir.amd.com.php new file mode 100644 index 00000000..af99fe99 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ir.amd.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'body' => array('//span[@class="ccbnTxt"]'), + 'strip' => array(), + 'test_url' => 'http://ir.amd.com/phoenix.zhtml?c=74093&p=RssLanding&cat=news&id=2055819', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php new file mode 100644 index 00000000..9959441d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/japantimes.co.jp.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.japantimes.co.jp/news/2015/09/27/world/social-issues-world/pope-meets-sex-abuse-victims-philadelphia-promises-accountability/', + 'body' => array( + '//article[@role="main"]', + ), + 'strip' => array( + '//script', + '//header', + '//div[contains(@class, "meta")]', + '//div[@class="clearfix"]', + '//div[@class="OUTBRAIN"]', + '//ul[@id="content_footer_menu"]', + '//div[@class="article_footer_ad"]', + '//div[@id="disqus_thread"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/japantoday.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/japantoday.com.php new file mode 100644 index 00000000..22485d69 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/japantoday.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.japantoday.com/category/politics/view/japan-u-s-to-sign-new-base-environment-pact', + 'body' => array( + '//div[@id="article_container"]', + ), + 'strip' => array( + '//h2', + '//div[@id="article_info"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php new file mode 100644 index 00000000..876b2698 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/journaldugeek.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www./2014/05/20/le-playstation-now-arrive-en-beta-fermee-aux-etats-unis/', + 'body' => array( + '//div[@class="post-content"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/jsonline.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/jsonline.com.php new file mode 100644 index 00000000..5895256e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/jsonline.com.php @@ -0,0 +1,37 @@ + array( + '%.%/picture-gallery/%' => array( + 'test_url' => 'http://www.jsonline.com/picture-gallery/news/local/milwaukee/2017/02/22/photos-aclu-sues-milwaukee-police-over-profiling-stop-and-frisk/98250836/', + 'body' => array( + '//div[@class="priority-asset-gallery galleries standalone hasendslate"]', + ), + 'strip' => array( + '//div[@class="buy-photo-btn"]', + '//div[@class="gallery-thumbs thumbs pag-thumbs")]', + ), + ), + '%.*%' => array( + 'test_url' => 'http://www.jsonline.com/news/usandworld/as-many-as-a-million-expected-for-popes-last-mass-in-us-b99585180z1-329688131.html', + 'body' => array( + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + '//h1', + '//iframe', + '//span[@class="mycapture-small-btn mycapture-btn-with-text mycapture-expandable-photo-btn-small js-mycapture-btn-small"]', + '//div[@class="close-wrap"]', + '//div[contains(@class,"ui-video-wrapper")]', + '//div[contains(@class,"media-mob")]', + '//div[contains(@class,"left-mob")]', + '//div[contains(@class,"nerdbox")]', + '//p/span', + '//div[contains(@class,"oembed-asset")]', + '//*[contains(@class,"share")]', + '//div[contains(@class,"gallery-asset")]', + '//div[contains(@class,"oembed-asset")]', + '//div[@class="article-print-url"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/justcoolidea.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/justcoolidea.ru.php new file mode 100644 index 00000000..089ff29c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/justcoolidea.ru.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://justcoolidea.ru/idealnyj-sad-samodelnye-proekty-dlya-berezhlivogo-domovladeltsa/', + 'body' => array( + '//section[@class="entry-content"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//*[contains(@class, "essb_links")]', + '//*[contains(@rel, "nofollow")]', + '//*[contains(@class, "ads")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kanpai.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kanpai.fr.php new file mode 100644 index 00000000..c3a1abc4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kanpai.fr.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.kanpai.fr/japon/comment-donner-lheure-en-japonais.html', + 'body' => array( + '//div[@class="single-left"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php new file mode 100644 index 00000000..25d6dfa3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/karriere.jobfinder.dk.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://karriere.jobfinder.dk/artikel/dansk-professor-skal-lede-smart-grid-forskning-20-millioner-dollars-763', + 'body' => array( + '//section[contains(@class, "teaser")]', + '//section[contains(@class, "body")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kisalfold.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kisalfold.hu.php new file mode 100644 index 00000000..75689014 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kisalfold.hu.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.kisalfold.hu/szorakozas/egy_15_eves_srac_szuntetheti_meg_a_wc-parat_budapesten/2536699/', + 'body' => array( + '//header[@class="single-article__header"]/h1', + '//header[@class="single-article__header"]/h2', + '//figure[@class="single-article__image"]/img', + '//div[@class="single-article__content"]/div[@id="single-article__lead"]', + '//div[@id="article_text"]' + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kiszamolo.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kiszamolo.hu.php new file mode 100644 index 00000000..c44a08f4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kiszamolo.hu.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'https://kiszamolo.hu/30-eve-volt-a-fekete-hetfo/', + 'body' => array( + '//article/h2', + '//article/div[@class="entry clearfix"]/p' + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kodi.tv.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kodi.tv.php new file mode 100644 index 00000000..439fc907 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/kodi.tv.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'https://kodi.tv/article/andwere-baaaaack', + 'body' => array( + '//div[@class="l-region--content"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/koreaherald.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/koreaherald.com.php new file mode 100644 index 00000000..96510560 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/koreaherald.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.koreaherald.com/view.php?ud=20150926000018', + 'body' => array( + '//div[@id="articleText"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/koreatimes.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/koreatimes.php new file mode 100644 index 00000000..f274b4a9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/koreatimes.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.koreatimes.co.kr/www/news/nation/2015/12/116_192409.html', + 'body' => array( + '//div[@id="p"]', + ), + 'strip' => array( + '//div[@id="webtalks_btn_listenDiv"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php new file mode 100644 index 00000000..12697ccb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lastplacecomics.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%-150x150%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/legorafi.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/legorafi.fr.php new file mode 100644 index 00000000..e6aae46b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/legorafi.fr.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => array( + 'http://www.legorafi.fr/2016/12/16/gorafi-magazine-bravo-vous-avez-bientot-presque-survecu-a-2016/', + 'http://www.legorafi.fr/2016/12/15/manuel-valls-promet-quune-fois-elu-il-debarrassera-la-france-de-manuel-valls/', + ), + 'body' => array( + '//section[@id="banner_magazine"]', + '//figure[@class="main_picture"]', + '//div[@class="content"]', + ), + 'strip' => array( + '//figcaption', + '//div[@class="sharebox"]', + '//div[@class="tags"]', + '//section[@class="taboola_article"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lejapon.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lejapon.fr.php new file mode 100644 index 00000000..8f2b2932 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lejapon.fr.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://lejapon.fr/guide-voyage-japon/5223/tokyo-sous-la-neige.htm', + 'body' => array( + '//div[@class="entry"]', + ), + 'strip' => array( + '//*[contains(@class, "addthis_toolbox")]', + '//*[contains(@class, "addthis_default_style")]', + '//*[@class="navigation small"]', + '//*[@id="related"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php new file mode 100644 index 00000000..369206ab --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lesjoiesducode.fr.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://lesjoiesducode.fr/post/75576211207/quand-lappli-ne-fonctionne-plus-sans-aucune-raison', + 'body' => array( + '//div[@class="blog-post-content"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lfg.co.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lfg.co.php new file mode 100644 index 00000000..d978a5fc --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lfg.co.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.lfg.co/page/871/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+LookingForGroup+%28Looking+For+Group%29&utm_content=FeedBurner', + 'body' => array( + '//*[@id="comic"]/img | //*[@class="content"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lifehacker.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lifehacker.com.php new file mode 100644 index 00000000..b9a69338 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lifehacker.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://lifehacker.com/bring-water-bottle-caps-into-concerts-to-protect-your-d-1269334973', + 'body' => array( + '//div[contains(@class, "row")/img', + '//div[contains(@class, "content-column")]', + ), + 'strip' => array( + '//*[contains(@class, "meta")]', + '//span[contains(@class, "icon")]', + '//h1', + '//aside', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lifehacker.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lifehacker.ru.php new file mode 100644 index 00000000..bc140f67 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lifehacker.ru.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'http://lifehacker.ru/2016/03/03/polymail/', + 'body' => array( + '//div[@class="post-content"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//*[@class="wp-thumbnail-caption"]', + '//*[contains(@class, "social-likes")]', + '//*[@class="jp-relatedposts"]', + '//*[contains(@class, "wpappbox")]', + '//*[contains(@class, "icon__image")]', + '//div[@id="hypercomments_widget"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux-magazin.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux-magazin.de.php new file mode 100644 index 00000000..f4bc07d0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux-magazin.de.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.linux-magazin.de/Ausgaben/2017/09/AWS-Alternativen', + 'body' => array( + '//div[@class="attribute-content"]/div[@class="attribute-intro"]', + '(//div[@class="attribute-image"])[1]', + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + '//p[@class="attribute-advice"]', + ) + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux.org.php new file mode 100644 index 00000000..2520d0d0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux.org.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.linux.org/threads/lua-the-scripting-interpreter.8352/', + 'body' => array( + '//div[@class="messageContent"]', + ), + 'strip' => array( + '//aside', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux.org.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux.org.ru.php new file mode 100644 index 00000000..7fa02497 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linux.org.ru.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.linux.org/threads/lua-the-scripting-interpreter.8352/', + 'body' => array( + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php new file mode 100644 index 00000000..4e0a4cc1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/linuxinsider.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.linuxinsider.com/story/82526.html?rss=1', + 'body' => array( + '//div[@id="story"]', + ), + 'strip' => array( + '//script', + '//h1', + '//div[@id="story-toolbox1"]', + '//div[@id="story-byline"]', + '//div[@id="story"]/p', + '//div[@class="story-advertisement"]', + '//iframe', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lists.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lists.php new file mode 100644 index 00000000..c7051a20 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lists.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://lists.freebsd.org/pipermail/freebsd-announce/2013-September/001504.html', + 'body' => array( + '//pre', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/loadingartist.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/loadingartist.com.php new file mode 100644 index 00000000..d06ed124 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/loadingartist.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%-150x150%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/loldwell.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/loldwell.com.php new file mode 100644 index 00000000..d358e156 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/loldwell.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://loldwell.com/?comic=food-math-101', + 'body' => array('//*[@id="comic"]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lukesurl.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lukesurl.com.php new file mode 100644 index 00000000..816233dd --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/lukesurl.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'body' => array('//div[@id="comic"]//img'), + 'strip' => array(), + 'test_url' => 'http://www.lukesurl.com/archives/comic/665-3-of-clubs', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/macg.co.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/macg.co.php new file mode 100644 index 00000000..bbe6dbcd --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/macg.co.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.macg.co//logiciels/2014/05/feedly-sameliore-un-petit-peu-sur-mac-82205', + 'body' => array( + '//div[contains(@class, "field-name-body")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/maclife.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/maclife.de.php new file mode 100644 index 00000000..bca347ec --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/maclife.de.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.maclife.de/news/neue-farbe-iphone-8-kommt-blush-gold-10094817.html', + 'body' => array( + '//div[contains(@class, "article_wrapper")]/p | //div[contains(@class, "article_wrapper")]/h2 | //div[@class="gallery"]//figure | //div[contains(@class, "gallery_single")]//figure', + ) + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/magyarkurir.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/magyarkurir.hu.php new file mode 100644 index 00000000..32d78bcf --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/magyarkurir.hu.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.magyarkurir.hu/hirek/a-vilagszerte-ismert-dicsoito-csapat-hillsong-young-free-lep-fel-budapesten', + 'body' => array( + '//div[@class="behuzas"]' + ), + 'strip' => array( + '//div[@class="ikonsav"]', + '//p[@class="copyright"]', + '//div[@class="cimkek"]', + '//div[@id="footerbanner"]', + '//div[@class="rovat sargabg rovatdobozcim"]', + '//div[@class="rovatdoboz"]', + '//a[contains(., "Own")]', + '//a[@class="fblink"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marc.info.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marc.info.php new file mode 100644 index 00000000..5f582a6d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marc.info.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://marc.info/?l=openbsd-misc&m=141987113202061&w=2', + 'body' => array( + '//pre', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php new file mode 100644 index 00000000..469640df --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marriedtothesea.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.marriedtothesea.com/index.php?date=052915', + 'body' => array( + '//div[@align]/a/img', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marycagle.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marycagle.com.php new file mode 100644 index 00000000..b8665e35 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/marycagle.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'body' => array( + '//img[@id="cc-comic"]', + '//div[@class="cc-newsbody"]', + ), + 'strip' => array(), + 'test_url' => 'http://www.marycagle.com/letsspeakenglish/74-grim-reality/', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php new file mode 100644 index 00000000..88800546 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/maximumble.thebookofbiff.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://maximumble.thebookofbiff.com/2015/04/20/1084-change/', + 'body' => array('//div[@id="comic"]/div/a/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/medium.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/medium.com.php new file mode 100644 index 00000000..e20860e0 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/medium.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'https://medium.com/lessons-learned/917b8b63ae3e', + 'body' => array( + '//div[@class="section-content"]', + ), + 'strip' => array( + '//div[contains(@class,"metabar")]', + '//img[contains(@class,"thumbnail")]', + '//h1', + '//blockquote', + '//div[@class="aspectRatioPlaceholder-fill"]', + '//footer' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mercworks.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mercworks.net.php new file mode 100644 index 00000000..c7a27dea --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mercworks.net.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'body' => array('//div[@id="comic"]', + '//div[contains(@class,"entry-content")]', + ), + 'strip' => array(), + 'test_url' => 'http://mercworks.net/comicland/healthy-choice/', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php new file mode 100644 index 00000000..5011169f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/metronieuws.nl.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.metronieuws.nl/sport/2015/04/broer-fellaini-zorgde-bijna-voor-paniek-bij-mourinho', + 'body' => array('//div[contains(@class,"article-top")]/div[contains(@class,"image-component")] | //div[@class="article-full-width"]/div[1]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/milwaukeenns.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/milwaukeenns.php new file mode 100644 index 00000000..ddb29a56 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/milwaukeenns.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://milwaukeenns.org/2016/01/08/united-way-grant-enables-sdc-to-restore-free-tax-assistance-program/', + 'body' => array( + '//div[@class="pf-content"]', + ), + 'strip' => array( + '//div[@class="printfriendly"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mno.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mno.hu.php new file mode 100644 index 00000000..a2799b85 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mno.hu.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'https://mno.hu/kulfold/elnokot-valasztanak-szloveniaban-2422840', + 'body' => array( + '//div[@class="header"]/h1', + '//div[@class="content hircikk clearfix"]/p' + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php new file mode 100644 index 00000000..1ddcd407 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mokepon.smackjeeves.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://mokepon.smackjeeves.com/comics/2120096/chapter-9-page-68/', + 'body' => array('//*[@id="comic_area_inner"]/img | //*[@id="comic_area_inner"]/a/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/monandroid.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/monandroid.com.php new file mode 100644 index 00000000..f87560e2 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/monandroid.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.monandroid.com/blog/tutoriel-avance-activer-le-stockage-fusionne-sur-android-6-marshamallow-t12.html', + 'body' => array( + '//div[@class="blog-post-body"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/monwindows.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/monwindows.com.php new file mode 100644 index 00000000..b2b24d74 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/monwindows.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.monwindows.com/tout-savoir-sur-le-centre-d-action-de-windows-phone-8-1-t40574.html', + 'body' => array( + '//div[@class="blog-post-body"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/moya-planeta.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/moya-planeta.ru.php new file mode 100644 index 00000000..dd842844 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/moya-planeta.ru.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.moya-planeta.ru/travel/view/chto_yaponcu_horosho_russkomu_ne_ponyat_20432/', + 'body' => array( + '//div[@class="full_object"]', + ), + 'strip' => array( + '//div[@class="full_object_panel object_panel"]', + '//div[@class="full_object_panel_geo object_panel"]', + '//div[@class="full_object_title"]', + '//div[@class="full_object_social_likes"]', + '//div[@class="full_object_planeta_likes"]', + '//div[@class="full_object_go2comments"]', + '//div[@id="yandex_ad_R-163191-3"]', + '//div[@class="full_object_shop_article_recommend"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php new file mode 100644 index 00000000..b971091f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mrlovenstein.com.php @@ -0,0 +1,9 @@ + array( + '%.*%' => array( + '%alt="(.+)" */>%' => '/>
$1', + '%\.png%' => '_rollover.png', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/muckrock.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/muckrock.com.php new file mode 100644 index 00000000..9e354a36 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/muckrock.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.muckrock.com/news/archives/2016/jan/13/5-concerns-private-prisons/', + 'body' => array( + '//div[@class="content"]', + ), + 'strip' => array( + '//div[@class="newsletter-widget"]', + '//div[@class="contributors"]', + '//time', + '//h1', + '//div[@class="secondary"]', + '//aside', + '//div[@class="articles__related"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mynorthshorenow.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mynorthshorenow.com.php new file mode 100644 index 00000000..b6309157 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/mynorthshorenow.com.php @@ -0,0 +1,27 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.mynorthshorenow.com/story/news/local/fox-point/2017/04/04/fox-point-building-board-approves-dunwood-commons-project/99875570/', + 'body' => array( + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + '//h1', + '//iframe', + '//span[@class="mycapture-small-btn mycapture-btn-with-text mycapture-expandable-photo-btn-small js-mycapture-btn-small"]', + '//div[@class="close-wrap"]', + '//div[contains(@class,"ui-video-wrapper")]', + '//div[contains(@class,"media-mob")]', + '//div[contains(@class,"left-mob")]', + '//div[contains(@class,"nerdbox")]', + '//p/span', + '//div[contains(@class,"oembed-asset")]', + '//*[contains(@class,"share")]', + '//div[contains(@class,"gallery-asset")]', + '//div[contains(@class,"oembed-asset")]', + '//div[@class="article-print-url"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nakedCapitalism.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nakedCapitalism.php new file mode 100644 index 00000000..ec2d5fd5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nakedCapitalism.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://feedproxy.google.com/~r/NakedCapitalism/~3/JOBxEHxN8ZI/mark-blyth-liberalism-undermined-democracy-failure-democratic-party.html', + 'body' => array( + '//div[@class="pf-content"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nasa.gov.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nasa.gov.php new file mode 100644 index 00000000..c6692d07 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nasa.gov.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.nasa.gov/image-feature/jpl/pia20514/coy-dione', + 'body' => array( + '//div[@class="article-body"]', + ), + 'strip' => array( + '//div[@class="title-bar"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nat-geo.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nat-geo.ru.php new file mode 100644 index 00000000..1a42d997 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nat-geo.ru.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nat-geo.ru/fact/868093-knidos-antichnyy-naukograd/', + 'body' => array( + '//div[@class="article-inner-text"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php new file mode 100644 index 00000000..5e612bef --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nationaljournal.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nationaljournal.com/s/354962/south-carolina-evangelicals-outstrip-establishment?mref=home_top_main', + 'body' => array( + '//div[@class="section-body"]', + ), + 'strip' => array( + '//*[contains(@class, "-related")]', + '//*[contains(@class, "social")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nature.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nature.com.php new file mode 100644 index 00000000..6b9e87f4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nature.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nature.com/doifinder/10.1038/nature.2015.18340', + 'body' => array( + '//div[contains(@class,"main-content")]', + ), + 'strip' => array(), + ), + ), +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nba.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nba.com.php new file mode 100644 index 00000000..c8ea926f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nba.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nba.com/2015/news/09/25/knicks-jackson-to-spend-more-time-around-coaching-staff.ap/index.html?rss=true', + 'body' => array( + '//div[@class="paragraphs"]', + ), + 'strip' => array( + '//div[@id="nbaArticleSocialWrapper_bot"]', + '//h5', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nedroid.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nedroid.com.php new file mode 100644 index 00000000..3214c62a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nedroid.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/networkworld.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/networkworld.com.php new file mode 100644 index 00000000..18524354 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/networkworld.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.networkworld.com/article/3020585/security/the-incident-response-fab-five.html', + 'body' => array( + '//figure/img[@class="hero-img"]', + '//section[@class="deck"]', + '//div[@itemprop="articleBody"] | //div[@itemprop="reviewBody"]', + '//div[@class="carousel-inside-crop"]', + ), + 'strip' => array( + '//script', + '//aside', + '//div[@class="credit"]', + '//div[@class="view-large"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php new file mode 100644 index 00000000..e0c0d19d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/neustadt-ticker.de.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.neustadt-ticker.de/41302/alltag/kultur/demo-auf-der-boehmischen', + 'body' => array( + '//div[@class="entry-content"]', + ), + 'strip' => array( + '//*[contains(@class, "sharedaddy")]', + '//*[contains(@class, "yarpp-related")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nextinpact.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nextinpact.com.php new file mode 100644 index 00000000..29dd9d6b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nextinpact.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nextinpact.com/news/101122-3d-nand-intel-lance-six-nouvelles-gammes-ssd-pour-tous-usages.htm', + 'body' => array( + '//div[@class="container_article"]', + ), + 'strip' => array( + '//div[@class="infos_article"]', + '//div[@id="actu_auteur"]', + '//div[@id="soutenir_journaliste"]', + '//section[@id="bandeau_abonnez_vous"]', + '//br' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php new file mode 100644 index 00000000..f41e4438 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/niceteethcomic.com.php @@ -0,0 +1,10 @@ + array( + '%/archives.*%' => array( + 'test_url' => 'http://niceteethcomic.com/archives/page119/', + 'body' => array('//*[@class="comicpane"]/a/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php new file mode 100644 index 00000000..4d083f98 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nichtlustig.de.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%.*static.nichtlustig.de/comics/full/(\\d+).*%s' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nlcafe.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nlcafe.hu.php new file mode 100644 index 00000000..b85e6b28 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/nlcafe.hu.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.nlcafe.hu/ezvan/20171021/nyugdijas-drogdilert-fogtak-a-ferencvarosi-rendorok/', + 'body' => array( + '//div[@class="single-title"]', + '//div[@class="single-excerpt"]', + '//div[@class="single-post-container-content"]/p', + '//div[@class="single-post-container-content"]/div' + ), + 'strip' => array( + '//div[@class="widget-container related-articles bigdata-widget related-full"]', + '//div[@class="banner-container clear-banner-row clearfix"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/novo-argumente.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/novo-argumente.com.php new file mode 100644 index 00000000..cef35955 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/novo-argumente.com.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.novo-argumente.com/artikel/der_kampf_gegen_die_schlafkrankheit', + 'body' => array( + '//main/div/article', + ), + 'strip' => array( + '//*[@class="artikel-datum"]', + '//*[@class="artikel-titel"]', + '//*[@class="artikel-autor"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/oglaf.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/oglaf.com.php new file mode 100644 index 00000000..8b2b5b65 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/oglaf.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'body' => array( + '//img[@id="strip"]', + '//a/div[@id="nx"]/..', + ), + 'strip' => array(), + 'test_url' => 'http://oglaf.com/slodging/', + ), + ), + 'filter' => array( + '%.*%' => array( + '%alt="(.+)" title="(.+)" */>%' => '/>
$1
$2
', + '%%' => 'Next page', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onhax.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onhax.net.php new file mode 100644 index 00000000..213849d8 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onhax.net.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://onhax.net/process-lasso-8-9-1-4-pro-key-portable-is-here-latest', + 'body' => array( + '//div[@class="postcontent"]', + ), + 'strip' => array( + '//*[@class="sharedaddy sd-sharing-enabled"]', + '//*[@class="yarpp-related"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onlinekosten.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onlinekosten.de.php new file mode 100644 index 00000000..7382612f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onlinekosten.de.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.onlinekosten.de/news/android-8-0-die-neuen-features-im-ueberblick_209619.html?utm_source=rss&utm_medium=feed&utm_campaign=android-8-0-die-neuen-features-im-ueberblick', + 'body' => array( + '//p[@class="cms-widget_article_lead"]', + '//img[@class="bec_img"]', + '//div[@class="cms-widget_article_body"]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onmilwaukee.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onmilwaukee.php new file mode 100644 index 00000000..f66ac4b8 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/onmilwaukee.php @@ -0,0 +1,24 @@ + array( + '%.*%' => array( + 'test_url' => 'http://onmilwaukee.com/movies/articles/downerspelunking.html', + 'body' => array( + '//article[contains(@class, "show")]', + ), + 'strip' => array( + '//h1', + '//div[contains(@class,"-ad")]', + '//div[contains(@class,"_ad")]', + '//div[@id="pub_wrapper"]', + '//div[contains(@class,"share_tools")]', + '//div[@class="clearfix"]', + '//div[contains(@class,"image_control")]', + '//section[@class="ribboned"]', + '//div[contains(@class,"sidebar")]', + '//aside[@class="article_tag_list"]', + '//section[contains(@id,"more_posts")]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/openculture.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/openculture.com.php new file mode 100644 index 00000000..84f2beed --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/openculture.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.openculture.com/2017/03/are-we-living-inside-a-computer-simulation-watch-the-simulation-argument.html', + 'body' => array( + '//div[@class="entry"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/opennet.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/opennet.ru.php new file mode 100644 index 00000000..1fb7722b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/opennet.ru.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.opennet.ru/opennews/art.shtml?num=46549', + 'body' => array( + '//*[@id="r_memo"]', + ), + 'strip' => array( + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php new file mode 100644 index 00000000..94139a72 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/openrightsgroup.org.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.openrightsgroup.org/blog/2014/3-days-to-go-till-orgcon2014', + 'body' => array( + '//div[contains(@class, "content")]/div', + ), + 'strip' => array( + '//h2[1]', + '//div[@class="info"]', + '//div[@class="tags"]', + '//div[@class="comments"]', + '//div[@class="breadcrumbs"]', + '//h1[@class="pageTitle"]', + '//p[@class="bookmarkThis"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/opensource.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/opensource.com.php new file mode 100644 index 00000000..60f3577b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/opensource.com.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'http://opensource.com/life/15/10/how-internet-things-will-change-way-we-think', + 'body' => array( + '//div[@id="article-template"]', + ), + 'strip' => array( + '//div[contains(@class,"os-article__sidebar")]', + '//div[@class="panel-pane pane-node-title"]', + '//div[@class="panel-pane pane-os-article-byline"]', + '//ul', + '//div[contains(@class,"-license")]', + '//div[contains(@class,"-tags")]', + '//div[@class="panel-pane pane-os-article-byline"]', + '//div[@class="os-article__content-below"]', + '//div[@id="comments"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/optipess.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/optipess.com.php new file mode 100644 index 00000000..3214c62a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/optipess.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/origo.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/origo.hu.php new file mode 100644 index 00000000..7bd94965 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/origo.hu.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.origo.hu/itthon/20171019-hamisan-tanuskodott-az-ugyved-ezert-nem-praktizalhat.html', + 'body' => array( + '//header[@id="article-head"]/h1', + '//article[@id="article-center"]' + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/osnews.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/osnews.com.php new file mode 100644 index 00000000..1d1396c8 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/osnews.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://osnews.com/story/28863/Google_said_to_be_under_US_antitrust_scrutiny_over_Android', + 'body' => array( + '//div[@class="newscontent1"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pastebin.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pastebin.com.php new file mode 100644 index 00000000..b20bf41c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pastebin.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://pastebin.com/ed1pP9Ak', + 'body' => array( + '//div[@class="text"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pcgameshardware.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pcgameshardware.de.php new file mode 100644 index 00000000..f180aeef --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pcgameshardware.de.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.pcgameshardware.de/Dragon-Age-Thema-259929/News/Plaene-fuer-Teil-4-und-5-der-Serie-1235682/', + 'body' => array( + '//p[@class="introText"]', + '//figure[contains(@class, "articleBigTeaser")]', + '//div[@id="articleTextBody"]//p | //div[@id="articleTextBody"]//h2[@class="anchorHeadline"]', + ), + 'strip' => array( + '//p[@class="introText"]//time', + ) + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/peebleslab.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/peebleslab.com.php new file mode 100644 index 00000000..ce4891d1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/peebleslab.com.php @@ -0,0 +1,9 @@ + array( + '%.*%' => array( + // the extra space is required to strip the title cleanly + '%title="(.+) " */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php new file mode 100644 index 00000000..dd39983b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/penny-arcade.com.php @@ -0,0 +1,21 @@ + array( + '%/news/.*%' => array( + 'test_url' => 'http://penny-arcade.com/news/post/2015/04/15/101-part-two', + 'body' => array( + '//*[@class="postBody"]/*', + ), + 'strip' => array( + ), + ), + '%/comic/.*%' => array( + 'test_url' => 'http://penny-arcade.com/comic/2015/04/15', + 'body' => array( + '//*[@id="comicFrame"]/a/img', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php new file mode 100644 index 00000000..fa9052ea --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pixelbeat.org.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.pixelbeat.org/programming/sigpipe_handling.html#1425573246', + 'body' => array( + '//div[@class="contentText"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/plus.google.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/plus.google.com.php new file mode 100644 index 00000000..5e48a6cf --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/plus.google.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'https://plus.google.com/+LarryPage/posts/Lh8SKC6sED1', + 'body' => array( + '//div[@role="article"]/div[contains(@class, "eE")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/popstrip.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/popstrip.com.php new file mode 100644 index 00000000..801a2814 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/popstrip.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%( '$1$2$1bonus.png"/>', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/portfolio.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/portfolio.hu.php new file mode 100644 index 00000000..ad01dadc --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/portfolio.hu.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.portfolio.hu/gazdasag/mennybe-vagy-pokolba-megy-ma-a-cseh-trump.265833.html', + 'body' => array( + '//div[@id="cikk"]/h1', + '//div[@class="smscontent"]' + ), + 'strip' => array( + '//div[@class="traderhirdetes ga_viewanalytics"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pro-linux.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pro-linux.de.php new file mode 100644 index 00000000..bc76630f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/pro-linux.de.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.pro-linux.de/news/1/25252/chrome-62-erschienen.html', + 'body' => array( + '//div[@id="news"]', + ), + 'strip' => array( + '//h3[@class="topic"]', + '//h2[@class="title"]', + '//div[@class="picto"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/publicpolicyforum.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/publicpolicyforum.org.php new file mode 100644 index 00000000..5dc8be88 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/publicpolicyforum.org.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'https://publicpolicyforum.org/blog/going-extra-mile', + 'body' => array( + '//div[contains(@class,"field-name-post-date")]', + '//div[contains(@class,"field-name-body")]', + ), + 'strip' => array( + '//img[@src="http://publicpolicyforum.org/sites/default/files/logo3.jpg"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/publy.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/publy.ru.php new file mode 100644 index 00000000..bcfeeb99 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/publy.ru.php @@ -0,0 +1,24 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.publy.ru/post/19988', + 'body' => array( + '//div[@class="singlepost"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//*[@class="featured"]', + '//*[@class="toc_white no_bullets"]', + '//*[@class="toc_title"]', + '//*[@class="pba"]', + '//*[@class="comments"]', + '//*[contains(@class, "g-single")]', + '//*[@class="ts-fab-wrapper"]', + '//*[contains(@class, "wp_rp_wrap")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php new file mode 100644 index 00000000..9fa5568c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/putaindecode.fr.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://putaindecode.fr/posts/js/etat-lieux-js-modulaire-front/', + 'body' => array( + '//*[@class="putainde-Post-md"]', + ), + 'strip' => array( + '//*[contains(@class, "inlineimg")]', + '//*[contains(@class, "comment-respond")]', + '//header', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/recode.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/recode.net.php new file mode 100644 index 00000000..343cd12f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/recode.net.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://recode.net/2015/09/26/big-tech-rolls-out-red-carpet-for-indian-prime-minister-lobbies-behind-closed-doors/', + 'body' => array( + '//img[contains(@class,"attachment-large")]', + '//div[contains(@class,"postarea")]', + '//li[@class,"author"]', + ), + 'strip' => array( + '//script', + '//div[contains(@class,"sharedaddy")]', + '//div[@class="post-send-off"]', + '//div[@class="large-12 columns"]', + '//div[contains(@class,"inner-related-article")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php new file mode 100644 index 00000000..b97c73ed --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/retractionwatch.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://retractionwatch.com/2015/11/12/psychologist-jens-forster-settles-case-by-agreeing-to-2-retractions/', + 'body' => array( + '//*[@class="main"]', + '//*[@class="entry-content"]', + ), + 'strip' => array( + '//*[contains(@class, "sharedaddy")]', + '//*[contains(@class, "jp-relatedposts")]', + '//p[@class="p1"]', + ) + ) + ) +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rockpapershotgun.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rockpapershotgun.com.php new file mode 100644 index 00000000..71110786 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rockpapershotgun.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.rockpapershotgun.com/2016/08/26/the-divisions-expansions-delayed-to-improve-the-game/', + 'body' => array( + '//div[@class="entry"]', + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php new file mode 100644 index 00000000..cb9116a3 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rue89.nouvelobs.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://rue89.feedsportal.com/c/33822/f/608948/s/30999fa0/sc/24/l/0L0Srue890N0C20A130C0A80C30A0Cfaisait0Eboris0Eboillon0Eex0Esarko0Eboy0E350A0E0A0A0A0Eeuros0Egare0Enord0E245315/story01.htm', + 'body' => array( + '//*[@id="article"]/div[contains(@class, "content")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rugbyrama.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rugbyrama.fr.php new file mode 100644 index 00000000..9915c234 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/rugbyrama.fr.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.rugbyrama.fr/rugby/top-14/2015-2016/top-14-hayman-coupe-du-monde-finale-2012-lutte.-voici-levan-chilachava-toulon_sto5283863/story.shtml', + 'body' => array( + '//div[@class="storyfull__content"]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//*[@class="share-buttons"]', + '//*[@class="ad"]', + '//*[@class="hide-desktop"]', + '//*[@id="tracking_img"]', + ) + ) + ) +); \ No newline at end of file diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/salonkolumnisten.com b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/salonkolumnisten.com new file mode 100644 index 00000000..37f43e9e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/salonkolumnisten.com @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.salonkolumnisten.com/schulpolitik-niedersachsen/', + 'body' => array( + '//div[@id="main"]/div[contains(@class, "featimg")]', + '//div[@id="main"]/article/div[contains(@class, "entry-content")]', + ), + 'strip' => array( + '//div[@id="main"]/article/div[contains(@class, "entry-content")]/a[1]', + '//div[@id="main"]/article/div[contains(@class, "entry-content")]/a[1]', + ), + ), + ), +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/satwcomic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/satwcomic.com.php new file mode 100644 index 00000000..d63fc11c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/satwcomic.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://satwcomic.com/day-at-the-beach', + 'body' => array( + '//div[@class="container"]/center/a/img', + '//span[@itemprop="articleBody"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/science-skeptical.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/science-skeptical.de.php new file mode 100644 index 00000000..fcf045fb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/science-skeptical.de.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.science-skeptical.de/politik/diesel-die-lueckenmedien-im-glashaus-6/0016080/', + 'body' => array( + '//div[@class="pf-content"]', + ), + 'strip' => array( + '//div[contains(@class, "printfriendly")]', + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php new file mode 100644 index 00000000..7835fd9e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/scrumalliance.org.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.scrumalliance.org/community/articles/2015/march/an-introduction-to-agile-project-intake?feed=articles', + 'body' => array( + '//div[@class="article_content"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/securityfocus.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/securityfocus.com.php new file mode 100644 index 00000000..01045148 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/securityfocus.com.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.securityfocus.com/archive/1/540139', + 'body' => array( + '//div[@id="vulnerability"]', + '//div[@class="comments_reply"]', + ), + 'strip' => array( + '//span[@class="title"]', + '//div[@id="logo_new"]', + '//div[@id="bannerAd"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php new file mode 100644 index 00000000..f4354179 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sentfromthemoon.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'body' => array( + '//div[@class="comicpane"]/a/img', + '//div[@class="entry"]', + ), + 'strip' => array(), + 'test_url' => 'http://sentfromthemoon.com/archives/1417', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sitepoint.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sitepoint.com.php new file mode 100644 index 00000000..ab0eb7d4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sitepoint.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.sitepoint.com/creating-hello-world-app-swift/', + 'body' => array( + '//section[@class="article_body"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/slashdot.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/slashdot.org.php new file mode 100644 index 00000000..89ced8b6 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/slashdot.org.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://science.slashdot.org/story/15/04/20/0528253/pull-top-can-tabs-at-50-reach-historic-archaeological-status', + 'body' => array( + '//article/div[@class="body"] | //article[@class="layout-article"]/div[@class="elips"]', ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php new file mode 100644 index 00000000..8c13c44c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smallhousebliss.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://smallhousebliss.com/2013/08/29/house-g-by-lode-architecture/', + 'body' => array( + '//div[@class="post-content"]', + ), + 'strip' => array( + '//*[contains(@class, "gallery")]', + '//*[contains(@class, "share")]', + '//*[contains(@class, "wpcnt")]', + '//*[contains(@class, "meta")]', + '//*[contains(@class, "postitle")]', + '//*[@id="nav-below"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php new file mode 100644 index 00000000..7463abc7 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smarthomewelt.de.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://smarthomewelt.de/apple-tv-amazon-echo-smart-home/', + 'body' => array('//div[@class="entry-inner"]/p | //div[@class="entry-inner"]/div[contains(@class,"wp-caption")]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php new file mode 100644 index 00000000..cbe10726 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smashingmagazine.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.smashingmagazine.com/2015/04/17/using-sketch-for-responsive-web-design-case-study/', + 'body' => array('//article[contains(@class,"post")]/p'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php new file mode 100644 index 00000000..42262dc9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/smbc-comics.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.smbc-comics.com/comic/the-troll-toll', + 'body' => array( + '//div[@id="cc-comicbody"]', + '//div[@id="aftercomic"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/snopes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/snopes.com.php new file mode 100644 index 00000000..b0fe6557 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/snopes.com.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.snopes.com/bacca-brides-on-tour/', + 'body' => array( + '//article', + ), + 'strip' => array( + '//span[@itemprop="author"]', + '//div[contains(@class,"author-")]', + '//h1', + '//style', + '//div[contains(@class,"socialShares")]', + '//div[contains(@class,"ad-unit")]', + '//aside', + '//div[contains(@class,"boomtrain")]', + '//footer' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/soundandvision.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/soundandvision.com.php new file mode 100644 index 00000000..6448bb05 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/soundandvision.com.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.soundandvision.com/content/james-guthrie-mixing-roger-waters-and-pink-floyd-51', + 'body' => array( + '//div[@id="left"]', + ), + 'strip' => array( + '//div[@class="meta"]', + '//div[@class="ratingsbox"]', + '//h1', + '//h2', + '//addthis', + '//comment-links', + '//div[@class="book-navigation"]', + '//div[@class="comment-links"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/spiegel.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/spiegel.de.php new file mode 100644 index 00000000..b42c3aac --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/spiegel.de.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.spiegel.de/politik/ausland/afrika-angola-geht-gegen-islam-vor-und-schliesst-moscheen-a-935788.html', + 'body' => array( + '//div[@class="spArticleContent"]/p | //div[@class="spArticleContent"]//img[@class="spResponsiveImage "]', + ), + 'strip' => array( + '//div[@class="author-details"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/stereophile.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/stereophile.com.php new file mode 100644 index 00000000..8e410be4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/stereophile.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.stereophile.com/content/2015-rocky-mountain-audio-fest-starts-friday', + 'body' => array( + '//div[@class="content clear-block"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/stupidfox.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/stupidfox.net.php new file mode 100644 index 00000000..61182d72 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/stupidfox.net.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://stupidfox.net/134-sleepy-time', + 'body' => array( + '//div[@class="comicmid"]/center/a/img', + '//div[@class="stand_high"]', + ), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/subtraction.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/subtraction.com.php new file mode 100644 index 00000000..6d744277 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/subtraction.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.subtraction.com/2015/06/06/time-lapse-video-of-one-world-trade-center/', + 'body' => array('//article/div[@class="entry-content"]'), + 'strip' => array(), + ), + ), + 'filter' => array( + '%.*%' => array( + '%\+%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sz.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sz.de.php new file mode 100644 index 00000000..90bde5a9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/sz.de.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://sz.de/1.2443161', + 'body' => array('//article[@id="sitecontent"]/section[@class="topenrichment"]//img | //article[@id="sitecontent"]/section[@class="body"]/section[@class="authors"]/preceding-sibling::*[not(contains(@class, "ad"))]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/takprosto.cc.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/takprosto.cc.php new file mode 100644 index 00000000..624ef907 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/takprosto.cc.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://takprosto.cc/kokteyl-dlya-pohudeniya-v-domashnih-usloviyah/', + 'body' => array( + '//div[contains(@class, "entry-contentt")]', + ), + 'strip' => array( + '//script', + '//form', + '//style', + '//*[@class="views_post"]', + '//*[contains(@class, "mailchimp-box")]', + '//*[contains(@class, "essb_links")]', + '//*[contains(@rel, "nofollow")]', + '//*[contains(@class, "ads")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/techcrunch.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/techcrunch.com.php new file mode 100644 index 00000000..230b791a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/techcrunch.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://techcrunch.com/2013/08/31/indias-visa-maze/', + 'body' => array( + '//div[contains(@class, "media-container")]', + '//div[contains(@class, "article-entry")]', + ), + 'strip' => array( + '//*[contains(@class, "module-crunchbase")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php new file mode 100644 index 00000000..3b01eb96 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/the-ebook-reader.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://blog.the-ebook-reader.com/2015/09/25/kobo-glo-hd-and-kobo-touch-2-0-covers-and-cases-roundup/', + 'body' => array( + '//div[@class="entry"]', + ), + 'strip' => array( + '//div[@id="share"]', + '//div[contains(@class,"ItemCenter")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theatlantic.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theatlantic.com.php new file mode 100644 index 00000000..bfad4ab2 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theatlantic.com.php @@ -0,0 +1,23 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.theatlantic.com/politics/archive/2015/09/what-does-it-mean-to-lament-the-poor-inside-panem/407317/', + 'body' => array( + '//picture[@class="img"]', + '//figure/figcaption/span', + '//div/p[@itemprop="description"]', + '//div[@class="article-body"]', + '//ul[@class="photos"]', + ), + 'strip' => array( + '//aside[@class="callout"]', + '//span[@class="credit"]', + '//figcaption[@class="credit"]', + '//aside[contains(@class,"partner-box")]', + '//div[contains(@class,"ad")]', + '//a[contains(@class,"social-icon")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php new file mode 100644 index 00000000..fd4f3d50 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theawkwardyeti.com.php @@ -0,0 +1,12 @@ + array( + '%/comic/.*%' => array( + 'test_url' => 'http://theawkwardyeti.com/comic/things-to-do/', + 'body' => array( + '//div[@id="comic"]' + ), + 'strip' => array() + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php new file mode 100644 index 00000000..c6ec5bf5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thecodinglove.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://thecodinglove.com/post/116897934767', + 'body' => array('//div[@class="bodytype"]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php new file mode 100644 index 00000000..d2f840d7 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thedoghousediaries.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'body' => array( + '//div[@class="comicpane"]/a/img', + '//div[@class="entry"]', + ), + 'strip' => array(), + 'test_url' => 'http://thedoghousediaries.com/6023', + ), + ), + 'filter' => array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thegamercat.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thegamercat.com.php new file mode 100644 index 00000000..f9b4637b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thegamercat.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.thegamercat.com/comic/just-no/', + 'body' => array('//div[@id="comic"] | //div[@class="post-content"]/div[@class="entry"]/p'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thehindu.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thehindu.com.php new file mode 100644 index 00000000..1e6735ba --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thehindu.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.thehindu.com/sci-tech/science/why-is-the-shape-of-cells-in-a-honeycomb-always-hexagonal/article7692306.ece?utm_source=RSS_Feed&utm_medium=RSS&utm_campaign=RSS_Syndication', + 'body' => array( + '//div/img[@class="main-image"]', + '//div[@class="photo-caption"]', + '//div[@class="articleLead"]', + '//p', + '//span[@class="upper"]', + ), + 'strip' => array( + '//div[@id="articleKeywords"]', + '//div[@class="photo-source"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thelocal.se.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thelocal.se.php new file mode 100644 index 00000000..c3ec250c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thelocal.se.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'www.thelocal.se/20161219/this-swede-can-memorize-hundreds-of-numbers-in-only-five-minutes', + 'body' => array( + '//div[@id="article-photo"]', + '//div[@id="article-description"]', + '//div[@id="article-body"]', + ), + 'strip' => array( + '//div[@id="article-info-middle"]', + ) + ) + ) +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/themerepublic.net.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/themerepublic.net.php new file mode 100644 index 00000000..bc47b278 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/themerepublic.net.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.themerepublic.net/2015/04/david-lopez-pitoko.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FDngUJ+%28Theme+Republic%29&utm_content=FeedBurner', + 'body' => array('//*[@class="post-body"]'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php new file mode 100644 index 00000000..0f5bf75e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/themoscowtimes.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.themoscowtimes.com/business/article/535500.html', + 'body' => array( + '//div[@class="article_main_img"]', + '//div[@class="article_text"]', + ), + 'strip' => array( + '//div[@class="articlebottom"]', + '//p/b', + '//p/a[contains(@href, "/article.php?id=")]', + '//div[@class="disqus_wrap"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thenewslens.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thenewslens.com.php new file mode 100644 index 00000000..75381707 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thenewslens.com.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://international.thenewslens.com/post/255032/', + 'body' => array( + '//div[@class="article-section"]', + ), + 'strip' => array( + '//div[contains(@class,"ad-")]', + '//div[@class="article-title-box"]', + '//div[@class="function-box"]', + '//p/span', + '//aside', + '//footer', + '//div[@class="article-infoBot-box"]', + '//div[contains(@class,"standard-container")]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php new file mode 100644 index 00000000..d06ed124 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theodd1sout.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%-150x150%' => '', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theonion.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theonion.com.php new file mode 100644 index 00000000..acbfd36b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theonion.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.theonion.com/article/wild-eyed-jim-harbaugh-informs-players-they-must-k-51397?utm_medium=RSS&utm_campaign=feeds', + 'body' => array( + '//div[@class="content-masthead"]/figure/div/noscript/img', + '//div[@class="content-text"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theregister.co.uk.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theregister.co.uk.php new file mode 100644 index 00000000..896365a6 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theregister.co.uk.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.theregister.co.uk/2017/10/21/purism_cleanses_laptops_of_intel_management_engine/', + 'body' => array( + '//div[@id="article"]', + ), + 'strip' => array( + '//div[@class="byline_and_share"]', + '//div[@class="social_btns alt_colour dcl"]', + '//div[@class="promo_article"]', + '//div[@id="article_body_btm"]', + '//p[@class="wptl btm"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php new file mode 100644 index 00000000..1163b345 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/thestandard.com.hk.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.thestandard.com.hk/breaking_news_detail.asp?id=67156', + 'body' => array( + '//table/tr/td/span[@class="bodyCopy"]', + ), + 'strip' => array( + '//script', + '//br', + '//map[@name="gif_bar"]', + '//img[contains(@usemap,"gif_bar")]', + '//a', + '//span[@class="bodyHeadline"]', + '//i', + '//b', + '//table', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theverge.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theverge.com.php new file mode 100644 index 00000000..09e876de --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/theverge.com.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.theverge.com/2017/11/11/16624298/mindhunter-netflix-show-david-fincher-review', + 'body' => array( + '//figure[@class="e-image e-image--hero"]/span[@class="e-image__inner"]', + '//div[@class="c-entry-content"]', + ), + 'strip' => array( + '//div[@class="c-related-list"]', + '//div[@class="c-page-title"]', + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php new file mode 100644 index 00000000..4af6196e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/threepanelsoul.com.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'body' => array( + '//img[@id="cc-comic"]', + ), + 'test_url' => 'http://www.threepanelsoul.com/comic/uncloaking', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tichyseinblick.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tichyseinblick.de.php new file mode 100644 index 00000000..6fba3df1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tichyseinblick.de.php @@ -0,0 +1,22 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.tichyseinblick.de/daili-es-sentials/jamaika-reaktionen-der-enttaeuschten/', + 'body' => array( + '//article' + ), + 'strip' => array( + '//header', + '//footer', + '//div[@class="mod-cad2"]', + '//ul[contains(@class, "social")]', + '//div[@class="rty-pop-up"]', + '//div[@class="pagelink"]', + '//div[@id="reward"]', + '//div[@class="rty-block-plista"]' + ) + ), + ), +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php new file mode 100644 index 00000000..19246806 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/timesofindia.indiatimes.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://timesofindia.indiatimes.com/city/mangaluru/Adani-UPCL-to-release-CSR-grant-of-Rs-3-74-crore-to-YellurGram-Panchayat/articleshow/50512116.cms', + 'body' => array( + '//div[@class="article_content clearfix"]', + '//section[@class="highlight clearfix"]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/totalcar.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/totalcar.hu.php new file mode 100644 index 00000000..f2e009de --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/totalcar.hu.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://totalcar.hu/tesztek/2017/10/21/veteran_fiat-abarth_1000tc_1968/', + 'body' => array( + '//div[@class="content-title"]', + '//div[@class="lead-container"]/div[@class="lead"]', + '//div[@class="cikk-torzs"]' + ), + 'strip' => array( + '//span[@class="gallery_title newline"]', + '//div[@class="social-stripe cikk-bottom-box"]', + '//div[@class="cikk-bottom-text-ad"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tozsdeforum.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tozsdeforum.hu.php new file mode 100644 index 00000000..97a0da07 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tozsdeforum.hu.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.tozsdeforum.hu/szemelyes-penzugyek/napi-penzugyek/ezek-a-legnepszerubb-turistacelpontok-voltal-mar-mindenhol-87181.html', + 'body' => array( + '//header/h1', + '//div[@class="title_img"]', + '//article/div[@class="tf-post"]/div[@class="p"]/p|//article/div[@class="tf-post"]/div[@class="p"]/h3|//article/div[@class="tf-post"]/div[@class="p"]/blockquote' + ), + 'strip' => array( + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php new file mode 100644 index 00000000..4ee4fcdc --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/travel-dealz.de.php @@ -0,0 +1,15 @@ + array( + '%^/blog.*%' => array( + 'test_url' => 'http://travel-dealz.de/blog/venere-gutschein/', + 'body' => array('//div[@class="post-entry"]'), + 'strip' => array( + '//*[@id="jp-relatedposts"]', + '//*[@class="post-meta"]', + '//*[@class="post-data"]', + '//*[@id="author-meta"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/travelo.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/travelo.hu.php new file mode 100644 index 00000000..3ab8ca4f --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/travelo.hu.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://travelo.hu/csaladbarat/2017/10/20/mar_csak_egy_het_es_kezdodik_az_oszi_szunet/', + 'body' => array( + '//div[@id="content"]/h1', + '//div[@id="kopf"]', + '//div[@id="szoveg"]' + ), + 'strip' => array( + '//div[@class="goAdverticum"]', + '//h1[@class="border"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/treehugger.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/treehugger.com.php new file mode 100644 index 00000000..55eb7e01 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/treehugger.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.treehugger.com/uncategorized/top-ten-posts-week-bunnies-2.html', + 'body' => array( + '//div[contains(@class, "promo-image")]', + '//div[contains(@id, "entry-body")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/treelobsters.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/treelobsters.com.php new file mode 100644 index 00000000..3214c62a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/treelobsters.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%title="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tutorialzine.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tutorialzine.com.php new file mode 100644 index 00000000..7e391457 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/tutorialzine.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'https://tutorialzine.com/2017/10/15-interesting-javascript-and-css-libraries-for-october-2017', + 'body' => array( + '//article' + ), + 'strip' => array( + '//div[@class="article__header"]', + '//div[@class="article__share"]', + '//div[@class="article__footer"]', + '//div[@id="article__related-articles"]', + '//div[@class="webappstudio-animation"]', + '//div[@class="ad-container adsbygoogle hidden-xs hidden-sm"]', + '//script' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/twogag.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/twogag.com.php new file mode 100644 index 00000000..79f4f62e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/twogag.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%http://www.twogag.com/comics-rss/([^.]+)\\.jpg%' => 'http://www.twogag.com/comics/$1.jpg', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php new file mode 100644 index 00000000..3428fcb4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/twokinds.keenspot.com.php @@ -0,0 +1,10 @@ + array( + '%.*%' => array( + 'test_url' => 'http://twokinds.keenspot.com/archive.php?p=0', + 'body' => array('//*[@class="comic"]/div/a/img | //*[@class="comic"]/div/img | //*[@id="cg_img"]/img | //*[@id="cg_img"]/a/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/undeadly.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/undeadly.org.php new file mode 100644 index 00000000..8b15900a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/undeadly.org.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://undeadly.org/cgi?action=article&sid=20141101181155', + 'body' => array( + '/html/body/table[3]/tbody/tr/td[1]/table[2]/tr/td[1]', + ), + 'strip' => array( + '//font', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/upi.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/upi.com.php new file mode 100644 index 00000000..ec8d1a1a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/upi.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.upi.com/Top_News/US/2015/09/26/Tech-giants-Hollywood-stars-among-guests-at-state-dinner-for-Chinas-Xi-Jinping/4541443281006/', + 'body' => array( + '//div[@class="img"]', + '//div/article[@itemprop="articleBody"]', + ), + 'strip' => array( + '//div[@align="center"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/usatoday.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/usatoday.com.php new file mode 100644 index 00000000..edd6aa44 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/usatoday.com.php @@ -0,0 +1,27 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.usatoday.com/story/life/music/2017/02/13/things-you-should-know-happened-grammy-awards-2017/97833734/', + 'body' => array( + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + '//script', + '//h1', + '//iframe', + '//span[@class="mycapture-small-btn mycapture-btn-with-text mycapture-expandable-photo-btn-small js-mycapture-btn-small"]', + '//div[@class="close-wrap"]', + '//div[contains(@class,"ui-video-wrapper")]', + '//div[contains(@class,"media-mob")]', + '//div[contains(@class,"left-mob")]', + '//div[contains(@class,"nerdbox")]', + '//div[contains(@class,"oembed-asset")]', + '//*[contains(@class,"share")]', + '//div[contains(@class,"gallery-asset")]', + '//div[contains(@class,"oembed-asset")]', + '//div[@class="article-print-url"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/version2.dk.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/version2.dk.php new file mode 100644 index 00000000..a6d49f2e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/version2.dk.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.version2.dk/artikel/surface-pro-2-fungerer-bedre-til-arbejde-end-fornoejelse-55195', + 'body' => array( + '//section[contains(@class, "teaser")]', + '//section[contains(@class, "body")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vezess.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vezess.hu.php new file mode 100644 index 00000000..acd68c08 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vezess.hu.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.vezess.hu/hirek/2017/10/20/audi-a7-2018-bemutato/', + 'body' => array( + '//article[@id="news"]/h1', + '//article[@id="news"]/h2', + '//article[@id="news"]/p[@class="lead"]', + '//article[@id="news"]/p[@class="main-pic responsive-img-container"]', + '//div[@class="article-body"]' + ), + 'strip' => array( + '//div[@class="info-bar"]', + '//ul[@class="breadcrumb"]', + '//div[@class="embed-link ce_widget"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vgcats.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vgcats.com.php new file mode 100644 index 00000000..b2830a37 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vgcats.com.php @@ -0,0 +1,15 @@ + array( + '%/comics.*%' => array( + 'test_url' => 'http://www.vgcats.com/comics/?strip_id=358', + 'body' => array('//*[@align="center"]/img'), + 'strip' => array(), + ), + '%/super.*%' => array( + 'test_url' => 'http://www.vgcats.com/super/?strip_id=84', + 'body' => array('//*[@align="center"]/p/img'), + 'strip' => array(), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vuxml.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vuxml.org.php new file mode 100644 index 00000000..b9bef7a4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/vuxml.org.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.vuxml.org/freebsd/a5f160fa-deee-11e4-99f8-080027ef73ec.html', + 'body' => array( + '//body', + ), + 'strip' => array( + '//h1', + '//div[@class="blurb"]', + '//hr', + '//p[@class="copyright"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/wausaudailyherald.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/wausaudailyherald.com.php new file mode 100644 index 00000000..58aceeaf --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/wausaudailyherald.com.php @@ -0,0 +1,27 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.wausaudailyherald.com/story/news/2017/04/01/hundreds-gather-remember-attorney-killed-shooting-spree/99826062/?from=global&sessionKey=&autologin=', + 'body' => array( + '//div[@itemprop="articleBody"]', + ), + 'strip' => array( + '//h1', + '//iframe', + '//span[@class="mycapture-small-btn mycapture-btn-with-text mycapture-expandable-photo-btn-small js-mycapture-btn-small"]', + '//div[@class="close-wrap"]', + '//div[contains(@class,"ui-video-wrapper")]', + '//div[contains(@class,"media-mob")]', + '//div[contains(@class,"left-mob")]', + '//div[contains(@class,"nerdbox")]', + '//p/span', + '//div[contains(@class,"oembed-asset")]', + '//*[contains(@class,"share")]', + '//div[contains(@class,"gallery-asset")]', + '//div[contains(@class,"oembed-asset")]', + '//div[@class="article-print-url"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/welt.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/welt.de.php new file mode 100644 index 00000000..83a2ebea --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/welt.de.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'https://www.welt.de/debatte/kommentare/article169740590/Bloss-keine-sozialdemokratische-Konsenssause.html', + 'body' => array( + '//main/article/header/div/div[contains(@class, "c-summary")]/div', + '//main/article/header/div[3]/div/figure/div/div/div/picture[1]', + '//main/article/header/div[3]/div/figure/figcaption/child::*', + '//main/article/div[contains(@class, "c-article-text")]' + ), + 'strip' => array( + '//*[contains(@class, "c-inline-element--has-commercials")]', + '//*[contains(@class, "c-inline-teaser")]', + '//figure[contains(@class, "c-video-element")]', + '//main/article/div[contains(@class, "c-article-text")]/div[@class="c-inline-element"]/div[contains(@class, "c-image-element")]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/westfalen-blatt.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/westfalen-blatt.de.php new file mode 100644 index 00000000..adcf417d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/westfalen-blatt.de.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.westfalen-blatt.de/OWL/Lokales/Kreis-Hoexter/Warburg/3024113-Polizei-in-Warburg-Hier-waren-keine-kriminellen-Profis-am-Werk-Wurstautomat-Sprengung-mit-Polen-Boellern', + 'body' => array( + '//div[contains(@class, "articleimage")]', + '//div[@class="attribute-short"]', + '//div[@class="attribute-long"]', + ), + 'strip' => array( + '//div[@class="fb-post"]' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php new file mode 100644 index 00000000..98fc368a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bbc.co.uk.php @@ -0,0 +1,33 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bbc.co.uk/news/world-middle-east-23911833', + 'body' => array( + '//div[@class="story-body__inner"] | //div[@class="article"]', + '//div[@class="indPost"]', + ), + 'strip' => array( + '//form', + '//div[@id="headline"]', + '//*[@class="warning"]', + '//span[@class="off-screen"]', + '//span[@class="story-image-copyright"]', + '//ul[@class="story-body__unordered-list"]', + '//div[@class="ad_wrapper"]', + '//div[@id="article-sidebar"]', + '//div[@class="data-table-outer"]', + '//*[@class="story-date"]', + '//*[@class="story-header"]', + '//figure[contains(@class,"has-caption")]', + '//*[@class="story-related"]', + '//*[contains(@class, "byline")]', + '//p[contains(@class, "media-message")]', + '//*[contains(@class, "story-feature")]', + '//*[@id="video-carousel-container"]', + '//*[@id="also-related-links"]', + '//*[contains(@class, "share") or contains(@class, "hidden") or contains(@class, "hyper")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php new file mode 100644 index 00000000..41ef68d4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bdgest.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bdgest.com/chronique-6027-BD-Adrastee-Tome-2.html', + 'body' => array( + '//*[contains(@class, "chronique")]', + ), + 'strip' => array( + '//*[contains(@class, "post-review")]', + '//*[contains(@class, "footer-review")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bgr.in.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bgr.in.php new file mode 100644 index 00000000..63ca069e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.bgr.in.php @@ -0,0 +1,23 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.bgr.in/news/xiaomi-redmi-3-with-13-megapixel-camera-snapdragon-616-launched-price-specifications-and-features/', + 'body' => array( + '//div[@class="article-content"]', + ), + 'strip' => array( + '//*[@class="article-meta"]', + '//*[@class="contentAdsense300"]', + '//*[@class="iwpl-social-hide"]', + '//iframe[@class="iframeads"]', + '//*[@class="disqus_thread"]', + '//*[@class="outb-mobile OUTBRAIN"]', + '//*[@class="wdt_smart_alerts"]', + '//*[@class="footnote"]', + '//*[@id="gadget-widget"]', + '//header[@class="article-title entry-header"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php new file mode 100644 index 00000000..0acc44ec --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.businessweek.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.businessweek.com/articles/2013-09-18/elon-musks-hyperloop-will-work-says-some-very-smart-software', + 'body' => array( + '//div[@id="lead_graphic"]', + '//div[@id="article_body"]', + ), + 'strip' => array( + '//*[contains(@class, "related_item")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.cnn.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.cnn.com.php new file mode 100644 index 00000000..31d03ed9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.cnn.com.php @@ -0,0 +1,24 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.cnn.com/2013/08/31/world/meast/syria-civil-war/index.html?hpt=hp_t1', + 'body' => array( + '//div[@class="cnn_strycntntlft"]', + ), + 'strip' => array( + '//div[@class="cnn_stryshrwdgtbtm"]', + '//div[@class="cnn_strybtmcntnt"]', + '//div[@class="cnn_strylftcntnt"]', + '//div[contains(@class, "cnnGalleryContainer")]', + '//div[contains(@class, "cnn_strylftcexpbx")]', + '//div[contains(@class, "articleGalleryNavContainer")]', + '//div[contains(@class, "cnnArticleGalleryCaptionControl")]', + '//div[contains(@class, "cnnArticleGalleryNavPrevNextDisabled")]', + '//div[contains(@class, "cnnArticleGalleryNavPrevNext")]', + '//div[contains(@class, "cnn_html_media_title_new")]', + '//div[contains(@id, "disqus")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.developpez.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.developpez.com.php new file mode 100644 index 00000000..1535e437 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.developpez.com.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.developpez.com/actu/81757/Mozilla-annonce-la-disponibilite-de-Firefox-36-qui-passe-au-HTTP-2-et-permet-la-synchronisation-de-son-ecran-d-accueil/', + 'body' => array( + '//*[@itemprop="articleBody"]', + ), + 'strip' => array( + '//form', + '//div[@class="content"]/img', + '//a[last()]/following-sibling::*', + '//*[contains(@class,"actuTitle")]', + '//*[contains(@class,"date")]', + '//*[contains(@class,"inlineimg")]', + '//*[@id="signaler"]', + '//*[@id="signalerFrame"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php new file mode 100644 index 00000000..263f0755 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.egscomics.com.php @@ -0,0 +1,12 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.egscomics.com/index.php?id=1690', + 'title' => '/html/head/title', + 'body' => array( + '//img[@id="comic"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php new file mode 100644 index 00000000..c948c77b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.fakingnews.firstpost.com.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.fakingnews.firstpost.com/2016/01/engineering-student-creates-record-in-a-decade-becomes-the-first-to-completely-exhaust-ball-pen-refill/', + 'body' => array( + '//div[@class="entry"]', + ), + 'strip' => array( + '//*[@class="socialshare_bar"]', + '//*[@class="authorbox"]', + '//*[@class="cf5_rps"]', + '//*[@class="60563 fb-comments fb-social-plugin"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.forbes.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.forbes.com.php new file mode 100644 index 00000000..fd16ed57 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.forbes.com.php @@ -0,0 +1,20 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.forbes.com/sites/andygreenberg/2013/09/05/follow-the-bitcoins-how-we-got-busted-buying-drugs-on-silk-roads-black-market/', + 'body' => array( + '//div[@id="leftRail"]/div[contains(@class, body)]', + ), + 'strip' => array( + '//aside', + '//div[contains(@class, "entity_block")]', + '//div[contains(@class, "vestpocket") and not contains(@class, "body")]', + '//div[contains(@style, "display")]', + '//div[contains(@id, "comment")]', + '//div[contains(@class, "widget")]', + '//div[contains(@class, "pagination")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php new file mode 100644 index 00000000..f7ec0d8d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.franceculture.fr.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.franceculture.fr/emission-culture-eco-la-finance-aime-toujours-la-france-2016-01-08', + 'body' => array( + '//div[@class="text-zone"]', + ), + 'strip' => array( + '//ul[@class="tags"]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php new file mode 100644 index 00000000..ea94a0fb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.futura-sciences.com.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.futura-sciences.com/magazines/espace/infos/actu/d/astronautique-curiosity-franchi-succes-dune-dingo-gap-52289/#xtor=RSS-8', + 'body' => array( + '//div[contains(@class, "content fiche-")]', + ), + 'strip' => array( + '//h1', + '//*[contains(@class, "content-date")]', + '//*[contains(@class, "diaporama")]', + '//*[contains(@class, "slider")]', + '//*[contains(@class, "cartouche")]', + '//*[contains(@class, "noprint")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php new file mode 100644 index 00000000..3d0b6c75 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.geekculture.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.geekculture.com/joyoftech/joyarchives/2180.html', + 'body' => array( + '//p[contains(@class,"Maintext")][2]/a/img[contains(@src,"joyimages")]', + ), + 'strip' => array(), + ), + ), +); + diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php new file mode 100644 index 00000000..6879e767 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.howtogeek.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.howtogeek.com/235283/what-is-a-wireless-hard-drive-and-should-i-get-one/', + 'body' => array( + '//div[@class="thecontent"]', + ), + 'strip' => array( + '//*[@class="relatedside"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php new file mode 100644 index 00000000..dcb7e484 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.lepoint.fr.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.lepoint.fr/c-est-arrive-aujourd-hui/19-septembre-1783-pour-la-premiere-fois-un-mouton-un-canard-et-un-coq-s-envoient-en-l-air-devant-louis-xvi-18-09-2012-1507704_494.php', + 'body' => array( + '//article', + ), + 'strip' => array( + '//*[contains(@class, "info_article")]', + '//*[contains(@class, "fildariane_titre")]', + '//*[contains(@class, "entete2_article")]', + '//*[contains(@class, "signature_article")]', + '//*[contains(@id, "share")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php new file mode 100644 index 00000000..0137e209 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.lesnumeriques.com.php @@ -0,0 +1,25 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.lesnumeriques.com/blender/kitchenaid-diamond-5ksb1585-p27473/test.html', + 'body' => array( + '//*[@id="product-content"]', + '//*[@id="news-content"]', + '//*[@id="article-content"]', + ), + 'strip' => array( + '//form', + '//div[contains(@class, "price-v4"])', + '//div[contains(@class, "authors-and-date")]', + '//div[contains(@class, "mini-product")]', + '//div[@id="articles-related-authors"]', + '//div[@id="tags-socials"]', + '//div[@id="user-reviews"]', + '//div[@id="product-reviews"]', + '//div[@id="publication-breadcrumbs-and-date"]', + '//div[@id="publication-breadcrumbs-and-date"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php new file mode 100644 index 00000000..60bc1bd4 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.mac4ever.com.php @@ -0,0 +1,13 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.mac4ever.com/actu/87392_video-quand-steve-jobs-et-bill-gates-jouaient-au-bachelor-avec-le-mac', + 'body' => array( + '//div[contains(@class, "news-news-content")]', + ), + 'strip' => array( + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php new file mode 100644 index 00000000..a274564a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.makeuseof.com.php @@ -0,0 +1,18 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.makeuseof.com/tag/having-problems-with-audio-in-windows-10-heres-a-likely-fix/', + 'body' => array( + '//div[@class="entry"]', + ), + 'strip' => array( + '//*[@class="new_sharebar"]', + '//*[@class="author"]', + '//*[@class="wdt_grouvi"]', + '//*[@class="wdt_smart_alerts"]', + '//*[@class="modal fade grouvi"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.monsieur-le-chien.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.monsieur-le-chien.fr.php new file mode 100644 index 00000000..5f5e987b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.monsieur-le-chien.fr.php @@ -0,0 +1,11 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.monsieur-le-chien.fr/index.php?planche=672', + 'body' => array( + '//img[starts-with(@src, "i/planches/")]', + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.npr.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.npr.org.php new file mode 100644 index 00000000..ecc0213a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.npr.org.php @@ -0,0 +1,28 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.npr.org/blogs/thesalt/2013/09/17/223345977/auto-brewery-syndrome-apparently-you-can-make-beer-in-your-gut', + 'body' => array( + '//article[contains(@class,"story")]', + ), + 'strip' => array( + '//div[@class="story-tools"]', + '//h3[@class="slug"]', + '//div[@class="storytitle"]', + '//div[@id="story-meta"]', + '//a[@id="mainContent"]', + '//div[@class="credit-caption"]', + '//div[@class="enlarge_html"]', + '//button', + '//div[contains(@id,"pullquote")]', + '//div[contains(@class,"internallink")]', + '//div[contains(@class,"video")]', + '//div[@class="simplenodate"]', + '//div[contains(@class,"share-")]', + '//div[@class="tags"]', + '//aside' + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.numerama.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.numerama.com.php new file mode 100644 index 00000000..fe4971c5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.numerama.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.numerama.com/sciences/125959-recherches-ladn-recompensees-nobel-de-chimie.html', + 'body' => array( + '//article', + ), + 'strip' => array( + '//footer', + '//section[@class="related-article"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php new file mode 100644 index 00000000..320c2147 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.oneindia.com.php @@ -0,0 +1,14 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.oneindia.com/india/b-luru-govt-likely-remove-word-eunuch-from-sec-36-a-karnataka-police-act-1981173.html', + 'body' => array( + '//div[@class="ecom-ad-content"]', + ), + 'strip' => array( + '//*[@id="view_cmtns"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php new file mode 100644 index 00000000..9e467edf --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.pseudo-sciences.org.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.pseudo-sciences.org/spip.php?article2275', + 'body' => array( + '//div[@id="art_main"]', + ), + 'strip' => array( + '//div[@id="art_print"]', + '//div[@id="art_chapo"]', + '//img[@class="puce"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.sciencemag.org.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.sciencemag.org.php new file mode 100644 index 00000000..ae7a93ac --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.sciencemag.org.php @@ -0,0 +1,16 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.sciencemag.org/news/2016/01/could-bright-foamy-wak$', + 'body' => array( + '//div[@class="row--hero"]', + '//article[contains(@class,"primary")]', + ), + 'strip' => array( + '//header[@class="article__header"]', + '//footer[@class="article__foot"]', + ), + ), + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.slate.fr.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.slate.fr.php new file mode 100644 index 00000000..8c8dc893 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.slate.fr.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.slate.fr/monde/77034/allemagne-2013-couacs-campagne', + 'body' => array( + '//div[@class="article_content"]', + ), + 'strip' => array( + '//*[@id="slate_associated_bn"]', + '//*[@id="ligatus-article"]', + '//*[@id="article_sidebar"]', + '//div[contains(@id, "reseaux")]', + '//*[contains(@class, "smart") or contains(@class, "article_tags") or contains(@class, "article_reactions")]', + '//*[contains(@class, "OUTBRAIN") or contains(@class, "related_item") or contains(@class, "share")]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php new file mode 100644 index 00000000..0747d0fb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.universfreebox.com.php @@ -0,0 +1,15 @@ + array( + '%.*%' => array( + 'test_url' => 'http://www.universfreebox.com/article/24305/4G-Bouygues-Telecom-lance-une-vente-flash-sur-son-forfait-Sensation-3Go', + 'body' => array( + '//div[@id="corps_corps"]', + ), + 'strip' => array( + '//*[@id="formulaire"]', + '//*[@id="commentaire"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.zeit.de.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.zeit.de.php new file mode 100644 index 00000000..316c2656 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/www.zeit.de.php @@ -0,0 +1,41 @@ + array( + '%^/zeit-magazin.*%' => array( + 'test_url' => 'http://www.zeit.de/zeit-magazin/2015/15/pegida-kathrin-oertel-lutz-bachmann', + 'body' => array( + '//article[@class="article"]', + ), + 'strip' => array( + '//header/div/h1', + '//header/div/div[@class="article__head__subtitle"]', + '//header/div/div[@class="article__column__author"]', + '//header/div/div[@class="article__column__author"]', + '//header/div/span[@class="article__head__meta-wrap"]', + '//form', + '//style', + '//div[contains(@class, "ad-tile")]', + '//div[@class="iqd-mobile-adplace"]', + '//div[@id="iq-artikelanker"]', + '//div[@id="js-social-services"]', + '//section[@id="js-comments"]', + '//aside', + ), + ), + '%.*%' => array( + 'test_url' => 'http://www.zeit.de/politik/ausland/2015-04/thessaloniki-krise-griechenland-yannis-boutaris/', + 'body' => array( + '//div[@class="article-body"]', + ), + 'strip' => array( + '//*[@class="articleheader"]', + '//*[@class="excerpt"]', + '//div[contains(@class, "ad")]', + '//div[@itemprop="video"]', + '//*[@class="articlemeta"]', + '//*[@class="articlemeta-clear"]', + '//*[@class="zol_inarticletools"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/xkcd.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/xkcd.com.php new file mode 100644 index 00000000..84957268 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/xkcd.com.php @@ -0,0 +1,8 @@ + array( + '%.*%' => array( + '%alt="(.+)" */>%' => '/>
$1', + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ymatuhin.ru.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ymatuhin.ru.php new file mode 100644 index 00000000..9fd83f18 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/ymatuhin.ru.php @@ -0,0 +1,21 @@ + array( + '%.*%' => array( + 'test_url' => 'https://ymatuhin.ru/tools/git-default-editor/', + 'body' => array( + '//section', + ), + 'strip' => array( + "//script", + "//style", + "//h1", + "//time", + "//aside", + "/html/body/section/ul", + "//amp-iframe", + "/html/body/section/h4" + ), + ) + ) +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zarojel.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zarojel.hu.php new file mode 100644 index 00000000..36d3bdf7 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zarojel.hu.php @@ -0,0 +1,19 @@ + array( + '%.*%' => array( + 'test_url' => 'https://zarojel.hu/meg-egyszer-a-foldi-ugyrol-is/', + 'body' => array( + '//div[@class="entry-category"]/h1', + '//div[@class="entry-content"]/div[@class="vc_row wpb_row vc_row-fluid"]' + ), + 'strip' => array( + '//ins[@class="adsbygoogle"]', + '//script', + '//figcaption', + '//p[contains(text(),"Kapcsolódó")]', + '//div[@class="wpb_wrapper"]/p[@class="entry-title"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zdnet.com.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zdnet.com.php new file mode 100644 index 00000000..79b35ddb --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zdnet.com.php @@ -0,0 +1,23 @@ + array( + '%.*%' => array( + 'test_url' => 'http://zdnet.com.feedsportal.com/c/35462/f/675637/s/4a33c93e/sc/11/l/0L0Szdnet0N0Carticle0Cchina0Eus0Eagree0Eon0Ecybercrime0Ecooperation0Eamid0Econtinued0Etension0C0Tftag0FRSSbaffb68/story01.htm', + 'body' => array( + '//p[@class="summary"]', + '//div[contains(@class,"storyBody")]', + ), + 'strip' => array( + '//*[contains(@class,"ad-")]', + '//p/span', + '//script', + '//p[@class="summary"]', + '//div[contains(@class,"relatedContent")]', + '//div[contains(@class,"loader")]', + '//p[@class="photoDetails"]', + '//div[@class="thumbnailSlider"]', + '//div[@class="shortcodeGalleryWrapper"]', + ), + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zoom.hu.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zoom.hu.php new file mode 100644 index 00000000..3e38781a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Rules/zoom.hu.php @@ -0,0 +1,17 @@ + array( + '%.*%' => array( + 'test_url' => 'https://zoom.hu/2017/10/20/mar-nem-nyomoznak-a-vegrehajtok-botranyai-miatt', + 'body' => array( + '//div[@class="title-wrapper"]/h1', + '//div[@class="entry-excerpt"]', + '//div[@class="thumbnail-wrapper"]', + '//div[@id="entry-content-id"]' + ), + 'strip' => array( + '//div[@class="place first normal"]' + ) + ), + ), +); diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/CandidateParser.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/CandidateParser.php new file mode 100644 index 00000000..0f74b3dd --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/CandidateParser.php @@ -0,0 +1,281 @@ +dom = XmlParser::getHtmlDocument(''.$html); + $this->xpath = new DOMXPath($this->dom); + } + + /** + * Get the relevant content with the list of potential attributes. + * + * @return string + */ + public function execute() + { + $content = $this->findContentWithCandidates(); + + if (strlen($content) < 200) { + $content = $this->findContentWithArticle(); + } + + if (strlen($content) < 50) { + $content = $this->findContentWithBody(); + } + + return $this->stripGarbage($content); + } + + /** + * Find content based on the list of tag candidates. + * + * @return string + */ + public function findContentWithCandidates() + { + foreach ($this->candidatesAttributes as $candidate) { + Logger::setMessage(get_called_class().': Try this candidate: "'.$candidate.'"'); + + $nodes = $this->xpath->query('//*[(contains(@class, "'.$candidate.'") or @id="'.$candidate.'") and not (contains(@class, "nav") or contains(@class, "page"))]'); + + if ($nodes !== false && $nodes->length > 0) { + Logger::setMessage(get_called_class().': Find candidate "'.$candidate.'"'); + + return $this->dom->saveXML($nodes->item(0)); + } + } + + return ''; + } + + /** + * Find
tag. + * + * @return string + */ + public function findContentWithArticle() + { + $nodes = $this->xpath->query('//article'); + + if ($nodes !== false && $nodes->length > 0) { + Logger::setMessage(get_called_class().': Find
tag'); + + return $this->dom->saveXML($nodes->item(0)); + } + + return ''; + } + + /** + * Find tag. + * + * @return string + */ + public function findContentWithBody() + { + $nodes = $this->xpath->query('//body'); + + if ($nodes !== false && $nodes->length > 0) { + Logger::setMessage(get_called_class().' Find '); + + return $this->dom->saveXML($nodes->item(0)); + } + + return ''; + } + + /** + * Strip useless tags. + * + * @param string $content + * @return string + */ + public function stripGarbage($content) + { + $dom = XmlParser::getDomDocument($content); + + if ($dom !== false) { + $xpath = new DOMXPath($dom); + + $this->stripTags($xpath); + $this->stripAttributes($dom, $xpath); + + $content = $dom->saveXML($dom->documentElement); + } + + return $content; + } + + /** + * Remove blacklisted tags. + * + * @param DOMXPath $xpath + */ + public function stripTags(DOMXPath $xpath) + { + foreach ($this->stripTags as $tag) { + $nodes = $xpath->query('//'.$tag); + + if ($nodes !== false && $nodes->length > 0) { + Logger::setMessage(get_called_class().': Strip tag: "'.$tag.'"'); + + foreach ($nodes as $node) { + $node->parentNode->removeChild($node); + } + } + } + } + + /** + * Remove blacklisted attributes. + * + * @param DomDocument $dom + * @param DOMXPath $xpath + */ + public function stripAttributes(DomDocument $dom, DOMXPath $xpath) + { + foreach ($this->stripAttributes as $attribute) { + $nodes = $xpath->query('//*[contains(@class, "'.$attribute.'") or contains(@id, "'.$attribute.'")]'); + + if ($nodes !== false && $nodes->length > 0) { + Logger::setMessage(get_called_class().': Strip attribute: "'.$attribute.'"'); + + foreach ($nodes as $node) { + if ($this->shouldRemove($dom, $node)) { + $node->parentNode->removeChild($node); + } + } + } + } + } + + /** + * Find link for next page of the article. + * + * @return string + */ + public function findNextLink() + { + return null; + } + + /** + * Return false if the node should not be removed. + * + * @param DomDocument $dom + * @param \DomNode $node + * @return bool + */ + public function shouldRemove(DomDocument $dom, $node) + { + $document_length = strlen($dom->textContent); + $node_length = strlen($node->textContent); + + if ($document_length === 0) { + return true; + } + + $ratio = $node_length * 100 / $document_length; + + if ($ratio >= 90) { + Logger::setMessage(get_called_class().': Should not remove this node ('.$node->nodeName.') ratio: '.$ratio.'%'); + + return false; + } + + return true; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/ParserInterface.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/ParserInterface.php new file mode 100644 index 00000000..3ded4b1c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/ParserInterface.php @@ -0,0 +1,20 @@ +getRulesFileList($hostname); + + foreach ($this->getRulesFolders() as $folder) { + $rule = $this->loadRuleFile($folder, $files); + + if (!empty($rule)) { + return $rule; + } + } + } + + return array(); + } + + /** + * Get the list of possible rules file names for a given hostname. + * + * @param string $hostname Hostname + * @return array + */ + public function getRulesFileList($hostname) + { + $files = array($hostname); // subdomain.domain.tld + $parts = explode('.', $hostname); + $len = count($parts); + + if ($len > 2) { + $subdomain = array_shift($parts); + $files[] = implode('.', $parts); // domain.tld + $files[] = '.'.implode('.', $parts); // .domain.tld + $files[] = $subdomain; // subdomain + } elseif ($len === 2) { + $files[] = '.'.implode('.', $parts); // .domain.tld + $files[] = $parts[0]; // domain + } + + return $files; + } + + /** + * Load a rule file from the defined folder. + * + * @param string $folder Rule directory + * @param array $files List of possible file names + * @return array + */ + public function loadRuleFile($folder, array $files) + { + foreach ($files as $file) { + $filename = $folder.'/'.$file.'.php'; + if (file_exists($filename)) { + Logger::setMessage(get_called_class().' Load rule: '.$file); + + return include $filename; + } + } + + return array(); + } + + /** + * Get the list of folders that contains rules. + * + * @return array + */ + public function getRulesFolders() + { + $folders = array(); + + if ($this->config !== null && $this->config->getGrabberRulesFolder() !== null) { + $folders[] = $this->config->getGrabberRulesFolder(); + } + + $folders[] = __DIR__ . '/../Rules'; + + return $folders; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/RuleParser.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/RuleParser.php new file mode 100644 index 00000000..9beb59c1 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/RuleParser.php @@ -0,0 +1,102 @@ +rules = $rules; + $this->dom = XmlParser::getHtmlDocument(''.$html); + $this->xpath = new DOMXPath($this->dom); + } + + /** + * Get the relevant content with predefined rules. + * + * @return string + */ + public function execute() + { + $this->stripTags(); + + return $this->findContent(); + } + + /** + * Remove HTML tags. + */ + public function stripTags() + { + if (isset($this->rules['strip']) && is_array($this->rules['strip'])) { + foreach ($this->rules['strip'] as $pattern) { + $nodes = $this->xpath->query($pattern); + + if ($nodes !== false && $nodes->length > 0) { + foreach ($nodes as $node) { + $node->parentNode->removeChild($node); + } + } + } + } + } + + /** + * Fetch content based on Xpath rules. + */ + public function findContent() + { + $content = ''; + if (isset($this->rules['body']) && is_array($this->rules['body'])) { + foreach ($this->rules['body'] as $pattern) { + $nodes = $this->xpath->query($pattern); + + if ($nodes !== false && $nodes->length > 0) { + foreach ($nodes as $node) { + $content .= $this->dom->saveXML($node); + } + } + } + } + + return $content; + } + + /** + * Fetch next link based on Xpath rules. + * + * @return string + */ + public function findNextLink() + { + if (isset($this->rules['next_page']) && is_array($this->rules['next_page'])) { + foreach ($this->rules['next_page'] as $pattern) { + $nodes = $this->xpath->query($pattern); + if ($nodes !== false && $nodes->length > 0) { + foreach ($nodes as $node) { + return $node->getAttribute('href'); + } + } + } + } + return null; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/Scraper.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/Scraper.php new file mode 100644 index 00000000..29383b21 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Scraper/Scraper.php @@ -0,0 +1,282 @@ +enableCandidateParser = false; + return $this; + } + + /** + * Get encoding. + * + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Set encoding. + * + * @param string $encoding + * + * @return Scraper + */ + public function setEncoding($encoding) + { + $this->encoding = $encoding; + + return $this; + } + + /** + * Get URL to download. + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Set URL to download. + * + * @param string $url URL + * + * @return Scraper + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * Return true if the scraper found relevant content. + * + * @return bool + */ + public function hasRelevantContent() + { + return !empty($this->content); + } + + /** + * Get relevant content. + * + * @return string + */ + public function getRelevantContent() + { + return $this->content; + } + + /** + * Get raw content (unfiltered). + * + * @return string + */ + public function getRawContent() + { + return $this->html; + } + + /** + * Set raw content (unfiltered). + * + * @param string $html + * + * @return Scraper + */ + public function setRawContent($html) + { + $this->html = $html; + + return $this; + } + + /** + * Get filtered relevant content. + * + * @return string + */ + public function getFilteredContent() + { + $filter = Filter::html($this->content, $this->url); + $filter->setConfig($this->config); + + return $filter->execute(); + } + + /** + * Download the HTML content. + * + * @return bool + */ + public function download() + { + if (!empty($this->url)) { + + // Clear everything + $this->html = ''; + $this->content = ''; + $this->encoding = ''; + + try { + $client = Client::getInstance(); + $client->setConfig($this->config); + $client->setTimeout($this->config->getGrabberTimeout()); + $client->setUserAgent($this->config->getGrabberUserAgent()); + $client->execute($this->url); + + $this->url = $client->getUrl(); + $this->html = $client->getContent(); + $this->encoding = $client->getEncoding(); + + return true; + } catch (ClientException $e) { + Logger::setMessage(get_called_class().': '.$e->getMessage()); + } + } + + return false; + } + + /** + * Execute the scraper. + * + * @param string $pageContent + * @param int $recursionDepth + */ + public function execute($pageContent = '', $recursionDepth = 0) + { + $this->html = ''; + $this->encoding = ''; + $this->content = ''; + $this->download(); + $this->prepareHtml(); + + $parser = $this->getParser(); + + if ($parser !== null) { + $maxRecursions = $this->config->getMaxRecursions(); + if(!isset($maxRecursions)){ + $maxRecursions = 25; + } + $pageContent .= $parser->execute(); + // check if there is a link to next page and recursively get content (max 25 pages) + if((($nextLink = $parser->findNextLink()) !== null) && $recursionDepth < $maxRecursions){ + $nextLink = Url::resolve($nextLink,$this->url); + $this->setUrl($nextLink); + $this->execute($pageContent,$recursionDepth+1); + } + else{ + $this->content = $pageContent; + } + Logger::setMessage(get_called_class().': Content length: '.strlen($this->content).' bytes'); + } + } + + /** + * Get the parser. + * + * @return ParserInterface + */ + public function getParser() + { + $ruleLoader = new RuleLoader($this->config); + $rules = $ruleLoader->getRules($this->url); + + if (!empty($rules['grabber'])) { + Logger::setMessage(get_called_class().': Parse content with rules'); + + foreach ($rules['grabber'] as $pattern => $rule) { + $url = new Url($this->url); + $sub_url = $url->getFullPath(); + + if (preg_match($pattern, $sub_url)) { + Logger::setMessage(get_called_class().': Matched url '.$sub_url); + return new RuleParser($this->html, $rule); + } + } + } elseif ($this->enableCandidateParser) { + Logger::setMessage(get_called_class().': Parse content with candidates'); + } + + return new CandidateParser($this->html); + } + + /** + * Normalize encoding and strip head tag. + */ + public function prepareHtml() + { + $html_encoding = XmlParser::getEncodingFromMetaTag($this->html); + + $this->html = Encoding::convert($this->html, $html_encoding ?: $this->encoding); + $this->html = Filter::stripHeadTags($this->html); + + Logger::setMessage(get_called_class().': HTTP Encoding "'.$this->encoding.'" ; HTML Encoding "'.$html_encoding.'"'); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/Subscription.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/Subscription.php new file mode 100644 index 00000000..12eccfd5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/Subscription.php @@ -0,0 +1,175 @@ +title = $title; + return $this; + } + + /** + * Get title + * + * @access public + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set feed URL + * + * @access public + * @param string $feedUrl + * @return Subscription + */ + public function setFeedUrl($feedUrl) + { + $this->feedUrl = $feedUrl; + return $this; + } + + /** + * Get feed URL + * + * @access public + * @return string + */ + public function getFeedUrl() + { + return $this->feedUrl; + } + + /** + * Set site URL + * + * @access public + * @param string $siteUrl + * @return Subscription + */ + public function setSiteUrl($siteUrl) + { + $this->siteUrl = $siteUrl; + return $this; + } + + /** + * Get site URL + * + * @access public + * @return string + */ + public function getSiteUrl() + { + return $this->siteUrl; + } + + /** + * Set category + * + * @access public + * @param string $category + * @return Subscription + */ + public function setCategory($category) + { + $this->category = $category; + return $this; + } + + /** + * Get category + * + * @access public + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * Set description + * + * @access public + * @param string $description + * @return Subscription + */ + public function setDescription($description) + { + $this->description = $description; + return $this; + } + + /** + * Get description + * + * @access public + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Set type + * + * @access public + * @param string $type + * @return Subscription + */ + public function setType($type) + { + $this->type = $type; + return $this; + } + + /** + * Get type + * + * @access public + * @return string + */ + public function getType() + { + return $this->type; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionList.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionList.php new file mode 100644 index 00000000..b173f89b --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionList.php @@ -0,0 +1,75 @@ +title = $title; + return $this; + } + + /** + * Get title + * + * @access public + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Add subscription + * + * @access public + * @param Subscription $subscription + * @return SubscriptionList + */ + public function addSubscription(Subscription $subscription) + { + $this->subscriptions[] = $subscription; + return $this; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionListBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionListBuilder.php new file mode 100644 index 00000000..838e4cb5 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionListBuilder.php @@ -0,0 +1,204 @@ +subscriptionList = $subscriptionList; + } + + /** + * Get object instance + * + * @static + * @access public + * @param SubscriptionList $subscriptionList + * @return SubscriptionListBuilder + */ + public static function create(SubscriptionList $subscriptionList) + { + return new static($subscriptionList); + } + + /** + * Build OPML feed + * + * @access public + * @param string $filename + * @return string + */ + public function build($filename = '') + { + $this->document = new DomDocument('1.0', 'UTF-8'); + $this->document->formatOutput = true; + + $opmlElement = $this->document->createElement('opml'); + $opmlElement->setAttribute('version', '1.0'); + + $headElement = $this->document->createElement('head'); + + if ($this->subscriptionList->getTitle() !== '') { + $titleElement = $this->document->createElement('title'); + $titleElement->appendChild($this->document->createTextNode($this->subscriptionList->getTitle())); + $headElement->appendChild($titleElement); + } + + $opmlElement->appendChild($headElement); + $opmlElement->appendChild($this->buildBody()); + $this->document->appendChild($opmlElement); + + if ($filename !== '') { + $this->document->save($filename); + return ''; + } + + return $this->document->saveXML(); + } + + /** + * Return true if the list has categories + * + * @access public + * @return bool + */ + public function hasCategories() + { + foreach ($this->subscriptionList->subscriptions as $subscription) { + if ($subscription->getCategory() !== '') { + return true; + } + } + + return false; + } + + /** + * Build OPML body + * + * @access protected + * @return DOMElement + */ + protected function buildBody() + { + $bodyElement = $this->document->createElement('body'); + + if ($this->hasCategories()) { + $this->buildCategories($bodyElement); + return $bodyElement; + } + + foreach ($this->subscriptionList->subscriptions as $subscription) { + $bodyElement->appendChild($this->buildSubscription($subscription)); + } + + return $bodyElement; + } + + /** + * Build categories section + * + * @access protected + * @param DOMElement $bodyElement + */ + protected function buildCategories(DOMElement $bodyElement) + { + $categories = $this->groupByCategories(); + + foreach ($categories as $category => $subscriptions) { + $bodyElement->appendChild($this->buildCategory($category, $subscriptions)); + } + } + + /** + * Build category tag + * + * @access protected + * @param string $category + * @param array $subscriptions + * @return DOMElement + */ + protected function buildCategory($category, array $subscriptions) + { + $outlineElement = $this->document->createElement('outline'); + $outlineElement->setAttribute('text', $category); + + foreach ($subscriptions as $subscription) { + $outlineElement->appendChild($this->buildSubscription($subscription)); + } + + return $outlineElement; + } + + /** + * Build subscription entry + * + * @access public + * @param Subscription $subscription + * @return DOMElement + */ + protected function buildSubscription(Subscription $subscription) + { + $outlineElement = $this->document->createElement('outline'); + $outlineElement->setAttribute('type', $subscription->getType() ?: 'rss'); + $outlineElement->setAttribute('text', $subscription->getTitle() ?: $subscription->getFeedUrl()); + $outlineElement->setAttribute('xmlUrl', $subscription->getFeedUrl()); + + if ($subscription->getTitle() !== '') { + $outlineElement->setAttribute('title', $subscription->getTitle()); + } + + if ($subscription->getDescription() !== '') { + $outlineElement->setAttribute('description', $subscription->getDescription()); + } + + if ($subscription->getSiteUrl() !== '') { + $outlineElement->setAttribute('htmlUrl', $subscription->getSiteUrl()); + } + + return $outlineElement; + } + + /** + * Group subscriptions by category + * + * @access private + * @return array + */ + private function groupByCategories() + { + $categories = array(); + + foreach ($this->subscriptionList->subscriptions as $subscription) { + $categories[$subscription->getCategory()][] = $subscription; + } + + return $categories; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionListParser.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionListParser.php new file mode 100644 index 00000000..9085588c --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionListParser.php @@ -0,0 +1,100 @@ +subscriptionList = new SubscriptionList(); + $this->data = trim($data); + } + + /** + * Get object instance + * + * @static + * @access public + * @param string $data + * @return SubscriptionListParser + */ + public static function create($data) + { + return new static($data); + } + + /** + * Parse a subscription list entry + * + * @access public + * @throws MalformedXmlException + * @return SubscriptionList + */ + public function parse() + { + $xml = XmlParser::getSimpleXml($this->data); + + if (! $xml || !isset($xml->head) || !isset($xml->body)) { + throw new MalformedXmlException('Unable to parse OPML file: invalid XML'); + } + + $this->parseTitle($xml->head); + $this->parseEntries($xml->body); + + return $this->subscriptionList; + } + + /** + * Parse title + * + * @access protected + * @param SimpleXMLElement $xml + */ + protected function parseTitle(SimpleXMLElement $xml) + { + $this->subscriptionList->setTitle((string) $xml->title); + } + + /** + * Parse entries + * + * @access protected + * @param SimpleXMLElement $body + */ + private function parseEntries(SimpleXMLElement $body) + { + foreach ($body->outline as $outlineElement) { + if (isset($outlineElement->outline)) { + $this->parseEntries($outlineElement); + } else { + $this->subscriptionList->subscriptions[] = SubscriptionParser::create($body, $outlineElement)->parse(); + } + } + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php new file mode 100644 index 00000000..caff07c2 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php @@ -0,0 +1,142 @@ +parentElement = $parentElement; + $this->outlineElement = $outlineElement; + $this->subscription = new Subscription(); + } + + /** + * Get object instance + * + * @static + * @access public + * @param SimpleXMLElement $parentElement + * @param SimpleXMLElement $outlineElement + * @return SubscriptionParser + */ + public static function create(SimpleXMLElement $parentElement, SimpleXMLElement $outlineElement) + { + return new static($parentElement, $outlineElement); + } + + /** + * Parse subscription entry + * + * @access public + * @return Subscription + */ + public function parse() + { + $this->subscription->setCategory($this->findCategory()); + $this->subscription->setTitle($this->findTitle()); + $this->subscription->setFeedUrl($this->findFeedUrl()); + $this->subscription->setSiteUrl($this->findSiteUrl()); + $this->subscription->setType($this->findType()); + $this->subscription->setDescription($this->findDescription()); + + return $this->subscription; + } + + /** + * Find category. + * + * @access protected + * @return string + */ + protected function findCategory() + { + return isset($this->parentElement['text']) ? (string) $this->parentElement['text'] : ''; + } + + /** + * Find title. + * + * @access protected + * @return string + */ + protected function findTitle() + { + return isset($this->outlineElement['title']) ? (string) $this->outlineElement['title'] : (string) $this->outlineElement['text']; + } + + /** + * Find feed url. + * + * @access protected + * @return string + */ + protected function findFeedUrl() + { + return (string) $this->outlineElement['xmlUrl']; + } + + /** + * Find site url. + * + * @access protected + * @return string + */ + protected function findSiteUrl() + { + return isset($this->outlineElement['htmlUrl']) ? (string) $this->outlineElement['htmlUrl'] : $this->findFeedUrl(); + } + + /** + * Find type. + * + * @access protected + * @return string + */ + protected function findType() + { + return isset($this->outlineElement['version']) ? (string) $this->outlineElement['version'] : + isset($this->outlineElement['type']) ? (string) $this->outlineElement['type'] : 'rss'; + } + + /** + * Find description. + * + * @access protected + * @return string + */ + protected function findDescription() + { + return isset($this->outlineElement['description']) ? (string) $this->outlineElement['description'] : $this->findTitle(); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomFeedBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomFeedBuilder.php new file mode 100644 index 00000000..34f37800 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomFeedBuilder.php @@ -0,0 +1,65 @@ +helper = new AtomHelper($this->getDocument()); + + $this->feedElement = $this->getDocument()->createElement('feed'); + $this->feedElement->setAttributeNodeNS(new DomAttr('xmlns', 'http://www.w3.org/2005/Atom')); + + $generator = $this->getDocument()->createElement('generator', 'PicoFeed'); + $generator->setAttribute('uri', 'https://github.com/miniflux/picoFeed'); + $this->feedElement->appendChild($generator); + + $this->helper + ->buildTitle($this->feedElement, $this->feedTitle) + ->buildId($this->feedElement, $this->feedUrl) + ->buildDate($this->feedElement, $this->feedDate) + ->buildLink($this->feedElement, $this->siteUrl) + ->buildLink($this->feedElement, $this->feedUrl, 'self', 'application/atom+xml') + ->buildAuthor($this->feedElement, $this->authorName, $this->authorEmail, $this->authorUrl) + ; + + foreach ($this->items as $item) { + $this->feedElement->appendChild($item->build()); + } + + $this->getDocument()->appendChild($this->feedElement); + + if ($filename !== '') { + $this->getDocument()->save($filename); + } + + return $this->getDocument()->saveXML(); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomHelper.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomHelper.php new file mode 100644 index 00000000..def6b0b9 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomHelper.php @@ -0,0 +1,139 @@ +document = $document; + } + + /** + * Build node + * + * @access public + * @param DOMElement $element + * @param string $tag + * @param string $value + * @return AtomHelper + */ + public function buildNode(DOMElement $element, $tag, $value) + { + $node = $this->document->createElement($tag); + $node->appendChild($this->document->createTextNode($value)); + $element->appendChild($node); + return $this; + } + + /** + * Build title + * + * @access public + * @param DOMElement $element + * @param string $title + * @return AtomHelper + */ + public function buildTitle(DOMElement $element, $title) + { + return $this->buildNode($element, 'title', $title); + } + + /** + * Build id + * + * @access public + * @param DOMElement $element + * @param string $id + * @return AtomHelper + */ + public function buildId(DOMElement $element, $id) + { + return $this->buildNode($element, 'id', $id); + } + + /** + * Build date element + * + * @access public + * @param DOMElement $element + * @param DateTime $date + * @param string $type + * @return AtomHelper + */ + public function buildDate(DOMElement $element, DateTime $date, $type = 'updated') + { + return $this->buildNode($element, $type, $date->format(DateTime::ATOM)); + } + + /** + * Build link element + * + * @access public + * @param DOMElement $element + * @param string $url + * @param string $rel + * @param string $type + * @return AtomHelper + */ + public function buildLink(DOMElement $element, $url, $rel = 'alternate', $type = 'text/html') + { + $node = $this->document->createElement('link'); + $node->setAttribute('rel', $rel); + $node->setAttribute('type', $type); + $node->setAttribute('href', $url); + $element->appendChild($node); + + return $this; + } + + /** + * Build author element + * + * @access public + * @param DOMElement $element + * @param string $authorName + * @param string $authorEmail + * @param string $authorUrl + * @return AtomHelper + */ + public function buildAuthor(DOMElement $element, $authorName, $authorEmail, $authorUrl) + { + if (!empty($authorName)) { + $author = $this->document->createElement('author'); + $this->buildNode($author, 'name', $authorName); + + if (!empty($authorEmail)) { + $this->buildNode($author, 'email', $authorEmail); + } + + if (!empty($authorUrl)) { + $this->buildNode($author, 'uri', $authorUrl); + } + + $element->appendChild($author); + } + + return $this; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomItemBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomItemBuilder.php new file mode 100644 index 00000000..dfdfe68d --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/AtomItemBuilder.php @@ -0,0 +1,63 @@ +itemElement = $this->feedBuilder->getDocument()->createElement('entry'); + $this->helper = new AtomHelper($this->feedBuilder->getDocument()); + + if (!empty($this->itemId)) { + $this->helper->buildId($this->itemElement, $this->itemId); + } else { + $this->helper->buildId($this->itemElement, $this->itemUrl); + } + + $this->helper + ->buildTitle($this->itemElement, $this->itemTitle) + ->buildLink($this->itemElement, $this->itemUrl) + ->buildDate($this->itemElement, $this->itemUpdatedDate, 'updated') + ->buildDate($this->itemElement, $this->itemPublishedDate, 'published') + ->buildAuthor($this->itemElement, $this->authorName, $this->authorEmail, $this->authorUrl) + ; + + if (!empty($this->itemSummary)) { + $this->helper->buildNode($this->itemElement, 'summary', $this->itemSummary); + } + + if (!empty($this->itemContent)) { + $node = $this->feedBuilder->getDocument()->createElement('content'); + $node->setAttribute('type', 'html'); + $node->appendChild($this->feedBuilder->getDocument()->createCDATASection($this->itemContent)); + $this->itemElement->appendChild($node); + } + + return $this->itemElement; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/FeedBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/FeedBuilder.php new file mode 100644 index 00000000..cf9d024e --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/FeedBuilder.php @@ -0,0 +1,185 @@ +document = new DomDocument('1.0', 'UTF-8'); + $this->document->formatOutput = true; + } + + /** + * Get new object instance + * + * @access public + * @return static + */ + public static function create() + { + return new static(); + } + + /** + * Add feed title + * + * @access public + * @param string $title + * @return $this + */ + public function withTitle($title) + { + $this->feedTitle = $title; + return $this; + } + + /** + * Add feed url + * + * @access public + * @param string $url + * @return $this + */ + public function withFeedUrl($url) + { + $this->feedUrl = $url; + return $this; + } + + /** + * Add website url + * + * @access public + * @param string $url + * @return $this + */ + public function withSiteUrl($url) + { + $this->siteUrl = $url; + return $this; + } + + /** + * Add feed date + * + * @access public + * @param DateTime $date + * @return $this + */ + public function withDate(DateTime $date) + { + $this->feedDate = $date; + return $this; + } + + /** + * Add feed author + * + * @access public + * @param string $name + * @param string $email + * @param string $url + * @return $this + */ + public function withAuthor($name, $email = '', $url ='') + { + $this->authorName = $name; + $this->authorEmail = $email; + $this->authorUrl = $url; + return $this; + } + + /** + * Add feed item + * + * @access public + * @param ItemBuilder $item + * @return $this + */ + public function withItem(ItemBuilder $item) + { + $this->items[] = $item; + return $this; + } + + /** + * Get DOM document + * + * @access public + * @return DOMDocument + */ + public function getDocument() + { + return $this->document; + } + + /** + * Build feed + * + * @abstract + * @access public + * @param string $filename + * @return string + */ + abstract public function build($filename = ''); +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/ItemBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/ItemBuilder.php new file mode 100644 index 00000000..86985bc7 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/ItemBuilder.php @@ -0,0 +1,209 @@ +feedBuilder = $feedBuilder; + } + + /** + * Get new object instance + * + * @access public + * @param FeedBuilder $feedBuilder + * @return static + */ + public static function create(FeedBuilder $feedBuilder) + { + return new static($feedBuilder); + } + + /** + * Add item title + * + * @access public + * @param string $title + * @return $this + */ + public function withTitle($title) + { + $this->itemTitle = $title; + return $this; + } + + /** + * Add item id + * + * @access public + * @param string $id + * @return $this + */ + public function withId($id) + { + $this->itemId = $id; + return $this; + } + + /** + * Add item url + * + * @access public + * @param string $url + * @return $this + */ + public function withUrl($url) + { + $this->itemUrl = $url; + return $this; + } + + /** + * Add item summary + * + * @access public + * @param string $summary + * @return $this + */ + public function withSummary($summary) + { + $this->itemSummary = $summary; + return $this; + } + + /** + * Add item content + * + * @access public + * @param string $content + * @return $this + */ + public function withContent($content) + { + $this->itemContent = $content; + return $this; + } + + /** + * Add item updated date + * + * @access public + * @param DateTime $date + * @return $this + */ + public function withUpdatedDate(DateTime $date) + { + $this->itemUpdatedDate = $date; + return $this; + } + + /** + * Add item published date + * + * @access public + * @param DateTime $date + * @return $this + */ + public function withPublishedDate(DateTime $date) + { + $this->itemPublishedDate = $date; + return $this; + } + + /** + * Add item author + * + * @access public + * @param string $name + * @param string $email + * @param string $url + * @return $this + */ + public function withAuthor($name, $email = '', $url ='') + { + $this->authorName = $name; + $this->authorEmail = $email; + $this->authorUrl = $url; + return $this; + } + + /** + * Build item + * + * @abstract + * @access public + * @return DOMElement + */ + abstract public function build(); +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20FeedBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20FeedBuilder.php new file mode 100644 index 00000000..bc3f5135 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20FeedBuilder.php @@ -0,0 +1,76 @@ +helper = new Rss20Helper($this->getDocument()); + + $this->rssElement = $this->getDocument()->createElement('rss'); + $this->rssElement->setAttribute('version', '2.0'); + $this->rssElement->setAttributeNodeNS(new DomAttr('xmlns:content', 'http://purl.org/rss/1.0/modules/content/')); + $this->rssElement->setAttributeNodeNS(new DomAttr('xmlns:atom', 'http://www.w3.org/2005/Atom')); + + $this->channelElement = $this->getDocument()->createElement('channel'); + $this->helper + ->buildNode($this->channelElement, 'generator', 'PicoFeed (https://github.com/miniflux/picoFeed)') + ->buildTitle($this->channelElement, $this->feedTitle) + ->buildNode($this->channelElement, 'description', $this->feedTitle) + ->buildDate($this->channelElement, $this->feedDate) + ->buildAuthor($this->channelElement, 'webMaster', $this->authorName, $this->authorEmail) + ->buildLink($this->channelElement, $this->siteUrl) + ; + + $link = $this->getDocument()->createElement('atom:link'); + $link->setAttribute('href', $this->feedUrl); + $link->setAttribute('rel', 'self'); + $link->setAttribute('type', 'application/rss+xml'); + $this->channelElement->appendChild($link); + + foreach ($this->items as $item) { + $this->channelElement->appendChild($item->build()); + } + + $this->rssElement->appendChild($this->channelElement); + $this->getDocument()->appendChild($this->rssElement); + + if ($filename !== '') { + $this->getDocument()->save($filename); + } + + return $this->getDocument()->saveXML(); + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20Helper.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20Helper.php new file mode 100644 index 00000000..72a19e56 --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20Helper.php @@ -0,0 +1,115 @@ +document = $document; + } + + /** + * Build node + * + * @access public + * @param DOMElement $element + * @param string $tag + * @param string $value + * @return $this + */ + public function buildNode(DOMElement $element, $tag, $value) + { + $node = $this->document->createElement($tag); + $node->appendChild($this->document->createTextNode($value)); + $element->appendChild($node); + return $this; + } + + /** + * Build title + * + * @access public + * @param DOMElement $element + * @param string $title + * @return $this + */ + public function buildTitle(DOMElement $element, $title) + { + return $this->buildNode($element, 'title', $title); + } + + /** + * Build date element + * + * @access public + * @param DOMElement $element + * @param DateTime $date + * @param string $type + * @return $this + */ + public function buildDate(DOMElement $element, DateTime $date, $type = 'pubDate') + { + return $this->buildNode($element, $type, $date->format(DateTime::RSS)); + } + + /** + * Build link element + * + * @access public + * @param DOMElement $element + * @param string $url + * @return $this + */ + public function buildLink(DOMElement $element, $url) + { + return $this->buildNode($element, 'link', $url); + } + + /** + * Build author element + * + * @access public + * @param DOMElement $element + * @param string $tag + * @param string $authorName + * @param string $authorEmail + * @return $this + */ + public function buildAuthor(DOMElement $element, $tag, $authorName, $authorEmail) + { + if (!empty($authorName)) { + $value = ''; + + if (!empty($authorEmail)) { + $value .= $authorEmail.' ('.$authorName.')'; + } else { + $value = $authorName; + } + + $this->buildNode($element, $tag, $value); + } + + return $this; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20ItemBuilder.php b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20ItemBuilder.php new file mode 100644 index 00000000..125dc6ac --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Syndication/Rss20ItemBuilder.php @@ -0,0 +1,67 @@ +itemElement = $this->feedBuilder->getDocument()->createElement('item'); + $this->helper = new Rss20Helper($this->feedBuilder->getDocument()); + + if (!empty($this->itemId)) { + $guid = $this->feedBuilder->getDocument()->createElement('guid'); + $guid->setAttribute('isPermaLink', 'false'); + $guid->appendChild($this->feedBuilder->getDocument()->createTextNode($this->itemId)); + $this->itemElement->appendChild($guid); + } else { + $guid = $this->feedBuilder->getDocument()->createElement('guid'); + $guid->setAttribute('isPermaLink', 'true'); + $guid->appendChild($this->feedBuilder->getDocument()->createTextNode($this->itemUrl)); + $this->itemElement->appendChild($guid); + } + + $this->helper + ->buildTitle($this->itemElement, $this->itemTitle) + ->buildLink($this->itemElement, $this->itemUrl) + ->buildDate($this->itemElement, $this->itemPublishedDate) + ->buildAuthor($this->itemElement, 'author', $this->authorName, $this->authorEmail) + ; + + if (!empty($this->itemSummary)) { + $this->helper->buildNode($this->itemElement, 'description', $this->itemSummary); + } + + if (!empty($this->itemContent)) { + $node = $this->feedBuilder->getDocument()->createElement('content:encoded'); + $node->appendChild($this->feedBuilder->getDocument()->createCDATASection($this->itemContent)); + $this->itemElement->appendChild($node); + } + + return $this->itemElement; + } +} diff --git a/dev/plugins/admin/vendor/p3k/picofeed/picofeed b/dev/plugins/admin/vendor/p3k/picofeed/picofeed new file mode 100644 index 00000000..8f35737a --- /dev/null +++ b/dev/plugins/admin/vendor/p3k/picofeed/picofeed @@ -0,0 +1,135 @@ +#!/usr/bin/env php +discover($url); + + $parser = $reader->getParser( + $resource->getUrl(), + $resource->getContent(), + $resource->getEncoding() + ); + + if ($disable_filtering) { + $parser->disableContentFiltering(); + } + + return $parser->execute(); + } + catch (PicoFeedException $e) { + echo 'Exception thrown ===> "'.$e->getMessage().'"'.PHP_EOL; + return false; + } +} + +function get_item($feed, $item_id) +{ + foreach ($feed->items as $item) { + if ($item->getId() === $item_id) { + echo $item; + echo "============= CONTENT ================\n"; + echo $item->getContent(); + echo "\n============= CONTENT ================\n"; + break; + } + } +} + +function dump_feed($url) +{ + $feed = get_feed($url); + echo $feed; +} + +function debug_feed($url) +{ + get_feed($url); + print_r(Logger::getMessages()); +} + +function dump_item($url, $item_id) +{ + $feed = get_feed($url); + + if ($feed !== false) { + get_item($feed, $item_id); + } +} + +function nofilter_item($url, $item_id) +{ + $feed = get_feed($url, true); + + if ($feed !== false) { + get_item($feed, $item_id); + } +} + +function grabber($url) +{ + $grabber = new Scraper(new Config); + $grabber->setUrl($url); + $grabber->execute(); + + print_r(Logger::getMessages()); + echo "============= CONTENT ================\n"; + echo $grabber->getRelevantContent().PHP_EOL; + echo "============= FILTERED ================\n"; + echo $grabber->getFilteredContent().PHP_EOL; +} + +function fetch_favicon($url) +{ + $favicon = new Favicon(); + echo $favicon->find($url) . PHP_EOL; +} + +// Parse command line arguments +if ($argc === 4) { + switch ($argv[1]) { + case 'item': + dump_item($argv[2], $argv[3]); + die; + case 'nofilter': + nofilter_item($argv[2], $argv[3]); + die; + } +} else if ($argc === 3) { + switch ($argv[1]) { + case 'feed': + dump_feed($argv[2]); + die; + case 'debug': + debug_feed($argv[2]); + die; + case 'grabber': + grabber($argv[2]); + die; + case 'favicon': + fetch_favicon($argv[2]); + die; + } +} + +printf("Usage:\n"); +printf("%s feed \n", $argv[0]); +printf("%s debug \n", $argv[0]); +printf("%s item \n", $argv[0]); +printf("%s nofilter \n", $argv[0]); +printf("%s grabber \n", $argv[0]); +printf("%s favicon \n", $argv[0]); diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/LICENSE.md b/dev/plugins/admin/vendor/scssphp/scssphp/LICENSE.md new file mode 100644 index 00000000..afcfdfb2 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2015 Leaf Corcoran, http://scssphp.github.io/scssphp + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/README.md b/dev/plugins/admin/vendor/scssphp/scssphp/README.md new file mode 100644 index 00000000..65bb93ea --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/README.md @@ -0,0 +1,71 @@ +# scssphp +### + +![Build](https://github.com/scssphp/scssphp/workflows/CI/badge.svg) +[![License](https://poser.pugx.org/scssphp/scssphp/license)](https://packagist.org/packages/scssphp/scssphp) + +`scssphp` is a compiler for SCSS written in PHP. + +Checkout the homepage, , for directions on how to use. + +## Running Tests + +`scssphp` uses [PHPUnit](https://github.com/sebastianbergmann/phpunit) for testing. + +Run the following command from the root directory to run every test: + + vendor/bin/phpunit tests + +There are several tests in the `tests/` directory: + +* `ApiTest.php` contains various unit tests that test the PHP interface. +* `ExceptionTest.php` contains unit tests that test for exceptions thrown by the parser and compiler. +* `FailingTest.php` contains tests reported in Github issues that demonstrate compatibility bugs. +* `InputTest.php` compiles every `.scss` file in the `tests/inputs` directory + then compares to the respective `.css` file in the `tests/outputs` directory. +* `SassSpecTest.php` extracts tests from the `sass/sass-spec` repository. + +When changing any of the tests in `tests/inputs`, the tests will most likely +fail because the output has changed. Once you verify that the output is correct +you can run the following command to rebuild all the tests: + + BUILD=1 vendor/bin/phpunit tests + +This will compile all the tests, and save results into `tests/outputs`. It also +updates the list of excluded specs from sass-spec. + +To enable the full `sass-spec` compatibility tests: + + TEST_SASS_SPEC=1 vendor/bin/phpunit tests + +## Coding Standard + +`scssphp` source conforms to [PSR12](https://www.php-fig.org/psr/psr-12/). + +Run the following command from the root directory to check the code for "sniffs". + + vendor/bin/phpcs --standard=PSR12 --extensions=php bin src tests *.php + +## Static Analysis + +`scssphp` uses [phpstan](https://phpstan.org/) for static analysis. + +Run the following command from the root directory to analyse the codebase: + + make phpstan + +As most of the codebase is composed of legacy code which cannot be type-checked +fully, the setup contains a baseline file with all errors we want to ignore. In +particular, we ignore all errors related to not specifying the types inside arrays +when these arrays correspond to the representation of Sass values and Sass AST nodes +in the parser and compiler. +When contributing, the proper process to deal with static analysis is the following: + +1. Make your change in the codebase +2. Run `make phpstan` +3. Fix errors reported by phpstan when possible +4. Repeat step 2 and 3 until nothing gets fixed anymore at step 3 +5. Run `make phpstan-baseline` to regenerate the phpstan baseline + +Additions to the baseline will be reviewed to avoid ignoring errors that should have +been fixed. diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/bin/pscss b/dev/plugins/admin/vendor/scssphp/scssphp/bin/pscss new file mode 100644 index 00000000..0f009d6b --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/bin/pscss @@ -0,0 +1,244 @@ +#!/usr/bin/env php +parse($data)), true)); + + fwrite(STDERR, 'Warning: the --dump-tree option is deprecated. Use proper debugging tools instead.'); + + exit(); +} + +$scss = new Compiler(); + +if ($loadPaths) { + $scss->setImportPaths($loadPaths); +} + +if ($style) { + if ($style === OutputStyle::COMPRESSED || $style === OutputStyle::EXPANDED) { + $scss->setOutputStyle($style); + } else { + fwrite(STDERR, "WARNING: the $style style is deprecated.\n"); + $scss->setFormatter('ScssPhp\\ScssPhp\\Formatter\\' . ucfirst($style)); + } +} + +$outputFile = isset($arguments[1]) ? $arguments[1] : null; +$sourceMapFile = null; + +if ($sourceMap) { + $sourceMapOptions = array( + 'outputSourceFiles' => $embedSources, + ); + if ($embedSourceMap || $outputFile === null) { + $scss->setSourceMap(Compiler::SOURCE_MAP_INLINE); + } else { + $sourceMapFile = $outputFile . '.map'; + $sourceMapOptions['sourceMapWriteTo'] = $sourceMapFile; + $sourceMapOptions['sourceMapURL'] = basename($sourceMapFile); + $sourceMapOptions['sourceMapBasepath'] = getcwd(); + $sourceMapOptions['sourceMapFilename'] = basename($outputFile); + + $scss->setSourceMap(Compiler::SOURCE_MAP_FILE); + } + + $scss->setSourceMapOptions($sourceMapOptions); +} + +if ($encoding) { + $scss->setEncoding($encoding); +} + +try { + $result = $scss->compileString($data, $inputFile); +} catch (SassException $e) { + fwrite(STDERR, 'Error: '.$e->getMessage()."\n"); + exit(1); +} + +if ($outputFile) { + file_put_contents($outputFile, $result->getCss()); + + if ($sourceMapFile !== null && $result->getSourceMap() !== null) { + file_put_contents($sourceMapFile, $result->getSourceMap()); + } +} else { + echo $result->getCss(); +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/composer.json b/dev/plugins/admin/vendor/scssphp/scssphp/composer.json new file mode 100644 index 00000000..a8cb2d4f --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/composer.json @@ -0,0 +1,111 @@ +{ + "name": "scssphp/scssphp", + "type": "library", + "description": "scssphp is a compiler for SCSS written in PHP.", + "keywords": ["css", "stylesheet", "scss", "sass", "less"], + "homepage": "http://scssphp.github.io/scssphp/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthon Pang", + "email": "apang@softwaredevelopment.ca", + "homepage": "https://github.com/robocoder" + }, + { + "name": "Cédric Morin", + "email": "cedric@yterium.com", + "homepage": "https://github.com/Cerdic" + } + ], + "autoload": { + "psr-4": { "ScssPhp\\ScssPhp\\": "src/" } + }, + "autoload-dev": { + "psr-4": { "ScssPhp\\ScssPhp\\Tests\\": "tests/" } + }, + "require": { + "php": ">=5.6.0", + "ext-json": "*", + "ext-ctype": "*" + }, + "suggest": { + "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv", + "ext-iconv": "Can be used as fallback when ext-mbstring is not available" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4", + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.3 || ^9.4", + "sass/sass-spec": "*", + "squizlabs/php_codesniffer": "~3.5", + "symfony/phpunit-bridge": "^5.1", + "thoughtbot/bourbon": "^7.0", + "twbs/bootstrap": "~5.0", + "twbs/bootstrap4": "4.6.1", + "zurb/foundation": "~6.5" + }, + "repositories": [ + { + "type": "package", + "package": { + "name": "sass/sass-spec", + "version": "2021.11.30", + "source": { + "type": "git", + "url": "https://github.com/sass/sass-spec.git", + "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a", + "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a", + "shasum": "" + } + } + }, + { + "type": "package", + "package": { + "name": "thoughtbot/bourbon", + "version": "v7.0.0", + "source": { + "type": "git", + "url": "https://github.com/thoughtbot/bourbon.git", + "reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thoughtbot/bourbon/zipball/fbe338ee6807e7f7aa996d82c8a16f248bb149b3", + "reference": "fbe338ee6807e7f7aa996d82c8a16f248bb149b3", + "shasum": "" + } + } + }, + { + "type": "package", + "package": { + "name": "twbs/bootstrap4", + "version": "v4.6.1", + "source": { + "type": "git", + "url": "https://github.com/twbs/bootstrap.git", + "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/043a03c95a2ad6738f85b65e53b9dbdfb03b8d10", + "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10", + "shasum": "" + } + } + } + ], + "bin": ["bin/pscss"], + "config": { + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/phpcs.xml.dist b/dev/plugins/admin/vendor/scssphp/scssphp/phpcs.xml.dist new file mode 100644 index 00000000..b162dbd6 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/phpcs.xml.dist @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/scss.inc.php b/dev/plugins/admin/vendor/scssphp/scssphp/scss.inc.php new file mode 100644 index 00000000..45983780 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/scss.inc.php @@ -0,0 +1,21 @@ + + * + * @internal + */ +class Range +{ + /** + * @var float|int + */ + public $first; + + /** + * @var float|int + */ + public $last; + + /** + * Initialize range + * + * @param int|float $first + * @param int|float $last + */ + public function __construct($first, $last) + { + $this->first = $first; + $this->last = $last; + } + + /** + * Test for inclusion in range + * + * @param int|float $value + * + * @return bool + */ + public function includes($value) + { + return $value >= $this->first && $value <= $this->last; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block.php new file mode 100644 index 00000000..96668dc6 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block.php @@ -0,0 +1,73 @@ + + * + * @internal + */ +class Block +{ + /** + * @var string|null + */ + public $type; + + /** + * @var Block|null + */ + public $parent; + + /** + * @var string + */ + public $sourceName; + + /** + * @var int + */ + public $sourceIndex; + + /** + * @var int + */ + public $sourceLine; + + /** + * @var int + */ + public $sourceColumn; + + /** + * @var array|null + */ + public $selectors; + + /** + * @var array + */ + public $comments; + + /** + * @var array + */ + public $children; + + /** + * @var Block|null + */ + public $selfParent; +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/AtRootBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/AtRootBlock.php new file mode 100644 index 00000000..41842c26 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/AtRootBlock.php @@ -0,0 +1,37 @@ +type = Type::T_AT_ROOT; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/CallableBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/CallableBlock.php new file mode 100644 index 00000000..a18a87c2 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/CallableBlock.php @@ -0,0 +1,45 @@ +type = $type; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ContentBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ContentBlock.php new file mode 100644 index 00000000..87084980 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ContentBlock.php @@ -0,0 +1,38 @@ +type = Type::T_INCLUDE; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php new file mode 100644 index 00000000..b1d3d1a8 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php @@ -0,0 +1,37 @@ +type = Type::T_DIRECTIVE; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/EachBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/EachBlock.php new file mode 100644 index 00000000..b3289579 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/EachBlock.php @@ -0,0 +1,37 @@ +type = Type::T_EACH; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ElseBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ElseBlock.php new file mode 100644 index 00000000..6abb4d77 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ElseBlock.php @@ -0,0 +1,27 @@ +type = Type::T_ELSE; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ElseifBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ElseifBlock.php new file mode 100644 index 00000000..4622bca7 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ElseifBlock.php @@ -0,0 +1,32 @@ +type = Type::T_ELSEIF; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ForBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ForBlock.php new file mode 100644 index 00000000..a9cf6733 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/ForBlock.php @@ -0,0 +1,47 @@ +type = Type::T_FOR; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/IfBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/IfBlock.php new file mode 100644 index 00000000..9f21bf88 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/IfBlock.php @@ -0,0 +1,37 @@ + + */ + public $cases = []; + + public function __construct() + { + $this->type = Type::T_IF; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/MediaBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/MediaBlock.php new file mode 100644 index 00000000..c49ee1b2 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/MediaBlock.php @@ -0,0 +1,37 @@ +type = Type::T_MEDIA; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/NestedPropertyBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/NestedPropertyBlock.php new file mode 100644 index 00000000..1ea4a6c8 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/NestedPropertyBlock.php @@ -0,0 +1,37 @@ +type = Type::T_NESTED_PROPERTY; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/WhileBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/WhileBlock.php new file mode 100644 index 00000000..ac18d4e0 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Block/WhileBlock.php @@ -0,0 +1,32 @@ +type = Type::T_WHILE; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Cache.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Cache.php new file mode 100644 index 00000000..9731c60a --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Cache.php @@ -0,0 +1,272 @@ + + * + * @internal + */ +class Cache +{ + const CACHE_VERSION = 1; + + /** + * directory used for storing data + * + * @var string|false + */ + public static $cacheDir = false; + + /** + * prefix for the storing data + * + * @var string + */ + public static $prefix = 'scssphp_'; + + /** + * force a refresh : 'once' for refreshing the first hit on a cache only, true to never use the cache in this hit + * + * @var bool|string + */ + public static $forceRefresh = false; + + /** + * specifies the number of seconds after which data cached will be seen as 'garbage' and potentially cleaned up + * + * @var int + */ + public static $gcLifetime = 604800; + + /** + * array of already refreshed cache if $forceRefresh==='once' + * + * @var array + */ + protected static $refreshed = []; + + /** + * Constructor + * + * @param array $options + * + * @phpstan-param array{cacheDir?: string, prefix?: string, forceRefresh?: string} $options + */ + public function __construct($options) + { + // check $cacheDir + if (isset($options['cacheDir'])) { + self::$cacheDir = $options['cacheDir']; + } + + if (empty(self::$cacheDir)) { + throw new Exception('cacheDir not set'); + } + + if (isset($options['prefix'])) { + self::$prefix = $options['prefix']; + } + + if (empty(self::$prefix)) { + throw new Exception('prefix not set'); + } + + if (isset($options['forceRefresh'])) { + self::$forceRefresh = $options['forceRefresh']; + } + + self::checkCacheDir(); + } + + /** + * Get the cached result of $operation on $what, + * which is known as dependant from the content of $options + * + * @param string $operation parse, compile... + * @param mixed $what content key (e.g., filename to be treated) + * @param array $options any option that affect the operation result on the content + * @param int|null $lastModified last modified timestamp + * + * @return mixed + * + * @throws \Exception + */ + public function getCache($operation, $what, $options = [], $lastModified = null) + { + $fileCache = self::$cacheDir . self::cacheName($operation, $what, $options); + + if ( + ((self::$forceRefresh === false) || (self::$forceRefresh === 'once' && + isset(self::$refreshed[$fileCache]))) && file_exists($fileCache) + ) { + $cacheTime = filemtime($fileCache); + + if ( + (\is_null($lastModified) || $cacheTime > $lastModified) && + $cacheTime + self::$gcLifetime > time() + ) { + $c = file_get_contents($fileCache); + $c = unserialize($c); + + if (\is_array($c) && isset($c['value'])) { + return $c['value']; + } + } + } + + return null; + } + + /** + * Put in cache the result of $operation on $what, + * which is known as dependant from the content of $options + * + * @param string $operation + * @param mixed $what + * @param mixed $value + * @param array $options + * + * @return void + */ + public function setCache($operation, $what, $value, $options = []) + { + $fileCache = self::$cacheDir . self::cacheName($operation, $what, $options); + + $c = ['value' => $value]; + $c = serialize($c); + + file_put_contents($fileCache, $c); + + if (self::$forceRefresh === 'once') { + self::$refreshed[$fileCache] = true; + } + } + + /** + * Get the cache name for the caching of $operation on $what, + * which is known as dependant from the content of $options + * + * @param string $operation + * @param mixed $what + * @param array $options + * + * @return string + */ + private static function cacheName($operation, $what, $options = []) + { + $t = [ + 'version' => self::CACHE_VERSION, + 'scssphpVersion' => Version::VERSION, + 'operation' => $operation, + 'what' => $what, + 'options' => $options + ]; + + $t = self::$prefix + . sha1(json_encode($t)) + . ".$operation" + . ".scsscache"; + + return $t; + } + + /** + * Check that the cache dir exists and is writeable + * + * @return void + * + * @throws \Exception + */ + public static function checkCacheDir() + { + self::$cacheDir = str_replace('\\', '/', self::$cacheDir); + self::$cacheDir = rtrim(self::$cacheDir, '/') . '/'; + + if (! is_dir(self::$cacheDir)) { + throw new Exception('Cache directory doesn\'t exist: ' . self::$cacheDir); + } + + if (! is_writable(self::$cacheDir)) { + throw new Exception('Cache directory isn\'t writable: ' . self::$cacheDir); + } + } + + /** + * Delete unused cached files + * + * @return void + */ + public static function cleanCache() + { + static $clean = false; + + if ($clean || empty(self::$cacheDir)) { + return; + } + + $clean = true; + + // only remove files with extensions created by SCSSPHP Cache + // css files removed based on the list files + $removeTypes = ['scsscache' => 1]; + + $files = scandir(self::$cacheDir); + + if (! $files) { + return; + } + + $checkTime = time() - self::$gcLifetime; + + foreach ($files as $file) { + // don't delete if the file wasn't created with SCSSPHP Cache + if (strpos($file, self::$prefix) !== 0) { + continue; + } + + $parts = explode('.', $file); + $type = array_pop($parts); + + if (! isset($removeTypes[$type])) { + continue; + } + + $fullPath = self::$cacheDir . $file; + $mtime = filemtime($fullPath); + + // don't delete if it's a relatively new file + if ($mtime > $checkTime) { + continue; + } + + unlink($fullPath); + } + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Colors.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Colors.php new file mode 100644 index 00000000..2df39992 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Colors.php @@ -0,0 +1,247 @@ + + * + * @internal + */ +class Colors +{ + /** + * CSS Colors + * + * @see http://www.w3.org/TR/css3-color + * + * @var array + */ + protected static $cssColors = [ + 'aliceblue' => '240,248,255', + 'antiquewhite' => '250,235,215', + 'aqua' => '0,255,255', + 'cyan' => '0,255,255', + 'aquamarine' => '127,255,212', + 'azure' => '240,255,255', + 'beige' => '245,245,220', + 'bisque' => '255,228,196', + 'black' => '0,0,0', + 'blanchedalmond' => '255,235,205', + 'blue' => '0,0,255', + 'blueviolet' => '138,43,226', + 'brown' => '165,42,42', + 'burlywood' => '222,184,135', + 'cadetblue' => '95,158,160', + 'chartreuse' => '127,255,0', + 'chocolate' => '210,105,30', + 'coral' => '255,127,80', + 'cornflowerblue' => '100,149,237', + 'cornsilk' => '255,248,220', + 'crimson' => '220,20,60', + 'darkblue' => '0,0,139', + 'darkcyan' => '0,139,139', + 'darkgoldenrod' => '184,134,11', + 'darkgray' => '169,169,169', + 'darkgrey' => '169,169,169', + 'darkgreen' => '0,100,0', + 'darkkhaki' => '189,183,107', + 'darkmagenta' => '139,0,139', + 'darkolivegreen' => '85,107,47', + 'darkorange' => '255,140,0', + 'darkorchid' => '153,50,204', + 'darkred' => '139,0,0', + 'darksalmon' => '233,150,122', + 'darkseagreen' => '143,188,143', + 'darkslateblue' => '72,61,139', + 'darkslategray' => '47,79,79', + 'darkslategrey' => '47,79,79', + 'darkturquoise' => '0,206,209', + 'darkviolet' => '148,0,211', + 'deeppink' => '255,20,147', + 'deepskyblue' => '0,191,255', + 'dimgray' => '105,105,105', + 'dimgrey' => '105,105,105', + 'dodgerblue' => '30,144,255', + 'firebrick' => '178,34,34', + 'floralwhite' => '255,250,240', + 'forestgreen' => '34,139,34', + 'fuchsia' => '255,0,255', + 'magenta' => '255,0,255', + 'gainsboro' => '220,220,220', + 'ghostwhite' => '248,248,255', + 'gold' => '255,215,0', + 'goldenrod' => '218,165,32', + 'gray' => '128,128,128', + 'grey' => '128,128,128', + 'green' => '0,128,0', + 'greenyellow' => '173,255,47', + 'honeydew' => '240,255,240', + 'hotpink' => '255,105,180', + 'indianred' => '205,92,92', + 'indigo' => '75,0,130', + 'ivory' => '255,255,240', + 'khaki' => '240,230,140', + 'lavender' => '230,230,250', + 'lavenderblush' => '255,240,245', + 'lawngreen' => '124,252,0', + 'lemonchiffon' => '255,250,205', + 'lightblue' => '173,216,230', + 'lightcoral' => '240,128,128', + 'lightcyan' => '224,255,255', + 'lightgoldenrodyellow' => '250,250,210', + 'lightgray' => '211,211,211', + 'lightgrey' => '211,211,211', + 'lightgreen' => '144,238,144', + 'lightpink' => '255,182,193', + 'lightsalmon' => '255,160,122', + 'lightseagreen' => '32,178,170', + 'lightskyblue' => '135,206,250', + 'lightslategray' => '119,136,153', + 'lightslategrey' => '119,136,153', + 'lightsteelblue' => '176,196,222', + 'lightyellow' => '255,255,224', + 'lime' => '0,255,0', + 'limegreen' => '50,205,50', + 'linen' => '250,240,230', + 'maroon' => '128,0,0', + 'mediumaquamarine' => '102,205,170', + 'mediumblue' => '0,0,205', + 'mediumorchid' => '186,85,211', + 'mediumpurple' => '147,112,219', + 'mediumseagreen' => '60,179,113', + 'mediumslateblue' => '123,104,238', + 'mediumspringgreen' => '0,250,154', + 'mediumturquoise' => '72,209,204', + 'mediumvioletred' => '199,21,133', + 'midnightblue' => '25,25,112', + 'mintcream' => '245,255,250', + 'mistyrose' => '255,228,225', + 'moccasin' => '255,228,181', + 'navajowhite' => '255,222,173', + 'navy' => '0,0,128', + 'oldlace' => '253,245,230', + 'olive' => '128,128,0', + 'olivedrab' => '107,142,35', + 'orange' => '255,165,0', + 'orangered' => '255,69,0', + 'orchid' => '218,112,214', + 'palegoldenrod' => '238,232,170', + 'palegreen' => '152,251,152', + 'paleturquoise' => '175,238,238', + 'palevioletred' => '219,112,147', + 'papayawhip' => '255,239,213', + 'peachpuff' => '255,218,185', + 'peru' => '205,133,63', + 'pink' => '255,192,203', + 'plum' => '221,160,221', + 'powderblue' => '176,224,230', + 'purple' => '128,0,128', + 'red' => '255,0,0', + 'rosybrown' => '188,143,143', + 'royalblue' => '65,105,225', + 'saddlebrown' => '139,69,19', + 'salmon' => '250,128,114', + 'sandybrown' => '244,164,96', + 'seagreen' => '46,139,87', + 'seashell' => '255,245,238', + 'sienna' => '160,82,45', + 'silver' => '192,192,192', + 'skyblue' => '135,206,235', + 'slateblue' => '106,90,205', + 'slategray' => '112,128,144', + 'slategrey' => '112,128,144', + 'snow' => '255,250,250', + 'springgreen' => '0,255,127', + 'steelblue' => '70,130,180', + 'tan' => '210,180,140', + 'teal' => '0,128,128', + 'thistle' => '216,191,216', + 'tomato' => '255,99,71', + 'turquoise' => '64,224,208', + 'violet' => '238,130,238', + 'wheat' => '245,222,179', + 'white' => '255,255,255', + 'whitesmoke' => '245,245,245', + 'yellow' => '255,255,0', + 'yellowgreen' => '154,205,50', + 'rebeccapurple' => '102,51,153', + 'transparent' => '0,0,0,0', + ]; + + /** + * Convert named color in a [r,g,b[,a]] array + * + * @param string $colorName + * + * @return int[]|null + */ + public static function colorNameToRGBa($colorName) + { + if (\is_string($colorName) && isset(static::$cssColors[$colorName])) { + $rgba = explode(',', static::$cssColors[$colorName]); + + // only case with opacity is transparent, with opacity=0, so we can intval on opacity also + $rgba = array_map('intval', $rgba); + + return $rgba; + } + + return null; + } + + /** + * Reverse conversion : from RGBA to a color name if possible + * + * @param int $r + * @param int $g + * @param int $b + * @param int|float $a + * + * @return string|null + */ + public static function RGBaToColorName($r, $g, $b, $a = 1) + { + static $reverseColorTable = null; + + if (! is_numeric($r) || ! is_numeric($g) || ! is_numeric($b) || ! is_numeric($a)) { + return null; + } + + if ($a < 1) { + return null; + } + + if (\is_null($reverseColorTable)) { + $reverseColorTable = []; + + foreach (static::$cssColors as $name => $rgb_str) { + $rgb_str = explode(',', $rgb_str); + + if ( + \count($rgb_str) == 3 && + ! isset($reverseColorTable[\intval($rgb_str[0])][\intval($rgb_str[1])][\intval($rgb_str[2])]) + ) { + $reverseColorTable[\intval($rgb_str[0])][\intval($rgb_str[1])][\intval($rgb_str[2])] = $name; + } + } + } + + if (isset($reverseColorTable[\intval($r)][\intval($g)][\intval($b)])) { + return $reverseColorTable[\intval($r)][\intval($g)][\intval($b)]; + } + + return null; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/CompilationResult.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/CompilationResult.php new file mode 100644 index 00000000..36adb0da --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/CompilationResult.php @@ -0,0 +1,69 @@ +css = $css; + $this->sourceMap = $sourceMap; + $this->includedFiles = $includedFiles; + } + + /** + * @return string + */ + public function getCss() + { + return $this->css; + } + + /** + * @return string[] + */ + public function getIncludedFiles() + { + return $this->includedFiles; + } + + /** + * The sourceMap content, if it was generated + * + * @return null|string + */ + public function getSourceMap() + { + return $this->sourceMap; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler.php new file mode 100644 index 00000000..b6ef0272 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler.php @@ -0,0 +1,10355 @@ + + * + * @final Extending the Compiler is deprecated + */ +class Compiler +{ + /** + * @deprecated + */ + const LINE_COMMENTS = 1; + /** + * @deprecated + */ + const DEBUG_INFO = 2; + + /** + * @deprecated + */ + const WITH_RULE = 1; + /** + * @deprecated + */ + const WITH_MEDIA = 2; + /** + * @deprecated + */ + const WITH_SUPPORTS = 4; + /** + * @deprecated + */ + const WITH_ALL = 7; + + const SOURCE_MAP_NONE = 0; + const SOURCE_MAP_INLINE = 1; + const SOURCE_MAP_FILE = 2; + + /** + * @var array + */ + protected static $operatorNames = [ + '+' => 'add', + '-' => 'sub', + '*' => 'mul', + '/' => 'div', + '%' => 'mod', + + '==' => 'eq', + '!=' => 'neq', + '<' => 'lt', + '>' => 'gt', + + '<=' => 'lte', + '>=' => 'gte', + ]; + + /** + * @var array + */ + protected static $namespaces = [ + 'special' => '%', + 'mixin' => '@', + 'function' => '^', + ]; + + public static $true = [Type::T_KEYWORD, 'true']; + public static $false = [Type::T_KEYWORD, 'false']; + /** @deprecated */ + public static $NaN = [Type::T_KEYWORD, 'NaN']; + /** @deprecated */ + public static $Infinity = [Type::T_KEYWORD, 'Infinity']; + public static $null = [Type::T_NULL]; + public static $nullString = [Type::T_STRING, '', []]; + public static $defaultValue = [Type::T_KEYWORD, '']; + public static $selfSelector = [Type::T_SELF]; + public static $emptyList = [Type::T_LIST, '', []]; + public static $emptyMap = [Type::T_MAP, [], []]; + public static $emptyString = [Type::T_STRING, '"', []]; + public static $with = [Type::T_KEYWORD, 'with']; + public static $without = [Type::T_KEYWORD, 'without']; + private static $emptyArgumentList = [Type::T_LIST, '', [], []]; + + /** + * @var array + */ + protected $importPaths = []; + /** + * @var array + */ + protected $importCache = []; + + /** + * @var string[] + */ + protected $importedFiles = []; + + /** + * @var array + * @phpstan-var array + */ + protected $userFunctions = []; + /** + * @var array + */ + protected $registeredVars = []; + /** + * @var array + */ + protected $registeredFeatures = [ + 'extend-selector-pseudoclass' => false, + 'at-error' => true, + 'units-level-3' => true, + 'global-variable-shadowing' => false, + ]; + + /** + * @var string|null + */ + protected $encoding = null; + /** + * @var null + * @deprecated + */ + protected $lineNumberStyle = null; + + /** + * @var int|SourceMapGenerator + * @phpstan-var self::SOURCE_MAP_*|SourceMapGenerator + */ + protected $sourceMap = self::SOURCE_MAP_NONE; + + /** + * @var array + * @phpstan-var array{sourceRoot?: string, sourceMapFilename?: string|null, sourceMapURL?: string|null, sourceMapWriteTo?: string|null, outputSourceFiles?: bool, sourceMapRootpath?: string, sourceMapBasepath?: string} + */ + protected $sourceMapOptions = []; + + /** + * @var bool + */ + private $charset = true; + + /** + * @var string|\ScssPhp\ScssPhp\Formatter + */ + protected $formatter = Expanded::class; + + /** + * @var Environment + */ + protected $rootEnv; + /** + * @var OutputBlock|null + */ + protected $rootBlock; + + /** + * @var \ScssPhp\ScssPhp\Compiler\Environment + */ + protected $env; + /** + * @var OutputBlock|null + */ + protected $scope; + /** + * @var Environment|null + */ + protected $storeEnv; + /** + * @var bool|null + * + * @deprecated + */ + protected $charsetSeen; + /** + * @var array + */ + protected $sourceNames; + + /** + * @var Cache|null + */ + protected $cache; + + /** + * @var bool + */ + protected $cacheCheckImportResolutions = false; + + /** + * @var int + */ + protected $indentLevel; + /** + * @var array[] + */ + protected $extends; + /** + * @var array + */ + protected $extendsMap; + + /** + * @var array + */ + protected $parsedFiles = []; + + /** + * @var Parser|null + */ + protected $parser; + /** + * @var int|null + */ + protected $sourceIndex; + /** + * @var int|null + */ + protected $sourceLine; + /** + * @var int|null + */ + protected $sourceColumn; + /** + * @var bool|null + */ + protected $shouldEvaluate; + /** + * @var null + * @deprecated + */ + protected $ignoreErrors; + /** + * @var bool + */ + protected $ignoreCallStackMessage = false; + + /** + * @var array[] + */ + protected $callStack = []; + + /** + * @var array + * @phpstan-var list + */ + private $resolvedImports = []; + + /** + * The directory of the currently processed file + * + * @var string|null + */ + private $currentDirectory; + + /** + * The directory of the input file + * + * @var string + */ + private $rootDirectory; + + /** + * @var bool + */ + private $legacyCwdImportPath = true; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * @var array + */ + private $warnedChildFunctions = []; + + /** + * Constructor + * + * @param array|null $cacheOptions + * @phpstan-param array{cacheDir?: string, prefix?: string, forceRefresh?: string, checkImportResolutions?: bool}|null $cacheOptions + */ + public function __construct($cacheOptions = null) + { + $this->sourceNames = []; + + if ($cacheOptions) { + $this->cache = new Cache($cacheOptions); + if (!empty($cacheOptions['checkImportResolutions'])) { + $this->cacheCheckImportResolutions = true; + } + } + + $this->logger = new StreamLogger(fopen('php://stderr', 'w'), true); + } + + /** + * Get compiler options + * + * @return array + * + * @internal + */ + public function getCompileOptions() + { + $options = [ + 'importPaths' => $this->importPaths, + 'registeredVars' => $this->registeredVars, + 'registeredFeatures' => $this->registeredFeatures, + 'encoding' => $this->encoding, + 'sourceMap' => serialize($this->sourceMap), + 'sourceMapOptions' => $this->sourceMapOptions, + 'formatter' => $this->formatter, + 'legacyImportPath' => $this->legacyCwdImportPath, + ]; + + return $options; + } + + /** + * Sets an alternative logger. + * + * Changing the logger in the middle of the compilation is not + * supported and will result in an undefined behavior. + * + * @param LoggerInterface $logger + * + * @return void + */ + public function setLogger(LoggerInterface $logger) + { + $this->logger = $logger; + } + + /** + * Set an alternative error output stream, for testing purpose only + * + * @param resource $handle + * + * @return void + * + * @deprecated Use {@see setLogger} instead + */ + public function setErrorOuput($handle) + { + @trigger_error('The method "setErrorOuput" is deprecated. Use "setLogger" instead.', E_USER_DEPRECATED); + + $this->logger = new StreamLogger($handle); + } + + /** + * Compile scss + * + * @param string $code + * @param string|null $path + * + * @return string + * + * @throws SassException when the source fails to compile + * + * @deprecated Use {@see compileString} instead. + */ + public function compile($code, $path = null) + { + @trigger_error(sprintf('The "%s" method is deprecated. Use "compileString" instead.', __METHOD__), E_USER_DEPRECATED); + + $result = $this->compileString($code, $path); + + $sourceMap = $result->getSourceMap(); + + if ($sourceMap !== null) { + if ($this->sourceMap instanceof SourceMapGenerator) { + $this->sourceMap->saveMap($sourceMap); + } elseif ($this->sourceMap === self::SOURCE_MAP_FILE) { + $sourceMapGenerator = new SourceMapGenerator($this->sourceMapOptions); + $sourceMapGenerator->saveMap($sourceMap); + } + } + + return $result->getCss(); + } + + /** + * Compile scss + * + * @param string $source + * @param string|null $path + * + * @return CompilationResult + * + * @throws SassException when the source fails to compile + */ + public function compileString($source, $path = null) + { + if ($this->cache) { + $cacheKey = ($path ? $path : '(stdin)') . ':' . md5($source); + $compileOptions = $this->getCompileOptions(); + $cachedResult = $this->cache->getCache('compile', $cacheKey, $compileOptions); + + if ($cachedResult instanceof CachedResult && $this->isFreshCachedResult($cachedResult)) { + return $cachedResult->getResult(); + } + } + + $this->indentLevel = -1; + $this->extends = []; + $this->extendsMap = []; + $this->sourceIndex = null; + $this->sourceLine = null; + $this->sourceColumn = null; + $this->env = null; + $this->scope = null; + $this->storeEnv = null; + $this->shouldEvaluate = null; + $this->ignoreCallStackMessage = false; + $this->parsedFiles = []; + $this->importedFiles = []; + $this->resolvedImports = []; + + if (!\is_null($path) && is_file($path)) { + $path = realpath($path) ?: $path; + $this->currentDirectory = dirname($path); + $this->rootDirectory = $this->currentDirectory; + } else { + $this->currentDirectory = null; + $this->rootDirectory = getcwd(); + } + + try { + $this->parser = $this->parserFactory($path); + $tree = $this->parser->parse($source); + $this->parser = null; + + $this->formatter = new $this->formatter(); + $this->rootBlock = null; + $this->rootEnv = $this->pushEnv($tree); + + $warnCallback = function ($message, $deprecation) { + $this->logger->warn($message, $deprecation); + }; + $previousWarnCallback = Warn::setCallback($warnCallback); + + try { + $this->injectVariables($this->registeredVars); + $this->compileRoot($tree); + $this->popEnv(); + } finally { + Warn::setCallback($previousWarnCallback); + } + + $sourceMapGenerator = null; + + if ($this->sourceMap) { + if (\is_object($this->sourceMap) && $this->sourceMap instanceof SourceMapGenerator) { + $sourceMapGenerator = $this->sourceMap; + $this->sourceMap = self::SOURCE_MAP_FILE; + } elseif ($this->sourceMap !== self::SOURCE_MAP_NONE) { + $sourceMapGenerator = new SourceMapGenerator($this->sourceMapOptions); + } + } + + $out = $this->formatter->format($this->scope, $sourceMapGenerator); + + $prefix = ''; + + if ($this->charset && strlen($out) !== Util::mbStrlen($out)) { + $prefix = '@charset "UTF-8";' . "\n"; + $out = $prefix . $out; + } + + $sourceMap = null; + + if (! empty($out) && $this->sourceMap && $this->sourceMap !== self::SOURCE_MAP_NONE) { + $sourceMap = $sourceMapGenerator->generateJson($prefix); + $sourceMapUrl = null; + + switch ($this->sourceMap) { + case self::SOURCE_MAP_INLINE: + $sourceMapUrl = sprintf('data:application/json,%s', Util::encodeURIComponent($sourceMap)); + break; + + case self::SOURCE_MAP_FILE: + if (isset($this->sourceMapOptions['sourceMapURL'])) { + $sourceMapUrl = $this->sourceMapOptions['sourceMapURL']; + } + break; + } + + if ($sourceMapUrl !== null) { + $out .= sprintf('/*# sourceMappingURL=%s */', $sourceMapUrl); + } + } + } catch (SassScriptException $e) { + throw new CompilerException($this->addLocationToMessage($e->getMessage()), 0, $e); + } + + $includedFiles = []; + + foreach ($this->resolvedImports as $resolvedImport) { + $includedFiles[$resolvedImport['filePath']] = $resolvedImport['filePath']; + } + + $result = new CompilationResult($out, $sourceMap, array_values($includedFiles)); + + if ($this->cache && isset($cacheKey) && isset($compileOptions)) { + $this->cache->setCache('compile', $cacheKey, new CachedResult($result, $this->parsedFiles, $this->resolvedImports), $compileOptions); + } + + // Reset state to free memory + // TODO in 2.0, reset parsedFiles as well when the getter is removed. + $this->resolvedImports = []; + $this->importedFiles = []; + + return $result; + } + + /** + * @param CachedResult $result + * + * @return bool + */ + private function isFreshCachedResult(CachedResult $result) + { + // check if any dependency file changed since the result was compiled + foreach ($result->getParsedFiles() as $file => $mtime) { + if (! is_file($file) || filemtime($file) !== $mtime) { + return false; + } + } + + if ($this->cacheCheckImportResolutions) { + $resolvedImports = []; + + foreach ($result->getResolvedImports() as $import) { + $currentDir = $import['currentDir']; + $path = $import['path']; + // store the check across all the results in memory to avoid multiple findImport() on the same path + // with same context. + // this is happening in a same hit with multiple compilations (especially with big frameworks) + if (empty($resolvedImports[$currentDir][$path])) { + $resolvedImports[$currentDir][$path] = $this->findImport($path, $currentDir); + } + + if ($resolvedImports[$currentDir][$path] !== $import['filePath']) { + return false; + } + } + } + + return true; + } + + /** + * Instantiate parser + * + * @param string|null $path + * + * @return \ScssPhp\ScssPhp\Parser + */ + protected function parserFactory($path) + { + // https://sass-lang.com/documentation/at-rules/import + // CSS files imported by Sass don’t allow any special Sass features. + // In order to make sure authors don’t accidentally write Sass in their CSS, + // all Sass features that aren’t also valid CSS will produce errors. + // Otherwise, the CSS will be rendered as-is. It can even be extended! + $cssOnly = false; + + if ($path !== null && substr($path, -4) === '.css') { + $cssOnly = true; + } + + $parser = new Parser($path, \count($this->sourceNames), $this->encoding, $this->cache, $cssOnly, $this->logger); + + $this->sourceNames[] = $path; + $this->addParsedFile($path); + + return $parser; + } + + /** + * Is self extend? + * + * @param array $target + * @param array $origin + * + * @return bool + */ + protected function isSelfExtend($target, $origin) + { + foreach ($origin as $sel) { + if (\in_array($target, $sel)) { + return true; + } + } + + return false; + } + + /** + * Push extends + * + * @param array $target + * @param array $origin + * @param array|null $block + * + * @return void + */ + protected function pushExtends($target, $origin, $block) + { + $i = \count($this->extends); + $this->extends[] = [$target, $origin, $block]; + + foreach ($target as $part) { + if (isset($this->extendsMap[$part])) { + $this->extendsMap[$part][] = $i; + } else { + $this->extendsMap[$part] = [$i]; + } + } + } + + /** + * Make output block + * + * @param string|null $type + * @param string[]|null $selectors + * + * @return \ScssPhp\ScssPhp\Formatter\OutputBlock + */ + protected function makeOutputBlock($type, $selectors = null) + { + $out = new OutputBlock(); + $out->type = $type; + $out->lines = []; + $out->children = []; + $out->parent = $this->scope; + $out->selectors = $selectors; + $out->depth = $this->env->depth; + + if ($this->env->block instanceof Block) { + $out->sourceName = $this->env->block->sourceName; + $out->sourceLine = $this->env->block->sourceLine; + $out->sourceColumn = $this->env->block->sourceColumn; + } else { + $out->sourceName = null; + $out->sourceLine = null; + $out->sourceColumn = null; + } + + return $out; + } + + /** + * Compile root + * + * @param \ScssPhp\ScssPhp\Block $rootBlock + * + * @return void + */ + protected function compileRoot(Block $rootBlock) + { + $this->rootBlock = $this->scope = $this->makeOutputBlock(Type::T_ROOT); + + $this->compileChildrenNoReturn($rootBlock->children, $this->scope); + $this->flattenSelectors($this->scope); + $this->missingSelectors(); + } + + /** + * Report missing selectors + * + * @return void + */ + protected function missingSelectors() + { + foreach ($this->extends as $extend) { + if (isset($extend[3])) { + continue; + } + + list($target, $origin, $block) = $extend; + + // ignore if !optional + if ($block[2]) { + continue; + } + + $target = implode(' ', $target); + $origin = $this->collapseSelectors($origin); + + $this->sourceLine = $block[Parser::SOURCE_LINE]; + throw $this->error("\"$origin\" failed to @extend \"$target\". The selector \"$target\" was not found."); + } + } + + /** + * Flatten selectors + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * @param string $parentKey + * + * @return void + */ + protected function flattenSelectors(OutputBlock $block, $parentKey = null) + { + if ($block->selectors) { + $selectors = []; + + foreach ($block->selectors as $s) { + $selectors[] = $s; + + if (! \is_array($s)) { + continue; + } + + // check extends + if (! empty($this->extendsMap)) { + $this->matchExtends($s, $selectors); + + // remove duplicates + array_walk($selectors, function (&$value) { + $value = serialize($value); + }); + + $selectors = array_unique($selectors); + + array_walk($selectors, function (&$value) { + $value = unserialize($value); + }); + } + } + + $block->selectors = []; + $placeholderSelector = false; + + foreach ($selectors as $selector) { + if ($this->hasSelectorPlaceholder($selector)) { + $placeholderSelector = true; + continue; + } + + $block->selectors[] = $this->compileSelector($selector); + } + + if ($placeholderSelector && 0 === \count($block->selectors) && null !== $parentKey) { + unset($block->parent->children[$parentKey]); + + return; + } + } + + foreach ($block->children as $key => $child) { + $this->flattenSelectors($child, $key); + } + } + + /** + * Glue parts of :not( or :nth-child( ... that are in general split in selectors parts + * + * @param array $parts + * + * @return array + */ + protected function glueFunctionSelectors($parts) + { + $new = []; + + foreach ($parts as $part) { + if (\is_array($part)) { + $part = $this->glueFunctionSelectors($part); + $new[] = $part; + } else { + // a selector part finishing with a ) is the last part of a :not( or :nth-child( + // and need to be joined to this + if ( + \count($new) && \is_string($new[\count($new) - 1]) && + \strlen($part) && substr($part, -1) === ')' && strpos($part, '(') === false + ) { + while (\count($new) > 1 && substr($new[\count($new) - 1], -1) !== '(') { + $part = array_pop($new) . $part; + } + $new[\count($new) - 1] .= $part; + } else { + $new[] = $part; + } + } + } + + return $new; + } + + /** + * Match extends + * + * @param array $selector + * @param array $out + * @param int $from + * @param bool $initial + * + * @return void + */ + protected function matchExtends($selector, &$out, $from = 0, $initial = true) + { + static $partsPile = []; + $selector = $this->glueFunctionSelectors($selector); + + if (\count($selector) == 1 && \in_array(reset($selector), $partsPile)) { + return; + } + + $outRecurs = []; + + foreach ($selector as $i => $part) { + if ($i < $from) { + continue; + } + + // check that we are not building an infinite loop of extensions + // if the new part is just including a previous part don't try to extend anymore + if (\count($part) > 1) { + foreach ($partsPile as $previousPart) { + if (! \count(array_diff($previousPart, $part))) { + continue 2; + } + } + } + + $partsPile[] = $part; + + if ($this->matchExtendsSingle($part, $origin, $initial)) { + $after = \array_slice($selector, $i + 1); + $before = \array_slice($selector, 0, $i); + list($before, $nonBreakableBefore) = $this->extractRelationshipFromFragment($before); + + foreach ($origin as $new) { + $k = 0; + + // remove shared parts + if (\count($new) > 1) { + while ($k < $i && isset($new[$k]) && $selector[$k] === $new[$k]) { + $k++; + } + } + + if (\count($nonBreakableBefore) && $k === \count($new)) { + $k--; + } + + $replacement = []; + $tempReplacement = $k > 0 ? \array_slice($new, $k) : $new; + + for ($l = \count($tempReplacement) - 1; $l >= 0; $l--) { + $slice = []; + + foreach ($tempReplacement[$l] as $chunk) { + if (! \in_array($chunk, $slice)) { + $slice[] = $chunk; + } + } + + array_unshift($replacement, $slice); + + if (! $this->isImmediateRelationshipCombinator(end($slice))) { + break; + } + } + + $afterBefore = $l != 0 ? \array_slice($tempReplacement, 0, $l) : []; + + // Merge shared direct relationships. + $mergedBefore = $this->mergeDirectRelationships($afterBefore, $nonBreakableBefore); + + $result = array_merge( + $before, + $mergedBefore, + $replacement, + $after + ); + + if ($result === $selector) { + continue; + } + + $this->pushOrMergeExtentedSelector($out, $result); + + // recursively check for more matches + $startRecurseFrom = \count($before) + min(\count($nonBreakableBefore), \count($mergedBefore)); + + if (\count($origin) > 1) { + $this->matchExtends($result, $out, $startRecurseFrom, false); + } else { + $this->matchExtends($result, $outRecurs, $startRecurseFrom, false); + } + + // selector sequence merging + if (! empty($before) && \count($new) > 1) { + $preSharedParts = $k > 0 ? \array_slice($before, 0, $k) : []; + $postSharedParts = $k > 0 ? \array_slice($before, $k) : $before; + + list($betweenSharedParts, $nonBreakabl2) = $this->extractRelationshipFromFragment($afterBefore); + + $result2 = array_merge( + $preSharedParts, + $betweenSharedParts, + $postSharedParts, + $nonBreakabl2, + $nonBreakableBefore, + $replacement, + $after + ); + + $this->pushOrMergeExtentedSelector($out, $result2); + } + } + } + array_pop($partsPile); + } + + while (\count($outRecurs)) { + $result = array_shift($outRecurs); + $this->pushOrMergeExtentedSelector($out, $result); + } + } + + /** + * Test a part for being a pseudo selector + * + * @param string $part + * @param array $matches + * + * @return bool + */ + protected function isPseudoSelector($part, &$matches) + { + if ( + strpos($part, ':') === 0 && + preg_match(",^::?([\w-]+)\((.+)\)$,", $part, $matches) + ) { + return true; + } + + return false; + } + + /** + * Push extended selector except if + * - this is a pseudo selector + * - same as previous + * - in a white list + * in this case we merge the pseudo selector content + * + * @param array $out + * @param array $extended + * + * @return void + */ + protected function pushOrMergeExtentedSelector(&$out, $extended) + { + if (\count($out) && \count($extended) === 1 && \count(reset($extended)) === 1) { + $single = reset($extended); + $part = reset($single); + + if ( + $this->isPseudoSelector($part, $matchesExtended) && + \in_array($matchesExtended[1], [ 'slotted' ]) + ) { + $prev = end($out); + $prev = $this->glueFunctionSelectors($prev); + + if (\count($prev) === 1 && \count(reset($prev)) === 1) { + $single = reset($prev); + $part = reset($single); + + if ( + $this->isPseudoSelector($part, $matchesPrev) && + $matchesPrev[1] === $matchesExtended[1] + ) { + $extended = explode($matchesExtended[1] . '(', $matchesExtended[0], 2); + $extended[1] = $matchesPrev[2] . ', ' . $extended[1]; + $extended = implode($matchesExtended[1] . '(', $extended); + $extended = [ [ $extended ]]; + array_pop($out); + } + } + } + } + $out[] = $extended; + } + + /** + * Match extends single + * + * @param array $rawSingle + * @param array $outOrigin + * @param bool $initial + * + * @return bool + */ + protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true) + { + $counts = []; + $single = []; + + // simple usual cases, no need to do the whole trick + if (\in_array($rawSingle, [['>'],['+'],['~']])) { + return false; + } + + foreach ($rawSingle as $part) { + // matches Number + if (! \is_string($part)) { + return false; + } + + if (! preg_match('/^[\[.:#%]/', $part) && \count($single)) { + $single[\count($single) - 1] .= $part; + } else { + $single[] = $part; + } + } + + $extendingDecoratedTag = false; + + if (\count($single) > 1) { + $matches = null; + $extendingDecoratedTag = preg_match('/^[a-z0-9]+$/i', $single[0], $matches) ? $matches[0] : false; + } + + $outOrigin = []; + $found = false; + + foreach ($single as $k => $part) { + if (isset($this->extendsMap[$part])) { + foreach ($this->extendsMap[$part] as $idx) { + $counts[$idx] = isset($counts[$idx]) ? $counts[$idx] + 1 : 1; + } + } + + if ( + $initial && + $this->isPseudoSelector($part, $matches) && + ! \in_array($matches[1], [ 'not' ]) + ) { + $buffer = $matches[2]; + $parser = $this->parserFactory(__METHOD__); + + if ($parser->parseSelector($buffer, $subSelectors, false)) { + foreach ($subSelectors as $ksub => $subSelector) { + $subExtended = []; + $this->matchExtends($subSelector, $subExtended, 0, false); + + if ($subExtended) { + $subSelectorsExtended = $subSelectors; + $subSelectorsExtended[$ksub] = $subExtended; + + foreach ($subSelectorsExtended as $ksse => $sse) { + $subSelectorsExtended[$ksse] = $this->collapseSelectors($sse); + } + + $subSelectorsExtended = implode(', ', $subSelectorsExtended); + $singleExtended = $single; + $singleExtended[$k] = str_replace('(' . $buffer . ')', "($subSelectorsExtended)", $part); + $outOrigin[] = [ $singleExtended ]; + $found = true; + } + } + } + } + } + + foreach ($counts as $idx => $count) { + list($target, $origin, /* $block */) = $this->extends[$idx]; + + $origin = $this->glueFunctionSelectors($origin); + + // check count + if ($count !== \count($target)) { + continue; + } + + $this->extends[$idx][3] = true; + + $rem = array_diff($single, $target); + + foreach ($origin as $j => $new) { + // prevent infinite loop when target extends itself + if ($this->isSelfExtend($single, $origin) && ! $initial) { + return false; + } + + $replacement = end($new); + + // Extending a decorated tag with another tag is not possible. + if ( + $extendingDecoratedTag && $replacement[0] != $extendingDecoratedTag && + preg_match('/^[a-z0-9]+$/i', $replacement[0]) + ) { + unset($origin[$j]); + continue; + } + + $combined = $this->combineSelectorSingle($replacement, $rem); + + if (\count(array_diff($combined, $origin[$j][\count($origin[$j]) - 1]))) { + $origin[$j][\count($origin[$j]) - 1] = $combined; + } + } + + $outOrigin = array_merge($outOrigin, $origin); + + $found = true; + } + + return $found; + } + + /** + * Extract a relationship from the fragment. + * + * When extracting the last portion of a selector we will be left with a + * fragment which may end with a direction relationship combinator. This + * method will extract the relationship fragment and return it along side + * the rest. + * + * @param array $fragment The selector fragment maybe ending with a direction relationship combinator. + * + * @return array The selector without the relationship fragment if any, the relationship fragment. + */ + protected function extractRelationshipFromFragment(array $fragment) + { + $parents = []; + $children = []; + + $j = $i = \count($fragment); + + for (;;) { + $children = $j != $i ? \array_slice($fragment, $j, $i - $j) : []; + $parents = \array_slice($fragment, 0, $j); + $slice = end($parents); + + if (empty($slice) || ! $this->isImmediateRelationshipCombinator($slice[0])) { + break; + } + + $j -= 2; + } + + return [$parents, $children]; + } + + /** + * Combine selector single + * + * @param array $base + * @param array $other + * + * @return array + */ + protected function combineSelectorSingle($base, $other) + { + $tag = []; + $out = []; + $wasTag = false; + $pseudo = []; + + while (\count($other) && strpos(end($other), ':') === 0) { + array_unshift($pseudo, array_pop($other)); + } + + foreach ([array_reverse($base), array_reverse($other)] as $single) { + $rang = count($single); + + foreach ($single as $part) { + if (preg_match('/^[\[:]/', $part)) { + $out[] = $part; + $wasTag = false; + } elseif (preg_match('/^[\.#]/', $part)) { + array_unshift($out, $part); + $wasTag = false; + } elseif (preg_match('/^[^_-]/', $part) && $rang === 1) { + $tag[] = $part; + $wasTag = true; + } elseif ($wasTag) { + $tag[\count($tag) - 1] .= $part; + } else { + array_unshift($out, $part); + } + $rang--; + } + } + + if (\count($tag)) { + array_unshift($out, $tag[0]); + } + + while (\count($pseudo)) { + $out[] = array_shift($pseudo); + } + + return $out; + } + + /** + * Compile media + * + * @param \ScssPhp\ScssPhp\Block $media + * + * @return void + */ + protected function compileMedia(Block $media) + { + assert($media instanceof MediaBlock); + $this->pushEnv($media); + + $mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env)); + + if (! empty($mediaQueries)) { + $previousScope = $this->scope; + $parentScope = $this->mediaParent($this->scope); + + foreach ($mediaQueries as $mediaQuery) { + $this->scope = $this->makeOutputBlock(Type::T_MEDIA, [$mediaQuery]); + + $parentScope->children[] = $this->scope; + $parentScope = $this->scope; + } + + // top level properties in a media cause it to be wrapped + $needsWrap = false; + + foreach ($media->children as $child) { + $type = $child[0]; + + if ( + $type !== Type::T_BLOCK && + $type !== Type::T_MEDIA && + $type !== Type::T_DIRECTIVE && + $type !== Type::T_IMPORT + ) { + $needsWrap = true; + break; + } + } + + if ($needsWrap) { + $wrapped = new Block(); + $wrapped->sourceName = $media->sourceName; + $wrapped->sourceIndex = $media->sourceIndex; + $wrapped->sourceLine = $media->sourceLine; + $wrapped->sourceColumn = $media->sourceColumn; + $wrapped->selectors = []; + $wrapped->comments = []; + $wrapped->parent = $media; + $wrapped->children = $media->children; + + $media->children = [[Type::T_BLOCK, $wrapped]]; + } + + $this->compileChildrenNoReturn($media->children, $this->scope); + + $this->scope = $previousScope; + } + + $this->popEnv(); + } + + /** + * Media parent + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope + * + * @return \ScssPhp\ScssPhp\Formatter\OutputBlock + */ + protected function mediaParent(OutputBlock $scope) + { + while (! empty($scope->parent)) { + if (! empty($scope->type) && $scope->type !== Type::T_MEDIA) { + break; + } + + $scope = $scope->parent; + } + + return $scope; + } + + /** + * Compile directive + * + * @param DirectiveBlock|array $directive + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * + * @return void + */ + protected function compileDirective($directive, OutputBlock $out) + { + if (\is_array($directive)) { + $directiveName = $this->compileDirectiveName($directive[0]); + $s = '@' . $directiveName; + + if (! empty($directive[1])) { + $s .= ' ' . $this->compileValue($directive[1]); + } + // sass-spec compliance on newline after directives, a bit tricky :/ + $appendNewLine = (! empty($directive[2]) || strpos($s, "\n")) ? "\n" : ""; + if (\is_array($directive[0]) && empty($directive[1])) { + $appendNewLine = "\n"; + } + + if (empty($directive[3])) { + $this->appendRootDirective($s . ';' . $appendNewLine, $out, [Type::T_COMMENT, Type::T_DIRECTIVE]); + } else { + $this->appendOutputLine($out, Type::T_DIRECTIVE, $s . ';'); + } + } else { + $directive->name = $this->compileDirectiveName($directive->name); + $s = '@' . $directive->name; + + if (! empty($directive->value)) { + $s .= ' ' . $this->compileValue($directive->value); + } + + if ($directive->name === 'keyframes' || substr($directive->name, -10) === '-keyframes') { + $this->compileKeyframeBlock($directive, [$s]); + } else { + $this->compileNestedBlock($directive, [$s]); + } + } + } + + /** + * directive names can include some interpolation + * + * @param string|array $directiveName + * @return string + * @throws CompilerException + */ + protected function compileDirectiveName($directiveName) + { + if (is_string($directiveName)) { + return $directiveName; + } + + return $this->compileValue($directiveName); + } + + /** + * Compile at-root + * + * @param \ScssPhp\ScssPhp\Block $block + * + * @return void + */ + protected function compileAtRoot(Block $block) + { + assert($block instanceof AtRootBlock); + $env = $this->pushEnv($block); + $envs = $this->compactEnv($env); + list($with, $without) = $this->compileWith(isset($block->with) ? $block->with : null); + + // wrap inline selector + if ($block->selector) { + $wrapped = new Block(); + $wrapped->sourceName = $block->sourceName; + $wrapped->sourceIndex = $block->sourceIndex; + $wrapped->sourceLine = $block->sourceLine; + $wrapped->sourceColumn = $block->sourceColumn; + $wrapped->selectors = $block->selector; + $wrapped->comments = []; + $wrapped->parent = $block; + $wrapped->children = $block->children; + $wrapped->selfParent = $block->selfParent; + + $block->children = [[Type::T_BLOCK, $wrapped]]; + $block->selector = null; + } + + $selfParent = $block->selfParent; + assert($selfParent !== null, 'at-root blocks must have a selfParent set.'); + + if ( + ! $selfParent->selectors && + isset($block->parent) && $block->parent && + isset($block->parent->selectors) && $block->parent->selectors + ) { + $selfParent = $block->parent; + } + + $this->env = $this->filterWithWithout($envs, $with, $without); + + $saveScope = $this->scope; + $this->scope = $this->filterScopeWithWithout($saveScope, $with, $without); + + // propagate selfParent to the children where they still can be useful + $this->compileChildrenNoReturn($block->children, $this->scope, $selfParent); + + $this->scope = $this->completeScope($this->scope, $saveScope); + $this->scope = $saveScope; + $this->env = $this->extractEnv($envs); + + $this->popEnv(); + } + + /** + * Filter at-root scope depending on with/without option + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope + * @param array $with + * @param array $without + * + * @return OutputBlock + */ + protected function filterScopeWithWithout($scope, $with, $without) + { + $filteredScopes = []; + $childStash = []; + + if ($scope->type === Type::T_ROOT) { + return $scope; + } + + // start from the root + while ($scope->parent && $scope->parent->type !== Type::T_ROOT) { + array_unshift($childStash, $scope); + $scope = $scope->parent; + } + + for (;;) { + if (! $scope) { + break; + } + + if ($this->isWith($scope, $with, $without)) { + $s = clone $scope; + $s->children = []; + $s->lines = []; + $s->parent = null; + + if ($s->type !== Type::T_MEDIA && $s->type !== Type::T_DIRECTIVE) { + $s->selectors = []; + } + + $filteredScopes[] = $s; + } + + if (\count($childStash)) { + $scope = array_shift($childStash); + } elseif ($scope->children) { + $scope = end($scope->children); + } else { + $scope = null; + } + } + + if (! \count($filteredScopes)) { + return $this->rootBlock; + } + + $newScope = array_shift($filteredScopes); + $newScope->parent = $this->rootBlock; + + $this->rootBlock->children[] = $newScope; + + $p = &$newScope; + + while (\count($filteredScopes)) { + $s = array_shift($filteredScopes); + $s->parent = $p; + $p->children[] = $s; + $newScope = &$p->children[0]; + $p = &$p->children[0]; + } + + return $newScope; + } + + /** + * found missing selector from a at-root compilation in the previous scope + * (if at-root is just enclosing a property, the selector is in the parent tree) + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $previousScope + * + * @return OutputBlock + */ + protected function completeScope($scope, $previousScope) + { + if (! $scope->type && (! $scope->selectors || ! \count($scope->selectors)) && \count($scope->lines)) { + $scope->selectors = $this->findScopeSelectors($previousScope, $scope->depth); + } + + if ($scope->children) { + foreach ($scope->children as $k => $c) { + $scope->children[$k] = $this->completeScope($c, $previousScope); + } + } + + return $scope; + } + + /** + * Find a selector by the depth node in the scope + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope + * @param int $depth + * + * @return array + */ + protected function findScopeSelectors($scope, $depth) + { + if ($scope->depth === $depth && $scope->selectors) { + return $scope->selectors; + } + + if ($scope->children) { + foreach (array_reverse($scope->children) as $c) { + if ($s = $this->findScopeSelectors($c, $depth)) { + return $s; + } + } + } + + return []; + } + + /** + * Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later + * + * @param array|null $withCondition + * + * @return array + * + * @phpstan-return array{array, array} + */ + protected function compileWith($withCondition) + { + // just compile what we have in 2 lists + $with = []; + $without = ['rule' => true]; + + if ($withCondition) { + if ($withCondition[0] === Type::T_INTERPOLATE) { + $w = $this->compileValue($withCondition); + + $buffer = "($w)"; + $parser = $this->parserFactory(__METHOD__); + + if ($parser->parseValue($buffer, $reParsedWith)) { + $withCondition = $reParsedWith; + } + } + + $withConfig = $this->mapGet($withCondition, static::$with); + if ($withConfig !== null) { + $without = []; // cancel the default + $list = $this->coerceList($withConfig); + + foreach ($list[2] as $item) { + $keyword = $this->compileStringContent($this->coerceString($item)); + + $with[$keyword] = true; + } + } + + $withoutConfig = $this->mapGet($withCondition, static::$without); + if ($withoutConfig !== null) { + $without = []; // cancel the default + $list = $this->coerceList($withoutConfig); + + foreach ($list[2] as $item) { + $keyword = $this->compileStringContent($this->coerceString($item)); + + $without[$keyword] = true; + } + } + } + + return [$with, $without]; + } + + /** + * Filter env stack + * + * @param Environment[] $envs + * @param array $with + * @param array $without + * + * @return Environment + * + * @phpstan-param non-empty-array $envs + */ + protected function filterWithWithout($envs, $with, $without) + { + $filtered = []; + + foreach ($envs as $e) { + if ($e->block && ! $this->isWith($e->block, $with, $without)) { + $ec = clone $e; + $ec->block = null; + $ec->selectors = []; + + $filtered[] = $ec; + } else { + $filtered[] = $e; + } + } + + return $this->extractEnv($filtered); + } + + /** + * Filter WITH rules + * + * @param \ScssPhp\ScssPhp\Block|\ScssPhp\ScssPhp\Formatter\OutputBlock $block + * @param array $with + * @param array $without + * + * @return bool + */ + protected function isWith($block, $with, $without) + { + if (isset($block->type)) { + if ($block->type === Type::T_MEDIA) { + return $this->testWithWithout('media', $with, $without); + } + + if ($block->type === Type::T_DIRECTIVE) { + assert($block instanceof DirectiveBlock || $block instanceof OutputBlock); + if (isset($block->name)) { + return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without); + } elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) { + return $this->testWithWithout($m[1], $with, $without); + } else { + return $this->testWithWithout('???', $with, $without); + } + } + } elseif (isset($block->selectors)) { + // a selector starting with number is a keyframe rule + if (\count($block->selectors)) { + $s = reset($block->selectors); + + while (\is_array($s)) { + $s = reset($s); + } + + if (\is_object($s) && $s instanceof Number) { + return $this->testWithWithout('keyframes', $with, $without); + } + } + + return $this->testWithWithout('rule', $with, $without); + } + + return true; + } + + /** + * Test a single type of block against with/without lists + * + * @param string $what + * @param array $with + * @param array $without + * + * @return bool + * true if the block should be kept, false to reject + */ + protected function testWithWithout($what, $with, $without) + { + // if without, reject only if in the list (or 'all' is in the list) + if (\count($without)) { + return (isset($without[$what]) || isset($without['all'])) ? false : true; + } + + // otherwise reject all what is not in the with list + return (isset($with[$what]) || isset($with['all'])) ? true : false; + } + + + /** + * Compile keyframe block + * + * @param \ScssPhp\ScssPhp\Block $block + * @param string[] $selectors + * + * @return void + */ + protected function compileKeyframeBlock(Block $block, $selectors) + { + $env = $this->pushEnv($block); + + $envs = $this->compactEnv($env); + + $this->env = $this->extractEnv(array_filter($envs, function (Environment $e) { + return ! isset($e->block->selectors); + })); + + $this->scope = $this->makeOutputBlock($block->type, $selectors); + $this->scope->depth = 1; + $this->scope->parent->children[] = $this->scope; + + $this->compileChildrenNoReturn($block->children, $this->scope); + + $this->scope = $this->scope->parent; + $this->env = $this->extractEnv($envs); + + $this->popEnv(); + } + + /** + * Compile nested properties lines + * + * @param \ScssPhp\ScssPhp\Block $block + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * + * @return void + */ + protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out) + { + assert($block instanceof NestedPropertyBlock); + $prefix = $this->compileValue($block->prefix) . '-'; + + $nested = $this->makeOutputBlock($block->type); + $nested->parent = $out; + + if ($block->hasValue) { + $nested->depth = $out->depth + 1; + } + + $out->children[] = $nested; + + foreach ($block->children as $child) { + switch ($child[0]) { + case Type::T_ASSIGN: + array_unshift($child[1][2], $prefix); + break; + + case Type::T_NESTED_PROPERTY: + assert($child[1] instanceof NestedPropertyBlock); + array_unshift($child[1]->prefix[2], $prefix); + break; + } + + $this->compileChild($child, $nested); + } + } + + /** + * Compile nested block + * + * @param \ScssPhp\ScssPhp\Block $block + * @param string[] $selectors + * + * @return void + */ + protected function compileNestedBlock(Block $block, $selectors) + { + $this->pushEnv($block); + + $this->scope = $this->makeOutputBlock($block->type, $selectors); + $this->scope->parent->children[] = $this->scope; + + // wrap assign children in a block + // except for @font-face + if (!$block instanceof DirectiveBlock || $this->compileDirectiveName($block->name) !== 'font-face') { + // need wrapping? + $needWrapping = false; + + foreach ($block->children as $child) { + if ($child[0] === Type::T_ASSIGN) { + $needWrapping = true; + break; + } + } + + if ($needWrapping) { + $wrapped = new Block(); + $wrapped->sourceName = $block->sourceName; + $wrapped->sourceIndex = $block->sourceIndex; + $wrapped->sourceLine = $block->sourceLine; + $wrapped->sourceColumn = $block->sourceColumn; + $wrapped->selectors = []; + $wrapped->comments = []; + $wrapped->parent = $block; + $wrapped->children = $block->children; + $wrapped->selfParent = $block->selfParent; + + $block->children = [[Type::T_BLOCK, $wrapped]]; + } + } + + $this->compileChildrenNoReturn($block->children, $this->scope); + + $this->scope = $this->scope->parent; + + $this->popEnv(); + } + + /** + * Recursively compiles a block. + * + * A block is analogous to a CSS block in most cases. A single SCSS document + * is encapsulated in a block when parsed, but it does not have parent tags + * so all of its children appear on the root level when compiled. + * + * Blocks are made up of selectors and children. + * + * The children of a block are just all the blocks that are defined within. + * + * Compiling the block involves pushing a fresh environment on the stack, + * and iterating through the props, compiling each one. + * + * @see Compiler::compileChild() + * + * @param \ScssPhp\ScssPhp\Block $block + * + * @return void + */ + protected function compileBlock(Block $block) + { + $env = $this->pushEnv($block); + $env->selectors = $this->evalSelectors($block->selectors); + + $out = $this->makeOutputBlock(null); + + $this->scope->children[] = $out; + + if (\count($block->children)) { + $out->selectors = $this->multiplySelectors($env, $block->selfParent); + + // propagate selfParent to the children where they still can be useful + $selfParentSelectors = null; + + if (isset($block->selfParent->selectors)) { + $selfParentSelectors = $block->selfParent->selectors; + $block->selfParent->selectors = $out->selectors; + } + + $this->compileChildrenNoReturn($block->children, $out, $block->selfParent); + + // and revert for the following children of the same block + if ($selfParentSelectors) { + $block->selfParent->selectors = $selfParentSelectors; + } + } + + $this->popEnv(); + } + + + /** + * Compile the value of a comment that can have interpolation + * + * @param array $value + * @param bool $pushEnv + * + * @return string + */ + protected function compileCommentValue($value, $pushEnv = false) + { + $c = $value[1]; + + if (isset($value[2])) { + if ($pushEnv) { + $this->pushEnv(); + } + + try { + $c = $this->compileValue($value[2]); + } catch (SassScriptException $e) { + $this->logger->warn('Ignoring interpolation errors in multiline comments is deprecated and will be removed in ScssPhp 2.0. ' . $this->addLocationToMessage($e->getMessage()), true); + // ignore error in comment compilation which are only interpolation + } catch (SassException $e) { + $this->logger->warn('Ignoring interpolation errors in multiline comments is deprecated and will be removed in ScssPhp 2.0. ' . $e->getMessage(), true); + // ignore error in comment compilation which are only interpolation + } + + if ($pushEnv) { + $this->popEnv(); + } + } + + return $c; + } + + /** + * Compile root level comment + * + * @param array $block + * + * @return void + */ + protected function compileComment($block) + { + $out = $this->makeOutputBlock(Type::T_COMMENT); + $out->lines[] = $this->compileCommentValue($block, true); + + $this->scope->children[] = $out; + } + + /** + * Evaluate selectors + * + * @param array $selectors + * + * @return array + */ + protected function evalSelectors($selectors) + { + $this->shouldEvaluate = false; + + $selectors = array_map([$this, 'evalSelector'], $selectors); + + // after evaluating interpolates, we might need a second pass + if ($this->shouldEvaluate) { + $selectors = $this->replaceSelfSelector($selectors, '&'); + $buffer = $this->collapseSelectors($selectors); + $parser = $this->parserFactory(__METHOD__); + + try { + $isValid = $parser->parseSelector($buffer, $newSelectors, true); + } catch (ParserException $e) { + throw $this->error($e->getMessage()); + } + + if ($isValid) { + $selectors = array_map([$this, 'evalSelector'], $newSelectors); + } + } + + return $selectors; + } + + /** + * Evaluate selector + * + * @param array $selector + * + * @return array + */ + protected function evalSelector($selector) + { + return array_map([$this, 'evalSelectorPart'], $selector); + } + + /** + * Evaluate selector part; replaces all the interpolates, stripping quotes + * + * @param array $part + * + * @return array + */ + protected function evalSelectorPart($part) + { + foreach ($part as &$p) { + if (\is_array($p) && ($p[0] === Type::T_INTERPOLATE || $p[0] === Type::T_STRING)) { + $p = $this->compileValue($p); + + // force re-evaluation if self char or non standard char + if (preg_match(',[^\w-],', $p)) { + $this->shouldEvaluate = true; + } + } elseif ( + \is_string($p) && \strlen($p) >= 2 && + ($first = $p[0]) && ($first === '"' || $first === "'") && + substr($p, -1) === $first + ) { + $p = substr($p, 1, -1); + } + } + + return $this->flattenSelectorSingle($part); + } + + /** + * Collapse selectors + * + * @param array $selectors + * + * @return string + */ + protected function collapseSelectors($selectors) + { + $parts = []; + + foreach ($selectors as $selector) { + $output = []; + + foreach ($selector as $node) { + $compound = ''; + + array_walk_recursive( + $node, + function ($value, $key) use (&$compound) { + $compound .= $value; + } + ); + + $output[] = $compound; + } + + $parts[] = implode(' ', $output); + } + + return implode(', ', $parts); + } + + /** + * Collapse selectors + * + * @param array $selectors + * + * @return array + */ + private function collapseSelectorsAsList($selectors) + { + $parts = []; + + foreach ($selectors as $selector) { + $output = []; + $glueNext = false; + + foreach ($selector as $node) { + $compound = ''; + + array_walk_recursive( + $node, + function ($value, $key) use (&$compound) { + $compound .= $value; + } + ); + + if ($this->isImmediateRelationshipCombinator($compound)) { + if (\count($output)) { + $output[\count($output) - 1] .= ' ' . $compound; + } else { + $output[] = $compound; + } + + $glueNext = true; + } elseif ($glueNext) { + $output[\count($output) - 1] .= ' ' . $compound; + $glueNext = false; + } else { + $output[] = $compound; + } + } + + foreach ($output as &$o) { + $o = [Type::T_STRING, '', [$o]]; + } + + $parts[] = [Type::T_LIST, ' ', $output]; + } + + return [Type::T_LIST, ',', $parts]; + } + + /** + * Parse down the selector and revert [self] to "&" before a reparsing + * + * @param array $selectors + * @param string|null $replace + * + * @return array + */ + protected function replaceSelfSelector($selectors, $replace = null) + { + foreach ($selectors as &$part) { + if (\is_array($part)) { + if ($part === [Type::T_SELF]) { + if (\is_null($replace)) { + $replace = $this->reduce([Type::T_SELF]); + $replace = $this->compileValue($replace); + } + $part = $replace; + } else { + $part = $this->replaceSelfSelector($part, $replace); + } + } + } + + return $selectors; + } + + /** + * Flatten selector single; joins together .classes and #ids + * + * @param array $single + * + * @return array + */ + protected function flattenSelectorSingle($single) + { + $joined = []; + + foreach ($single as $part) { + if ( + empty($joined) || + ! \is_string($part) || + preg_match('/[\[.:#%]/', $part) + ) { + $joined[] = $part; + continue; + } + + if (\is_array(end($joined))) { + $joined[] = $part; + } else { + $joined[\count($joined) - 1] .= $part; + } + } + + return $joined; + } + + /** + * Compile selector to string; self(&) should have been replaced by now + * + * @param string|array $selector + * + * @return string + */ + protected function compileSelector($selector) + { + if (! \is_array($selector)) { + return $selector; // media and the like + } + + return implode( + ' ', + array_map( + [$this, 'compileSelectorPart'], + $selector + ) + ); + } + + /** + * Compile selector part + * + * @param array $piece + * + * @return string + */ + protected function compileSelectorPart($piece) + { + foreach ($piece as &$p) { + if (! \is_array($p)) { + continue; + } + + switch ($p[0]) { + case Type::T_SELF: + $p = '&'; + break; + + default: + $p = $this->compileValue($p); + break; + } + } + + return implode($piece); + } + + /** + * Has selector placeholder? + * + * @param array $selector + * + * @return bool + */ + protected function hasSelectorPlaceholder($selector) + { + if (! \is_array($selector)) { + return false; + } + + foreach ($selector as $parts) { + foreach ($parts as $part) { + if (\strlen($part) && '%' === $part[0]) { + return true; + } + } + } + + return false; + } + + /** + * @param string $name + * + * @return void + */ + protected function pushCallStack($name = '') + { + $this->callStack[] = [ + 'n' => $name, + Parser::SOURCE_INDEX => $this->sourceIndex, + Parser::SOURCE_LINE => $this->sourceLine, + Parser::SOURCE_COLUMN => $this->sourceColumn + ]; + + // infinite calling loop + if (\count($this->callStack) > 25000) { + // not displayed but you can var_dump it to deep debug + $msg = $this->callStackMessage(true, 100); + $msg = 'Infinite calling loop'; + + throw $this->error($msg); + } + } + + /** + * @return void + */ + protected function popCallStack() + { + array_pop($this->callStack); + } + + /** + * Compile children and return result + * + * @param array $stms + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * @param string $traceName + * + * @return array|Number|null + */ + protected function compileChildren($stms, OutputBlock $out, $traceName = '') + { + $this->pushCallStack($traceName); + + foreach ($stms as $stm) { + $ret = $this->compileChild($stm, $out); + + if (isset($ret)) { + $this->popCallStack(); + + return $ret; + } + } + + $this->popCallStack(); + + return null; + } + + /** + * Compile children and throw exception if unexpected `@return` + * + * @param array $stms + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * @param \ScssPhp\ScssPhp\Block $selfParent + * @param string $traceName + * + * @return void + * + * @throws \Exception + */ + protected function compileChildrenNoReturn($stms, OutputBlock $out, $selfParent = null, $traceName = '') + { + $this->pushCallStack($traceName); + + foreach ($stms as $stm) { + if ($selfParent && isset($stm[1]) && \is_object($stm[1]) && $stm[1] instanceof Block) { + $stm[1]->selfParent = $selfParent; + $ret = $this->compileChild($stm, $out); + $stm[1]->selfParent = null; + } elseif ($selfParent && \in_array($stm[0], [Type::T_INCLUDE, Type::T_EXTEND])) { + $stm['selfParent'] = $selfParent; + $ret = $this->compileChild($stm, $out); + unset($stm['selfParent']); + } else { + $ret = $this->compileChild($stm, $out); + } + + if (isset($ret)) { + throw $this->error('@return may only be used within a function'); + } + } + + $this->popCallStack(); + } + + + /** + * evaluate media query : compile internal value keeping the structure unchanged + * + * @param array $queryList + * + * @return array + */ + protected function evaluateMediaQuery($queryList) + { + static $parser = null; + + $outQueryList = []; + + foreach ($queryList as $kql => $query) { + $shouldReparse = false; + + foreach ($query as $kq => $q) { + for ($i = 1; $i < \count($q); $i++) { + $value = $this->compileValue($q[$i]); + + // the parser had no mean to know if media type or expression if it was an interpolation + // so you need to reparse if the T_MEDIA_TYPE looks like anything else a media type + if ( + $q[0] == Type::T_MEDIA_TYPE && + (strpos($value, '(') !== false || + strpos($value, ')') !== false || + strpos($value, ':') !== false || + strpos($value, ',') !== false) + ) { + $shouldReparse = true; + } + + $queryList[$kql][$kq][$i] = [Type::T_KEYWORD, $value]; + } + } + + if ($shouldReparse) { + if (\is_null($parser)) { + $parser = $this->parserFactory(__METHOD__); + } + + $queryString = $this->compileMediaQuery([$queryList[$kql]]); + $queryString = reset($queryString); + + if (strpos($queryString, '@media ') === 0) { + $queryString = substr($queryString, 7); + $queries = []; + + if ($parser->parseMediaQueryList($queryString, $queries)) { + $queries = $this->evaluateMediaQuery($queries[2]); + + while (\count($queries)) { + $outQueryList[] = array_shift($queries); + } + + continue; + } + } + } + + $outQueryList[] = $queryList[$kql]; + } + + return $outQueryList; + } + + /** + * Compile media query + * + * @param array $queryList + * + * @return string[] + */ + protected function compileMediaQuery($queryList) + { + $start = '@media '; + $default = trim($start); + $out = []; + $current = ''; + + foreach ($queryList as $query) { + $type = null; + $parts = []; + + $mediaTypeOnly = true; + + foreach ($query as $q) { + if ($q[0] !== Type::T_MEDIA_TYPE) { + $mediaTypeOnly = false; + break; + } + } + + foreach ($query as $q) { + switch ($q[0]) { + case Type::T_MEDIA_TYPE: + $newType = array_map([$this, 'compileValue'], \array_slice($q, 1)); + + // combining not and anything else than media type is too risky and should be avoided + if (! $mediaTypeOnly) { + if (\in_array(Type::T_NOT, $newType) || ($type && \in_array(Type::T_NOT, $type) )) { + if ($type) { + array_unshift($parts, implode(' ', array_filter($type))); + } + + if (! empty($parts)) { + if (\strlen($current)) { + $current .= $this->formatter->tagSeparator; + } + + $current .= implode(' and ', $parts); + } + + if ($current) { + $out[] = $start . $current; + } + + $current = ''; + $type = null; + $parts = []; + } + } + + if ($newType === ['all'] && $default) { + $default = $start . 'all'; + } + + // all can be safely ignored and mixed with whatever else + if ($newType !== ['all']) { + if ($type) { + $type = $this->mergeMediaTypes($type, $newType); + + if (empty($type)) { + // merge failed : ignore this query that is not valid, skip to the next one + $parts = []; + $default = ''; // if everything fail, no @media at all + continue 3; + } + } else { + $type = $newType; + } + } + break; + + case Type::T_MEDIA_EXPRESSION: + if (isset($q[2])) { + $parts[] = '(' + . $this->compileValue($q[1]) + . $this->formatter->assignSeparator + . $this->compileValue($q[2]) + . ')'; + } else { + $parts[] = '(' + . $this->compileValue($q[1]) + . ')'; + } + break; + + case Type::T_MEDIA_VALUE: + $parts[] = $this->compileValue($q[1]); + break; + } + } + + if ($type) { + array_unshift($parts, implode(' ', array_filter($type))); + } + + if (! empty($parts)) { + if (\strlen($current)) { + $current .= $this->formatter->tagSeparator; + } + + $current .= implode(' and ', $parts); + } + } + + if ($current) { + $out[] = $start . $current; + } + + // no @media type except all, and no conflict? + if (! $out && $default) { + $out[] = $default; + } + + return $out; + } + + /** + * Merge direct relationships between selectors + * + * @param array $selectors1 + * @param array $selectors2 + * + * @return array + */ + protected function mergeDirectRelationships($selectors1, $selectors2) + { + if (empty($selectors1) || empty($selectors2)) { + return array_merge($selectors1, $selectors2); + } + + $part1 = end($selectors1); + $part2 = end($selectors2); + + if (! $this->isImmediateRelationshipCombinator($part1[0]) && $part1 !== $part2) { + return array_merge($selectors1, $selectors2); + } + + $merged = []; + + do { + $part1 = array_pop($selectors1); + $part2 = array_pop($selectors2); + + if (! $this->isImmediateRelationshipCombinator($part1[0]) && $part1 !== $part2) { + if ($this->isImmediateRelationshipCombinator(reset($merged)[0])) { + array_unshift($merged, [$part1[0] . $part2[0]]); + $merged = array_merge($selectors1, $selectors2, $merged); + } else { + $merged = array_merge($selectors1, [$part1], $selectors2, [$part2], $merged); + } + + break; + } + + array_unshift($merged, $part1); + } while (! empty($selectors1) && ! empty($selectors2)); + + return $merged; + } + + /** + * Merge media types + * + * @param array $type1 + * @param array $type2 + * + * @return array|null + */ + protected function mergeMediaTypes($type1, $type2) + { + if (empty($type1)) { + return $type2; + } + + if (empty($type2)) { + return $type1; + } + + if (\count($type1) > 1) { + $m1 = strtolower($type1[0]); + $t1 = strtolower($type1[1]); + } else { + $m1 = ''; + $t1 = strtolower($type1[0]); + } + + if (\count($type2) > 1) { + $m2 = strtolower($type2[0]); + $t2 = strtolower($type2[1]); + } else { + $m2 = ''; + $t2 = strtolower($type2[0]); + } + + if (($m1 === Type::T_NOT) ^ ($m2 === Type::T_NOT)) { + if ($t1 === $t2) { + return null; + } + + return [ + $m1 === Type::T_NOT ? $m2 : $m1, + $m1 === Type::T_NOT ? $t2 : $t1, + ]; + } + + if ($m1 === Type::T_NOT && $m2 === Type::T_NOT) { + // CSS has no way of representing "neither screen nor print" + if ($t1 !== $t2) { + return null; + } + + return [Type::T_NOT, $t1]; + } + + if ($t1 !== $t2) { + return null; + } + + // t1 == t2, neither m1 nor m2 are "not" + return [empty($m1) ? $m2 : $m1, $t1]; + } + + /** + * Compile import; returns true if the value was something that could be imported + * + * @param array $rawPath + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * @param bool $once + * + * @return bool + */ + protected function compileImport($rawPath, OutputBlock $out, $once = false) + { + if ($rawPath[0] === Type::T_STRING) { + $path = $this->compileStringContent($rawPath); + + if (strpos($path, 'url(') !== 0 && $filePath = $this->findImport($path, $this->currentDirectory)) { + $this->registerImport($this->currentDirectory, $path, $filePath); + + if (! $once || ! \in_array($filePath, $this->importedFiles)) { + $this->importFile($filePath, $out); + $this->importedFiles[] = $filePath; + } + + return true; + } + + $this->appendRootDirective('@import ' . $this->compileImportPath($rawPath) . ';', $out); + + return false; + } + + if ($rawPath[0] === Type::T_LIST) { + // handle a list of strings + if (\count($rawPath[2]) === 0) { + return false; + } + + foreach ($rawPath[2] as $path) { + if ($path[0] !== Type::T_STRING) { + $this->appendRootDirective('@import ' . $this->compileImportPath($rawPath) . ';', $out); + + return false; + } + } + + foreach ($rawPath[2] as $path) { + $this->compileImport($path, $out, $once); + } + + return true; + } + + $this->appendRootDirective('@import ' . $this->compileImportPath($rawPath) . ';', $out); + + return false; + } + + /** + * @param array $rawPath + * @return string + * @throws CompilerException + */ + protected function compileImportPath($rawPath) + { + $path = $this->compileValue($rawPath); + + // case url() without quotes : suppress \r \n remaining in the path + // if this is a real string there can not be CR or LF char + if (strpos($path, 'url(') === 0) { + $path = str_replace(array("\r", "\n"), array('', ' '), $path); + } else { + // if this is a file name in a string, spaces should be escaped + $path = $this->reduce($rawPath); + $path = $this->escapeImportPathString($path); + $path = $this->compileValue($path); + } + + return $path; + } + + /** + * @param array $path + * @return array + * @throws CompilerException + */ + protected function escapeImportPathString($path) + { + switch ($path[0]) { + case Type::T_LIST: + foreach ($path[2] as $k => $v) { + $path[2][$k] = $this->escapeImportPathString($v); + } + break; + case Type::T_STRING: + if ($path[1]) { + $path = $this->compileValue($path); + $path = str_replace(' ', '\\ ', $path); + $path = [Type::T_KEYWORD, $path]; + } + break; + } + + return $path; + } + + /** + * Append a root directive like @import or @charset as near as the possible from the source code + * (keeping before comments, @import and @charset coming before in the source code) + * + * @param string $line + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * @param array $allowed + * + * @return void + */ + protected function appendRootDirective($line, $out, $allowed = [Type::T_COMMENT]) + { + $root = $out; + + while ($root->parent) { + $root = $root->parent; + } + + $i = 0; + + while ($i < \count($root->children)) { + if (! isset($root->children[$i]->type) || ! \in_array($root->children[$i]->type, $allowed)) { + break; + } + + $i++; + } + + // remove incompatible children from the bottom of the list + $saveChildren = []; + + while ($i < \count($root->children)) { + $saveChildren[] = array_pop($root->children); + } + + // insert the directive as a comment + $child = $this->makeOutputBlock(Type::T_COMMENT); + $child->lines[] = $line; + $child->sourceName = $this->sourceNames[$this->sourceIndex] ?: '(stdin)'; + $child->sourceLine = $this->sourceLine; + $child->sourceColumn = $this->sourceColumn; + + $root->children[] = $child; + + // repush children + while (\count($saveChildren)) { + $root->children[] = array_pop($saveChildren); + } + } + + /** + * Append lines to the current output block: + * directly to the block or through a child if necessary + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * @param string $type + * @param string $line + * + * @return void + */ + protected function appendOutputLine(OutputBlock $out, $type, $line) + { + $outWrite = &$out; + + // check if it's a flat output or not + if (\count($out->children)) { + $lastChild = &$out->children[\count($out->children) - 1]; + + if ( + $lastChild->depth === $out->depth && + \is_null($lastChild->selectors) && + ! \count($lastChild->children) + ) { + $outWrite = $lastChild; + } else { + $nextLines = $this->makeOutputBlock($type); + $nextLines->parent = $out; + $nextLines->depth = $out->depth; + + $out->children[] = $nextLines; + $outWrite = &$nextLines; + } + } + + $outWrite->lines[] = $line; + } + + /** + * Compile child; returns a value to halt execution + * + * @param array $child + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * + * @return array|Number|null + */ + protected function compileChild($child, OutputBlock $out) + { + if (isset($child[Parser::SOURCE_LINE])) { + $this->sourceIndex = isset($child[Parser::SOURCE_INDEX]) ? $child[Parser::SOURCE_INDEX] : null; + $this->sourceLine = isset($child[Parser::SOURCE_LINE]) ? $child[Parser::SOURCE_LINE] : -1; + $this->sourceColumn = isset($child[Parser::SOURCE_COLUMN]) ? $child[Parser::SOURCE_COLUMN] : -1; + } elseif (\is_array($child) && isset($child[1]->sourceLine)) { + $this->sourceIndex = $child[1]->sourceIndex; + $this->sourceLine = $child[1]->sourceLine; + $this->sourceColumn = $child[1]->sourceColumn; + } elseif (! empty($out->sourceLine) && ! empty($out->sourceName)) { + $this->sourceLine = $out->sourceLine; + $sourceIndex = array_search($out->sourceName, $this->sourceNames); + $this->sourceColumn = $out->sourceColumn; + + if ($sourceIndex === false) { + $sourceIndex = null; + } + $this->sourceIndex = $sourceIndex; + } + + switch ($child[0]) { + case Type::T_SCSSPHP_IMPORT_ONCE: + $rawPath = $this->reduce($child[1]); + + $this->compileImport($rawPath, $out, true); + break; + + case Type::T_IMPORT: + $rawPath = $this->reduce($child[1]); + + $this->compileImport($rawPath, $out); + break; + + case Type::T_DIRECTIVE: + $this->compileDirective($child[1], $out); + break; + + case Type::T_AT_ROOT: + $this->compileAtRoot($child[1]); + break; + + case Type::T_MEDIA: + $this->compileMedia($child[1]); + break; + + case Type::T_BLOCK: + $this->compileBlock($child[1]); + break; + + case Type::T_CHARSET: + break; + + case Type::T_CUSTOM_PROPERTY: + list(, $name, $value) = $child; + $compiledName = $this->compileValue($name); + + // if the value reduces to null from something else then + // the property should be discarded + if ($value[0] !== Type::T_NULL) { + $value = $this->reduce($value); + + if ($value[0] === Type::T_NULL || $value === static::$nullString) { + break; + } + } + + $compiledValue = $this->compileValue($value); + + $line = $this->formatter->customProperty( + $compiledName, + $compiledValue + ); + + $this->appendOutputLine($out, Type::T_ASSIGN, $line); + break; + + case Type::T_ASSIGN: + list(, $name, $value) = $child; + + if ($name[0] === Type::T_VARIABLE) { + $flags = isset($child[3]) ? $child[3] : []; + $isDefault = \in_array('!default', $flags); + $isGlobal = \in_array('!global', $flags); + + if ($isGlobal) { + $this->set($name[1], $this->reduce($value), false, $this->rootEnv, $value); + break; + } + + $shouldSet = $isDefault && + (\is_null($result = $this->get($name[1], false)) || + $result === static::$null); + + if (! $isDefault || $shouldSet) { + $this->set($name[1], $this->reduce($value), true, null, $value); + } + break; + } + + $compiledName = $this->compileValue($name); + + // handle shorthand syntaxes : size / line-height... + if (\in_array($compiledName, ['font', 'grid-row', 'grid-column', 'border-radius'])) { + if ($value[0] === Type::T_VARIABLE) { + // if the font value comes from variable, the content is already reduced + // (i.e., formulas were already calculated), so we need the original unreduced value + $value = $this->get($value[1], true, null, true); + } + + $shorthandValue=&$value; + + $shorthandDividerNeedsUnit = false; + $maxListElements = null; + $maxShorthandDividers = 1; + + switch ($compiledName) { + case 'border-radius': + $maxListElements = 4; + $shorthandDividerNeedsUnit = true; + break; + } + + if ($compiledName === 'font' && $value[0] === Type::T_LIST && $value[1] === ',') { + // this is the case if more than one font is given: example: "font: 400 1em/1.3 arial,helvetica" + // we need to handle the first list element + $shorthandValue=&$value[2][0]; + } + + if ($shorthandValue[0] === Type::T_EXPRESSION && $shorthandValue[1] === '/') { + $revert = true; + + if ($shorthandDividerNeedsUnit) { + $divider = $shorthandValue[3]; + + if (\is_array($divider)) { + $divider = $this->reduce($divider, true); + } + + if ($divider instanceof Number && \intval($divider->getDimension()) && $divider->unitless()) { + $revert = false; + } + } + + if ($revert) { + $shorthandValue = $this->expToString($shorthandValue); + } + } elseif ($shorthandValue[0] === Type::T_LIST) { + foreach ($shorthandValue[2] as &$item) { + if ($item[0] === Type::T_EXPRESSION && $item[1] === '/') { + if ($maxShorthandDividers > 0) { + $revert = true; + + // if the list of values is too long, this has to be a shorthand, + // otherwise it could be a real division + if (\is_null($maxListElements) || \count($shorthandValue[2]) <= $maxListElements) { + if ($shorthandDividerNeedsUnit) { + $divider = $item[3]; + + if (\is_array($divider)) { + $divider = $this->reduce($divider, true); + } + + if ($divider instanceof Number && \intval($divider->getDimension()) && $divider->unitless()) { + $revert = false; + } + } + } + + if ($revert) { + $item = $this->expToString($item); + $maxShorthandDividers--; + } + } + } + } + } + } + + // if the value reduces to null from something else then + // the property should be discarded + if ($value[0] !== Type::T_NULL) { + $value = $this->reduce($value); + + if ($value[0] === Type::T_NULL || $value === static::$nullString) { + break; + } + } + + $compiledValue = $this->compileValue($value); + + // ignore empty value + if (\strlen($compiledValue)) { + $line = $this->formatter->property( + $compiledName, + $compiledValue + ); + $this->appendOutputLine($out, Type::T_ASSIGN, $line); + } + break; + + case Type::T_COMMENT: + if ($out->type === Type::T_ROOT) { + $this->compileComment($child); + break; + } + + $line = $this->compileCommentValue($child, true); + $this->appendOutputLine($out, Type::T_COMMENT, $line); + break; + + case Type::T_MIXIN: + case Type::T_FUNCTION: + list(, $block) = $child; + assert($block instanceof CallableBlock); + // the block need to be able to go up to it's parent env to resolve vars + $block->parentEnv = $this->getStoreEnv(); + $this->set(static::$namespaces[$block->type] . $block->name, $block, true); + break; + + case Type::T_EXTEND: + foreach ($child[1] as $sel) { + $replacedSel = $this->replaceSelfSelector($sel); + + if ($replacedSel !== $sel) { + throw $this->error('Parent selectors aren\'t allowed here.'); + } + + $results = $this->evalSelectors([$sel]); + + foreach ($results as $result) { + if (\count($result) !== 1) { + throw $this->error('complex selectors may not be extended.'); + } + + // only use the first one + $result = $result[0]; + $selectors = $out->selectors; + + if (! $selectors && isset($child['selfParent'])) { + $selectors = $this->multiplySelectors($this->env, $child['selfParent']); + } + + if (\count($result) > 1) { + $replacement = implode(', ', $result); + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + + $message = <<logger->warn($message); + } + + $this->pushExtends($result, $selectors, $child); + } + } + break; + + case Type::T_IF: + list(, $if) = $child; + assert($if instanceof IfBlock); + + if ($this->isTruthy($this->reduce($if->cond, true))) { + return $this->compileChildren($if->children, $out); + } + + foreach ($if->cases as $case) { + if ( + $case instanceof ElseBlock || + $case instanceof ElseifBlock && $this->isTruthy($this->reduce($case->cond)) + ) { + return $this->compileChildren($case->children, $out); + } + } + break; + + case Type::T_EACH: + list(, $each) = $child; + assert($each instanceof EachBlock); + + $list = $this->coerceList($this->reduce($each->list), ',', true); + + $this->pushEnv(); + + foreach ($list[2] as $item) { + if (\count($each->vars) === 1) { + $this->set($each->vars[0], $item, true); + } else { + list(,, $values) = $this->coerceList($item); + + foreach ($each->vars as $i => $var) { + $this->set($var, isset($values[$i]) ? $values[$i] : static::$null, true); + } + } + + $ret = $this->compileChildren($each->children, $out); + + if ($ret) { + $store = $this->env->store; + $this->popEnv(); + $this->backPropagateEnv($store, $each->vars); + + return $ret; + } + } + $store = $this->env->store; + $this->popEnv(); + $this->backPropagateEnv($store, $each->vars); + + break; + + case Type::T_WHILE: + list(, $while) = $child; + assert($while instanceof WhileBlock); + + while ($this->isTruthy($this->reduce($while->cond, true))) { + $ret = $this->compileChildren($while->children, $out); + + if ($ret) { + return $ret; + } + } + break; + + case Type::T_FOR: + list(, $for) = $child; + assert($for instanceof ForBlock); + + $startNumber = $this->assertNumber($this->reduce($for->start, true)); + $endNumber = $this->assertNumber($this->reduce($for->end, true)); + + $start = $this->assertInteger($startNumber); + + $numeratorUnits = $startNumber->getNumeratorUnits(); + $denominatorUnits = $startNumber->getDenominatorUnits(); + + $end = $this->assertInteger($endNumber->coerce($numeratorUnits, $denominatorUnits)); + + $d = $start < $end ? 1 : -1; + + $this->pushEnv(); + + for (;;) { + if ( + (! $for->until && $start - $d == $end) || + ($for->until && $start == $end) + ) { + break; + } + + $this->set($for->var, new Number($start, $numeratorUnits, $denominatorUnits)); + $start += $d; + + $ret = $this->compileChildren($for->children, $out); + + if ($ret) { + $store = $this->env->store; + $this->popEnv(); + $this->backPropagateEnv($store, [$for->var]); + + return $ret; + } + } + + $store = $this->env->store; + $this->popEnv(); + $this->backPropagateEnv($store, [$for->var]); + + break; + + case Type::T_RETURN: + return $this->reduce($child[1], true); + + case Type::T_NESTED_PROPERTY: + $this->compileNestedPropertiesBlock($child[1], $out); + break; + + case Type::T_INCLUDE: + // including a mixin + list(, $name, $argValues, $content, $argUsing) = $child; + + $mixin = $this->get(static::$namespaces['mixin'] . $name, false); + + if (! $mixin) { + throw $this->error("Undefined mixin $name"); + } + + assert($mixin instanceof CallableBlock); + + $callingScope = $this->getStoreEnv(); + + // push scope, apply args + $this->pushEnv(); + $this->env->depth--; + + // Find the parent selectors in the env to be able to know what '&' refers to in the mixin + // and assign this fake parent to childs + $selfParent = null; + + if (isset($child['selfParent']) && isset($child['selfParent']->selectors)) { + $selfParent = $child['selfParent']; + } else { + $parentSelectors = $this->multiplySelectors($this->env); + + if ($parentSelectors) { + $parent = new Block(); + $parent->selectors = $parentSelectors; + + foreach ($mixin->children as $k => $child) { + if (isset($child[1]) && \is_object($child[1]) && $child[1] instanceof Block) { + $mixin->children[$k][1]->parent = $parent; + } + } + } + } + + // clone the stored content to not have its scope spoiled by a further call to the same mixin + // i.e., recursive @include of the same mixin + if (isset($content)) { + $copyContent = clone $content; + $copyContent->scope = clone $callingScope; + + $this->setRaw(static::$namespaces['special'] . 'content', $copyContent, $this->env); + } else { + $this->setRaw(static::$namespaces['special'] . 'content', null, $this->env); + } + + // save the "using" argument list for applying it to when "@content" is invoked + if (isset($argUsing)) { + $this->setRaw(static::$namespaces['special'] . 'using', $argUsing, $this->env); + } else { + $this->setRaw(static::$namespaces['special'] . 'using', null, $this->env); + } + + if (isset($mixin->args)) { + $this->applyArguments($mixin->args, $argValues); + } + + $this->env->marker = 'mixin'; + + if (! empty($mixin->parentEnv)) { + $this->env->declarationScopeParent = $mixin->parentEnv; + } else { + throw $this->error("@mixin $name() without parentEnv"); + } + + $this->compileChildrenNoReturn($mixin->children, $out, $selfParent, $this->env->marker . ' ' . $name); + + $this->popEnv(); + break; + + case Type::T_MIXIN_CONTENT: + $env = isset($this->storeEnv) ? $this->storeEnv : $this->env; + $content = $this->get(static::$namespaces['special'] . 'content', false, $env); + $argUsing = $this->get(static::$namespaces['special'] . 'using', false, $env); + $argContent = $child[1]; + + if (! $content) { + break; + } + + $storeEnv = $this->storeEnv; + $varsUsing = []; + + if (isset($argUsing) && isset($argContent)) { + // Get the arguments provided for the content with the names provided in the "using" argument list + $this->storeEnv = null; + $varsUsing = $this->applyArguments($argUsing, $argContent, false); + } + + // restore the scope from the @content + $this->storeEnv = $content->scope; + + // append the vars from using if any + foreach ($varsUsing as $name => $val) { + $this->set($name, $val, true, $this->storeEnv); + } + + $this->compileChildrenNoReturn($content->children, $out); + + $this->storeEnv = $storeEnv; + break; + + case Type::T_DEBUG: + list(, $value) = $child; + + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + $value = $this->compileDebugValue($value); + + $this->logger->debug("$fname:$line DEBUG: $value"); + break; + + case Type::T_WARN: + list(, $value) = $child; + + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + $value = $this->compileDebugValue($value); + + $this->logger->warn("$value\n on line $line of $fname"); + break; + + case Type::T_ERROR: + list(, $value) = $child; + + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + $value = $this->compileValue($this->reduce($value, true)); + + throw $this->error("File $fname on line $line ERROR: $value\n"); + + default: + throw $this->error("unknown child type: $child[0]"); + } + } + + /** + * Reduce expression to string + * + * @param array $exp + * @param bool $keepParens + * + * @return array + */ + protected function expToString($exp, $keepParens = false) + { + list(, $op, $left, $right, $inParens, $whiteLeft, $whiteRight) = $exp; + + $content = []; + + if ($keepParens && $inParens) { + $content[] = '('; + } + + $content[] = $this->reduce($left); + + if ($whiteLeft) { + $content[] = ' '; + } + + $content[] = $op; + + if ($whiteRight) { + $content[] = ' '; + } + + $content[] = $this->reduce($right); + + if ($keepParens && $inParens) { + $content[] = ')'; + } + + return [Type::T_STRING, '', $content]; + } + + /** + * Is truthy? + * + * @param array|Number $value + * + * @return bool + */ + public function isTruthy($value) + { + return $value !== static::$false && $value !== static::$null; + } + + /** + * Is the value a direct relationship combinator? + * + * @param string $value + * + * @return bool + */ + protected function isImmediateRelationshipCombinator($value) + { + return $value === '>' || $value === '+' || $value === '~'; + } + + /** + * Should $value cause its operand to eval + * + * @param array $value + * + * @return bool + */ + protected function shouldEval($value) + { + switch ($value[0]) { + case Type::T_EXPRESSION: + if ($value[1] === '/') { + return $this->shouldEval($value[2]) || $this->shouldEval($value[3]); + } + + // fall-thru + case Type::T_VARIABLE: + case Type::T_FUNCTION_CALL: + return true; + } + + return false; + } + + /** + * Reduce value + * + * @param array|Number $value + * @param bool $inExp + * + * @return array|Number + */ + protected function reduce($value, $inExp = false) + { + if ($value instanceof Number) { + return $value; + } + + switch ($value[0]) { + case Type::T_EXPRESSION: + list(, $op, $left, $right, $inParens) = $value; + + $opName = isset(static::$operatorNames[$op]) ? static::$operatorNames[$op] : $op; + $inExp = $inExp || $this->shouldEval($left) || $this->shouldEval($right); + + $left = $this->reduce($left, true); + + if ($op !== 'and' && $op !== 'or') { + $right = $this->reduce($right, true); + } + + // special case: looks like css shorthand + if ( + $opName == 'div' && ! $inParens && ! $inExp && + (($right[0] !== Type::T_NUMBER && isset($right[2]) && $right[2] != '') || + ($right[0] === Type::T_NUMBER && ! $right->unitless())) + ) { + return $this->expToString($value); + } + + $left = $this->coerceForExpression($left); + $right = $this->coerceForExpression($right); + $ltype = $left[0]; + $rtype = $right[0]; + + $ucOpName = ucfirst($opName); + $ucLType = ucfirst($ltype); + $ucRType = ucfirst($rtype); + + // this tries: + // 1. op[op name][left type][right type] + // 2. op[left type][right type] (passing the op as first arg + // 3. op[op name] + $fn = "op${ucOpName}${ucLType}${ucRType}"; + + if ( + \is_callable([$this, $fn]) || + (($fn = "op${ucLType}${ucRType}") && + \is_callable([$this, $fn]) && + $passOp = true) || + (($fn = "op${ucOpName}") && + \is_callable([$this, $fn]) && + $genOp = true) + ) { + $shouldEval = $inParens || $inExp; + + if (isset($passOp)) { + $out = $this->$fn($op, $left, $right, $shouldEval); + } else { + $out = $this->$fn($left, $right, $shouldEval); + } + + if (isset($out)) { + return $out; + } + } + + return $this->expToString($value); + + case Type::T_UNARY: + list(, $op, $exp, $inParens) = $value; + + $inExp = $inExp || $this->shouldEval($exp); + $exp = $this->reduce($exp); + + if ($exp instanceof Number) { + switch ($op) { + case '+': + return $exp; + + case '-': + return $exp->unaryMinus(); + } + } + + if ($op === 'not') { + if ($inExp || $inParens) { + if ($exp === static::$false || $exp === static::$null) { + return static::$true; + } + + return static::$false; + } + + $op = $op . ' '; + } + + return [Type::T_STRING, '', [$op, $exp]]; + + case Type::T_VARIABLE: + return $this->reduce($this->get($value[1])); + + case Type::T_LIST: + foreach ($value[2] as &$item) { + $item = $this->reduce($item); + } + unset($item); + + if (isset($value[3]) && \is_array($value[3])) { + foreach ($value[3] as &$item) { + $item = $this->reduce($item); + } + unset($item); + } + + return $value; + + case Type::T_MAP: + foreach ($value[1] as &$item) { + $item = $this->reduce($item); + } + + foreach ($value[2] as &$item) { + $item = $this->reduce($item); + } + + return $value; + + case Type::T_STRING: + foreach ($value[2] as &$item) { + if (\is_array($item) || $item instanceof Number) { + $item = $this->reduce($item); + } + } + + return $value; + + case Type::T_INTERPOLATE: + $value[1] = $this->reduce($value[1]); + + if ($inExp) { + return [Type::T_KEYWORD, $this->compileValue($value, false)]; + } + + return $value; + + case Type::T_FUNCTION_CALL: + return $this->fncall($value[1], $value[2]); + + case Type::T_SELF: + $selfParent = ! empty($this->env->block->selfParent) ? $this->env->block->selfParent : null; + $selfSelector = $this->multiplySelectors($this->env, $selfParent); + $selfSelector = $this->collapseSelectorsAsList($selfSelector); + + return $selfSelector; + + default: + return $value; + } + } + + /** + * Function caller + * + * @param string|array $functionReference + * @param array $argValues + * + * @return array|Number + */ + protected function fncall($functionReference, $argValues) + { + // a string means this is a static hard reference coming from the parsing + if (is_string($functionReference)) { + $name = $functionReference; + + $functionReference = $this->getFunctionReference($name); + if ($functionReference === static::$null || $functionReference[0] !== Type::T_FUNCTION_REFERENCE) { + $functionReference = [Type::T_FUNCTION, $name, [Type::T_LIST, ',', []]]; + } + } + + // a function type means we just want a plain css function call + if ($functionReference[0] === Type::T_FUNCTION) { + // for CSS functions, simply flatten the arguments into a list + $listArgs = []; + + foreach ((array) $argValues as $arg) { + if (empty($arg[0]) || count($argValues) === 1) { + $listArgs[] = $this->reduce($this->stringifyFncallArgs($arg[1])); + } + } + + return [Type::T_FUNCTION, $functionReference[1], [Type::T_LIST, ',', $listArgs]]; + } + + if ($functionReference === static::$null || $functionReference[0] !== Type::T_FUNCTION_REFERENCE) { + return static::$defaultValue; + } + + + switch ($functionReference[1]) { + // SCSS @function + case 'scss': + return $this->callScssFunction($functionReference[3], $argValues); + + // native PHP functions + case 'user': + case 'native': + list(,,$name, $fn, $prototype) = $functionReference; + + // special cases of css valid functions min/max + $name = strtolower($name); + if (\in_array($name, ['min', 'max']) && count($argValues) >= 1) { + $cssFunction = $this->cssValidArg( + [Type::T_FUNCTION_CALL, $name, $argValues], + ['min', 'max', 'calc', 'env', 'var'] + ); + if ($cssFunction !== false) { + return $cssFunction; + } + } + $returnValue = $this->callNativeFunction($name, $fn, $prototype, $argValues); + + if (! isset($returnValue)) { + return $this->fncall([Type::T_FUNCTION, $name, [Type::T_LIST, ',', []]], $argValues); + } + + return $returnValue; + + default: + return static::$defaultValue; + } + } + + /** + * @param array|Number $arg + * @param string[] $allowed_function + * @param bool $inFunction + * + * @return array|Number|false + */ + protected function cssValidArg($arg, $allowed_function = [], $inFunction = false) + { + if ($arg instanceof Number) { + return $this->stringifyFncallArgs($arg); + } + + switch ($arg[0]) { + case Type::T_INTERPOLATE: + return [Type::T_KEYWORD, $this->CompileValue($arg)]; + + case Type::T_FUNCTION: + if (! \in_array($arg[1], $allowed_function)) { + return false; + } + if ($arg[2][0] === Type::T_LIST) { + foreach ($arg[2][2] as $k => $subarg) { + $arg[2][2][$k] = $this->cssValidArg($subarg, $allowed_function, $arg[1]); + if ($arg[2][2][$k] === false) { + return false; + } + } + } + return $arg; + + case Type::T_FUNCTION_CALL: + if (! \in_array($arg[1], $allowed_function)) { + return false; + } + $cssArgs = []; + foreach ($arg[2] as $argValue) { + if ($argValue === static::$null) { + return false; + } + $cssArg = $this->cssValidArg($argValue[1], $allowed_function, $arg[1]); + if (empty($argValue[0]) && $cssArg !== false) { + $cssArgs[] = [$argValue[0], $cssArg]; + } else { + return false; + } + } + + return $this->fncall([Type::T_FUNCTION, $arg[1], [Type::T_LIST, ',', []]], $cssArgs); + + case Type::T_STRING: + case Type::T_KEYWORD: + if (!$inFunction or !\in_array($inFunction, ['calc', 'env', 'var'])) { + return false; + } + return $this->stringifyFncallArgs($arg); + + case Type::T_LIST: + if (!$inFunction) { + return false; + } + if (empty($arg['enclosing']) and $arg[1] === '') { + foreach ($arg[2] as $k => $subarg) { + $arg[2][$k] = $this->cssValidArg($subarg, $allowed_function, $inFunction); + if ($arg[2][$k] === false) { + return false; + } + } + $arg[0] = Type::T_STRING; + return $arg; + } + return false; + + case Type::T_EXPRESSION: + if (! \in_array($arg[1], ['+', '-', '/', '*'])) { + return false; + } + $arg[2] = $this->cssValidArg($arg[2], $allowed_function, $inFunction); + $arg[3] = $this->cssValidArg($arg[3], $allowed_function, $inFunction); + if ($arg[2] === false || $arg[3] === false) { + return false; + } + return $this->expToString($arg, true); + + case Type::T_VARIABLE: + case Type::T_SELF: + default: + return false; + } + } + + + /** + * Reformat fncall arguments to proper css function output + * + * @param array|Number $arg + * + * @return array|Number + */ + protected function stringifyFncallArgs($arg) + { + if ($arg instanceof Number) { + return $arg; + } + + switch ($arg[0]) { + case Type::T_LIST: + foreach ($arg[2] as $k => $v) { + $arg[2][$k] = $this->stringifyFncallArgs($v); + } + break; + + case Type::T_EXPRESSION: + if ($arg[1] === '/') { + $arg[2] = $this->stringifyFncallArgs($arg[2]); + $arg[3] = $this->stringifyFncallArgs($arg[3]); + $arg[5] = $arg[6] = false; // no space around / + $arg = $this->expToString($arg); + } + break; + + case Type::T_FUNCTION_CALL: + $name = strtolower($arg[1]); + + if (in_array($name, ['max', 'min', 'calc'])) { + $args = $arg[2]; + $arg = $this->fncall([Type::T_FUNCTION, $name, [Type::T_LIST, ',', []]], $args); + } + break; + } + + return $arg; + } + + /** + * Find a function reference + * @param string $name + * @param bool $safeCopy + * @return array + */ + protected function getFunctionReference($name, $safeCopy = false) + { + // SCSS @function + if ($func = $this->get(static::$namespaces['function'] . $name, false)) { + if ($safeCopy) { + $func = clone $func; + } + + return [Type::T_FUNCTION_REFERENCE, 'scss', $name, $func]; + } + + // native PHP functions + + // try to find a native lib function + $normalizedName = $this->normalizeName($name); + + if (isset($this->userFunctions[$normalizedName])) { + // see if we can find a user function + list($f, $prototype) = $this->userFunctions[$normalizedName]; + + return [Type::T_FUNCTION_REFERENCE, 'user', $name, $f, $prototype]; + } + + $lowercasedName = strtolower($normalizedName); + + // Special functions overriding a CSS function are case-insensitive. We normalize them as lowercase + // to avoid the deprecation warning about the wrong case being used. + if ($lowercasedName === 'min' || $lowercasedName === 'max') { + $normalizedName = $lowercasedName; + } + + if (($f = $this->getBuiltinFunction($normalizedName)) && \is_callable($f)) { + $libName = $f[1]; + $prototype = isset(static::$$libName) ? static::$$libName : null; + + // All core functions have a prototype defined. Not finding the + // prototype can mean 2 things: + // - the function comes from a child class (deprecated just after) + // - the function was found with a different case, which relates to calling the + // wrong Sass function due to our camelCase usage (`fade-in()` vs `fadein()`), + // because PHP method names are case-insensitive while property names are + // case-sensitive. + if ($prototype === null || strtolower($normalizedName) !== $normalizedName) { + $r = new \ReflectionMethod($this, $libName); + $actualLibName = $r->name; + + if ($actualLibName !== $libName || strtolower($normalizedName) !== $normalizedName) { + $kebabCaseName = preg_replace('~(?<=\\w)([A-Z])~', '-$1', substr($actualLibName, 3)); + assert($kebabCaseName !== null); + $originalName = strtolower($kebabCaseName); + $warning = "Calling built-in functions with a non-standard name is deprecated since Scssphp 1.8.0 and will not work anymore in 2.0 (they will be treated as CSS function calls instead).\nUse \"$originalName\" instead of \"$name\"."; + @trigger_error($warning, E_USER_DEPRECATED); + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + Warn::deprecation("$warning\n on line $line of $fname"); + + // Use the actual function definition + $prototype = isset(static::$$actualLibName) ? static::$$actualLibName : null; + $f[1] = $libName = $actualLibName; + } + } + + if (\get_class($this) !== __CLASS__ && !isset($this->warnedChildFunctions[$libName])) { + $r = new \ReflectionMethod($this, $libName); + $declaringClass = $r->getDeclaringClass()->name; + + $needsWarning = $this->warnedChildFunctions[$libName] = $declaringClass !== __CLASS__; + + if ($needsWarning) { + if (method_exists(__CLASS__, $libName)) { + @trigger_error(sprintf('Overriding the "%s" core function by extending the Compiler is deprecated and will be unsupported in 2.0. Remove the "%s::%s" method.', $normalizedName, $declaringClass, $libName), E_USER_DEPRECATED); + } else { + @trigger_error(sprintf('Registering custom functions by extending the Compiler and using the lib* discovery mechanism is deprecated and will be removed in 2.0. Replace the "%s::%s" method with registering the "%s" function through "Compiler::registerFunction".', $declaringClass, $libName, $normalizedName), E_USER_DEPRECATED); + } + } + } + + return [Type::T_FUNCTION_REFERENCE, 'native', $name, $f, $prototype]; + } + + return static::$null; + } + + + /** + * Normalize name + * + * @param string $name + * + * @return string + */ + protected function normalizeName($name) + { + return str_replace('-', '_', $name); + } + + /** + * Normalize value + * + * @internal + * + * @param array|Number $value + * + * @return array|Number + */ + public function normalizeValue($value) + { + $value = $this->coerceForExpression($this->reduce($value)); + + if ($value instanceof Number) { + return $value; + } + + switch ($value[0]) { + case Type::T_LIST: + $value = $this->extractInterpolation($value); + + if ($value[0] !== Type::T_LIST) { + return [Type::T_KEYWORD, $this->compileValue($value)]; + } + + foreach ($value[2] as $key => $item) { + $value[2][$key] = $this->normalizeValue($item); + } + + if (! empty($value['enclosing'])) { + unset($value['enclosing']); + } + + if ($value[1] === '' && count($value[2]) > 1) { + $value[1] = ' '; + } + + return $value; + + case Type::T_STRING: + return [$value[0], '"', [$this->compileStringContent($value)]]; + + case Type::T_INTERPOLATE: + return [Type::T_KEYWORD, $this->compileValue($value)]; + + default: + return $value; + } + } + + /** + * Add numbers + * + * @param Number $left + * @param Number $right + * + * @return Number + */ + protected function opAddNumberNumber(Number $left, Number $right) + { + return $left->plus($right); + } + + /** + * Multiply numbers + * + * @param Number $left + * @param Number $right + * + * @return Number + */ + protected function opMulNumberNumber(Number $left, Number $right) + { + return $left->times($right); + } + + /** + * Subtract numbers + * + * @param Number $left + * @param Number $right + * + * @return Number + */ + protected function opSubNumberNumber(Number $left, Number $right) + { + return $left->minus($right); + } + + /** + * Divide numbers + * + * @param Number $left + * @param Number $right + * + * @return Number + */ + protected function opDivNumberNumber(Number $left, Number $right) + { + return $left->dividedBy($right); + } + + /** + * Mod numbers + * + * @param Number $left + * @param Number $right + * + * @return Number + */ + protected function opModNumberNumber(Number $left, Number $right) + { + return $left->modulo($right); + } + + /** + * Add strings + * + * @param array $left + * @param array $right + * + * @return array|null + */ + protected function opAdd($left, $right) + { + if ($strLeft = $this->coerceString($left)) { + if ($right[0] === Type::T_STRING) { + $right[1] = ''; + } + + $strLeft[2][] = $right; + + return $strLeft; + } + + if ($strRight = $this->coerceString($right)) { + if ($left[0] === Type::T_STRING) { + $left[1] = ''; + } + + array_unshift($strRight[2], $left); + + return $strRight; + } + + return null; + } + + /** + * Boolean and + * + * @param array|Number $left + * @param array|Number $right + * @param bool $shouldEval + * + * @return array|Number|null + */ + protected function opAnd($left, $right, $shouldEval) + { + $truthy = ($left === static::$null || $right === static::$null) || + ($left === static::$false || $left === static::$true) && + ($right === static::$false || $right === static::$true); + + if (! $shouldEval) { + if (! $truthy) { + return null; + } + } + + if ($left !== static::$false && $left !== static::$null) { + return $this->reduce($right, true); + } + + return $left; + } + + /** + * Boolean or + * + * @param array|Number $left + * @param array|Number $right + * @param bool $shouldEval + * + * @return array|Number|null + */ + protected function opOr($left, $right, $shouldEval) + { + $truthy = ($left === static::$null || $right === static::$null) || + ($left === static::$false || $left === static::$true) && + ($right === static::$false || $right === static::$true); + + if (! $shouldEval) { + if (! $truthy) { + return null; + } + } + + if ($left !== static::$false && $left !== static::$null) { + return $left; + } + + return $this->reduce($right, true); + } + + /** + * Compare colors + * + * @param string $op + * @param array $left + * @param array $right + * + * @return array + */ + protected function opColorColor($op, $left, $right) + { + if ($op !== '==' && $op !== '!=') { + $warning = "Color arithmetic is deprecated and will be an error in future versions.\n" + . "Consider using Sass's color functions instead."; + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + + Warn::deprecation("$warning\n on line $line of $fname"); + } + + $out = [Type::T_COLOR]; + + foreach ([1, 2, 3] as $i) { + $lval = isset($left[$i]) ? $left[$i] : 0; + $rval = isset($right[$i]) ? $right[$i] : 0; + + switch ($op) { + case '+': + $out[] = $lval + $rval; + break; + + case '-': + $out[] = $lval - $rval; + break; + + case '*': + $out[] = $lval * $rval; + break; + + case '%': + if ($rval == 0) { + throw $this->error("color: Can't take modulo by zero"); + } + + $out[] = $lval % $rval; + break; + + case '/': + if ($rval == 0) { + throw $this->error("color: Can't divide by zero"); + } + + $out[] = (int) ($lval / $rval); + break; + + case '==': + return $this->opEq($left, $right); + + case '!=': + return $this->opNeq($left, $right); + + default: + throw $this->error("color: unknown op $op"); + } + } + + if (isset($left[4])) { + $out[4] = $left[4]; + } elseif (isset($right[4])) { + $out[4] = $right[4]; + } + + return $this->fixColor($out); + } + + /** + * Compare color and number + * + * @param string $op + * @param array $left + * @param Number $right + * + * @return array + */ + protected function opColorNumber($op, $left, Number $right) + { + if ($op === '==') { + return static::$false; + } + + if ($op === '!=') { + return static::$true; + } + + $value = $right->getDimension(); + + return $this->opColorColor( + $op, + $left, + [Type::T_COLOR, $value, $value, $value] + ); + } + + /** + * Compare number and color + * + * @param string $op + * @param Number $left + * @param array $right + * + * @return array + */ + protected function opNumberColor($op, Number $left, $right) + { + if ($op === '==') { + return static::$false; + } + + if ($op === '!=') { + return static::$true; + } + + $value = $left->getDimension(); + + return $this->opColorColor( + $op, + [Type::T_COLOR, $value, $value, $value], + $right + ); + } + + /** + * Compare number1 == number2 + * + * @param array|Number $left + * @param array|Number $right + * + * @return array + */ + protected function opEq($left, $right) + { + if (($lStr = $this->coerceString($left)) && ($rStr = $this->coerceString($right))) { + $lStr[1] = ''; + $rStr[1] = ''; + + $left = $this->compileValue($lStr); + $right = $this->compileValue($rStr); + } + + return $this->toBool($left === $right); + } + + /** + * Compare number1 != number2 + * + * @param array|Number $left + * @param array|Number $right + * + * @return array + */ + protected function opNeq($left, $right) + { + if (($lStr = $this->coerceString($left)) && ($rStr = $this->coerceString($right))) { + $lStr[1] = ''; + $rStr[1] = ''; + + $left = $this->compileValue($lStr); + $right = $this->compileValue($rStr); + } + + return $this->toBool($left !== $right); + } + + /** + * Compare number1 == number2 + * + * @param Number $left + * @param Number $right + * + * @return array + */ + protected function opEqNumberNumber(Number $left, Number $right) + { + return $this->toBool($left->equals($right)); + } + + /** + * Compare number1 != number2 + * + * @param Number $left + * @param Number $right + * + * @return array + */ + protected function opNeqNumberNumber(Number $left, Number $right) + { + return $this->toBool(!$left->equals($right)); + } + + /** + * Compare number1 >= number2 + * + * @param Number $left + * @param Number $right + * + * @return array + */ + protected function opGteNumberNumber(Number $left, Number $right) + { + return $this->toBool($left->greaterThanOrEqual($right)); + } + + /** + * Compare number1 > number2 + * + * @param Number $left + * @param Number $right + * + * @return array + */ + protected function opGtNumberNumber(Number $left, Number $right) + { + return $this->toBool($left->greaterThan($right)); + } + + /** + * Compare number1 <= number2 + * + * @param Number $left + * @param Number $right + * + * @return array + */ + protected function opLteNumberNumber(Number $left, Number $right) + { + return $this->toBool($left->lessThanOrEqual($right)); + } + + /** + * Compare number1 < number2 + * + * @param Number $left + * @param Number $right + * + * @return array + */ + protected function opLtNumberNumber(Number $left, Number $right) + { + return $this->toBool($left->lessThan($right)); + } + + /** + * Cast to boolean + * + * @api + * + * @param bool $thing + * + * @return array + */ + public function toBool($thing) + { + return $thing ? static::$true : static::$false; + } + + /** + * Escape non printable chars in strings output as in dart-sass + * + * @internal + * + * @param string $string + * @param bool $inKeyword + * + * @return string + */ + public function escapeNonPrintableChars($string, $inKeyword = false) + { + static $replacement = []; + if (empty($replacement[$inKeyword])) { + for ($i = 0; $i < 32; $i++) { + if ($i !== 9 || $inKeyword) { + $replacement[$inKeyword][chr($i)] = '\\' . dechex($i) . ($inKeyword ? ' ' : chr(0)); + } + } + } + $string = str_replace(array_keys($replacement[$inKeyword]), array_values($replacement[$inKeyword]), $string); + // chr(0) is not a possible char from the input, so any chr(0) comes from our escaping replacement + if (strpos($string, chr(0)) !== false) { + if (substr($string, -1) === chr(0)) { + $string = substr($string, 0, -1); + } + $string = str_replace( + [chr(0) . '\\',chr(0) . ' '], + [ '\\', ' '], + $string + ); + if (strpos($string, chr(0)) !== false) { + $parts = explode(chr(0), $string); + $string = array_shift($parts); + while (count($parts)) { + $next = array_shift($parts); + if (strpos("0123456789abcdefABCDEF" . chr(9), $next[0]) !== false) { + $string .= " "; + } + $string .= $next; + } + } + } + + return $string; + } + + /** + * Compiles a primitive value into a CSS property value. + * + * Values in scssphp are typed by being wrapped in arrays, their format is + * typically: + * + * array(type, contents [, additional_contents]*) + * + * The input is expected to be reduced. This function will not work on + * things like expressions and variables. + * + * @api + * + * @param array|Number $value + * @param bool $quote + * + * @return string + */ + public function compileValue($value, $quote = true) + { + $value = $this->reduce($value); + + if ($value instanceof Number) { + return $value->output($this); + } + + switch ($value[0]) { + case Type::T_KEYWORD: + return $this->escapeNonPrintableChars($value[1], true); + + case Type::T_COLOR: + // [1] - red component (either number for a %) + // [2] - green component + // [3] - blue component + // [4] - optional alpha component + list(, $r, $g, $b) = $value; + + $r = $this->compileRGBAValue($r); + $g = $this->compileRGBAValue($g); + $b = $this->compileRGBAValue($b); + + if (\count($value) === 5) { + $alpha = $this->compileRGBAValue($value[4], true); + + if (! is_numeric($alpha) || $alpha < 1) { + $colorName = Colors::RGBaToColorName($r, $g, $b, $alpha); + + if (! \is_null($colorName)) { + return $colorName; + } + + if (is_numeric($alpha)) { + $a = new Number($alpha, ''); + } else { + $a = $alpha; + } + + return 'rgba(' . $r . ', ' . $g . ', ' . $b . ', ' . $a . ')'; + } + } + + if (! is_numeric($r) || ! is_numeric($g) || ! is_numeric($b)) { + return 'rgb(' . $r . ', ' . $g . ', ' . $b . ')'; + } + + $colorName = Colors::RGBaToColorName($r, $g, $b); + + if (! \is_null($colorName)) { + return $colorName; + } + + $h = sprintf('#%02x%02x%02x', $r, $g, $b); + + // Converting hex color to short notation (e.g. #003399 to #039) + if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) { + $h = '#' . $h[1] . $h[3] . $h[5]; + } + + return $h; + + case Type::T_STRING: + $content = $this->compileStringContent($value, $quote); + + if ($value[1] && $quote) { + $content = str_replace('\\', '\\\\', $content); + + $content = $this->escapeNonPrintableChars($content); + + // force double quote as string quote for the output in certain cases + if ( + $value[1] === "'" && + (strpos($content, '"') === false or strpos($content, "'") !== false) + ) { + $value[1] = '"'; + } elseif ( + $value[1] === '"' && + (strpos($content, '"') !== false and strpos($content, "'") === false) + ) { + $value[1] = "'"; + } + + $content = str_replace($value[1], '\\' . $value[1], $content); + } + + return $value[1] . $content . $value[1]; + + case Type::T_FUNCTION: + $args = ! empty($value[2]) ? $this->compileValue($value[2], $quote) : ''; + + return "$value[1]($args)"; + + case Type::T_FUNCTION_REFERENCE: + $name = ! empty($value[2]) ? $value[2] : ''; + + return "get-function(\"$name\")"; + + case Type::T_LIST: + $value = $this->extractInterpolation($value); + + if ($value[0] !== Type::T_LIST) { + return $this->compileValue($value, $quote); + } + + list(, $delim, $items) = $value; + $pre = $post = ''; + + if (! empty($value['enclosing'])) { + switch ($value['enclosing']) { + case 'parent': + //$pre = '('; + //$post = ')'; + break; + case 'forced_parent': + $pre = '('; + $post = ')'; + break; + case 'bracket': + case 'forced_bracket': + $pre = '['; + $post = ']'; + break; + } + } + + $separator = $delim === '/' ? ' /' : $delim; + + $prefix_value = ''; + + if ($delim !== ' ') { + $prefix_value = ' '; + } + + $filtered = []; + + $same_string_quote = null; + foreach ($items as $item) { + if (\is_null($same_string_quote)) { + $same_string_quote = false; + if ($item[0] === Type::T_STRING) { + $same_string_quote = $item[1]; + foreach ($items as $ii) { + if ($ii[0] !== Type::T_STRING) { + $same_string_quote = false; + break; + } + } + } + } + if ($item[0] === Type::T_NULL) { + continue; + } + if ($same_string_quote === '"' && $item[0] === Type::T_STRING && $item[1]) { + $item[1] = $same_string_quote; + } + + $compiled = $this->compileValue($item, $quote); + + if ($prefix_value && \strlen($compiled)) { + $compiled = $prefix_value . $compiled; + } + + $filtered[] = $compiled; + } + + return $pre . substr(implode($separator, $filtered), \strlen($prefix_value)) . $post; + + case Type::T_MAP: + $keys = $value[1]; + $values = $value[2]; + $filtered = []; + + for ($i = 0, $s = \count($keys); $i < $s; $i++) { + $filtered[$this->compileValue($keys[$i], $quote)] = $this->compileValue($values[$i], $quote); + } + + array_walk($filtered, function (&$value, $key) { + $value = $key . ': ' . $value; + }); + + return '(' . implode(', ', $filtered) . ')'; + + case Type::T_INTERPOLATED: + // node created by extractInterpolation + list(, $interpolate, $left, $right) = $value; + list(,, $whiteLeft, $whiteRight) = $interpolate; + + $delim = $left[1]; + + if ($delim && $delim !== ' ' && ! $whiteLeft) { + $delim .= ' '; + } + + $left = \count($left[2]) > 0 + ? $this->compileValue($left, $quote) . $delim . $whiteLeft + : ''; + + $delim = $right[1]; + + if ($delim && $delim !== ' ') { + $delim .= ' '; + } + + $right = \count($right[2]) > 0 ? + $whiteRight . $delim . $this->compileValue($right, $quote) : ''; + + return $left . $this->compileValue($interpolate, $quote) . $right; + + case Type::T_INTERPOLATE: + // strip quotes if it's a string + $reduced = $this->reduce($value[1]); + + if ($reduced instanceof Number) { + return $this->compileValue($reduced, $quote); + } + + switch ($reduced[0]) { + case Type::T_LIST: + $reduced = $this->extractInterpolation($reduced); + + if ($reduced[0] !== Type::T_LIST) { + break; + } + + list(, $delim, $items) = $reduced; + + if ($delim !== ' ') { + $delim .= ' '; + } + + $filtered = []; + + foreach ($items as $item) { + if ($item[0] === Type::T_NULL) { + continue; + } + + if ($item[0] === Type::T_STRING) { + $filtered[] = $this->compileStringContent($item, $quote); + } elseif ($item[0] === Type::T_KEYWORD) { + $filtered[] = $item[1]; + } else { + $filtered[] = $this->compileValue($item, $quote); + } + } + + $reduced = [Type::T_KEYWORD, implode("$delim", $filtered)]; + break; + + case Type::T_STRING: + $reduced = [Type::T_STRING, '', [$this->compileStringContent($reduced)]]; + break; + + case Type::T_NULL: + $reduced = [Type::T_KEYWORD, '']; + } + + return $this->compileValue($reduced, $quote); + + case Type::T_NULL: + return 'null'; + + case Type::T_COMMENT: + return $this->compileCommentValue($value); + + default: + throw $this->error('unknown value type: ' . json_encode($value)); + } + } + + /** + * @param array|Number $value + * + * @return string + */ + protected function compileDebugValue($value) + { + $value = $this->reduce($value, true); + + if ($value instanceof Number) { + return $this->compileValue($value); + } + + switch ($value[0]) { + case Type::T_STRING: + return $this->compileStringContent($value); + + default: + return $this->compileValue($value); + } + } + + /** + * Flatten list + * + * @param array $list + * + * @return string + * + * @deprecated + */ + protected function flattenList($list) + { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + + return $this->compileValue($list); + } + + /** + * Gets the text of a Sass string + * + * Calling this method on anything else than a SassString is unsupported. Use {@see assertString} first + * to ensure that the value is indeed a string. + * + * @param array $value + * + * @return string + */ + public function getStringText(array $value) + { + if ($value[0] !== Type::T_STRING) { + throw new \InvalidArgumentException('The argument is not a sass string. Did you forgot to use "assertString"?'); + } + + return $this->compileStringContent($value); + } + + /** + * Compile string content + * + * @param array $string + * @param bool $quote + * + * @return string + */ + protected function compileStringContent($string, $quote = true) + { + $parts = []; + + foreach ($string[2] as $part) { + if (\is_array($part) || $part instanceof Number) { + $parts[] = $this->compileValue($part, $quote); + } else { + $parts[] = $part; + } + } + + return implode($parts); + } + + /** + * Extract interpolation; it doesn't need to be recursive, compileValue will handle that + * + * @param array $list + * + * @return array + */ + protected function extractInterpolation($list) + { + $items = $list[2]; + + foreach ($items as $i => $item) { + if ($item[0] === Type::T_INTERPOLATE) { + $before = [Type::T_LIST, $list[1], \array_slice($items, 0, $i)]; + $after = [Type::T_LIST, $list[1], \array_slice($items, $i + 1)]; + + return [Type::T_INTERPOLATED, $item, $before, $after]; + } + } + + return $list; + } + + /** + * Find the final set of selectors + * + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * @param \ScssPhp\ScssPhp\Block $selfParent + * + * @return array + */ + protected function multiplySelectors(Environment $env, $selfParent = null) + { + $envs = $this->compactEnv($env); + $selectors = []; + $parentSelectors = [[]]; + + $selfParentSelectors = null; + + if (! \is_null($selfParent) && $selfParent->selectors) { + $selfParentSelectors = $this->evalSelectors($selfParent->selectors); + } + + while ($env = array_pop($envs)) { + if (empty($env->selectors)) { + continue; + } + + $selectors = $env->selectors; + + do { + $stillHasSelf = false; + $prevSelectors = $selectors; + $selectors = []; + + foreach ($parentSelectors as $parent) { + foreach ($prevSelectors as $selector) { + if ($selfParentSelectors) { + foreach ($selfParentSelectors as $selfParent) { + // if no '&' in the selector, each call will give same result, only add once + $s = $this->joinSelectors($parent, $selector, $stillHasSelf, $selfParent); + $selectors[serialize($s)] = $s; + } + } else { + $s = $this->joinSelectors($parent, $selector, $stillHasSelf); + $selectors[serialize($s)] = $s; + } + } + } + } while ($stillHasSelf); + + $parentSelectors = $selectors; + } + + $selectors = array_values($selectors); + + // case we are just starting a at-root : nothing to multiply but parentSelectors + if (! $selectors && $selfParentSelectors) { + $selectors = $selfParentSelectors; + } + + return $selectors; + } + + /** + * Join selectors; looks for & to replace, or append parent before child + * + * @param array $parent + * @param array $child + * @param bool $stillHasSelf + * @param array $selfParentSelectors + + * @return array + */ + protected function joinSelectors($parent, $child, &$stillHasSelf, $selfParentSelectors = null) + { + $setSelf = false; + $out = []; + + foreach ($child as $part) { + $newPart = []; + + foreach ($part as $p) { + // only replace & once and should be recalled to be able to make combinations + if ($p === static::$selfSelector && $setSelf) { + $stillHasSelf = true; + } + + if ($p === static::$selfSelector && ! $setSelf) { + $setSelf = true; + + if (\is_null($selfParentSelectors)) { + $selfParentSelectors = $parent; + } + + foreach ($selfParentSelectors as $i => $parentPart) { + if ($i > 0) { + $out[] = $newPart; + $newPart = []; + } + + foreach ($parentPart as $pp) { + if (\is_array($pp)) { + $flatten = []; + + array_walk_recursive($pp, function ($a) use (&$flatten) { + $flatten[] = $a; + }); + + $pp = implode($flatten); + } + + $newPart[] = $pp; + } + } + } else { + $newPart[] = $p; + } + } + + $out[] = $newPart; + } + + return $setSelf ? $out : array_merge($parent, $child); + } + + /** + * Multiply media + * + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * @param array $childQueries + * + * @return array + */ + protected function multiplyMedia(Environment $env = null, $childQueries = null) + { + if ( + ! isset($env) || + ! empty($env->block->type) && $env->block->type !== Type::T_MEDIA + ) { + return $childQueries; + } + + // plain old block, skip + if (empty($env->block->type)) { + return $this->multiplyMedia($env->parent, $childQueries); + } + + assert($env->block instanceof MediaBlock); + + $parentQueries = isset($env->block->queryList) + ? $env->block->queryList + : [[[Type::T_MEDIA_VALUE, $env->block->value]]]; + + $store = [$this->env, $this->storeEnv]; + + $this->env = $env; + $this->storeEnv = null; + $parentQueries = $this->evaluateMediaQuery($parentQueries); + + list($this->env, $this->storeEnv) = $store; + + if (\is_null($childQueries)) { + $childQueries = $parentQueries; + } else { + $originalQueries = $childQueries; + $childQueries = []; + + foreach ($parentQueries as $parentQuery) { + foreach ($originalQueries as $childQuery) { + $childQueries[] = array_merge( + $parentQuery, + [[Type::T_MEDIA_TYPE, [Type::T_KEYWORD, 'all']]], + $childQuery + ); + } + } + } + + return $this->multiplyMedia($env->parent, $childQueries); + } + + /** + * Convert env linked list to stack + * + * @param Environment $env + * + * @return Environment[] + * + * @phpstan-return non-empty-array + */ + protected function compactEnv(Environment $env) + { + for ($envs = []; $env; $env = $env->parent) { + $envs[] = $env; + } + + return $envs; + } + + /** + * Convert env stack to singly linked list + * + * @param Environment[] $envs + * + * @return Environment + * + * @phpstan-param non-empty-array $envs + */ + protected function extractEnv($envs) + { + for ($env = null; $e = array_pop($envs);) { + $e->parent = $env; + $env = $e; + } + + return $env; + } + + /** + * Push environment + * + * @param \ScssPhp\ScssPhp\Block $block + * + * @return \ScssPhp\ScssPhp\Compiler\Environment + */ + protected function pushEnv(Block $block = null) + { + $env = new Environment(); + $env->parent = $this->env; + $env->parentStore = $this->storeEnv; + $env->store = []; + $env->block = $block; + $env->depth = isset($this->env->depth) ? $this->env->depth + 1 : 0; + + $this->env = $env; + $this->storeEnv = null; + + return $env; + } + + /** + * Pop environment + * + * @return void + */ + protected function popEnv() + { + $this->storeEnv = $this->env->parentStore; + $this->env = $this->env->parent; + } + + /** + * Propagate vars from a just poped Env (used in @each and @for) + * + * @param array $store + * @param null|string[] $excludedVars + * + * @return void + */ + protected function backPropagateEnv($store, $excludedVars = null) + { + foreach ($store as $key => $value) { + if (empty($excludedVars) || ! \in_array($key, $excludedVars)) { + $this->set($key, $value, true); + } + } + } + + /** + * Get store environment + * + * @return \ScssPhp\ScssPhp\Compiler\Environment + */ + protected function getStoreEnv() + { + return isset($this->storeEnv) ? $this->storeEnv : $this->env; + } + + /** + * Set variable + * + * @param string $name + * @param mixed $value + * @param bool $shadow + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * @param mixed $valueUnreduced + * + * @return void + */ + protected function set($name, $value, $shadow = false, Environment $env = null, $valueUnreduced = null) + { + $name = $this->normalizeName($name); + + if (! isset($env)) { + $env = $this->getStoreEnv(); + } + + if ($shadow) { + $this->setRaw($name, $value, $env, $valueUnreduced); + } else { + $this->setExisting($name, $value, $env, $valueUnreduced); + } + } + + /** + * Set existing variable + * + * @param string $name + * @param mixed $value + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * @param mixed $valueUnreduced + * + * @return void + */ + protected function setExisting($name, $value, Environment $env, $valueUnreduced = null) + { + $storeEnv = $env; + $specialContentKey = static::$namespaces['special'] . 'content'; + + $hasNamespace = $name[0] === '^' || $name[0] === '@' || $name[0] === '%'; + + $maxDepth = 10000; + + for (;;) { + if ($maxDepth-- <= 0) { + break; + } + + if (\array_key_exists($name, $env->store)) { + break; + } + + if (! $hasNamespace && isset($env->marker)) { + if (! empty($env->store[$specialContentKey])) { + $env = $env->store[$specialContentKey]->scope; + continue; + } + + if (! empty($env->declarationScopeParent)) { + $env = $env->declarationScopeParent; + continue; + } else { + $env = $storeEnv; + break; + } + } + + if (isset($env->parentStore)) { + $env = $env->parentStore; + } elseif (isset($env->parent)) { + $env = $env->parent; + } else { + $env = $storeEnv; + break; + } + } + + $env->store[$name] = $value; + + if ($valueUnreduced) { + $env->storeUnreduced[$name] = $valueUnreduced; + } + } + + /** + * Set raw variable + * + * @param string $name + * @param mixed $value + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * @param mixed $valueUnreduced + * + * @return void + */ + protected function setRaw($name, $value, Environment $env, $valueUnreduced = null) + { + $env->store[$name] = $value; + + if ($valueUnreduced) { + $env->storeUnreduced[$name] = $valueUnreduced; + } + } + + /** + * Get variable + * + * @internal + * + * @param string $name + * @param bool $shouldThrow + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * @param bool $unreduced + * + * @return mixed|null + */ + public function get($name, $shouldThrow = true, Environment $env = null, $unreduced = false) + { + $normalizedName = $this->normalizeName($name); + $specialContentKey = static::$namespaces['special'] . 'content'; + + if (! isset($env)) { + $env = $this->getStoreEnv(); + } + + $hasNamespace = $normalizedName[0] === '^' || $normalizedName[0] === '@' || $normalizedName[0] === '%'; + + $maxDepth = 10000; + + for (;;) { + if ($maxDepth-- <= 0) { + break; + } + + if (\array_key_exists($normalizedName, $env->store)) { + if ($unreduced && isset($env->storeUnreduced[$normalizedName])) { + return $env->storeUnreduced[$normalizedName]; + } + + return $env->store[$normalizedName]; + } + + if (! $hasNamespace && isset($env->marker)) { + if (! empty($env->store[$specialContentKey])) { + $env = $env->store[$specialContentKey]->scope; + continue; + } + + if (! empty($env->declarationScopeParent)) { + $env = $env->declarationScopeParent; + } else { + $env = $this->rootEnv; + } + continue; + } + + if (isset($env->parentStore)) { + $env = $env->parentStore; + } elseif (isset($env->parent)) { + $env = $env->parent; + } else { + break; + } + } + + if ($shouldThrow) { + throw $this->error("Undefined variable \$$name" . ($maxDepth <= 0 ? ' (infinite recursion)' : '')); + } + + // found nothing + return null; + } + + /** + * Has variable? + * + * @param string $name + * @param \ScssPhp\ScssPhp\Compiler\Environment $env + * + * @return bool + */ + protected function has($name, Environment $env = null) + { + return ! \is_null($this->get($name, false, $env)); + } + + /** + * Inject variables + * + * @param array $args + * + * @return void + */ + protected function injectVariables(array $args) + { + if (empty($args)) { + return; + } + + $parser = $this->parserFactory(__METHOD__); + + foreach ($args as $name => $strValue) { + if ($name[0] === '$') { + $name = substr($name, 1); + } + + if (!\is_string($strValue) || ! $parser->parseValue($strValue, $value)) { + $value = $this->coerceValue($strValue); + } + + $this->set($name, $value); + } + } + + /** + * Replaces variables. + * + * @param array $variables + * + * @return void + */ + public function replaceVariables(array $variables) + { + $this->registeredVars = []; + $this->addVariables($variables); + } + + /** + * Replaces variables. + * + * @param array $variables + * + * @return void + */ + public function addVariables(array $variables) + { + $triggerWarning = false; + + foreach ($variables as $name => $value) { + if (!$value instanceof Number && !\is_array($value)) { + $triggerWarning = true; + } + + $this->registeredVars[$name] = $value; + } + + if ($triggerWarning) { + @trigger_error('Passing raw values to as custom variables to the Compiler is deprecated. Use "\ScssPhp\ScssPhp\ValueConverter::parseValue" or "\ScssPhp\ScssPhp\ValueConverter::fromPhp" to convert them instead.', E_USER_DEPRECATED); + } + } + + /** + * Set variables + * + * @api + * + * @param array $variables + * + * @return void + * + * @deprecated Use "addVariables" or "replaceVariables" instead. + */ + public function setVariables(array $variables) + { + @trigger_error('The method "setVariables" of the Compiler is deprecated. Use the "addVariables" method for the equivalent behavior or "replaceVariables" if merging with previous variables was not desired.'); + + $this->addVariables($variables); + } + + /** + * Unset variable + * + * @api + * + * @param string $name + * + * @return void + */ + public function unsetVariable($name) + { + unset($this->registeredVars[$name]); + } + + /** + * Returns list of variables + * + * @api + * + * @return array + */ + public function getVariables() + { + return $this->registeredVars; + } + + /** + * Adds to list of parsed files + * + * @internal + * + * @param string|null $path + * + * @return void + */ + public function addParsedFile($path) + { + if (! \is_null($path) && is_file($path)) { + $this->parsedFiles[realpath($path)] = filemtime($path); + } + } + + /** + * Returns list of parsed files + * + * @deprecated + * @return array + */ + public function getParsedFiles() + { + @trigger_error('The method "getParsedFiles" of the Compiler is deprecated. Use the "getIncludedFiles" method on the CompilationResult instance returned by compileString() instead. Be careful that the signature of the method is different.', E_USER_DEPRECATED); + return $this->parsedFiles; + } + + /** + * Add import path + * + * @api + * + * @param string|callable $path + * + * @return void + */ + public function addImportPath($path) + { + if (! \in_array($path, $this->importPaths)) { + $this->importPaths[] = $path; + } + } + + /** + * Set import paths + * + * @api + * + * @param string|array $path + * + * @return void + */ + public function setImportPaths($path) + { + $paths = (array) $path; + $actualImportPaths = array_filter($paths, function ($path) { + return $path !== ''; + }); + + $this->legacyCwdImportPath = \count($actualImportPaths) !== \count($paths); + + if ($this->legacyCwdImportPath) { + @trigger_error('Passing an empty string in the import paths to refer to the current working directory is deprecated. If that\'s the intended behavior, the value of "getcwd()" should be used directly instead. If this was used for resolving relative imports of the input alongside "chdir" with the source directory, the path of the input file should be passed to "compileString()" instead.', E_USER_DEPRECATED); + } + + $this->importPaths = $actualImportPaths; + } + + /** + * Set number precision + * + * @api + * + * @param int $numberPrecision + * + * @return void + * + * @deprecated The number precision is not configurable anymore. The default is enough for all browsers. + */ + public function setNumberPrecision($numberPrecision) + { + @trigger_error('The number precision is not configurable anymore. ' + . 'The default is enough for all browsers.', E_USER_DEPRECATED); + } + + /** + * Sets the output style. + * + * @api + * + * @param string $style One of the OutputStyle constants + * + * @return void + * + * @phpstan-param OutputStyle::* $style + */ + public function setOutputStyle($style) + { + switch ($style) { + case OutputStyle::EXPANDED: + $this->formatter = Expanded::class; + break; + + case OutputStyle::COMPRESSED: + $this->formatter = Compressed::class; + break; + + default: + throw new \InvalidArgumentException(sprintf('Invalid output style "%s".', $style)); + } + } + + /** + * Set formatter + * + * @api + * + * @param string $formatterName + * + * @return void + * + * @deprecated Use {@see setOutputStyle} instead. + */ + public function setFormatter($formatterName) + { + if (!\in_array($formatterName, [Expanded::class, Compressed::class], true)) { + @trigger_error('Formatters other than Expanded and Compressed are deprecated.', E_USER_DEPRECATED); + } + @trigger_error('The method "setFormatter" is deprecated. Use "setOutputStyle" instead.', E_USER_DEPRECATED); + + $this->formatter = $formatterName; + } + + /** + * Set line number style + * + * @api + * + * @param string $lineNumberStyle + * + * @return void + * + * @deprecated The line number output is not supported anymore. Use source maps instead. + */ + public function setLineNumberStyle($lineNumberStyle) + { + @trigger_error('The line number output is not supported anymore. ' + . 'Use source maps instead.', E_USER_DEPRECATED); + } + + /** + * Configures the handling of non-ASCII outputs. + * + * If $charset is `true`, this will include a `@charset` declaration or a + * UTF-8 [byte-order mark][] if the stylesheet contains any non-ASCII + * characters. Otherwise, it will never include a `@charset` declaration or a + * byte-order mark. + * + * [byte-order mark]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8 + * + * @param bool $charset + * + * @return void + */ + public function setCharset($charset) + { + $this->charset = $charset; + } + + /** + * Enable/disable source maps + * + * @api + * + * @param int $sourceMap + * + * @return void + * + * @phpstan-param self::SOURCE_MAP_* $sourceMap + */ + public function setSourceMap($sourceMap) + { + $this->sourceMap = $sourceMap; + } + + /** + * Set source map options + * + * @api + * + * @param array $sourceMapOptions + * + * @phpstan-param array{sourceRoot?: string, sourceMapFilename?: string|null, sourceMapURL?: string|null, sourceMapWriteTo?: string|null, outputSourceFiles?: bool, sourceMapRootpath?: string, sourceMapBasepath?: string} $sourceMapOptions + * + * @return void + */ + public function setSourceMapOptions($sourceMapOptions) + { + $this->sourceMapOptions = $sourceMapOptions; + } + + /** + * Register function + * + * @api + * + * @param string $name + * @param callable $callback + * @param string[]|null $argumentDeclaration + * + * @return void + */ + public function registerFunction($name, $callback, $argumentDeclaration = null) + { + if (self::isNativeFunction($name)) { + @trigger_error(sprintf('The "%s" function is a core sass function. Overriding it with a custom implementation through "%s" is deprecated and won\'t be supported in ScssPhp 2.0 anymore.', $name, __METHOD__), E_USER_DEPRECATED); + } + + if ($argumentDeclaration === null) { + @trigger_error('Omitting the argument declaration when registering custom function is deprecated and won\'t be supported in ScssPhp 2.0 anymore.', E_USER_DEPRECATED); + } + + $this->userFunctions[$this->normalizeName($name)] = [$callback, $argumentDeclaration]; + } + + /** + * Unregister function + * + * @api + * + * @param string $name + * + * @return void + */ + public function unregisterFunction($name) + { + unset($this->userFunctions[$this->normalizeName($name)]); + } + + /** + * Add feature + * + * @api + * + * @param string $name + * + * @return void + * + * @deprecated Registering additional features is deprecated. + */ + public function addFeature($name) + { + @trigger_error('Registering additional features is deprecated.', E_USER_DEPRECATED); + + $this->registeredFeatures[$name] = true; + } + + /** + * Import file + * + * @param string $path + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out + * + * @return void + */ + protected function importFile($path, OutputBlock $out) + { + $this->pushCallStack('import ' . $this->getPrettyPath($path)); + // see if tree is cached + $realPath = realpath($path); + + if (substr($path, -5) === '.sass') { + $this->sourceIndex = \count($this->sourceNames); + $this->sourceNames[] = $path; + $this->sourceLine = 1; + $this->sourceColumn = 1; + + throw $this->error('The Sass indented syntax is not implemented.'); + } + + if (isset($this->importCache[$realPath])) { + $this->handleImportLoop($realPath); + + $tree = $this->importCache[$realPath]; + } else { + $code = file_get_contents($path); + $parser = $this->parserFactory($path); + $tree = $parser->parse($code); + + $this->importCache[$realPath] = $tree; + } + + $currentDirectory = $this->currentDirectory; + $this->currentDirectory = dirname($path); + + $this->compileChildrenNoReturn($tree->children, $out); + $this->currentDirectory = $currentDirectory; + $this->popCallStack(); + } + + /** + * Save the imported files with their resolving path context + * + * @param string|null $currentDirectory + * @param string $path + * @param string $filePath + * + * @return void + */ + private function registerImport($currentDirectory, $path, $filePath) + { + $this->resolvedImports[] = ['currentDir' => $currentDirectory, 'path' => $path, 'filePath' => $filePath]; + } + + /** + * Detects whether the import is a CSS import. + * + * For legacy reasons, custom importers are called for those, allowing them + * to replace them with an actual Sass import. However this behavior is + * deprecated. Custom importers are expected to return null when they receive + * a CSS import. + * + * @param string $url + * + * @return bool + */ + public static function isCssImport($url) + { + return 1 === preg_match('~\.css$|^https?://|^//~', $url); + } + + /** + * Return the file path for an import url if it exists + * + * @internal + * + * @param string $url + * @param string|null $currentDir + * + * @return string|null + */ + public function findImport($url, $currentDir = null) + { + // Vanilla css and external requests. These are not meant to be Sass imports. + // Callback importers are still called for BC. + if (self::isCssImport($url)) { + foreach ($this->importPaths as $dir) { + if (\is_string($dir)) { + continue; + } + + if (\is_callable($dir)) { + // check custom callback for import path + $file = \call_user_func($dir, $url); + + if (! \is_null($file)) { + if (\is_array($dir)) { + $callableDescription = (\is_object($dir[0]) ? \get_class($dir[0]) : $dir[0]).'::'.$dir[1]; + } elseif ($dir instanceof \Closure) { + $r = new \ReflectionFunction($dir); + if (false !== strpos($r->name, '{closure}')) { + $callableDescription = sprintf('closure{%s:%s}', $r->getFileName(), $r->getStartLine()); + } elseif ($class = $r->getClosureScopeClass()) { + $callableDescription = $class->name.'::'.$r->name; + } else { + $callableDescription = $r->name; + } + } elseif (\is_object($dir)) { + $callableDescription = \get_class($dir) . '::__invoke'; + } else { + $callableDescription = 'callable'; // Fallback if we don't have a dedicated description + } + @trigger_error(sprintf('Returning a file to import for CSS or external references in custom importer callables is deprecated and will not be supported anymore in ScssPhp 2.0. This behavior is not compliant with the Sass specification. Update your "%s" importer.', $callableDescription), E_USER_DEPRECATED); + + return $file; + } + } + } + return null; + } + + if (!\is_null($currentDir)) { + $relativePath = $this->resolveImportPath($url, $currentDir); + + if (!\is_null($relativePath)) { + return $relativePath; + } + } + + foreach ($this->importPaths as $dir) { + if (\is_string($dir)) { + $path = $this->resolveImportPath($url, $dir); + + if (!\is_null($path)) { + return $path; + } + } elseif (\is_callable($dir)) { + // check custom callback for import path + $file = \call_user_func($dir, $url); + + if (! \is_null($file)) { + return $file; + } + } + } + + if ($this->legacyCwdImportPath) { + $path = $this->resolveImportPath($url, getcwd()); + + if (!\is_null($path)) { + @trigger_error('Resolving imports relatively to the current working directory is deprecated. If that\'s the intended behavior, the value of "getcwd()" should be added as an import path explicitly instead. If this was used for resolving relative imports of the input alongside "chdir" with the source directory, the path of the input file should be passed to "compileString()" instead.', E_USER_DEPRECATED); + + return $path; + } + } + + throw $this->error("`$url` file not found for @import"); + } + + /** + * @param string $url + * @param string $baseDir + * + * @return string|null + */ + private function resolveImportPath($url, $baseDir) + { + $path = Path::join($baseDir, $url); + + $hasExtension = preg_match('/.s[ac]ss$/', $url); + + if ($hasExtension) { + return $this->checkImportPathConflicts($this->tryImportPath($path)); + } + + $result = $this->checkImportPathConflicts($this->tryImportPathWithExtensions($path)); + + if (!\is_null($result)) { + return $result; + } + + return $this->tryImportPathAsDirectory($path); + } + + /** + * @param string[] $paths + * + * @return string|null + */ + private function checkImportPathConflicts(array $paths) + { + if (\count($paths) === 0) { + return null; + } + + if (\count($paths) === 1) { + return $paths[0]; + } + + $formattedPrettyPaths = []; + + foreach ($paths as $path) { + $formattedPrettyPaths[] = ' ' . $this->getPrettyPath($path); + } + + throw $this->error("It's not clear which file to import. Found:\n" . implode("\n", $formattedPrettyPaths)); + } + + /** + * @param string $path + * + * @return string[] + */ + private function tryImportPathWithExtensions($path) + { + $result = array_merge( + $this->tryImportPath($path.'.sass'), + $this->tryImportPath($path.'.scss') + ); + + if ($result) { + return $result; + } + + return $this->tryImportPath($path.'.css'); + } + + /** + * @param string $path + * + * @return string[] + */ + private function tryImportPath($path) + { + $partial = dirname($path).'/_'.basename($path); + + $candidates = []; + + if (is_file($partial)) { + $candidates[] = $partial; + } + + if (is_file($path)) { + $candidates[] = $path; + } + + return $candidates; + } + + /** + * @param string $path + * + * @return string|null + */ + private function tryImportPathAsDirectory($path) + { + if (!is_dir($path)) { + return null; + } + + return $this->checkImportPathConflicts($this->tryImportPathWithExtensions($path.'/index')); + } + + /** + * @param string|null $path + * + * @return string + */ + private function getPrettyPath($path) + { + if ($path === null) { + return '(unknown file)'; + } + + $normalizedPath = $path; + $normalizedRootDirectory = $this->rootDirectory.'/'; + + if (\DIRECTORY_SEPARATOR === '\\') { + $normalizedRootDirectory = str_replace('\\', '/', $normalizedRootDirectory); + $normalizedPath = str_replace('\\', '/', $path); + } + + if (0 === strpos($normalizedPath, $normalizedRootDirectory)) { + return substr($path, \strlen($normalizedRootDirectory)); + } + + return $path; + } + + /** + * Set encoding + * + * @api + * + * @param string|null $encoding + * + * @return void + * + * @deprecated Non-compliant support for other encodings than UTF-8 is deprecated. + */ + public function setEncoding($encoding) + { + if (!$encoding || strtolower($encoding) === 'utf-8') { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + } else { + @trigger_error(sprintf('The "%s" method is deprecated. Parsing will only support UTF-8 in ScssPhp 2.0. The non-UTF-8 parsing of ScssPhp 1.x is not spec compliant.', __METHOD__), E_USER_DEPRECATED); + } + + $this->encoding = $encoding; + } + + /** + * Ignore errors? + * + * @api + * + * @param bool $ignoreErrors + * + * @return \ScssPhp\ScssPhp\Compiler + * + * @deprecated Ignoring Sass errors is not longer supported. + */ + public function setIgnoreErrors($ignoreErrors) + { + @trigger_error('Ignoring Sass errors is not longer supported.', E_USER_DEPRECATED); + + return $this; + } + + /** + * Get source position + * + * @api + * + * @return array + * + * @deprecated + */ + public function getSourcePosition() + { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + + $sourceFile = isset($this->sourceNames[$this->sourceIndex]) ? $this->sourceNames[$this->sourceIndex] : ''; + + return [$sourceFile, $this->sourceLine, $this->sourceColumn]; + } + + /** + * Throw error (exception) + * + * @api + * + * @param string $msg Message with optional sprintf()-style vararg parameters + * + * @throws \ScssPhp\ScssPhp\Exception\CompilerException + * + * @deprecated use "error" and throw the exception in the caller instead. + */ + public function throwError($msg) + { + @trigger_error( + 'The method "throwError" is deprecated. Use "error" and throw the exception in the caller instead', + E_USER_DEPRECATED + ); + + throw $this->error(...func_get_args()); + } + + /** + * Build an error (exception) + * + * @internal + * + * @param string $msg Message with optional sprintf()-style vararg parameters + * + * @return CompilerException + */ + public function error($msg, ...$args) + { + if ($args) { + $msg = sprintf($msg, ...$args); + } + + if (! $this->ignoreCallStackMessage) { + $msg = $this->addLocationToMessage($msg); + } + + return new CompilerException($msg); + } + + /** + * @param string $msg + * + * @return string + */ + private function addLocationToMessage($msg) + { + $line = $this->sourceLine; + $column = $this->sourceColumn; + + $loc = isset($this->sourceNames[$this->sourceIndex]) + ? $this->getPrettyPath($this->sourceNames[$this->sourceIndex]) . " on line $line, at column $column" + : "line: $line, column: $column"; + + $msg = "$msg: $loc"; + + $callStackMsg = $this->callStackMessage(); + + if ($callStackMsg) { + $msg .= "\nCall Stack:\n" . $callStackMsg; + } + + return $msg; + } + + /** + * @param string $functionName + * @param array $ExpectedArgs + * @param int $nbActual + * @return CompilerException + * + * @deprecated + */ + public function errorArgsNumber($functionName, $ExpectedArgs, $nbActual) + { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + + $nbExpected = \count($ExpectedArgs); + + if ($nbActual > $nbExpected) { + return $this->error( + 'Error: Only %d arguments allowed in %s(), but %d were passed.', + $nbExpected, + $functionName, + $nbActual + ); + } else { + $missing = []; + + while (count($ExpectedArgs) && count($ExpectedArgs) > $nbActual) { + array_unshift($missing, array_pop($ExpectedArgs)); + } + + return $this->error( + 'Error: %s() argument%s %s missing.', + $functionName, + count($missing) > 1 ? 's' : '', + implode(', ', $missing) + ); + } + } + + /** + * Beautify call stack for output + * + * @param bool $all + * @param int|null $limit + * + * @return string + */ + protected function callStackMessage($all = false, $limit = null) + { + $callStackMsg = []; + $ncall = 0; + + if ($this->callStack) { + foreach (array_reverse($this->callStack) as $call) { + if ($all || (isset($call['n']) && $call['n'])) { + $msg = '#' . $ncall++ . ' ' . $call['n'] . ' '; + $msg .= (isset($this->sourceNames[$call[Parser::SOURCE_INDEX]]) + ? $this->getPrettyPath($this->sourceNames[$call[Parser::SOURCE_INDEX]]) + : '(unknown file)'); + $msg .= ' on line ' . $call[Parser::SOURCE_LINE]; + + $callStackMsg[] = $msg; + + if (! \is_null($limit) && $ncall > $limit) { + break; + } + } + } + } + + return implode("\n", $callStackMsg); + } + + /** + * Handle import loop + * + * @param string $name + * + * @throws \Exception + */ + protected function handleImportLoop($name) + { + for ($env = $this->env; $env; $env = $env->parent) { + if (! $env->block) { + continue; + } + + $file = $this->sourceNames[$env->block->sourceIndex]; + + if ($file === null) { + continue; + } + + if (realpath($file) === $name) { + throw $this->error('An @import loop has been found: %s imports %s', $file, basename($file)); + } + } + } + + /** + * Call SCSS @function + * + * @param CallableBlock|null $func + * @param array $argValues + * + * @return array|Number + */ + protected function callScssFunction($func, $argValues) + { + if (! $func) { + return static::$defaultValue; + } + $name = $func->name; + + $this->pushEnv(); + + // set the args + if (isset($func->args)) { + $this->applyArguments($func->args, $argValues); + } + + // throw away lines and children + $tmp = new OutputBlock(); + $tmp->lines = []; + $tmp->children = []; + + $this->env->marker = 'function'; + + if (! empty($func->parentEnv)) { + $this->env->declarationScopeParent = $func->parentEnv; + } else { + throw $this->error("@function $name() without parentEnv"); + } + + $ret = $this->compileChildren($func->children, $tmp, $this->env->marker . ' ' . $name); + + $this->popEnv(); + + return ! isset($ret) ? static::$defaultValue : $ret; + } + + /** + * Call built-in and registered (PHP) functions + * + * @param string $name + * @param callable $function + * @param array $prototype + * @param array $args + * + * @return array|Number|null + */ + protected function callNativeFunction($name, $function, $prototype, $args) + { + $libName = (is_array($function) ? end($function) : null); + $sorted_kwargs = $this->sortNativeFunctionArgs($libName, $prototype, $args); + + if (\is_null($sorted_kwargs)) { + return null; + } + @list($sorted, $kwargs) = $sorted_kwargs; + + if ($name !== 'if') { + foreach ($sorted as &$val) { + if ($val !== null) { + $val = $this->reduce($val, true); + } + } + } + + $returnValue = \call_user_func($function, $sorted, $kwargs); + + if (! isset($returnValue)) { + return null; + } + + if (\is_array($returnValue) || $returnValue instanceof Number) { + return $returnValue; + } + + @trigger_error(sprintf('Returning a PHP value from the "%s" custom function is deprecated. A sass value must be returned instead.', $name), E_USER_DEPRECATED); + + return $this->coerceValue($returnValue); + } + + /** + * Get built-in function + * + * @param string $name Normalized name + * + * @return array + */ + protected function getBuiltinFunction($name) + { + $libName = self::normalizeNativeFunctionName($name); + return [$this, $libName]; + } + + /** + * Normalize native function name + * + * @internal + * + * @param string $name + * + * @return string + */ + public static function normalizeNativeFunctionName($name) + { + $name = str_replace("-", "_", $name); + $libName = 'lib' . preg_replace_callback( + '/_(.)/', + function ($m) { + return ucfirst($m[1]); + }, + ucfirst($name) + ); + return $libName; + } + + /** + * Check if a function is a native built-in scss function, for css parsing + * + * @internal + * + * @param string $name + * + * @return bool + */ + public static function isNativeFunction($name) + { + return method_exists(Compiler::class, self::normalizeNativeFunctionName($name)); + } + + /** + * Sorts keyword arguments + * + * @param string $functionName + * @param array|null $prototypes + * @param array $args + * + * @return array|null + */ + protected function sortNativeFunctionArgs($functionName, $prototypes, $args) + { + static $parser = null; + + if (! isset($prototypes)) { + $keyArgs = []; + $posArgs = []; + + if (\is_array($args) && \count($args) && \end($args) === static::$null) { + array_pop($args); + } + + // separate positional and keyword arguments + foreach ($args as $arg) { + list($key, $value) = $arg; + + if (empty($key) or empty($key[1])) { + $posArgs[] = empty($arg[2]) ? $value : $arg; + } else { + $keyArgs[$key[1]] = $value; + } + } + + return [$posArgs, $keyArgs]; + } + + // specific cases ? + if (\in_array($functionName, ['libRgb', 'libRgba', 'libHsl', 'libHsla'])) { + // notation 100 127 255 / 0 is in fact a simple list of 4 values + foreach ($args as $k => $arg) { + if ($arg[1][0] === Type::T_LIST && \count($arg[1][2]) === 3) { + $args[$k][1][2] = $this->extractSlashAlphaInColorFunction($arg[1][2]); + } + } + } + + list($positionalArgs, $namedArgs, $names, $separator, $hasSplat) = $this->evaluateArguments($args, false); + + if (! \is_array(reset($prototypes))) { + $prototypes = [$prototypes]; + } + + $parsedPrototypes = array_map([$this, 'parseFunctionPrototype'], $prototypes); + assert(!empty($parsedPrototypes)); + $matchedPrototype = $this->selectFunctionPrototype($parsedPrototypes, \count($positionalArgs), $names); + + $this->verifyPrototype($matchedPrototype, \count($positionalArgs), $names, $hasSplat); + + $vars = $this->applyArgumentsToDeclaration($matchedPrototype, $positionalArgs, $namedArgs, $separator); + + $finalArgs = []; + $keyArgs = []; + + foreach ($matchedPrototype['arguments'] as $argument) { + list($normalizedName, $originalName, $default) = $argument; + + if (isset($vars[$normalizedName])) { + $value = $vars[$normalizedName]; + } else { + $value = $default; + } + + // special null value as default: translate to real null here + if ($value === [Type::T_KEYWORD, 'null']) { + $value = null; + } + + $finalArgs[] = $value; + $keyArgs[$originalName] = $value; + } + + if ($matchedPrototype['rest_argument'] !== null) { + $value = $vars[$matchedPrototype['rest_argument']]; + + $finalArgs[] = $value; + $keyArgs[$matchedPrototype['rest_argument']] = $value; + } + + return [$finalArgs, $keyArgs]; + } + + /** + * Parses a function prototype to the internal representation of arguments. + * + * The input is an array of strings describing each argument, as supported + * in {@see registerFunction}. Argument names don't include the `$`. + * The output contains the list of positional argument, with their normalized + * name (underscores are replaced by dashes), their original name (to be used + * in case of error reporting) and their default value. The output also contains + * the normalized name of the rest argument, or null if the function prototype + * is not variadic. + * + * @param string[] $prototype + * + * @return array + * @phpstan-return array{arguments: list, rest_argument: string|null} + */ + private function parseFunctionPrototype(array $prototype) + { + static $parser = null; + + $arguments = []; + $restArgument = null; + + foreach ($prototype as $p) { + if (null !== $restArgument) { + throw new \InvalidArgumentException('The argument declaration is invalid. The rest argument must be the last one.'); + } + + $default = null; + $p = explode(':', $p, 2); + $name = str_replace('_', '-', $p[0]); + + if (isset($p[1])) { + $defaultSource = trim($p[1]); + + if ($defaultSource === 'null') { + // differentiate this null from the static::$null + $default = [Type::T_KEYWORD, 'null']; + } else { + if (\is_null($parser)) { + $parser = $this->parserFactory(__METHOD__); + } + + $parser->parseValue($defaultSource, $default); + } + } + + if (substr($name, -3) === '...') { + $restArgument = substr($name, 0, -3); + } else { + $arguments[] = [$name, $p[0], $default]; + } + } + + return [ + 'arguments' => $arguments, + 'rest_argument' => $restArgument, + ]; + } + + /** + * Returns the function prototype for the given positional and named arguments. + * + * If no exact match is found, finds the closest approximation. Note that this + * doesn't guarantee that $positional and $names are valid for the returned + * prototype. + * + * @param array[] $prototypes + * @param int $positional + * @param array $names A set of names, as both keys and values + * + * @return array + * + * @phpstan-param non-empty-list, rest_argument: string|null}> $prototypes + * @phpstan-return array{arguments: list, rest_argument: string|null} + */ + private function selectFunctionPrototype(array $prototypes, $positional, array $names) + { + $fuzzyMatch = null; + $minMismatchDistance = null; + + foreach ($prototypes as $prototype) { + // Ideally, find an exact match. + if ($this->checkPrototypeMatches($prototype, $positional, $names)) { + return $prototype; + } + + $mismatchDistance = \count($prototype['arguments']) - $positional; + + if ($minMismatchDistance !== null) { + if (abs($mismatchDistance) > abs($minMismatchDistance)) { + continue; + } + + // If two overloads have the same mismatch distance, favor the overload + // that has more arguments. + if (abs($mismatchDistance) === abs($minMismatchDistance) && $mismatchDistance < 0) { + continue; + } + } + + $minMismatchDistance = $mismatchDistance; + $fuzzyMatch = $prototype; + } + + return $fuzzyMatch; + } + + /** + * Checks whether the argument invocation matches the callable prototype. + * + * The rules are similar to {@see verifyPrototype}. The boolean return value + * avoids the overhead of building and catching exceptions when the reason of + * not matching the prototype does not need to be known. + * + * @param array $prototype + * @param int $positional + * @param array $names + * + * @return bool + * + * @phpstan-param array{arguments: list, rest_argument: string|null} $prototype + */ + private function checkPrototypeMatches(array $prototype, $positional, array $names) + { + $nameUsed = 0; + + foreach ($prototype['arguments'] as $i => $argument) { + list ($name, $originalName, $default) = $argument; + + if ($i < $positional) { + if (isset($names[$name])) { + return false; + } + } elseif (isset($names[$name])) { + $nameUsed++; + } elseif ($default === null) { + return false; + } + } + + if ($prototype['rest_argument'] !== null) { + return true; + } + + if ($positional > \count($prototype['arguments'])) { + return false; + } + + if ($nameUsed < \count($names)) { + return false; + } + + return true; + } + + /** + * Verifies that the argument invocation is valid for the callable prototype. + * + * @param array $prototype + * @param int $positional + * @param array $names + * @param bool $hasSplat + * + * @return void + * + * @throws SassScriptException + * + * @phpstan-param array{arguments: list, rest_argument: string|null} $prototype + */ + private function verifyPrototype(array $prototype, $positional, array $names, $hasSplat) + { + $nameUsed = 0; + + foreach ($prototype['arguments'] as $i => $argument) { + list ($name, $originalName, $default) = $argument; + + if ($i < $positional) { + if (isset($names[$name])) { + throw new SassScriptException(sprintf('Argument $%s was passed both by position and by name.', $originalName)); + } + } elseif (isset($names[$name])) { + $nameUsed++; + } elseif ($default === null) { + throw new SassScriptException(sprintf('Missing argument $%s', $originalName)); + } + } + + if ($prototype['rest_argument'] !== null) { + return; + } + + if ($positional > \count($prototype['arguments'])) { + $message = sprintf( + 'Only %d %sargument%s allowed, but %d %s passed.', + \count($prototype['arguments']), + empty($names) ? '' : 'positional ', + \count($prototype['arguments']) === 1 ? '' : 's', + $positional, + $positional === 1 ? 'was' : 'were' + ); + if (!$hasSplat) { + throw new SassScriptException($message); + } + + $message = $this->addLocationToMessage($message); + $message .= "\nThis will be an error in future versions of Sass."; + $this->logger->warn($message, true); + } + + if ($nameUsed < \count($names)) { + $unknownNames = array_values(array_diff($names, array_column($prototype['arguments'], 0))); + $lastName = array_pop($unknownNames); + $message = sprintf( + 'No argument%s named $%s%s.', + $unknownNames ? 's' : '', + $unknownNames ? implode(', $', $unknownNames) . ' or $' : '', + $lastName + ); + throw new SassScriptException($message); + } + } + + /** + * Evaluates the argument from the invocation. + * + * This returns several things about this invocation: + * - the list of positional arguments + * - the map of named arguments, indexed by normalized names + * - the set of names used in the arguments (that's an array using the normalized names as keys for O(1) access) + * - the separator used by the list using the splat operator, if any + * - a boolean indicator whether any splat argument (list or map) was used, to support the incomplete error reporting. + * + * @param array[] $args + * @param bool $reduce Whether arguments should be reduced to their value + * + * @return array + * + * @throws SassScriptException + * + * @phpstan-return array{0: list, 1: array, 2: array, 3: string|null, 4: bool} + */ + private function evaluateArguments(array $args, $reduce = true) + { + // this represents trailing commas + if (\count($args) && end($args) === static::$null) { + array_pop($args); + } + + $splatSeparator = null; + $keywordArgs = []; + $names = []; + $positionalArgs = []; + $hasKeywordArgument = false; + $hasSplat = false; + + foreach ($args as $arg) { + if (!empty($arg[0])) { + $hasKeywordArgument = true; + + assert(\is_string($arg[0][1])); + $name = str_replace('_', '-', $arg[0][1]); + + if (isset($keywordArgs[$name])) { + throw new SassScriptException(sprintf('Duplicate named argument $%s.', $arg[0][1])); + } + + $keywordArgs[$name] = $this->maybeReduce($reduce, $arg[1]); + $names[$name] = $name; + } elseif (! empty($arg[2])) { + // $arg[2] means a var followed by ... in the arg ($list... ) + $val = $this->reduce($arg[1], true); + $hasSplat = true; + + if ($val[0] === Type::T_LIST) { + foreach ($val[2] as $item) { + if (\is_null($splatSeparator)) { + $splatSeparator = $val[1]; + } + + $positionalArgs[] = $this->maybeReduce($reduce, $item); + } + + if (isset($val[3]) && \is_array($val[3])) { + foreach ($val[3] as $name => $item) { + assert(\is_string($name)); + + $normalizedName = str_replace('_', '-', $name); + + if (isset($keywordArgs[$normalizedName])) { + throw new SassScriptException(sprintf('Duplicate named argument $%s.', $name)); + } + + $keywordArgs[$normalizedName] = $this->maybeReduce($reduce, $item); + $names[$normalizedName] = $normalizedName; + $hasKeywordArgument = true; + } + } + } elseif ($val[0] === Type::T_MAP) { + foreach ($val[1] as $i => $name) { + $name = $this->compileStringContent($this->coerceString($name)); + $item = $val[2][$i]; + + if (! is_numeric($name)) { + $normalizedName = str_replace('_', '-', $name); + + if (isset($keywordArgs[$normalizedName])) { + throw new SassScriptException(sprintf('Duplicate named argument $%s.', $name)); + } + + $keywordArgs[$normalizedName] = $this->maybeReduce($reduce, $item); + $names[$normalizedName] = $normalizedName; + $hasKeywordArgument = true; + } else { + if (\is_null($splatSeparator)) { + $splatSeparator = $val[1]; + } + + $positionalArgs[] = $this->maybeReduce($reduce, $item); + } + } + } elseif ($val[0] !== Type::T_NULL) { // values other than null are treated a single-element lists, while null is the empty list + $positionalArgs[] = $this->maybeReduce($reduce, $val); + } + } elseif ($hasKeywordArgument) { + throw new SassScriptException('Positional arguments must come before keyword arguments.'); + } else { + $positionalArgs[] = $this->maybeReduce($reduce, $arg[1]); + } + } + + return [$positionalArgs, $keywordArgs, $names, $splatSeparator, $hasSplat]; + } + + /** + * @param bool $reduce + * @param array|Number $value + * + * @return array|Number + */ + private function maybeReduce($reduce, $value) + { + if ($reduce) { + return $this->reduce($value, true); + } + + return $value; + } + + /** + * Apply argument values per definition + * + * @param array[] $argDef + * @param array|null $argValues + * @param bool $storeInEnv + * @param bool $reduce only used if $storeInEnv = false + * + * @return array + * + * @phpstan-param list $argDef + * + * @throws \Exception + */ + protected function applyArguments($argDef, $argValues, $storeInEnv = true, $reduce = true) + { + $output = []; + + if (\is_null($argValues)) { + $argValues = []; + } + + if ($storeInEnv) { + $storeEnv = $this->getStoreEnv(); + + $env = new Environment(); + $env->store = $storeEnv->store; + } + + $prototype = ['arguments' => [], 'rest_argument' => null]; + $originalRestArgumentName = null; + + foreach ($argDef as $i => $arg) { + list($name, $default, $isVariable) = $arg; + $normalizedName = str_replace('_', '-', $name); + + if ($isVariable) { + $originalRestArgumentName = $name; + $prototype['rest_argument'] = $normalizedName; + } else { + $prototype['arguments'][] = [$normalizedName, $name, !empty($default) ? $default : null]; + } + } + + list($positionalArgs, $namedArgs, $names, $splatSeparator, $hasSplat) = $this->evaluateArguments($argValues, $reduce); + + $this->verifyPrototype($prototype, \count($positionalArgs), $names, $hasSplat); + + $vars = $this->applyArgumentsToDeclaration($prototype, $positionalArgs, $namedArgs, $splatSeparator); + + foreach ($prototype['arguments'] as $argument) { + list($normalizedName, $name) = $argument; + + if (!isset($vars[$normalizedName])) { + continue; + } + + $val = $vars[$normalizedName]; + + if ($storeInEnv) { + $this->set($name, $this->reduce($val, true), true, $env); + } else { + $output[$name] = ($reduce ? $this->reduce($val, true) : $val); + } + } + + if ($prototype['rest_argument'] !== null) { + assert($originalRestArgumentName !== null); + $name = $originalRestArgumentName; + $val = $vars[$prototype['rest_argument']]; + + if ($storeInEnv) { + $this->set($name, $this->reduce($val, true), true, $env); + } else { + $output[$name] = ($reduce ? $this->reduce($val, true) : $val); + } + } + + if ($storeInEnv) { + $storeEnv->store = $env->store; + } + + foreach ($prototype['arguments'] as $argument) { + list($normalizedName, $name, $default) = $argument; + + if (isset($vars[$normalizedName])) { + continue; + } + assert($default !== null); + + if ($storeInEnv) { + $this->set($name, $this->reduce($default, true), true); + } else { + $output[$name] = ($reduce ? $this->reduce($default, true) : $default); + } + } + + return $output; + } + + /** + * Apply argument values per definition. + * + * This method assumes that the arguments are valid for the provided prototype. + * The validation with {@see verifyPrototype} must have been run before calling + * it. + * Arguments are returned as a map from the normalized argument names to the + * value. Additional arguments are collected in a sass argument list available + * under the name of the rest argument in the result. + * + * Defaults are not applied as they are resolved in a different environment. + * + * @param array $prototype + * @param array $positionalArgs + * @param array $namedArgs + * @param string|null $splatSeparator + * + * @return array + * + * @phpstan-param array{arguments: list, rest_argument: string|null} $prototype + */ + private function applyArgumentsToDeclaration(array $prototype, array $positionalArgs, array $namedArgs, $splatSeparator) + { + $output = []; + $minLength = min(\count($positionalArgs), \count($prototype['arguments'])); + + for ($i = 0; $i < $minLength; $i++) { + list($name) = $prototype['arguments'][$i]; + $val = $positionalArgs[$i]; + + $output[$name] = $val; + } + + $restNamed = $namedArgs; + + for ($i = \count($positionalArgs); $i < \count($prototype['arguments']); $i++) { + $argument = $prototype['arguments'][$i]; + list($name) = $argument; + + if (isset($namedArgs[$name])) { + $val = $namedArgs[$name]; + unset($restNamed[$name]); + } else { + continue; + } + + $output[$name] = $val; + } + + if ($prototype['rest_argument'] !== null) { + $name = $prototype['rest_argument']; + $rest = array_values(array_slice($positionalArgs, \count($prototype['arguments']))); + + $val = [Type::T_LIST, \is_null($splatSeparator) ? ',' : $splatSeparator , $rest, $restNamed]; + + $output[$name] = $val; + } + + return $output; + } + + /** + * Coerce a php value into a scss one + * + * @param mixed $value + * + * @return array|Number + */ + protected function coerceValue($value) + { + if (\is_array($value) || $value instanceof Number) { + return $value; + } + + if (\is_bool($value)) { + return $this->toBool($value); + } + + if (\is_null($value)) { + return static::$null; + } + + if (is_numeric($value)) { + return new Number($value, ''); + } + + if ($value === '') { + return static::$emptyString; + } + + $value = [Type::T_KEYWORD, $value]; + $color = $this->coerceColor($value); + + if ($color) { + return $color; + } + + return $value; + } + + /** + * Tries to convert an item to a Sass map + * + * @param Number|array $item + * + * @return array|null + */ + private function tryMap($item) + { + if ($item instanceof Number) { + return null; + } + + if ($item[0] === Type::T_MAP) { + return $item; + } + + if ( + $item[0] === Type::T_LIST && + $item[2] === [] + ) { + return static::$emptyMap; + } + + return null; + } + + /** + * Coerce something to map + * + * @param array|Number $item + * + * @return array|Number + */ + protected function coerceMap($item) + { + $map = $this->tryMap($item); + + if ($map !== null) { + return $map; + } + + return $item; + } + + /** + * Coerce something to list + * + * @param array|Number $item + * @param string $delim + * @param bool $removeTrailingNull + * + * @return array + */ + protected function coerceList($item, $delim = ',', $removeTrailingNull = false) + { + if ($item instanceof Number) { + return [Type::T_LIST, '', [$item]]; + } + + if ($item[0] === Type::T_LIST) { + // remove trailing null from the list + if ($removeTrailingNull && end($item[2]) === static::$null) { + array_pop($item[2]); + } + + return $item; + } + + if ($item[0] === Type::T_MAP) { + $keys = $item[1]; + $values = $item[2]; + $list = []; + + for ($i = 0, $s = \count($keys); $i < $s; $i++) { + $key = $keys[$i]; + $value = $values[$i]; + + $list[] = [ + Type::T_LIST, + ' ', + [$key, $value] + ]; + } + + return [Type::T_LIST, $list ? ',' : '', $list]; + } + + return [Type::T_LIST, '', [$item]]; + } + + /** + * Coerce color for expression + * + * @param array|Number $value + * + * @return array|Number + */ + protected function coerceForExpression($value) + { + if ($color = $this->coerceColor($value)) { + return $color; + } + + return $value; + } + + /** + * Coerce value to color + * + * @param array|Number $value + * @param bool $inRGBFunction + * + * @return array|null + */ + protected function coerceColor($value, $inRGBFunction = false) + { + if ($value instanceof Number) { + return null; + } + + switch ($value[0]) { + case Type::T_COLOR: + for ($i = 1; $i <= 3; $i++) { + if (! is_numeric($value[$i])) { + $cv = $this->compileRGBAValue($value[$i]); + + if (! is_numeric($cv)) { + return null; + } + + $value[$i] = $cv; + } + + if (isset($value[4])) { + if (! is_numeric($value[4])) { + $cv = $this->compileRGBAValue($value[4], true); + + if (! is_numeric($cv)) { + return null; + } + + $value[4] = $cv; + } + } + } + + return $value; + + case Type::T_LIST: + if ($inRGBFunction) { + if (\count($value[2]) == 3 || \count($value[2]) == 4) { + $color = $value[2]; + array_unshift($color, Type::T_COLOR); + + return $this->coerceColor($color); + } + } + + return null; + + case Type::T_KEYWORD: + if (! \is_string($value[1])) { + return null; + } + + $name = strtolower($value[1]); + + // hexa color? + if (preg_match('/^#([0-9a-f]+)$/i', $name, $m)) { + $nofValues = \strlen($m[1]); + + if (\in_array($nofValues, [3, 4, 6, 8])) { + $nbChannels = 3; + $color = []; + $num = hexdec($m[1]); + + switch ($nofValues) { + case 4: + $nbChannels = 4; + // then continuing with the case 3: + case 3: + for ($i = 0; $i < $nbChannels; $i++) { + $t = $num & 0xf; + array_unshift($color, $t << 4 | $t); + $num >>= 4; + } + + break; + + case 8: + $nbChannels = 4; + // then continuing with the case 6: + case 6: + for ($i = 0; $i < $nbChannels; $i++) { + array_unshift($color, $num & 0xff); + $num >>= 8; + } + + break; + } + + if ($nbChannels === 4) { + if ($color[3] === 255) { + $color[3] = 1; // fully opaque + } else { + $color[3] = round($color[3] / 255, Number::PRECISION); + } + } + + array_unshift($color, Type::T_COLOR); + + return $color; + } + } + + if ($rgba = Colors::colorNameToRGBa($name)) { + return isset($rgba[3]) + ? [Type::T_COLOR, $rgba[0], $rgba[1], $rgba[2], $rgba[3]] + : [Type::T_COLOR, $rgba[0], $rgba[1], $rgba[2]]; + } + + return null; + } + + return null; + } + + /** + * @param int|Number $value + * @param bool $isAlpha + * + * @return int|mixed + */ + protected function compileRGBAValue($value, $isAlpha = false) + { + if ($isAlpha) { + return $this->compileColorPartValue($value, 0, 1, false); + } + + return $this->compileColorPartValue($value, 0, 255, true); + } + + /** + * @param mixed $value + * @param int|float $min + * @param int|float $max + * @param bool $isInt + * + * @return int|mixed + */ + protected function compileColorPartValue($value, $min, $max, $isInt = true) + { + if (! is_numeric($value)) { + if (\is_array($value)) { + $reduced = $this->reduce($value); + + if ($reduced instanceof Number) { + $value = $reduced; + } + } + + if ($value instanceof Number) { + if ($value->unitless()) { + $num = $value->getDimension(); + } elseif ($value->hasUnit('%')) { + $num = $max * $value->getDimension() / 100; + } else { + throw $this->error('Expected %s to have no units or "%%".', $value); + } + + $value = $num; + } elseif (\is_array($value)) { + $value = $this->compileValue($value); + } + } + + if (is_numeric($value)) { + if ($isInt) { + $value = round($value); + } + + $value = min($max, max($min, $value)); + + return $value; + } + + return $value; + } + + /** + * Coerce value to string + * + * @param array|Number $value + * + * @return array + */ + protected function coerceString($value) + { + if ($value[0] === Type::T_STRING) { + return $value; + } + + return [Type::T_STRING, '', [$this->compileValue($value)]]; + } + + /** + * Assert value is a string + * + * This method deals with internal implementation details of the value + * representation where unquoted strings can sometimes be stored under + * other types. + * The returned value is always using the T_STRING type. + * + * @api + * + * @param array|Number $value + * @param string|null $varName + * + * @return array + * + * @throws SassScriptException + */ + public function assertString($value, $varName = null) + { + // case of url(...) parsed a a function + if ($value[0] === Type::T_FUNCTION) { + $value = $this->coerceString($value); + } + + if (! \in_array($value[0], [Type::T_STRING, Type::T_KEYWORD])) { + $value = $this->compileValue($value); + throw SassScriptException::forArgument("$value is not a string.", $varName); + } + + return $this->coerceString($value); + } + + /** + * Coerce value to a percentage + * + * @param array|Number $value + * + * @return int|float + * + * @deprecated + */ + protected function coercePercent($value) + { + @trigger_error(sprintf('"%s" is deprecated since 1.7.0.', __METHOD__), E_USER_DEPRECATED); + + if ($value instanceof Number) { + if ($value->hasUnit('%')) { + return $value->getDimension() / 100; + } + + return $value->getDimension(); + } + + return 0; + } + + /** + * Assert value is a map + * + * @api + * + * @param array|Number $value + * @param string|null $varName + * + * @return array + * + * @throws SassScriptException + */ + public function assertMap($value, $varName = null) + { + $map = $this->tryMap($value); + + if ($map === null) { + $value = $this->compileValue($value); + + throw SassScriptException::forArgument("$value is not a map.", $varName); + } + + return $map; + } + + /** + * Assert value is a list + * + * @api + * + * @param array|Number $value + * + * @return array + * + * @throws \Exception + */ + public function assertList($value) + { + if ($value[0] !== Type::T_LIST) { + throw $this->error('expecting list, %s received', $value[0]); + } + + return $value; + } + + /** + * Gets the keywords of an argument list. + * + * Keys in the returned array are normalized names (underscores are replaced with dashes) + * without the leading `$`. + * Calling this helper with anything that an argument list received for a rest argument + * of the function argument declaration is not supported. + * + * @param array|Number $value + * + * @return array + */ + public function getArgumentListKeywords($value) + { + if ($value[0] !== Type::T_LIST || !isset($value[3]) || !\is_array($value[3])) { + throw new \InvalidArgumentException('The argument is not a sass argument list.'); + } + + return $value[3]; + } + + /** + * Assert value is a color + * + * @api + * + * @param array|Number $value + * @param string|null $varName + * + * @return array + * + * @throws SassScriptException + */ + public function assertColor($value, $varName = null) + { + if ($color = $this->coerceColor($value)) { + return $color; + } + + $value = $this->compileValue($value); + + throw SassScriptException::forArgument("$value is not a color.", $varName); + } + + /** + * Assert value is a number + * + * @api + * + * @param array|Number $value + * @param string|null $varName + * + * @return Number + * + * @throws SassScriptException + */ + public function assertNumber($value, $varName = null) + { + if (!$value instanceof Number) { + $value = $this->compileValue($value); + throw SassScriptException::forArgument("$value is not a number.", $varName); + } + + return $value; + } + + /** + * Assert value is a integer + * + * @api + * + * @param array|Number $value + * @param string|null $varName + * + * @return int + * + * @throws SassScriptException + */ + public function assertInteger($value, $varName = null) + { + $value = $this->assertNumber($value, $varName)->getDimension(); + if (round($value - \intval($value), Number::PRECISION) > 0) { + throw SassScriptException::forArgument("$value is not an integer.", $varName); + } + + return intval($value); + } + + /** + * Extract the ... / alpha on the last argument of channel arg + * in color functions + * + * @param array $args + * @return array + */ + private function extractSlashAlphaInColorFunction($args) + { + $last = end($args); + if (\count($args) === 3 && $last[0] === Type::T_EXPRESSION && $last[1] === '/') { + array_pop($args); + $args[] = $last[2]; + $args[] = $last[3]; + } + return $args; + } + + + /** + * Make sure a color's components don't go out of bounds + * + * @param array $c + * + * @return array + */ + protected function fixColor($c) + { + foreach ([1, 2, 3] as $i) { + if ($c[$i] < 0) { + $c[$i] = 0; + } + + if ($c[$i] > 255) { + $c[$i] = 255; + } + + if (!\is_int($c[$i])) { + $c[$i] = round($c[$i]); + } + } + + return $c; + } + + /** + * Convert RGB to HSL + * + * @internal + * + * @param int $red + * @param int $green + * @param int $blue + * + * @return array + */ + public function toHSL($red, $green, $blue) + { + $min = min($red, $green, $blue); + $max = max($red, $green, $blue); + + $l = $min + $max; + $d = $max - $min; + + if ((int) $d === 0) { + $h = $s = 0; + } else { + if ($l < 255) { + $s = $d / $l; + } else { + $s = $d / (510 - $l); + } + + if ($red == $max) { + $h = 60 * ($green - $blue) / $d; + } elseif ($green == $max) { + $h = 60 * ($blue - $red) / $d + 120; + } elseif ($blue == $max) { + $h = 60 * ($red - $green) / $d + 240; + } + } + + return [Type::T_HSL, fmod($h + 360, 360), $s * 100, $l / 5.1]; + } + + /** + * Hue to RGB helper + * + * @param float $m1 + * @param float $m2 + * @param float $h + * + * @return float + */ + protected function hueToRGB($m1, $m2, $h) + { + if ($h < 0) { + $h += 1; + } elseif ($h > 1) { + $h -= 1; + } + + if ($h * 6 < 1) { + return $m1 + ($m2 - $m1) * $h * 6; + } + + if ($h * 2 < 1) { + return $m2; + } + + if ($h * 3 < 2) { + return $m1 + ($m2 - $m1) * (2 / 3 - $h) * 6; + } + + return $m1; + } + + /** + * Convert HSL to RGB + * + * @internal + * + * @param int|float $hue H from 0 to 360 + * @param int|float $saturation S from 0 to 100 + * @param int|float $lightness L from 0 to 100 + * + * @return array + */ + public function toRGB($hue, $saturation, $lightness) + { + if ($hue < 0) { + $hue += 360; + } + + $h = $hue / 360; + $s = min(100, max(0, $saturation)) / 100; + $l = min(100, max(0, $lightness)) / 100; + + $m2 = $l <= 0.5 ? $l * ($s + 1) : $l + $s - $l * $s; + $m1 = $l * 2 - $m2; + + $r = $this->hueToRGB($m1, $m2, $h + 1 / 3) * 255; + $g = $this->hueToRGB($m1, $m2, $h) * 255; + $b = $this->hueToRGB($m1, $m2, $h - 1 / 3) * 255; + + $out = [Type::T_COLOR, $r, $g, $b]; + + return $out; + } + + /** + * Convert HWB to RGB + * https://www.w3.org/TR/css-color-4/#hwb-to-rgb + * + * @api + * + * @param int $hue H from 0 to 360 + * @param int $whiteness W from 0 to 100 + * @param int $blackness B from 0 to 100 + * + * @return array + */ + private function HWBtoRGB($hue, $whiteness, $blackness) + { + $w = min(100, max(0, $whiteness)) / 100; + $b = min(100, max(0, $blackness)) / 100; + + $sum = $w + $b; + if ($sum > 1.0) { + $w = $w / $sum; + $b = $b / $sum; + } + $b = min(1.0 - $w, $b); + + $rgb = $this->toRGB($hue, 100, 50); + for($i = 1; $i < 4; $i++) { + $rgb[$i] *= (1.0 - $w - $b); + $rgb[$i] = round($rgb[$i] + 255 * $w + 0.0001); + } + + return $rgb; + } + + /** + * Convert RGB to HWB + * + * @api + * + * @param int $red + * @param int $green + * @param int $blue + * + * @return array + */ + private function RGBtoHWB($red, $green, $blue) + { + $min = min($red, $green, $blue); + $max = max($red, $green, $blue); + + $d = $max - $min; + + if ((int) $d === 0) { + $h = 0; + } else { + + if ($red == $max) { + $h = 60 * ($green - $blue) / $d; + } elseif ($green == $max) { + $h = 60 * ($blue - $red) / $d + 120; + } elseif ($blue == $max) { + $h = 60 * ($red - $green) / $d + 240; + } + } + + return [Type::T_HWB, fmod($h, 360), $min / 255 * 100, 100 - $max / 255 *100]; + } + + + // Built in functions + + protected static $libCall = ['function', 'args...']; + protected function libCall($args) + { + $functionReference = $args[0]; + + if (in_array($functionReference[0], [Type::T_STRING, Type::T_KEYWORD])) { + $name = $this->compileStringContent($this->coerceString($functionReference)); + $warning = "Passing a string to call() is deprecated and will be illegal\n" + . "in Sass 4.0. Use call(function-reference($name)) instead."; + Warn::deprecation($warning); + $functionReference = $this->libGetFunction([$this->assertString($functionReference, 'function')]); + } + + if ($functionReference === static::$null) { + return static::$null; + } + + if (! in_array($functionReference[0], [Type::T_FUNCTION_REFERENCE, Type::T_FUNCTION])) { + throw $this->error('Function reference expected, got ' . $functionReference[0]); + } + + $callArgs = [ + [null, $args[1], true] + ]; + + return $this->reduce([Type::T_FUNCTION_CALL, $functionReference, $callArgs]); + } + + + protected static $libGetFunction = [ + ['name'], + ['name', 'css'] + ]; + protected function libGetFunction($args) + { + $name = $this->compileStringContent($this->assertString(array_shift($args), 'name')); + $isCss = false; + + if (count($args)) { + $isCss = array_shift($args); + $isCss = (($isCss === static::$true) ? true : false); + } + + if ($isCss) { + return [Type::T_FUNCTION, $name, [Type::T_LIST, ',', []]]; + } + + return $this->getFunctionReference($name, true); + } + + protected static $libIf = ['condition', 'if-true', 'if-false:']; + protected function libIf($args) + { + list($cond, $t, $f) = $args; + + if (! $this->isTruthy($this->reduce($cond, true))) { + return $this->reduce($f, true); + } + + return $this->reduce($t, true); + } + + protected static $libIndex = ['list', 'value']; + protected function libIndex($args) + { + list($list, $value) = $args; + + if ( + $list[0] === Type::T_MAP || + $list[0] === Type::T_STRING || + $list[0] === Type::T_KEYWORD || + $list[0] === Type::T_INTERPOLATE + ) { + $list = $this->coerceList($list, ' '); + } + + if ($list[0] !== Type::T_LIST) { + return static::$null; + } + + // Numbers are represented with value objects, for which the PHP equality operator does not + // match the Sass rules (and we cannot overload it). As they are the only type of values + // represented with a value object for now, they require a special case. + if ($value instanceof Number) { + $key = 0; + foreach ($list[2] as $item) { + $key++; + $itemValue = $this->normalizeValue($item); + + if ($itemValue instanceof Number && $value->equals($itemValue)) { + return new Number($key, ''); + } + } + return static::$null; + } + + $values = []; + + foreach ($list[2] as $item) { + $values[] = $this->normalizeValue($item); + } + + $key = array_search($this->normalizeValue($value), $values); + + return false === $key ? static::$null : new Number($key + 1, ''); + } + + protected static $libRgb = [ + ['color'], + ['color', 'alpha'], + ['channels'], + ['red', 'green', 'blue'], + ['red', 'green', 'blue', 'alpha'] ]; + protected function libRgb($args, $kwargs, $funcName = 'rgb') + { + switch (\count($args)) { + case 1: + if (! $color = $this->coerceColor($args[0], true)) { + $color = [Type::T_STRING, '', [$funcName . '(', $args[0], ')']]; + } + break; + + case 3: + $color = [Type::T_COLOR, $args[0], $args[1], $args[2]]; + + if (! $color = $this->coerceColor($color)) { + $color = [Type::T_STRING, '', [$funcName . '(', $args[0], ', ', $args[1], ', ', $args[2], ')']]; + } + + return $color; + + case 2: + if ($color = $this->coerceColor($args[0], true)) { + $alpha = $this->compileRGBAValue($args[1], true); + + if (is_numeric($alpha)) { + $color[4] = $alpha; + } else { + $color = [Type::T_STRING, '', + [$funcName . '(', $color[1], ', ', $color[2], ', ', $color[3], ', ', $alpha, ')']]; + } + } else { + $color = [Type::T_STRING, '', [$funcName . '(', $args[0], ', ', $args[1], ')']]; + } + break; + + case 4: + default: + $color = [Type::T_COLOR, $args[0], $args[1], $args[2], $args[3]]; + + if (! $color = $this->coerceColor($color)) { + $color = [Type::T_STRING, '', + [$funcName . '(', $args[0], ', ', $args[1], ', ', $args[2], ', ', $args[3], ')']]; + } + break; + } + + return $color; + } + + protected static $libRgba = [ + ['color'], + ['color', 'alpha'], + ['channels'], + ['red', 'green', 'blue'], + ['red', 'green', 'blue', 'alpha'] ]; + protected function libRgba($args, $kwargs) + { + return $this->libRgb($args, $kwargs, 'rgba'); + } + + /** + * Helper function for adjust_color, change_color, and scale_color + * + * @param array $args + * @param string $operation + * @param callable $fn + * + * @return array + * + * @phpstan-param callable(float|int, float|int|null, float|int): (float|int) $fn + */ + protected function alterColor(array $args, $operation, $fn) + { + $color = $this->assertColor($args[0], 'color'); + + if ($args[1][2]) { + throw new SassScriptException('Only one positional argument is allowed. All other arguments must be passed by name.'); + } + + $kwargs = $this->getArgumentListKeywords($args[1]); + + $scale = $operation === 'scale'; + $change = $operation === 'change'; + + /** + * @param string $name + * @param float|int $max + * @param bool $checkPercent + * @param bool $assertPercent + * + * @return float|int|null + */ + $getParam = function ($name, $max, $checkPercent = false, $assertPercent = false) use (&$kwargs, $scale, $change) { + if (!isset($kwargs[$name])) { + return null; + } + + $number = $this->assertNumber($kwargs[$name], $name); + unset($kwargs[$name]); + + if (!$scale && $checkPercent) { + if (!$number->hasUnit('%')) { + $warning = $this->error("{$name} Passing a number `$number` without unit % is deprecated."); + $this->logger->warn($warning->getMessage(), true); + } + } + + if ($scale || $assertPercent) { + $number->assertUnit('%', $name); + } + + if ($scale) { + $max = 100; + } + + return $number->valueInRange($change ? 0 : -$max, $max, $name); + }; + + $alpha = $getParam('alpha', 1); + $red = $getParam('red', 255); + $green = $getParam('green', 255); + $blue = $getParam('blue', 255); + + if ($scale || !isset($kwargs['hue'])) { + $hue = null; + } else { + $hueNumber = $this->assertNumber($kwargs['hue'], 'hue'); + unset($kwargs['hue']); + $hue = $hueNumber->getDimension(); + } + $saturation = $getParam('saturation', 100, true); + $lightness = $getParam('lightness', 100, true); + $whiteness = $getParam('whiteness', 100, false, true); + $blackness = $getParam('blackness', 100, false, true); + + if (!empty($kwargs)) { + $unknownNames = array_keys($kwargs); + $lastName = array_pop($unknownNames); + $message = sprintf( + 'No argument%s named $%s%s.', + $unknownNames ? 's' : '', + $unknownNames ? implode(', $', $unknownNames) . ' or $' : '', + $lastName + ); + throw new SassScriptException($message); + } + + $hasRgb = $red !== null || $green !== null || $blue !== null; + $hasSL = $saturation !== null || $lightness !== null; + $hasWB = $whiteness !== null || $blackness !== null; + $found = false; + + if ($hasRgb && ($hasSL || $hasWB || $hue !== null)) { + throw new SassScriptException(sprintf('RGB parameters may not be passed along with %s parameters.', $hasWB ? 'HWB' : 'HSL')); + } + + if ($hasWB && $hasSL) { + throw new SassScriptException('HSL parameters may not be passed along with HWB parameters.'); + } + + if ($hasRgb) { + $color[1] = round($fn($color[1], $red, 255)); + $color[2] = round($fn($color[2], $green, 255)); + $color[3] = round($fn($color[3], $blue, 255)); + } elseif ($hasWB) { + $hwb = $this->RGBtoHWB($color[1], $color[2], $color[3]); + if ($hue !== null) { + $hwb[1] = $change ? $hue : $hwb[1] + $hue; + } + $hwb[2] = $fn($hwb[2], $whiteness, 100); + $hwb[3] = $fn($hwb[3], $blackness, 100); + + $rgb = $this->HWBtoRGB($hwb[1], $hwb[2], $hwb[3]); + + if (isset($color[4])) { + $rgb[4] = $color[4]; + } + + $color = $rgb; + } elseif ($hue !== null || $hasSL) { + $hsl = $this->toHSL($color[1], $color[2], $color[3]); + + if ($hue !== null) { + $hsl[1] = $change ? $hue : $hsl[1] + $hue; + } + $hsl[2] = $fn($hsl[2], $saturation, 100); + $hsl[3] = $fn($hsl[3], $lightness, 100); + + $rgb = $this->toRGB($hsl[1], $hsl[2], $hsl[3]); + + if (isset($color[4])) { + $rgb[4] = $color[4]; + } + + $color = $rgb; + } + + if ($alpha !== null) { + $existingAlpha = isset($color[4]) ? $color[4] : 1; + $color[4] = $fn($existingAlpha, $alpha, 1); + } + + return $color; + } + + protected static $libAdjustColor = ['color', 'kwargs...']; + protected function libAdjustColor($args) + { + return $this->alterColor($args, 'adjust', function ($base, $alter, $max) { + if ($alter === null) { + return $base; + } + + $new = $base + $alter; + + if ($new < 0) { + return 0; + } + + if ($new > $max) { + return $max; + } + + return $new; + }); + } + + protected static $libChangeColor = ['color', 'kwargs...']; + protected function libChangeColor($args) + { + return $this->alterColor($args,'change', function ($base, $alter, $max) { + if ($alter === null) { + return $base; + } + + return $alter; + }); + } + + protected static $libScaleColor = ['color', 'kwargs...']; + protected function libScaleColor($args) + { + return $this->alterColor($args, 'scale', function ($base, $scale, $max) { + if ($scale === null) { + return $base; + } + + $scale = $scale / 100; + + if ($scale < 0) { + return $base * $scale + $base; + } + + return ($max - $base) * $scale + $base; + }); + } + + protected static $libIeHexStr = ['color']; + protected function libIeHexStr($args) + { + $color = $this->coerceColor($args[0]); + + if (\is_null($color)) { + throw $this->error('Error: argument `$color` of `ie-hex-str($color)` must be a color'); + } + + $color[4] = isset($color[4]) ? round(255 * $color[4]) : 255; + + return [Type::T_STRING, '', [sprintf('#%02X%02X%02X%02X', $color[4], $color[1], $color[2], $color[3])]]; + } + + protected static $libRed = ['color']; + protected function libRed($args) + { + $color = $this->coerceColor($args[0]); + + if (\is_null($color)) { + throw $this->error('Error: argument `$color` of `red($color)` must be a color'); + } + + return new Number((int) $color[1], ''); + } + + protected static $libGreen = ['color']; + protected function libGreen($args) + { + $color = $this->coerceColor($args[0]); + + if (\is_null($color)) { + throw $this->error('Error: argument `$color` of `green($color)` must be a color'); + } + + return new Number((int) $color[2], ''); + } + + protected static $libBlue = ['color']; + protected function libBlue($args) + { + $color = $this->coerceColor($args[0]); + + if (\is_null($color)) { + throw $this->error('Error: argument `$color` of `blue($color)` must be a color'); + } + + return new Number((int) $color[3], ''); + } + + protected static $libAlpha = ['color']; + protected function libAlpha($args) + { + if ($color = $this->coerceColor($args[0])) { + return new Number(isset($color[4]) ? $color[4] : 1, ''); + } + + // this might be the IE function, so return value unchanged + return null; + } + + protected static $libOpacity = ['color']; + protected function libOpacity($args) + { + $value = $args[0]; + + if ($value instanceof Number) { + return null; + } + + return $this->libAlpha($args); + } + + // mix two colors + protected static $libMix = [ + ['color1', 'color2', 'weight:50%'], + ['color-1', 'color-2', 'weight:50%'] + ]; + protected function libMix($args) + { + list($first, $second, $weight) = $args; + + $first = $this->assertColor($first, 'color1'); + $second = $this->assertColor($second, 'color2'); + $weightScale = $this->assertNumber($weight, 'weight')->valueInRange(0, 100, 'weight') / 100; + + $firstAlpha = isset($first[4]) ? $first[4] : 1; + $secondAlpha = isset($second[4]) ? $second[4] : 1; + + $normalizedWeight = $weightScale * 2 - 1; + $alphaDistance = $firstAlpha - $secondAlpha; + + $combinedWeight = $normalizedWeight * $alphaDistance == -1 ? $normalizedWeight : ($normalizedWeight + $alphaDistance) / (1 + $normalizedWeight * $alphaDistance); + $weight1 = ($combinedWeight + 1) / 2.0; + $weight2 = 1.0 - $weight1; + + $new = [Type::T_COLOR, + $weight1 * $first[1] + $weight2 * $second[1], + $weight1 * $first[2] + $weight2 * $second[2], + $weight1 * $first[3] + $weight2 * $second[3], + ]; + + if ($firstAlpha != 1.0 || $secondAlpha != 1.0) { + $new[] = $firstAlpha * $weightScale + $secondAlpha * (1 - $weightScale); + } + + return $this->fixColor($new); + } + + protected static $libHsl = [ + ['channels'], + ['hue', 'saturation'], + ['hue', 'saturation', 'lightness'], + ['hue', 'saturation', 'lightness', 'alpha'] ]; + protected function libHsl($args, $kwargs, $funcName = 'hsl') + { + $args_to_check = $args; + + if (\count($args) == 1) { + if ($args[0][0] !== Type::T_LIST || \count($args[0][2]) < 3 || \count($args[0][2]) > 4) { + return [Type::T_STRING, '', [$funcName . '(', $args[0], ')']]; + } + + $args = $args[0][2]; + $args_to_check = $kwargs['channels'][2]; + } + + if (\count($args) === 2) { + // if var() is used as an argument, return as a css function + foreach ($args as $arg) { + if ($arg[0] === Type::T_FUNCTION && in_array($arg[1], ['var'])) { + return null; + } + } + + throw new SassScriptException('Missing argument $lightness.'); + } + + foreach ($kwargs as $k => $arg) { + if (in_array($arg[0], [Type::T_FUNCTION_CALL, Type::T_FUNCTION]) && in_array($arg[1], ['min', 'max'])) { + return null; + } + } + + foreach ($args_to_check as $k => $arg) { + if (in_array($arg[0], [Type::T_FUNCTION_CALL, Type::T_FUNCTION]) && in_array($arg[1], ['min', 'max'])) { + if (count($kwargs) > 1 || ($k >= 2 && count($args) === 4)) { + return null; + } + + $args[$k] = $this->stringifyFncallArgs($arg); + } + + if ( + $k >= 2 && count($args) === 4 && + in_array($arg[0], [Type::T_FUNCTION_CALL, Type::T_FUNCTION]) && + in_array($arg[1], ['calc','env']) + ) { + return null; + } + } + + $hue = $this->reduce($args[0]); + $saturation = $this->reduce($args[1]); + $lightness = $this->reduce($args[2]); + $alpha = null; + + if (\count($args) === 4) { + $alpha = $this->compileColorPartValue($args[3], 0, 100, false); + + if (!$hue instanceof Number || !$saturation instanceof Number || ! $lightness instanceof Number || ! is_numeric($alpha)) { + return [Type::T_STRING, '', + [$funcName . '(', $args[0], ', ', $args[1], ', ', $args[2], ', ', $args[3], ')']]; + } + } else { + if (!$hue instanceof Number || !$saturation instanceof Number || ! $lightness instanceof Number) { + return [Type::T_STRING, '', [$funcName . '(', $args[0], ', ', $args[1], ', ', $args[2], ')']]; + } + } + + $hueValue = fmod($hue->getDimension(), 360); + + while ($hueValue < 0) { + $hueValue += 360; + } + + $color = $this->toRGB($hueValue, max(0, min($saturation->getDimension(), 100)), max(0, min($lightness->getDimension(), 100))); + + if (! \is_null($alpha)) { + $color[4] = $alpha; + } + + return $color; + } + + protected static $libHsla = [ + ['channels'], + ['hue', 'saturation'], + ['hue', 'saturation', 'lightness'], + ['hue', 'saturation', 'lightness', 'alpha']]; + protected function libHsla($args, $kwargs) + { + return $this->libHsl($args, $kwargs, 'hsla'); + } + + protected static $libHue = ['color']; + protected function libHue($args) + { + $color = $this->assertColor($args[0], 'color'); + $hsl = $this->toHSL($color[1], $color[2], $color[3]); + + return new Number($hsl[1], 'deg'); + } + + protected static $libSaturation = ['color']; + protected function libSaturation($args) + { + $color = $this->assertColor($args[0], 'color'); + $hsl = $this->toHSL($color[1], $color[2], $color[3]); + + return new Number($hsl[2], '%'); + } + + protected static $libLightness = ['color']; + protected function libLightness($args) + { + $color = $this->assertColor($args[0], 'color'); + $hsl = $this->toHSL($color[1], $color[2], $color[3]); + + return new Number($hsl[3], '%'); + } + + /* + * Todo : a integrer dans le futur module color + protected static $libHwb = [ + ['channels'], + ['hue', 'whiteness', 'blackness'], + ['hue', 'whiteness', 'blackness', 'alpha'] ]; + protected function libHwb($args, $kwargs, $funcName = 'hwb') + { + $args_to_check = $args; + + if (\count($args) == 1) { + if ($args[0][0] !== Type::T_LIST) { + throw $this->error("Missing elements \$whiteness and \$blackness"); + } + + if (\trim($args[0][1])) { + throw $this->error("\$channels must be a space-separated list."); + } + + if (! empty($args[0]['enclosing'])) { + throw $this->error("\$channels must be an unbracketed list."); + } + + $args = $args[0][2]; + if (\count($args) > 3) { + throw $this->error("hwb() : Only 3 elements are allowed but ". \count($args) . "were passed"); + } + + $args_to_check = $this->extractSlashAlphaInColorFunction($kwargs['channels'][2]); + if (\count($args_to_check) !== \count($kwargs['channels'][2])) { + $args = $args_to_check; + } + } + + if (\count($args_to_check) < 2) { + throw $this->error("Missing elements \$whiteness and \$blackness"); + } + if (\count($args_to_check) < 3) { + throw $this->error("Missing element \$blackness"); + } + if (\count($args_to_check) > 4) { + throw $this->error("hwb() : Only 4 elements are allowed but ". \count($args) . "were passed"); + } + + foreach ($kwargs as $k => $arg) { + if (in_array($arg[0], [Type::T_FUNCTION_CALL]) && in_array($arg[1], ['min', 'max'])) { + return null; + } + } + + foreach ($args_to_check as $k => $arg) { + if (in_array($arg[0], [Type::T_FUNCTION_CALL]) && in_array($arg[1], ['min', 'max'])) { + if (count($kwargs) > 1 || ($k >= 2 && count($args) === 4)) { + return null; + } + + $args[$k] = $this->stringifyFncallArgs($arg); + } + + if ( + $k >= 2 && count($args) === 4 && + in_array($arg[0], [Type::T_FUNCTION_CALL, Type::T_FUNCTION]) && + in_array($arg[1], ['calc','env']) + ) { + return null; + } + } + + $hue = $this->reduce($args[0]); + $whiteness = $this->reduce($args[1]); + $blackness = $this->reduce($args[2]); + $alpha = null; + + if (\count($args) === 4) { + $alpha = $this->compileColorPartValue($args[3], 0, 1, false); + + if (! \is_numeric($alpha)) { + $val = $this->compileValue($args[3]); + throw $this->error("\$alpha: $val is not a number"); + } + } + + $this->assertNumber($hue, 'hue'); + $this->assertUnit($whiteness, ['%'], 'whiteness'); + $this->assertUnit($blackness, ['%'], 'blackness'); + + $this->assertRange($whiteness, 0, 100, "0% and 100%", "whiteness"); + $this->assertRange($blackness, 0, 100, "0% and 100%", "blackness"); + + $w = $whiteness->getDimension(); + $b = $blackness->getDimension(); + + $hueValue = $hue->getDimension() % 360; + + while ($hueValue < 0) { + $hueValue += 360; + } + + $color = $this->HWBtoRGB($hueValue, $w, $b); + + if (! \is_null($alpha)) { + $color[4] = $alpha; + } + + return $color; + } + + protected static $libWhiteness = ['color']; + protected function libWhiteness($args, $kwargs, $funcName = 'whiteness') { + + $color = $this->assertColor($args[0]); + $hwb = $this->RGBtoHWB($color[1], $color[2], $color[3]); + + return new Number($hwb[2], '%'); + } + + protected static $libBlackness = ['color']; + protected function libBlackness($args, $kwargs, $funcName = 'blackness') { + + $color = $this->assertColor($args[0]); + $hwb = $this->RGBtoHWB($color[1], $color[2], $color[3]); + + return new Number($hwb[3], '%'); + } + */ + + /** + * @param array $color + * @param int $idx + * @param int|float $amount + * + * @return array + */ + protected function adjustHsl($color, $idx, $amount) + { + $hsl = $this->toHSL($color[1], $color[2], $color[3]); + $hsl[$idx] += $amount; + + if ($idx !== 1) { + // Clamp the saturation and lightness + $hsl[$idx] = min(max(0, $hsl[$idx]), 100); + } + + $out = $this->toRGB($hsl[1], $hsl[2], $hsl[3]); + + if (isset($color[4])) { + $out[4] = $color[4]; + } + + return $out; + } + + protected static $libAdjustHue = ['color', 'degrees']; + protected function libAdjustHue($args) + { + $color = $this->assertColor($args[0], 'color'); + $degrees = $this->assertNumber($args[1], 'degrees')->getDimension(); + + return $this->adjustHsl($color, 1, $degrees); + } + + protected static $libLighten = ['color', 'amount']; + protected function libLighten($args) + { + $color = $this->assertColor($args[0], 'color'); + $amount = Util::checkRange('amount', new Range(0, 100), $args[1], '%'); + + return $this->adjustHsl($color, 3, $amount); + } + + protected static $libDarken = ['color', 'amount']; + protected function libDarken($args) + { + $color = $this->assertColor($args[0], 'color'); + $amount = Util::checkRange('amount', new Range(0, 100), $args[1], '%'); + + return $this->adjustHsl($color, 3, -$amount); + } + + protected static $libSaturate = [['color', 'amount'], ['amount']]; + protected function libSaturate($args) + { + $value = $args[0]; + + if (count($args) === 1) { + $this->assertNumber($args[0], 'amount'); + + return null; + } + + $color = $this->assertColor($args[0], 'color'); + $amount = $this->assertNumber($args[1], 'amount'); + + return $this->adjustHsl($color, 2, $amount->valueInRange(0, 100, 'amount')); + } + + protected static $libDesaturate = ['color', 'amount']; + protected function libDesaturate($args) + { + $color = $this->assertColor($args[0], 'color'); + $amount = $this->assertNumber($args[1], 'amount'); + + return $this->adjustHsl($color, 2, -$amount->valueInRange(0, 100, 'amount')); + } + + protected static $libGrayscale = ['color']; + protected function libGrayscale($args) + { + $value = $args[0]; + + if ($value instanceof Number) { + return null; + } + + return $this->adjustHsl($this->assertColor($value, 'color'), 2, -100); + } + + protected static $libComplement = ['color']; + protected function libComplement($args) + { + return $this->adjustHsl($this->assertColor($args[0], 'color'), 1, 180); + } + + protected static $libInvert = ['color', 'weight:100%']; + protected function libInvert($args) + { + $value = $args[0]; + + $weight = $this->assertNumber($args[1], 'weight'); + + if ($value instanceof Number) { + if ($weight->getDimension() != 100 || !$weight->hasUnit('%')) { + throw new SassScriptException('Only one argument may be passed to the plain-CSS invert() function.'); + } + + return null; + } + + $color = $this->assertColor($value, 'color'); + $inverted = $color; + $inverted[1] = 255 - $inverted[1]; + $inverted[2] = 255 - $inverted[2]; + $inverted[3] = 255 - $inverted[3]; + + return $this->libMix([$inverted, $color, $weight]); + } + + // increases opacity by amount + protected static $libOpacify = ['color', 'amount']; + protected function libOpacify($args) + { + $color = $this->assertColor($args[0], 'color'); + $amount = $this->assertNumber($args[1], 'amount'); + + $color[4] = (isset($color[4]) ? $color[4] : 1) + $amount->valueInRange(0, 1, 'amount'); + $color[4] = min(1, max(0, $color[4])); + + return $color; + } + + protected static $libFadeIn = ['color', 'amount']; + protected function libFadeIn($args) + { + return $this->libOpacify($args); + } + + // decreases opacity by amount + protected static $libTransparentize = ['color', 'amount']; + protected function libTransparentize($args) + { + $color = $this->assertColor($args[0], 'color'); + $amount = $this->assertNumber($args[1], 'amount'); + + $color[4] = (isset($color[4]) ? $color[4] : 1) - $amount->valueInRange(0, 1, 'amount'); + $color[4] = min(1, max(0, $color[4])); + + return $color; + } + + protected static $libFadeOut = ['color', 'amount']; + protected function libFadeOut($args) + { + return $this->libTransparentize($args); + } + + protected static $libUnquote = ['string']; + protected function libUnquote($args) + { + try { + $str = $this->assertString($args[0], 'string'); + } catch (SassScriptException $e) { + $value = $this->compileValue($args[0]); + $fname = $this->getPrettyPath($this->sourceNames[$this->sourceIndex]); + $line = $this->sourceLine; + + $message = "Passing $value, a non-string value, to unquote() +will be an error in future versions of Sass.\n on line $line of $fname"; + + $this->logger->warn($message, true); + + return $args[0]; + } + + $str[1] = ''; + + return $str; + } + + protected static $libQuote = ['string']; + protected function libQuote($args) + { + $value = $this->assertString($args[0], 'string'); + + $value[1] = '"'; + + return $value; + } + + protected static $libPercentage = ['number']; + protected function libPercentage($args) + { + $num = $this->assertNumber($args[0], 'number'); + $num->assertNoUnits('number'); + + return new Number($num->getDimension() * 100, '%'); + } + + protected static $libRound = ['number']; + protected function libRound($args) + { + $num = $this->assertNumber($args[0], 'number'); + + return new Number(round($num->getDimension()), $num->getNumeratorUnits(), $num->getDenominatorUnits()); + } + + protected static $libFloor = ['number']; + protected function libFloor($args) + { + $num = $this->assertNumber($args[0], 'number'); + + return new Number(floor($num->getDimension()), $num->getNumeratorUnits(), $num->getDenominatorUnits()); + } + + protected static $libCeil = ['number']; + protected function libCeil($args) + { + $num = $this->assertNumber($args[0], 'number'); + + return new Number(ceil($num->getDimension()), $num->getNumeratorUnits(), $num->getDenominatorUnits()); + } + + protected static $libAbs = ['number']; + protected function libAbs($args) + { + $num = $this->assertNumber($args[0], 'number'); + + return new Number(abs($num->getDimension()), $num->getNumeratorUnits(), $num->getDenominatorUnits()); + } + + protected static $libMin = ['numbers...']; + protected function libMin($args) + { + /** + * @var Number|null + */ + $min = null; + + foreach ($args[0][2] as $arg) { + $number = $this->assertNumber($arg); + + if (\is_null($min) || $min->greaterThan($number)) { + $min = $number; + } + } + + if (!\is_null($min)) { + return $min; + } + + throw $this->error('At least one argument must be passed.'); + } + + protected static $libMax = ['numbers...']; + protected function libMax($args) + { + /** + * @var Number|null + */ + $max = null; + + foreach ($args[0][2] as $arg) { + $number = $this->assertNumber($arg); + + if (\is_null($max) || $max->lessThan($number)) { + $max = $number; + } + } + + if (!\is_null($max)) { + return $max; + } + + throw $this->error('At least one argument must be passed.'); + } + + protected static $libLength = ['list']; + protected function libLength($args) + { + $list = $this->coerceList($args[0], ',', true); + + return new Number(\count($list[2]), ''); + } + + protected static $libListSeparator = ['list']; + protected function libListSeparator($args) + { + if (! \in_array($args[0][0], [Type::T_LIST, Type::T_MAP])) { + return [Type::T_KEYWORD, 'space']; + } + + $list = $this->coerceList($args[0]); + + if ($list[1] === '' && \count($list[2]) <= 1 && empty($list['enclosing'])) { + return [Type::T_KEYWORD, 'space']; + } + + if ($list[1] === ',') { + return [Type::T_KEYWORD, 'comma']; + } + + if ($list[1] === '/') { + return [Type::T_KEYWORD, 'slash']; + } + + return [Type::T_KEYWORD, 'space']; + } + + protected static $libNth = ['list', 'n']; + protected function libNth($args) + { + $list = $this->coerceList($args[0], ',', false); + $n = $this->assertNumber($args[1])->getDimension(); + + if ($n > 0) { + $n--; + } elseif ($n < 0) { + $n += \count($list[2]); + } + + return isset($list[2][$n]) ? $list[2][$n] : static::$defaultValue; + } + + protected static $libSetNth = ['list', 'n', 'value']; + protected function libSetNth($args) + { + $list = $this->coerceList($args[0]); + $n = $this->assertNumber($args[1])->getDimension(); + + if ($n > 0) { + $n--; + } elseif ($n < 0) { + $n += \count($list[2]); + } + + if (! isset($list[2][$n])) { + throw $this->error('Invalid argument for "n"'); + } + + $list[2][$n] = $args[2]; + + return $list; + } + + protected static $libMapGet = ['map', 'key', 'keys...']; + protected function libMapGet($args) + { + $map = $this->assertMap($args[0], 'map'); + if (!isset($args[2])) { + // BC layer for usages of the function from PHP code rather than from the Sass function + $args[2] = self::$emptyArgumentList; + } + $keys = array_merge([$args[1]], $args[2][2]); + $value = static::$null; + + foreach ($keys as $key) { + if (!\is_array($map) || $map[0] !== Type::T_MAP) { + return static::$null; + } + + $map = $this->mapGet($map, $key); + + if ($map === null) { + return static::$null; + } + + $value = $map; + } + + return $value; + } + + /** + * Gets the value corresponding to that key in the map + * + * @param array $map + * @param Number|array $key + * + * @return Number|array|null + */ + private function mapGet(array $map, $key) + { + $index = $this->mapGetEntryIndex($map, $key); + + if ($index !== null) { + return $map[2][$index]; + } + + return null; + } + + /** + * Gets the index corresponding to that key in the map entries + * + * @param array $map + * @param Number|array $key + * + * @return int|null + */ + private function mapGetEntryIndex(array $map, $key) + { + $key = $this->compileStringContent($this->coerceString($key)); + + for ($i = \count($map[1]) - 1; $i >= 0; $i--) { + if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) { + return $i; + } + } + + return null; + } + + protected static $libMapKeys = ['map']; + protected function libMapKeys($args) + { + $map = $this->assertMap($args[0], 'map'); + $keys = $map[1]; + + return [Type::T_LIST, ',', $keys]; + } + + protected static $libMapValues = ['map']; + protected function libMapValues($args) + { + $map = $this->assertMap($args[0], 'map'); + $values = $map[2]; + + return [Type::T_LIST, ',', $values]; + } + + protected static $libMapRemove = [ + ['map'], + ['map', 'key', 'keys...'], + ]; + protected function libMapRemove($args) + { + $map = $this->assertMap($args[0], 'map'); + + if (\count($args) === 1) { + return $map; + } + + $keys = []; + $keys[] = $this->compileStringContent($this->coerceString($args[1])); + + foreach ($args[2][2] as $key) { + $keys[] = $this->compileStringContent($this->coerceString($key)); + } + + for ($i = \count($map[1]) - 1; $i >= 0; $i--) { + if (in_array($this->compileStringContent($this->coerceString($map[1][$i])), $keys)) { + array_splice($map[1], $i, 1); + array_splice($map[2], $i, 1); + } + } + + return $map; + } + + protected static $libMapHasKey = ['map', 'key', 'keys...']; + protected function libMapHasKey($args) + { + $map = $this->assertMap($args[0], 'map'); + if (!isset($args[2])) { + // BC layer for usages of the function from PHP code rather than from the Sass function + $args[2] = self::$emptyArgumentList; + } + $keys = array_merge([$args[1]], $args[2][2]); + $lastKey = array_pop($keys); + + foreach ($keys as $key) { + $value = $this->mapGet($map, $key); + + if ($value === null || $value instanceof Number || $value[0] !== Type::T_MAP) { + return self::$false; + } + + $map = $value; + } + + return $this->toBool($this->mapHasKey($map, $lastKey)); + } + + /** + * @param array|Number $keyValue + * + * @return bool + */ + private function mapHasKey(array $map, $keyValue) + { + $key = $this->compileStringContent($this->coerceString($keyValue)); + + for ($i = \count($map[1]) - 1; $i >= 0; $i--) { + if ($key === $this->compileStringContent($this->coerceString($map[1][$i]))) { + return true; + } + } + + return false; + } + + protected static $libMapMerge = [ + ['map1', 'map2'], + ['map-1', 'map-2'], + ['map1', 'args...'] + ]; + protected function libMapMerge($args) + { + $map1 = $this->assertMap($args[0], 'map1'); + $map2 = $args[1]; + $keys = []; + if ($map2[0] === Type::T_LIST && isset($map2[3]) && \is_array($map2[3])) { + // This is an argument list for the variadic signature + if (\count($map2[2]) === 0) { + throw new SassScriptException('Expected $args to contain a key.'); + } + if (\count($map2[2]) === 1) { + throw new SassScriptException('Expected $args to contain a value.'); + } + $keys = $map2[2]; + $map2 = array_pop($keys); + } + $map2 = $this->assertMap($map2, 'map2'); + + return $this->modifyMap($map1, $keys, function ($oldValue) use ($map2) { + $nestedMap = $this->tryMap($oldValue); + + if ($nestedMap === null) { + return $map2; + } + + return $this->mergeMaps($nestedMap, $map2); + }); + } + + /** + * @param array $map + * @param array $keys + * @param callable $modify + * @param bool $addNesting + * + * @return Number|array + * + * @phpstan-param array $keys + * @phpstan-param callable(Number|array): (Number|array) $modify + */ + private function modifyMap(array $map, array $keys, callable $modify, $addNesting = true) + { + if ($keys === []) { + return $modify($map); + } + + return $this->modifyNestedMap($map, $keys, $modify, $addNesting); + } + + /** + * @param array $map + * @param array $keys + * @param callable $modify + * @param bool $addNesting + * + * @return array + * + * @phpstan-param non-empty-array $keys + * @phpstan-param callable(Number|array): (Number|array) $modify + */ + private function modifyNestedMap(array $map, array $keys, callable $modify, $addNesting) + { + $key = array_shift($keys); + + $nestedValueIndex = $this->mapGetEntryIndex($map, $key); + + if ($keys === []) { + if ($nestedValueIndex !== null) { + $map[2][$nestedValueIndex] = $modify($map[2][$nestedValueIndex]); + } else { + $map[1][] = $key; + $map[2][] = $modify(self::$null); + } + + return $map; + } + + $nestedMap = $nestedValueIndex !== null ? $this->tryMap($map[2][$nestedValueIndex]) : null; + + if ($nestedMap === null && !$addNesting) { + return $map; + } + + if ($nestedMap === null) { + $nestedMap = self::$emptyMap; + } + + $newNestedMap = $this->modifyNestedMap($nestedMap, $keys, $modify, $addNesting); + + if ($nestedValueIndex !== null) { + $map[2][$nestedValueIndex] = $newNestedMap; + } else { + $map[1][] = $key; + $map[2][] = $newNestedMap; + } + + return $map; + } + + /** + * Merges 2 Sass maps together + * + * @param array $map1 + * @param array $map2 + * + * @return array + */ + private function mergeMaps(array $map1, array $map2) + { + foreach ($map2[1] as $i2 => $key2) { + $map1EntryIndex = $this->mapGetEntryIndex($map1, $key2); + + if ($map1EntryIndex !== null) { + $map1[2][$map1EntryIndex] = $map2[2][$i2]; + continue; + } + + $map1[1][] = $key2; + $map1[2][] = $map2[2][$i2]; + } + + return $map1; + } + + protected static $libKeywords = ['args']; + protected function libKeywords($args) + { + $value = $args[0]; + + if ($value[0] !== Type::T_LIST || !isset($value[3]) || !\is_array($value[3])) { + $compiledValue = $this->compileValue($value); + + throw SassScriptException::forArgument($compiledValue . ' is not an argument list.', 'args'); + } + + $keys = []; + $values = []; + + foreach ($this->getArgumentListKeywords($value) as $name => $arg) { + $keys[] = [Type::T_KEYWORD, $name]; + $values[] = $arg; + } + + return [Type::T_MAP, $keys, $values]; + } + + protected static $libIsBracketed = ['list']; + protected function libIsBracketed($args) + { + $list = $args[0]; + $this->coerceList($list, ' '); + + if (! empty($list['enclosing']) && $list['enclosing'] === 'bracket') { + return self::$true; + } + + return self::$false; + } + + /** + * @param array $list1 + * @param array|Number|null $sep + * + * @return string + * @throws CompilerException + * + * @deprecated + */ + protected function listSeparatorForJoin($list1, $sep) + { + @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED); + + if (! isset($sep)) { + return $list1[1]; + } + + switch ($this->compileValue($sep)) { + case 'comma': + return ','; + + case 'space': + return ' '; + + default: + return $list1[1]; + } + } + + protected static $libJoin = ['list1', 'list2', 'separator:auto', 'bracketed:auto']; + protected function libJoin($args) + { + list($list1, $list2, $sep, $bracketed) = $args; + + $list1 = $this->coerceList($list1, ' ', true); + $list2 = $this->coerceList($list2, ' ', true); + + switch ($this->compileStringContent($this->assertString($sep, 'separator'))) { + case 'comma': + $separator = ','; + break; + + case 'space': + $separator = ' '; + break; + + case 'slash': + $separator = '/'; + break; + + case 'auto': + if ($list1[1] !== '' || count($list1[2]) > 1 || !empty($list1['enclosing']) && $list1['enclosing'] !== 'parent') { + $separator = $list1[1] ?: ' '; + } elseif ($list2[1] !== '' || count($list2[2]) > 1 || !empty($list2['enclosing']) && $list2['enclosing'] !== 'parent') { + $separator = $list2[1] ?: ' '; + } else { + $separator = ' '; + } + break; + + default: + throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator'); + } + + if ($bracketed === static::$true) { + $bracketed = true; + } elseif ($bracketed === static::$false) { + $bracketed = false; + } elseif ($bracketed === [Type::T_KEYWORD, 'auto']) { + $bracketed = 'auto'; + } elseif ($bracketed === static::$null) { + $bracketed = false; + } else { + $bracketed = $this->compileValue($bracketed); + $bracketed = ! ! $bracketed; + + if ($bracketed === true) { + $bracketed = true; + } + } + + if ($bracketed === 'auto') { + $bracketed = false; + + if (! empty($list1['enclosing']) && $list1['enclosing'] === 'bracket') { + $bracketed = true; + } + } + + $res = [Type::T_LIST, $separator, array_merge($list1[2], $list2[2])]; + + if ($bracketed) { + $res['enclosing'] = 'bracket'; + } + + return $res; + } + + protected static $libAppend = ['list', 'val', 'separator:auto']; + protected function libAppend($args) + { + list($list1, $value, $sep) = $args; + + $list1 = $this->coerceList($list1, ' ', true); + + switch ($this->compileStringContent($this->assertString($sep, 'separator'))) { + case 'comma': + $separator = ','; + break; + + case 'space': + $separator = ' '; + break; + + case 'slash': + $separator = '/'; + break; + + case 'auto': + $separator = $list1[1] === '' && \count($list1[2]) <= 1 && (empty($list1['enclosing']) || $list1['enclosing'] === 'parent') ? ' ' : $list1[1]; + break; + + default: + throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator'); + } + + $res = [Type::T_LIST, $separator, array_merge($list1[2], [$value])]; + + if (isset($list1['enclosing'])) { + $res['enclosing'] = $list1['enclosing']; + } + + return $res; + } + + protected static $libZip = ['lists...']; + protected function libZip($args) + { + $argLists = []; + foreach ($args[0][2] as $arg) { + $argLists[] = $this->coerceList($arg); + } + + $lists = []; + $firstList = array_shift($argLists); + + $result = [Type::T_LIST, ',', $lists]; + if (! \is_null($firstList)) { + foreach ($firstList[2] as $key => $item) { + $list = [Type::T_LIST, ' ', [$item]]; + + foreach ($argLists as $arg) { + if (isset($arg[2][$key])) { + $list[2][] = $arg[2][$key]; + } else { + break 2; + } + } + + $lists[] = $list; + } + + $result[2] = $lists; + } else { + $result['enclosing'] = 'parent'; + } + + return $result; + } + + protected static $libTypeOf = ['value']; + protected function libTypeOf($args) + { + $value = $args[0]; + + return [Type::T_KEYWORD, $this->getTypeOf($value)]; + } + + /** + * @param array|Number $value + * + * @return string + */ + private function getTypeOf($value) + { + switch ($value[0]) { + case Type::T_KEYWORD: + if ($value === static::$true || $value === static::$false) { + return 'bool'; + } + + if ($this->coerceColor($value)) { + return 'color'; + } + + // fall-thru + case Type::T_FUNCTION: + return 'string'; + + case Type::T_FUNCTION_REFERENCE: + return 'function'; + + case Type::T_LIST: + if (isset($value[3]) && \is_array($value[3])) { + return 'arglist'; + } + + // fall-thru + default: + return $value[0]; + } + } + + protected static $libUnit = ['number']; + protected function libUnit($args) + { + $num = $this->assertNumber($args[0], 'number'); + + return [Type::T_STRING, '"', [$num->unitStr()]]; + } + + protected static $libUnitless = ['number']; + protected function libUnitless($args) + { + $value = $this->assertNumber($args[0], 'number'); + + return $this->toBool($value->unitless()); + } + + protected static $libComparable = [ + ['number1', 'number2'], + ['number-1', 'number-2'] + ]; + protected function libComparable($args) + { + list($number1, $number2) = $args; + + if ( + ! $number1 instanceof Number || + ! $number2 instanceof Number + ) { + throw $this->error('Invalid argument(s) for "comparable"'); + } + + return $this->toBool($number1->isComparableTo($number2)); + } + + protected static $libStrIndex = ['string', 'substring']; + protected function libStrIndex($args) + { + $string = $this->assertString($args[0], 'string'); + $stringContent = $this->compileStringContent($string); + + $substring = $this->assertString($args[1], 'substring'); + $substringContent = $this->compileStringContent($substring); + + if (! \strlen($substringContent)) { + $result = 0; + } else { + $result = Util::mbStrpos($stringContent, $substringContent); + } + + return $result === false ? static::$null : new Number($result + 1, ''); + } + + protected static $libStrInsert = ['string', 'insert', 'index']; + protected function libStrInsert($args) + { + $string = $this->assertString($args[0], 'string'); + $stringContent = $this->compileStringContent($string); + + $insert = $this->assertString($args[1], 'insert'); + $insertContent = $this->compileStringContent($insert); + + $index = $this->assertInteger($args[2], 'index'); + if ($index > 0) { + $index = $index - 1; + } + if ($index < 0) { + $index = Util::mbStrlen($stringContent) + 1 + $index; + } + + $string[2] = [ + Util::mbSubstr($stringContent, 0, $index), + $insertContent, + Util::mbSubstr($stringContent, $index) + ]; + + return $string; + } + + protected static $libStrLength = ['string']; + protected function libStrLength($args) + { + $string = $this->assertString($args[0], 'string'); + $stringContent = $this->compileStringContent($string); + + return new Number(Util::mbStrlen($stringContent), ''); + } + + protected static $libStrSlice = ['string', 'start-at', 'end-at:-1']; + protected function libStrSlice($args) + { + $string = $this->assertString($args[0], 'string'); + $stringContent = $this->compileStringContent($string); + + $start = $this->assertNumber($args[1], 'start-at'); + $start->assertNoUnits('start-at'); + $startInt = $this->assertInteger($start, 'start-at'); + $end = $this->assertNumber($args[2], 'end-at'); + $end->assertNoUnits('end-at'); + $endInt = $this->assertInteger($end, 'end-at'); + + if ($endInt === 0) { + return [Type::T_STRING, $string[1], []]; + } + + if ($startInt > 0) { + $startInt--; + } + + if ($endInt < 0) { + $endInt = Util::mbStrlen($stringContent) + $endInt; + } else { + $endInt--; + } + + if ($endInt < $startInt) { + return [Type::T_STRING, $string[1], []]; + } + + $length = $endInt - $startInt + 1; // The end of the slice is inclusive + + $string[2] = [Util::mbSubstr($stringContent, $startInt, $length)]; + + return $string; + } + + protected static $libToLowerCase = ['string']; + protected function libToLowerCase($args) + { + $string = $this->assertString($args[0], 'string'); + $stringContent = $this->compileStringContent($string); + + $string[2] = [$this->stringTransformAsciiOnly($stringContent, 'strtolower')]; + + return $string; + } + + protected static $libToUpperCase = ['string']; + protected function libToUpperCase($args) + { + $string = $this->assertString($args[0], 'string'); + $stringContent = $this->compileStringContent($string); + + $string[2] = [$this->stringTransformAsciiOnly($stringContent, 'strtoupper')]; + + return $string; + } + + /** + * Apply a filter on a string content, only on ascii chars + * let extended chars untouched + * + * @param string $stringContent + * @param callable $filter + * @return string + */ + protected function stringTransformAsciiOnly($stringContent, $filter) + { + $mblength = Util::mbStrlen($stringContent); + if ($mblength === strlen($stringContent)) { + return $filter($stringContent); + } + $filteredString = ""; + for ($i = 0; $i < $mblength; $i++) { + $char = Util::mbSubstr($stringContent, $i, 1); + if (strlen($char) > 1) { + $filteredString .= $char; + } else { + $filteredString .= $filter($char); + } + } + + return $filteredString; + } + + protected static $libFeatureExists = ['feature']; + protected function libFeatureExists($args) + { + $string = $this->assertString($args[0], 'feature'); + $name = $this->compileStringContent($string); + + return $this->toBool( + \array_key_exists($name, $this->registeredFeatures) ? $this->registeredFeatures[$name] : false + ); + } + + protected static $libFunctionExists = ['name']; + protected function libFunctionExists($args) + { + $string = $this->assertString($args[0], 'name'); + $name = $this->compileStringContent($string); + + // user defined functions + if ($this->has(static::$namespaces['function'] . $name)) { + return self::$true; + } + + $name = $this->normalizeName($name); + + if (isset($this->userFunctions[$name])) { + return self::$true; + } + + // built-in functions + $f = $this->getBuiltinFunction($name); + + return $this->toBool(\is_callable($f)); + } + + protected static $libGlobalVariableExists = ['name']; + protected function libGlobalVariableExists($args) + { + $string = $this->assertString($args[0], 'name'); + $name = $this->compileStringContent($string); + + return $this->toBool($this->has($name, $this->rootEnv)); + } + + protected static $libMixinExists = ['name']; + protected function libMixinExists($args) + { + $string = $this->assertString($args[0], 'name'); + $name = $this->compileStringContent($string); + + return $this->toBool($this->has(static::$namespaces['mixin'] . $name)); + } + + protected static $libVariableExists = ['name']; + protected function libVariableExists($args) + { + $string = $this->assertString($args[0], 'name'); + $name = $this->compileStringContent($string); + + return $this->toBool($this->has($name)); + } + + protected static $libCounter = ['args...']; + /** + * Workaround IE7's content counter bug. + * + * @param array $args + * + * @return array + */ + protected function libCounter($args) + { + $list = array_map([$this, 'compileValue'], $args[0][2]); + + return [Type::T_STRING, '', ['counter(' . implode(',', $list) . ')']]; + } + + protected static $libRandom = ['limit:null']; + protected function libRandom($args) + { + if (isset($args[0]) && $args[0] !== static::$null) { + $n = $this->assertInteger($args[0], 'limit'); + + if ($n < 1) { + throw new SassScriptException("\$limit: Must be greater than 0, was $n."); + } + + return new Number(mt_rand(1, $n), ''); + } + + $max = mt_getrandmax(); + return new Number(mt_rand(0, $max - 1) / $max, ''); + } + + protected static $libUniqueId = []; + protected function libUniqueId() + { + static $id; + + if (! isset($id)) { + $id = PHP_INT_SIZE === 4 + ? mt_rand(0, pow(36, 5)) . str_pad(mt_rand(0, pow(36, 5)) % 10000000, 7, '0', STR_PAD_LEFT) + : mt_rand(0, pow(36, 8)); + } + + $id += mt_rand(0, 10) + 1; + + return [Type::T_STRING, '', ['u' . str_pad(base_convert($id, 10, 36), 8, '0', STR_PAD_LEFT)]]; + } + + /** + * @param array|Number $value + * @param bool $force_enclosing_display + * + * @return array + */ + protected function inspectFormatValue($value, $force_enclosing_display = false) + { + if ($value === static::$null) { + $value = [Type::T_KEYWORD, 'null']; + } + + $stringValue = [$value]; + + if ($value instanceof Number) { + return [Type::T_STRING, '', $stringValue]; + } + + if ($value[0] === Type::T_LIST) { + if (end($value[2]) === static::$null) { + array_pop($value[2]); + $value[2][] = [Type::T_STRING, '', ['']]; + $force_enclosing_display = true; + } + + if ( + ! empty($value['enclosing']) && + ($force_enclosing_display || + ($value['enclosing'] === 'bracket') || + ! \count($value[2])) + ) { + $value['enclosing'] = 'forced_' . $value['enclosing']; + $force_enclosing_display = true; + } elseif (! \count($value[2])) { + $value['enclosing'] = 'forced_parent'; + } + + foreach ($value[2] as $k => $listelement) { + $value[2][$k] = $this->inspectFormatValue($listelement, $force_enclosing_display); + } + + $stringValue = [$value]; + } + + return [Type::T_STRING, '', $stringValue]; + } + + protected static $libInspect = ['value']; + protected function libInspect($args) + { + $value = $args[0]; + + return $this->inspectFormatValue($value); + } + + /** + * Preprocess selector args + * + * @param array $arg + * @param string|null $varname + * @param bool $allowParent + * + * @return array + */ + protected function getSelectorArg($arg, $varname = null, $allowParent = false) + { + static $parser = null; + + if (\is_null($parser)) { + $parser = $this->parserFactory(__METHOD__); + } + + if (! $this->checkSelectorArgType($arg)) { + $var_value = $this->compileValue($arg); + throw SassScriptException::forArgument("$var_value is not a valid selector: it must be a string, a list of strings, or a list of lists of strings", $varname); + } + + + if ($arg[0] === Type::T_STRING) { + $arg[1] = ''; + } + $arg = $this->compileValue($arg); + + $parsedSelector = []; + + if ($parser->parseSelector($arg, $parsedSelector, true)) { + $selector = $this->evalSelectors($parsedSelector); + $gluedSelector = $this->glueFunctionSelectors($selector); + + if (! $allowParent) { + foreach ($gluedSelector as $selector) { + foreach ($selector as $s) { + if (in_array(static::$selfSelector, $s)) { + throw SassScriptException::forArgument("Parent selectors aren't allowed here.", $varname); + } + } + } + } + + return $gluedSelector; + } + + throw SassScriptException::forArgument("expected more input, invalid selector.", $varname); + } + + /** + * Check variable type for getSelectorArg() function + * @param array $arg + * @param int $maxDepth + * @return bool + */ + protected function checkSelectorArgType($arg, $maxDepth = 2) + { + if ($arg[0] === Type::T_LIST && $maxDepth > 0) { + foreach ($arg[2] as $elt) { + if (! $this->checkSelectorArgType($elt, $maxDepth - 1)) { + return false; + } + } + return true; + } + if (!in_array($arg[0], [Type::T_STRING, Type::T_KEYWORD])) { + return false; + } + return true; + } + + /** + * Postprocess selector to output in right format + * + * @param array $selectors + * + * @return array + */ + protected function formatOutputSelector($selectors) + { + $selectors = $this->collapseSelectorsAsList($selectors); + + return $selectors; + } + + protected static $libIsSuperselector = ['super', 'sub']; + protected function libIsSuperselector($args) + { + list($super, $sub) = $args; + + $super = $this->getSelectorArg($super, 'super'); + $sub = $this->getSelectorArg($sub, 'sub'); + + return $this->toBool($this->isSuperSelector($super, $sub)); + } + + /** + * Test a $super selector again $sub + * + * @param array $super + * @param array $sub + * + * @return bool + */ + protected function isSuperSelector($super, $sub) + { + // one and only one selector for each arg + if (! $super) { + throw $this->error('Invalid super selector for isSuperSelector()'); + } + + if (! $sub) { + throw $this->error('Invalid sub selector for isSuperSelector()'); + } + + if (count($sub) > 1) { + foreach ($sub as $s) { + if (! $this->isSuperSelector($super, [$s])) { + return false; + } + } + return true; + } + + if (count($super) > 1) { + foreach ($super as $s) { + if ($this->isSuperSelector([$s], $sub)) { + return true; + } + } + return false; + } + + $super = reset($super); + $sub = reset($sub); + + $i = 0; + $nextMustMatch = false; + + foreach ($super as $node) { + $compound = ''; + + array_walk_recursive( + $node, + function ($value, $key) use (&$compound) { + $compound .= $value; + } + ); + + if ($this->isImmediateRelationshipCombinator($compound)) { + if ($node !== $sub[$i]) { + return false; + } + + $nextMustMatch = true; + $i++; + } else { + while ($i < \count($sub) && ! $this->isSuperPart($node, $sub[$i])) { + if ($nextMustMatch) { + return false; + } + + $i++; + } + + if ($i >= \count($sub)) { + return false; + } + + $nextMustMatch = false; + $i++; + } + } + + return true; + } + + /** + * Test a part of super selector again a part of sub selector + * + * @param array $superParts + * @param array $subParts + * + * @return bool + */ + protected function isSuperPart($superParts, $subParts) + { + $i = 0; + + foreach ($superParts as $superPart) { + while ($i < \count($subParts) && $subParts[$i] !== $superPart) { + $i++; + } + + if ($i >= \count($subParts)) { + return false; + } + + $i++; + } + + return true; + } + + protected static $libSelectorAppend = ['selector...']; + protected function libSelectorAppend($args) + { + // get the selector... list + $args = reset($args); + $args = $args[2]; + + if (\count($args) < 1) { + throw $this->error('selector-append() needs at least 1 argument'); + } + + $selectors = []; + foreach ($args as $arg) { + $selectors[] = $this->getSelectorArg($arg, 'selector'); + } + + return $this->formatOutputSelector($this->selectorAppend($selectors)); + } + + /** + * Append parts of the last selector in the list to the previous, recursively + * + * @param array $selectors + * + * @return array + * + * @throws \ScssPhp\ScssPhp\Exception\CompilerException + */ + protected function selectorAppend($selectors) + { + $lastSelectors = array_pop($selectors); + + if (! $lastSelectors) { + throw $this->error('Invalid selector list in selector-append()'); + } + + while (\count($selectors)) { + $previousSelectors = array_pop($selectors); + + if (! $previousSelectors) { + throw $this->error('Invalid selector list in selector-append()'); + } + + // do the trick, happening $lastSelector to $previousSelector + $appended = []; + + foreach ($previousSelectors as $previousSelector) { + foreach ($lastSelectors as $lastSelector) { + $previous = $previousSelector; + foreach ($previousSelector as $j => $previousSelectorParts) { + foreach ($lastSelector as $lastSelectorParts) { + foreach ($lastSelectorParts as $lastSelectorPart) { + $previous[$j][] = $lastSelectorPart; + } + } + } + + $appended[] = $previous; + } + } + + $lastSelectors = $appended; + } + + return $lastSelectors; + } + + protected static $libSelectorExtend = [ + ['selector', 'extendee', 'extender'], + ['selectors', 'extendee', 'extender'] + ]; + protected function libSelectorExtend($args) + { + list($selectors, $extendee, $extender) = $args; + + $selectors = $this->getSelectorArg($selectors, 'selector'); + $extendee = $this->getSelectorArg($extendee, 'extendee'); + $extender = $this->getSelectorArg($extender, 'extender'); + + if (! $selectors || ! $extendee || ! $extender) { + throw $this->error('selector-extend() invalid arguments'); + } + + $extended = $this->extendOrReplaceSelectors($selectors, $extendee, $extender); + + return $this->formatOutputSelector($extended); + } + + protected static $libSelectorReplace = [ + ['selector', 'original', 'replacement'], + ['selectors', 'original', 'replacement'] + ]; + protected function libSelectorReplace($args) + { + list($selectors, $original, $replacement) = $args; + + $selectors = $this->getSelectorArg($selectors, 'selector'); + $original = $this->getSelectorArg($original, 'original'); + $replacement = $this->getSelectorArg($replacement, 'replacement'); + + if (! $selectors || ! $original || ! $replacement) { + throw $this->error('selector-replace() invalid arguments'); + } + + $replaced = $this->extendOrReplaceSelectors($selectors, $original, $replacement, true); + + return $this->formatOutputSelector($replaced); + } + + /** + * Extend/replace in selectors + * used by selector-extend and selector-replace that use the same logic + * + * @param array $selectors + * @param array $extendee + * @param array $extender + * @param bool $replace + * + * @return array + */ + protected function extendOrReplaceSelectors($selectors, $extendee, $extender, $replace = false) + { + $saveExtends = $this->extends; + $saveExtendsMap = $this->extendsMap; + + $this->extends = []; + $this->extendsMap = []; + + foreach ($extendee as $es) { + if (\count($es) !== 1) { + throw $this->error('Can\'t extend complex selector.'); + } + + // only use the first one + $this->pushExtends(reset($es), $extender, null); + } + + $extended = []; + + foreach ($selectors as $selector) { + if (! $replace) { + $extended[] = $selector; + } + + $n = \count($extended); + + $this->matchExtends($selector, $extended); + + // if didnt match, keep the original selector if we are in a replace operation + if ($replace && \count($extended) === $n) { + $extended[] = $selector; + } + } + + $this->extends = $saveExtends; + $this->extendsMap = $saveExtendsMap; + + return $extended; + } + + protected static $libSelectorNest = ['selector...']; + protected function libSelectorNest($args) + { + // get the selector... list + $args = reset($args); + $args = $args[2]; + + if (\count($args) < 1) { + throw $this->error('selector-nest() needs at least 1 argument'); + } + + $selectorsMap = []; + foreach ($args as $arg) { + $selectorsMap[] = $this->getSelectorArg($arg, 'selector', true); + } + + $envs = []; + + foreach ($selectorsMap as $selectors) { + $env = new Environment(); + $env->selectors = $selectors; + + $envs[] = $env; + } + + $envs = array_reverse($envs); + $env = $this->extractEnv($envs); + $outputSelectors = $this->multiplySelectors($env); + + return $this->formatOutputSelector($outputSelectors); + } + + protected static $libSelectorParse = [ + ['selector'], + ['selectors'] + ]; + protected function libSelectorParse($args) + { + $selectors = reset($args); + $selectors = $this->getSelectorArg($selectors, 'selector'); + + return $this->formatOutputSelector($selectors); + } + + protected static $libSelectorUnify = ['selectors1', 'selectors2']; + protected function libSelectorUnify($args) + { + list($selectors1, $selectors2) = $args; + + $selectors1 = $this->getSelectorArg($selectors1, 'selectors1'); + $selectors2 = $this->getSelectorArg($selectors2, 'selectors2'); + + if (! $selectors1 || ! $selectors2) { + throw $this->error('selector-unify() invalid arguments'); + } + + // only consider the first compound of each + $compound1 = reset($selectors1); + $compound2 = reset($selectors2); + + // unify them and that's it + $unified = $this->unifyCompoundSelectors($compound1, $compound2); + + return $this->formatOutputSelector($unified); + } + + /** + * The selector-unify magic as its best + * (at least works as expected on test cases) + * + * @param array $compound1 + * @param array $compound2 + * + * @return array + */ + protected function unifyCompoundSelectors($compound1, $compound2) + { + if (! \count($compound1)) { + return $compound2; + } + + if (! \count($compound2)) { + return $compound1; + } + + // check that last part are compatible + $lastPart1 = array_pop($compound1); + $lastPart2 = array_pop($compound2); + $last = $this->mergeParts($lastPart1, $lastPart2); + + if (! $last) { + return [[]]; + } + + $unifiedCompound = [$last]; + $unifiedSelectors = [$unifiedCompound]; + + // do the rest + while (\count($compound1) || \count($compound2)) { + $part1 = end($compound1); + $part2 = end($compound2); + + if ($part1 && ($match2 = $this->matchPartInCompound($part1, $compound2))) { + list($compound2, $part2, $after2) = $match2; + + if ($after2) { + $unifiedSelectors = $this->prependSelectors($unifiedSelectors, $after2); + } + + $c = $this->mergeParts($part1, $part2); + $unifiedSelectors = $this->prependSelectors($unifiedSelectors, [$c]); + + $part1 = $part2 = null; + + array_pop($compound1); + } + + if ($part2 && ($match1 = $this->matchPartInCompound($part2, $compound1))) { + list($compound1, $part1, $after1) = $match1; + + if ($after1) { + $unifiedSelectors = $this->prependSelectors($unifiedSelectors, $after1); + } + + $c = $this->mergeParts($part2, $part1); + $unifiedSelectors = $this->prependSelectors($unifiedSelectors, [$c]); + + $part1 = $part2 = null; + + array_pop($compound2); + } + + $new = []; + + if ($part1 && $part2) { + array_pop($compound1); + array_pop($compound2); + + $s = $this->prependSelectors($unifiedSelectors, [$part2]); + $new = array_merge($new, $this->prependSelectors($s, [$part1])); + $s = $this->prependSelectors($unifiedSelectors, [$part1]); + $new = array_merge($new, $this->prependSelectors($s, [$part2])); + } elseif ($part1) { + array_pop($compound1); + + $new = array_merge($new, $this->prependSelectors($unifiedSelectors, [$part1])); + } elseif ($part2) { + array_pop($compound2); + + $new = array_merge($new, $this->prependSelectors($unifiedSelectors, [$part2])); + } + + if ($new) { + $unifiedSelectors = $new; + } + } + + return $unifiedSelectors; + } + + /** + * Prepend each selector from $selectors with $parts + * + * @param array $selectors + * @param array $parts + * + * @return array + */ + protected function prependSelectors($selectors, $parts) + { + $new = []; + + foreach ($selectors as $compoundSelector) { + array_unshift($compoundSelector, $parts); + + $new[] = $compoundSelector; + } + + return $new; + } + + /** + * Try to find a matching part in a compound: + * - with same html tag name + * - with some class or id or something in common + * + * @param array $part + * @param array $compound + * + * @return array|false + */ + protected function matchPartInCompound($part, $compound) + { + $partTag = $this->findTagName($part); + $before = $compound; + $after = []; + + // try to find a match by tag name first + while (\count($before)) { + $p = array_pop($before); + + if ($partTag && $partTag !== '*' && $partTag == $this->findTagName($p)) { + return [$before, $p, $after]; + } + + $after[] = $p; + } + + // try again matching a non empty intersection and a compatible tagname + $before = $compound; + $after = []; + + while (\count($before)) { + $p = array_pop($before); + + if ($this->checkCompatibleTags($partTag, $this->findTagName($p))) { + if (\count(array_intersect($part, $p))) { + return [$before, $p, $after]; + } + } + + $after[] = $p; + } + + return false; + } + + /** + * Merge two part list taking care that + * - the html tag is coming first - if any + * - the :something are coming last + * + * @param array $parts1 + * @param array $parts2 + * + * @return array + */ + protected function mergeParts($parts1, $parts2) + { + $tag1 = $this->findTagName($parts1); + $tag2 = $this->findTagName($parts2); + $tag = $this->checkCompatibleTags($tag1, $tag2); + + // not compatible tags + if ($tag === false) { + return []; + } + + if ($tag) { + if ($tag1) { + $parts1 = array_diff($parts1, [$tag1]); + } + + if ($tag2) { + $parts2 = array_diff($parts2, [$tag2]); + } + } + + $mergedParts = array_merge($parts1, $parts2); + $mergedOrderedParts = []; + + foreach ($mergedParts as $part) { + if (strpos($part, ':') === 0) { + $mergedOrderedParts[] = $part; + } + } + + $mergedParts = array_diff($mergedParts, $mergedOrderedParts); + $mergedParts = array_merge($mergedParts, $mergedOrderedParts); + + if ($tag) { + array_unshift($mergedParts, $tag); + } + + return $mergedParts; + } + + /** + * Check the compatibility between two tag names: + * if both are defined they should be identical or one has to be '*' + * + * @param string $tag1 + * @param string $tag2 + * + * @return array|false + */ + protected function checkCompatibleTags($tag1, $tag2) + { + $tags = [$tag1, $tag2]; + $tags = array_unique($tags); + $tags = array_filter($tags); + + if (\count($tags) > 1) { + $tags = array_diff($tags, ['*']); + } + + // not compatible nodes + if (\count($tags) > 1) { + return false; + } + + return $tags; + } + + /** + * Find the html tag name in a selector parts list + * + * @param string[] $parts + * + * @return string + */ + protected function findTagName($parts) + { + foreach ($parts as $part) { + if (! preg_match('/^[\[.:#%_-]/', $part)) { + return $part; + } + } + + return ''; + } + + protected static $libSimpleSelectors = ['selector']; + protected function libSimpleSelectors($args) + { + $selector = reset($args); + $selector = $this->getSelectorArg($selector, 'selector'); + + // remove selectors list layer, keeping the first one + $selector = reset($selector); + + // remove parts list layer, keeping the first part + $part = reset($selector); + + $listParts = []; + + foreach ($part as $p) { + $listParts[] = [Type::T_STRING, '', [$p]]; + } + + return [Type::T_LIST, ',', $listParts]; + } + + protected static $libScssphpGlob = ['pattern']; + protected function libScssphpGlob($args) + { + @trigger_error(sprintf('The "scssphp-glob" function is deprecated an will be removed in ScssPhp 2.0. Register your own alternative through "%s::registerFunction', __CLASS__), E_USER_DEPRECATED); + + $this->logger->warn('The "scssphp-glob" function is deprecated an will be removed in ScssPhp 2.0.', true); + + $string = $this->assertString($args[0], 'pattern'); + $pattern = $this->compileStringContent($string); + $matches = glob($pattern); + $listParts = []; + + foreach ($matches as $match) { + if (! is_file($match)) { + continue; + } + + $listParts[] = [Type::T_STRING, '"', [$match]]; + } + + return [Type::T_LIST, ',', $listParts]; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler/CachedResult.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler/CachedResult.php new file mode 100644 index 00000000..a6629199 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler/CachedResult.php @@ -0,0 +1,77 @@ + + */ + private $parsedFiles; + + /** + * @var array + * @phpstan-var list + */ + private $resolvedImports; + + /** + * @param CompilationResult $result + * @param array $parsedFiles + * @param array $resolvedImports + * + * @phpstan-param list $resolvedImports + */ + public function __construct(CompilationResult $result, array $parsedFiles, array $resolvedImports) + { + $this->result = $result; + $this->parsedFiles = $parsedFiles; + $this->resolvedImports = $resolvedImports; + } + + /** + * @return CompilationResult + */ + public function getResult() + { + return $this->result; + } + + /** + * @return array + */ + public function getParsedFiles() + { + return $this->parsedFiles; + } + + /** + * @return array + * + * @phpstan-return list + */ + public function getResolvedImports() + { + return $this->resolvedImports; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler/Environment.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler/Environment.php new file mode 100644 index 00000000..b205a077 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Compiler/Environment.php @@ -0,0 +1,68 @@ + + * + * @internal + */ +class Environment +{ + /** + * @var \ScssPhp\ScssPhp\Block|null + */ + public $block; + + /** + * @var \ScssPhp\ScssPhp\Compiler\Environment|null + */ + public $parent; + + /** + * @var Environment|null + */ + public $declarationScopeParent; + + /** + * @var Environment|null + */ + public $parentStore; + + /** + * @var array|null + */ + public $selectors; + + /** + * @var string|null + */ + public $marker; + + /** + * @var array + */ + public $store; + + /** + * @var array + */ + public $storeUnreduced; + + /** + * @var int + */ + public $depth; +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/CompilerException.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/CompilerException.php new file mode 100644 index 00000000..0b00cf52 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/CompilerException.php @@ -0,0 +1,24 @@ + + * + * @internal + */ +class CompilerException extends \Exception implements SassException +{ +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/ParserException.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/ParserException.php new file mode 100644 index 00000000..00d77ec9 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/ParserException.php @@ -0,0 +1,50 @@ + + * + * @internal + */ +class ParserException extends \Exception implements SassException +{ + /** + * @var array + */ + private $sourcePosition; + + /** + * Get source position + * + * @api + */ + public function getSourcePosition() + { + return $this->sourcePosition; + } + + /** + * Set source position + * + * @api + * + * @param array $sourcePosition + */ + public function setSourcePosition($sourcePosition) + { + $this->sourcePosition = $sourcePosition; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/RangeException.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/RangeException.php new file mode 100644 index 00000000..4be4dee7 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/RangeException.php @@ -0,0 +1,24 @@ + + * + * @internal + */ +class RangeException extends \Exception implements SassException +{ +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/SassException.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/SassException.php new file mode 100644 index 00000000..9f62b3cd --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Exception/SassException.php @@ -0,0 +1,7 @@ + + * + * @deprecated The Scssphp server should define its own exception instead. + */ +class ServerException extends \Exception implements SassException +{ +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter.php new file mode 100644 index 00000000..c88ddba9 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter.php @@ -0,0 +1,364 @@ + + * + * @internal + */ +abstract class Formatter +{ + /** + * @var int + */ + public $indentLevel; + + /** + * @var string + */ + public $indentChar; + + /** + * @var string + */ + public $break; + + /** + * @var string + */ + public $open; + + /** + * @var string + */ + public $close; + + /** + * @var string + */ + public $tagSeparator; + + /** + * @var string + */ + public $assignSeparator; + + /** + * @var bool + */ + public $keepSemicolons; + + /** + * @var \ScssPhp\ScssPhp\Formatter\OutputBlock + */ + protected $currentBlock; + + /** + * @var int + */ + protected $currentLine; + + /** + * @var int + */ + protected $currentColumn; + + /** + * @var \ScssPhp\ScssPhp\SourceMap\SourceMapGenerator|null + */ + protected $sourceMapGenerator; + + /** + * @var string + */ + protected $strippedSemicolon; + + /** + * Initialize formatter + * + * @api + */ + abstract public function __construct(); + + /** + * Return indentation (whitespace) + * + * @return string + */ + protected function indentStr() + { + return ''; + } + + /** + * Return property assignment + * + * @api + * + * @param string $name + * @param mixed $value + * + * @return string + */ + public function property($name, $value) + { + return rtrim($name) . $this->assignSeparator . $value . ';'; + } + + /** + * Return custom property assignment + * differs in that you have to keep spaces in the value as is + * + * @api + * + * @param string $name + * @param mixed $value + * + * @return string + */ + public function customProperty($name, $value) + { + return rtrim($name) . trim($this->assignSeparator) . $value . ';'; + } + + /** + * Output lines inside a block + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * + * @return void + */ + protected function blockLines(OutputBlock $block) + { + $inner = $this->indentStr(); + $glue = $this->break . $inner; + + $this->write($inner . implode($glue, $block->lines)); + + if (! empty($block->children)) { + $this->write($this->break); + } + } + + /** + * Output block selectors + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * + * @return void + */ + protected function blockSelectors(OutputBlock $block) + { + assert(! empty($block->selectors)); + + $inner = $this->indentStr(); + + $this->write($inner + . implode($this->tagSeparator, $block->selectors) + . $this->open . $this->break); + } + + /** + * Output block children + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * + * @return void + */ + protected function blockChildren(OutputBlock $block) + { + foreach ($block->children as $child) { + $this->block($child); + } + } + + /** + * Output non-empty block + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * + * @return void + */ + protected function block(OutputBlock $block) + { + if (empty($block->lines) && empty($block->children)) { + return; + } + + $this->currentBlock = $block; + + $pre = $this->indentStr(); + + if (! empty($block->selectors)) { + $this->blockSelectors($block); + + $this->indentLevel++; + } + + if (! empty($block->lines)) { + $this->blockLines($block); + } + + if (! empty($block->children)) { + $this->blockChildren($block); + } + + if (! empty($block->selectors)) { + $this->indentLevel--; + + if (! $this->keepSemicolons) { + $this->strippedSemicolon = ''; + } + + if (empty($block->children)) { + $this->write($this->break); + } + + $this->write($pre . $this->close . $this->break); + } + } + + /** + * Test and clean safely empty children + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * + * @return bool + */ + protected function testEmptyChildren($block) + { + $isEmpty = empty($block->lines); + + if ($block->children) { + foreach ($block->children as $k => &$child) { + if (! $this->testEmptyChildren($child)) { + $isEmpty = false; + continue; + } + + if ($child->type === Type::T_MEDIA || $child->type === Type::T_DIRECTIVE) { + $child->children = []; + $child->selectors = null; + } + } + } + + return $isEmpty; + } + + /** + * Entry point to formatting a block + * + * @api + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block An abstract syntax tree + * @param \ScssPhp\ScssPhp\SourceMap\SourceMapGenerator|null $sourceMapGenerator Optional source map generator + * + * @return string + */ + public function format(OutputBlock $block, SourceMapGenerator $sourceMapGenerator = null) + { + $this->sourceMapGenerator = null; + + if ($sourceMapGenerator) { + $this->currentLine = 1; + $this->currentColumn = 0; + $this->sourceMapGenerator = $sourceMapGenerator; + } + + $this->testEmptyChildren($block); + + ob_start(); + + $this->block($block); + + $out = ob_get_clean(); + + return $out; + } + + /** + * Output content + * + * @param string $str + * + * @return void + */ + protected function write($str) + { + if (! empty($this->strippedSemicolon)) { + echo $this->strippedSemicolon; + + $this->strippedSemicolon = ''; + } + + /* + * Maybe Strip semi-colon appended by property(); it's a separator, not a terminator + * will be striped for real before a closing, otherwise displayed unchanged starting the next write + */ + if ( + ! $this->keepSemicolons && + $str && + (strpos($str, ';') !== false) && + (substr($str, -1) === ';') + ) { + $str = substr($str, 0, -1); + + $this->strippedSemicolon = ';'; + } + + if ($this->sourceMapGenerator) { + $lines = explode("\n", $str); + $lastLine = array_pop($lines); + + foreach ($lines as $line) { + // If the written line starts is empty, adding a mapping would add it for + // a non-existent column as we are at the end of the line + if ($line !== '') { + $this->sourceMapGenerator->addMapping( + $this->currentLine, + $this->currentColumn, + $this->currentBlock->sourceLine, + //columns from parser are off by one + $this->currentBlock->sourceColumn > 0 ? $this->currentBlock->sourceColumn - 1 : 0, + $this->currentBlock->sourceName + ); + } + + $this->currentLine++; + $this->currentColumn = 0; + } + + if ($lastLine !== '') { + $this->sourceMapGenerator->addMapping( + $this->currentLine, + $this->currentColumn, + $this->currentBlock->sourceLine, + //columns from parser are off by one + $this->currentBlock->sourceColumn > 0 ? $this->currentBlock->sourceColumn - 1 : 0, + $this->currentBlock->sourceName + ); + } + + $this->currentColumn += \strlen($lastLine); + } + + echo $str; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Compact.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Compact.php new file mode 100644 index 00000000..22f22688 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Compact.php @@ -0,0 +1,52 @@ + + * + * @deprecated since 1.4.0. Use the Compressed formatter instead. + * + * @internal + */ +class Compact extends Formatter +{ + /** + * {@inheritdoc} + */ + public function __construct() + { + @trigger_error('The Compact formatter is deprecated since 1.4.0. Use the Compressed formatter instead.', E_USER_DEPRECATED); + + $this->indentLevel = 0; + $this->indentChar = ''; + $this->break = ''; + $this->open = ' {'; + $this->close = "}\n\n"; + $this->tagSeparator = ','; + $this->assignSeparator = ':'; + $this->keepSemicolons = true; + } + + /** + * {@inheritdoc} + */ + public function indentStr() + { + return ' '; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Compressed.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Compressed.php new file mode 100644 index 00000000..58ebe3f1 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Compressed.php @@ -0,0 +1,83 @@ + + * + * @internal + */ +class Compressed extends Formatter +{ + /** + * {@inheritdoc} + */ + public function __construct() + { + $this->indentLevel = 0; + $this->indentChar = ' '; + $this->break = ''; + $this->open = '{'; + $this->close = '}'; + $this->tagSeparator = ','; + $this->assignSeparator = ':'; + $this->keepSemicolons = false; + } + + /** + * {@inheritdoc} + */ + public function blockLines(OutputBlock $block) + { + $inner = $this->indentStr(); + + $glue = $this->break . $inner; + + foreach ($block->lines as $index => $line) { + if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') { + unset($block->lines[$index]); + } + } + + $this->write($inner . implode($glue, $block->lines)); + + if (! empty($block->children)) { + $this->write($this->break); + } + } + + /** + * Output block selectors + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + */ + protected function blockSelectors(OutputBlock $block) + { + assert(! empty($block->selectors)); + + $inner = $this->indentStr(); + + $this->write( + $inner + . implode( + $this->tagSeparator, + str_replace([' > ', ' + ', ' ~ '], ['>', '+', '~'], $block->selectors) + ) + . $this->open . $this->break + ); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Crunched.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Crunched.php new file mode 100644 index 00000000..2bc1e929 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Crunched.php @@ -0,0 +1,87 @@ + + * + * @deprecated since 1.4.0. Use the Compressed formatter instead. + * + * @internal + */ +class Crunched extends Formatter +{ + /** + * {@inheritdoc} + */ + public function __construct() + { + @trigger_error('The Crunched formatter is deprecated since 1.4.0. Use the Compressed formatter instead.', E_USER_DEPRECATED); + + $this->indentLevel = 0; + $this->indentChar = ' '; + $this->break = ''; + $this->open = '{'; + $this->close = '}'; + $this->tagSeparator = ','; + $this->assignSeparator = ':'; + $this->keepSemicolons = false; + } + + /** + * {@inheritdoc} + */ + public function blockLines(OutputBlock $block) + { + $inner = $this->indentStr(); + + $glue = $this->break . $inner; + + foreach ($block->lines as $index => $line) { + if (substr($line, 0, 2) === '/*') { + unset($block->lines[$index]); + } + } + + $this->write($inner . implode($glue, $block->lines)); + + if (! empty($block->children)) { + $this->write($this->break); + } + } + + /** + * Output block selectors + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + */ + protected function blockSelectors(OutputBlock $block) + { + assert(! empty($block->selectors)); + + $inner = $this->indentStr(); + + $this->write( + $inner + . implode( + $this->tagSeparator, + str_replace([' > ', ' + ', ' ~ '], ['>', '+', '~'], $block->selectors) + ) + . $this->open . $this->break + ); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Debug.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Debug.php new file mode 100644 index 00000000..b3f44225 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Debug.php @@ -0,0 +1,127 @@ + + * + * @deprecated since 1.4.0. + * + * @internal + */ +class Debug extends Formatter +{ + /** + * {@inheritdoc} + */ + public function __construct() + { + @trigger_error('The Debug formatter is deprecated since 1.4.0.', E_USER_DEPRECATED); + + $this->indentLevel = 0; + $this->indentChar = ''; + $this->break = "\n"; + $this->open = ' {'; + $this->close = ' }'; + $this->tagSeparator = ', '; + $this->assignSeparator = ': '; + $this->keepSemicolons = true; + } + + /** + * {@inheritdoc} + */ + protected function indentStr() + { + return str_repeat(' ', $this->indentLevel); + } + + /** + * {@inheritdoc} + */ + protected function blockLines(OutputBlock $block) + { + $indent = $this->indentStr(); + + if (empty($block->lines)) { + $this->write("{$indent}block->lines: []\n"); + + return; + } + + foreach ($block->lines as $index => $line) { + $this->write("{$indent}block->lines[{$index}]: $line\n"); + } + } + + /** + * {@inheritdoc} + */ + protected function blockSelectors(OutputBlock $block) + { + $indent = $this->indentStr(); + + if (empty($block->selectors)) { + $this->write("{$indent}block->selectors: []\n"); + + return; + } + + foreach ($block->selectors as $index => $selector) { + $this->write("{$indent}block->selectors[{$index}]: $selector\n"); + } + } + + /** + * {@inheritdoc} + */ + protected function blockChildren(OutputBlock $block) + { + $indent = $this->indentStr(); + + if (empty($block->children)) { + $this->write("{$indent}block->children: []\n"); + + return; + } + + $this->indentLevel++; + + foreach ($block->children as $i => $child) { + $this->block($child); + } + + $this->indentLevel--; + } + + /** + * {@inheritdoc} + */ + protected function block(OutputBlock $block) + { + $indent = $this->indentStr(); + + $this->write("{$indent}block->type: {$block->type}\n" . + "{$indent}block->depth: {$block->depth}\n"); + + $this->currentBlock = $block; + + $this->blockSelectors($block); + $this->blockLines($block); + $this->blockChildren($block); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Expanded.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Expanded.php new file mode 100644 index 00000000..a280416d --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Expanded.php @@ -0,0 +1,70 @@ + + * + * @internal + */ +class Expanded extends Formatter +{ + /** + * {@inheritdoc} + */ + public function __construct() + { + $this->indentLevel = 0; + $this->indentChar = ' '; + $this->break = "\n"; + $this->open = ' {'; + $this->close = '}'; + $this->tagSeparator = ', '; + $this->assignSeparator = ': '; + $this->keepSemicolons = true; + } + + /** + * {@inheritdoc} + */ + protected function indentStr() + { + return str_repeat($this->indentChar, $this->indentLevel); + } + + /** + * {@inheritdoc} + */ + protected function blockLines(OutputBlock $block) + { + $inner = $this->indentStr(); + + $glue = $this->break . $inner; + + foreach ($block->lines as $index => $line) { + if (substr($line, 0, 2) === '/*') { + $block->lines[$index] = preg_replace('/\r\n?|\n|\f/', $this->break, $line); + } + } + + $this->write($inner . implode($glue, $block->lines)); + + if (empty($block->selectors) || ! empty($block->children)) { + $this->write($this->break); + } + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Nested.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Nested.php new file mode 100644 index 00000000..c11ea8ad --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/Nested.php @@ -0,0 +1,236 @@ + + * + * @deprecated since 1.4.0. Use the Expanded formatter instead. + * + * @internal + */ +class Nested extends Formatter +{ + /** + * @var int + */ + private $depth; + + /** + * {@inheritdoc} + */ + public function __construct() + { + @trigger_error('The Nested formatter is deprecated since 1.4.0. Use the Expanded formatter instead.', E_USER_DEPRECATED); + + $this->indentLevel = 0; + $this->indentChar = ' '; + $this->break = "\n"; + $this->open = ' {'; + $this->close = ' }'; + $this->tagSeparator = ', '; + $this->assignSeparator = ': '; + $this->keepSemicolons = true; + } + + /** + * {@inheritdoc} + */ + protected function indentStr() + { + $n = $this->depth - 1; + + return str_repeat($this->indentChar, max($this->indentLevel + $n, 0)); + } + + /** + * {@inheritdoc} + */ + protected function blockLines(OutputBlock $block) + { + $inner = $this->indentStr(); + $glue = $this->break . $inner; + + foreach ($block->lines as $index => $line) { + if (substr($line, 0, 2) === '/*') { + $block->lines[$index] = preg_replace('/\r\n?|\n|\f/', $this->break, $line); + } + } + + $this->write($inner . implode($glue, $block->lines)); + } + + /** + * {@inheritdoc} + */ + protected function block(OutputBlock $block) + { + static $depths; + static $downLevel; + static $closeBlock; + static $previousEmpty; + static $previousHasSelector; + + if ($block->type === 'root') { + $depths = [ 0 ]; + $downLevel = ''; + $closeBlock = ''; + $this->depth = 0; + $previousEmpty = false; + $previousHasSelector = false; + } + + $isMediaOrDirective = \in_array($block->type, [Type::T_DIRECTIVE, Type::T_MEDIA]); + $isSupport = ($block->type === Type::T_DIRECTIVE + && $block->selectors && strpos(implode('', $block->selectors), '@supports') !== false); + + while ($block->depth < end($depths) || ($block->depth == 1 && end($depths) == 1)) { + array_pop($depths); + $this->depth--; + + if ( + ! $this->depth && ($block->depth <= 1 || (! $this->indentLevel && $block->type === Type::T_COMMENT)) && + (($block->selectors && ! $isMediaOrDirective) || $previousHasSelector) + ) { + $downLevel = $this->break; + } + + if (empty($block->lines) && empty($block->children)) { + $previousEmpty = true; + } + } + + if (empty($block->lines) && empty($block->children)) { + return; + } + + $this->currentBlock = $block; + + if (! empty($block->lines) || (! empty($block->children) && ($this->depth < 1 || $isSupport))) { + if ($block->depth > end($depths)) { + if (! $previousEmpty || $this->depth < 1) { + $this->depth++; + + $depths[] = $block->depth; + } else { + // keep the current depth unchanged but take the block depth as a new reference for following blocks + array_pop($depths); + + $depths[] = $block->depth; + } + } + } + + $previousEmpty = ($block->type === Type::T_COMMENT); + $previousHasSelector = false; + + if (! empty($block->selectors)) { + if ($closeBlock) { + $this->write($closeBlock); + $closeBlock = ''; + } + + if ($downLevel) { + $this->write($downLevel); + $downLevel = ''; + } + + $this->blockSelectors($block); + + $this->indentLevel++; + } + + if (! empty($block->lines)) { + if ($closeBlock) { + $this->write($closeBlock); + $closeBlock = ''; + } + + if ($downLevel) { + $this->write($downLevel); + $downLevel = ''; + } + + $this->blockLines($block); + + $closeBlock = $this->break; + } + + if (! empty($block->children)) { + if ($this->depth > 0 && ($isMediaOrDirective || ! $this->hasFlatChild($block))) { + array_pop($depths); + + $this->depth--; + $this->blockChildren($block); + $this->depth++; + + $depths[] = $block->depth; + } else { + $this->blockChildren($block); + } + } + + // reclear to not be spoiled by children if T_DIRECTIVE + if ($block->type === Type::T_DIRECTIVE) { + $previousHasSelector = false; + } + + if (! empty($block->selectors)) { + $this->indentLevel--; + + if (! $this->keepSemicolons) { + $this->strippedSemicolon = ''; + } + + $this->write($this->close); + + $closeBlock = $this->break; + + if ($this->depth > 1 && ! empty($block->children)) { + array_pop($depths); + $this->depth--; + } + + if (! $isMediaOrDirective) { + $previousHasSelector = true; + } + } + + if ($block->type === 'root') { + $this->write($this->break); + } + } + + /** + * Block has flat child + * + * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block + * + * @return bool + */ + private function hasFlatChild($block) + { + foreach ($block->children as $child) { + if (empty($child->selectors)) { + return true; + } + } + + return false; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/OutputBlock.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/OutputBlock.php new file mode 100644 index 00000000..5cc91a08 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Formatter/OutputBlock.php @@ -0,0 +1,68 @@ + + * + * @internal + */ +class OutputBlock +{ + /** + * @var string + */ + public $type; + + /** + * @var int + */ + public $depth; + + /** + * @var array|null + */ + public $selectors; + + /** + * @var string[] + */ + public $lines; + + /** + * @var OutputBlock[] + */ + public $children; + + /** + * @var OutputBlock|null + */ + public $parent; + + /** + * @var string|null + */ + public $sourceName; + + /** + * @var int|null + */ + public $sourceLine; + + /** + * @var int|null + */ + public $sourceColumn; +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Logger/LoggerInterface.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Logger/LoggerInterface.php new file mode 100644 index 00000000..7c0a2f76 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Logger/LoggerInterface.php @@ -0,0 +1,48 @@ +stream = $stream; + $this->closeOnDestruct = $closeOnDestruct; + } + + /** + * @internal + */ + public function __destruct() + { + if ($this->closeOnDestruct) { + fclose($this->stream); + } + } + + /** + * @inheritDoc + */ + public function warn($message, $deprecation = false) + { + $prefix = ($deprecation ? 'DEPRECATION ' : '') . 'WARNING: '; + + fwrite($this->stream, $prefix . $message . "\n\n"); + } + + /** + * @inheritDoc + */ + public function debug($message) + { + fwrite($this->stream, $message . "\n"); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Node.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Node.php new file mode 100644 index 00000000..fcaf8a95 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Node.php @@ -0,0 +1,43 @@ + + * + * @internal + */ +abstract class Node +{ + /** + * @var string + */ + public $type; + + /** + * @var int + */ + public $sourceIndex; + + /** + * @var int|null + */ + public $sourceLine; + + /** + * @var int|null + */ + public $sourceColumn; +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Node/Number.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Node/Number.php new file mode 100644 index 00000000..ca9b5b65 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Node/Number.php @@ -0,0 +1,804 @@ + + * + * @template-implements \ArrayAccess + */ +class Number extends Node implements \ArrayAccess +{ + const PRECISION = 10; + + /** + * @var int + * @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore. + */ + public static $precision = self::PRECISION; + + /** + * @see http://www.w3.org/TR/2012/WD-css3-values-20120308/ + * + * @var array + * @phpstan-var array> + */ + protected static $unitTable = [ + 'in' => [ + 'in' => 1, + 'pc' => 6, + 'pt' => 72, + 'px' => 96, + 'cm' => 2.54, + 'mm' => 25.4, + 'q' => 101.6, + ], + 'turn' => [ + 'deg' => 360, + 'grad' => 400, + 'rad' => 6.28318530717958647692528676, // 2 * M_PI + 'turn' => 1, + ], + 's' => [ + 's' => 1, + 'ms' => 1000, + ], + 'Hz' => [ + 'Hz' => 1, + 'kHz' => 0.001, + ], + 'dpi' => [ + 'dpi' => 1, + 'dpcm' => 1 / 2.54, + 'dppx' => 1 / 96, + ], + ]; + + /** + * @var int|float + */ + private $dimension; + + /** + * @var string[] + * @phpstan-var list + */ + private $numeratorUnits; + + /** + * @var string[] + * @phpstan-var list + */ + private $denominatorUnits; + + /** + * Initialize number + * + * @param int|float $dimension + * @param string[]|string $numeratorUnits + * @param string[] $denominatorUnits + * + * @phpstan-param list|string $numeratorUnits + * @phpstan-param list $denominatorUnits + */ + public function __construct($dimension, $numeratorUnits, array $denominatorUnits = []) + { + if (is_string($numeratorUnits)) { + $numeratorUnits = $numeratorUnits ? [$numeratorUnits] : []; + } elseif (isset($numeratorUnits['numerator_units'], $numeratorUnits['denominator_units'])) { + // TODO get rid of this once `$number[2]` is not used anymore + $denominatorUnits = $numeratorUnits['denominator_units']; + $numeratorUnits = $numeratorUnits['numerator_units']; + } + + $this->dimension = $dimension; + $this->numeratorUnits = $numeratorUnits; + $this->denominatorUnits = $denominatorUnits; + } + + /** + * @return float|int + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * @return string[] + */ + public function getNumeratorUnits() + { + return $this->numeratorUnits; + } + + /** + * @return string[] + */ + public function getDenominatorUnits() + { + return $this->denominatorUnits; + } + + /** + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + if ($offset === -3) { + return ! \is_null($this->sourceColumn); + } + + if ($offset === -2) { + return ! \is_null($this->sourceLine); + } + + if ( + $offset === -1 || + $offset === 0 || + $offset === 1 || + $offset === 2 + ) { + return true; + } + + return false; + } + + /** + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + switch ($offset) { + case -3: + return $this->sourceColumn; + + case -2: + return $this->sourceLine; + + case -1: + return $this->sourceIndex; + + case 0: + return Type::T_NUMBER; + + case 1: + return $this->dimension; + + case 2: + return array('numerator_units' => $this->numeratorUnits, 'denominator_units' => $this->denominatorUnits); + } + } + + /** + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + throw new \BadMethodCallException('Number is immutable'); + } + + /** + * @return void + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + throw new \BadMethodCallException('Number is immutable'); + } + + /** + * Returns true if the number is unitless + * + * @return bool + */ + public function unitless() + { + return \count($this->numeratorUnits) === 0 && \count($this->denominatorUnits) === 0; + } + + /** + * Checks whether the number has exactly this unit + * + * @param string $unit + * + * @return bool + */ + public function hasUnit($unit) + { + return \count($this->numeratorUnits) === 1 && \count($this->denominatorUnits) === 0 && $this->numeratorUnits[0] === $unit; + } + + /** + * Returns unit(s) as the product of numerator units divided by the product of denominator units + * + * @return string + */ + public function unitStr() + { + if ($this->unitless()) { + return ''; + } + + return self::getUnitString($this->numeratorUnits, $this->denominatorUnits); + } + + /** + * @param float|int $min + * @param float|int $max + * @param string|null $name + * + * @return float|int + * @throws SassScriptException + */ + public function valueInRange($min, $max, $name = null) + { + try { + return Util::checkRange('', new Range($min, $max), $this); + } catch (RangeException $e) { + throw SassScriptException::forArgument(sprintf('Expected %s to be within %s%s and %s%3$s', $this, $min, $this->unitStr(), $max), $name); + } + } + + /** + * @param string|null $varName + * + * @return void + */ + public function assertNoUnits($varName = null) + { + if ($this->unitless()) { + return; + } + + throw SassScriptException::forArgument(sprintf('Expected %s to have no units.', $this), $varName); + } + + /** + * @param string $unit + * @param string|null $varName + * + * @return void + */ + public function assertUnit($unit, $varName = null) + { + if ($this->hasUnit($unit)) { + return; + } + + throw SassScriptException::forArgument(sprintf('Expected %s to have unit "%s".', $this, $unit), $varName); + } + + /** + * @param Number $other + * + * @return void + */ + public function assertSameUnitOrUnitless(Number $other) + { + if ($other->unitless()) { + return; + } + + if ($this->numeratorUnits === $other->numeratorUnits && $this->denominatorUnits === $other->denominatorUnits) { + return; + } + + throw new SassScriptException(sprintf( + 'Incompatible units %s and %s.', + self::getUnitString($this->numeratorUnits, $this->denominatorUnits), + self::getUnitString($other->numeratorUnits, $other->denominatorUnits) + )); + } + + /** + * Returns a copy of this number, converted to the units represented by $newNumeratorUnits and $newDenominatorUnits. + * + * This does not throw an error if this number is unitless and + * $newNumeratorUnits/$newDenominatorUnits are not empty, or vice versa. Instead, + * it treats all unitless numbers as convertible to and from all units without + * changing the value. + * + * @param string[] $newNumeratorUnits + * @param string[] $newDenominatorUnits + * + * @return Number + * + * @phpstan-param list $newNumeratorUnits + * @phpstan-param list $newDenominatorUnits + * + * @throws SassScriptException if this number's units are not compatible with $newNumeratorUnits and $newDenominatorUnits + */ + public function coerce(array $newNumeratorUnits, array $newDenominatorUnits) + { + return new Number($this->valueInUnits($newNumeratorUnits, $newDenominatorUnits), $newNumeratorUnits, $newDenominatorUnits); + } + + /** + * @param Number $other + * + * @return bool + */ + public function isComparableTo(Number $other) + { + if ($this->unitless() || $other->unitless()) { + return true; + } + + try { + $this->greaterThan($other); + return true; + } catch (SassScriptException $e) { + return false; + } + } + + /** + * @param Number $other + * + * @return bool + */ + public function lessThan(Number $other) + { + return $this->coerceUnits($other, function ($num1, $num2) { + return $num1 < $num2; + }); + } + + /** + * @param Number $other + * + * @return bool + */ + public function lessThanOrEqual(Number $other) + { + return $this->coerceUnits($other, function ($num1, $num2) { + return $num1 <= $num2; + }); + } + + /** + * @param Number $other + * + * @return bool + */ + public function greaterThan(Number $other) + { + return $this->coerceUnits($other, function ($num1, $num2) { + return $num1 > $num2; + }); + } + + /** + * @param Number $other + * + * @return bool + */ + public function greaterThanOrEqual(Number $other) + { + return $this->coerceUnits($other, function ($num1, $num2) { + return $num1 >= $num2; + }); + } + + /** + * @param Number $other + * + * @return Number + */ + public function plus(Number $other) + { + return $this->coerceNumber($other, function ($num1, $num2) { + return $num1 + $num2; + }); + } + + /** + * @param Number $other + * + * @return Number + */ + public function minus(Number $other) + { + return $this->coerceNumber($other, function ($num1, $num2) { + return $num1 - $num2; + }); + } + + /** + * @return Number + */ + public function unaryMinus() + { + return new Number(-$this->dimension, $this->numeratorUnits, $this->denominatorUnits); + } + + /** + * @param Number $other + * + * @return Number + */ + public function modulo(Number $other) + { + return $this->coerceNumber($other, function ($num1, $num2) { + if ($num2 == 0) { + return NAN; + } + + $result = fmod($num1, $num2); + + if ($result == 0) { + return 0; + } + + if ($num2 < 0 xor $num1 < 0) { + $result += $num2; + } + + return $result; + }); + } + + /** + * @param Number $other + * + * @return Number + */ + public function times(Number $other) + { + return $this->multiplyUnits($this->dimension * $other->dimension, $this->numeratorUnits, $this->denominatorUnits, $other->numeratorUnits, $other->denominatorUnits); + } + + /** + * @param Number $other + * + * @return Number + */ + public function dividedBy(Number $other) + { + if ($other->dimension == 0) { + if ($this->dimension == 0) { + $value = NAN; + } elseif ($this->dimension > 0) { + $value = INF; + } else { + $value = -INF; + } + } else { + $value = $this->dimension / $other->dimension; + } + + return $this->multiplyUnits($value, $this->numeratorUnits, $this->denominatorUnits, $other->denominatorUnits, $other->numeratorUnits); + } + + /** + * @param Number $other + * + * @return bool + */ + public function equals(Number $other) + { + // Unitless numbers are convertable to unit numbers, but not equal, so we special-case unitless here. + if ($this->unitless() !== $other->unitless()) { + return false; + } + + // In Sass, neither NaN nor Infinity are equal to themselves, while PHP defines INF==INF + if (is_nan($this->dimension) || is_nan($other->dimension) || !is_finite($this->dimension) || !is_finite($other->dimension)) { + return false; + } + + if ($this->unitless()) { + return round($this->dimension, self::PRECISION) == round($other->dimension, self::PRECISION); + } + + try { + return $this->coerceUnits($other, function ($num1, $num2) { + return round($num1,self::PRECISION) == round($num2, self::PRECISION); + }); + } catch (SassScriptException $e) { + return false; + } + } + + /** + * Output number + * + * @param \ScssPhp\ScssPhp\Compiler $compiler + * + * @return string + */ + public function output(Compiler $compiler = null) + { + $dimension = round($this->dimension, self::PRECISION); + + if (is_nan($dimension)) { + return 'NaN'; + } + + if ($dimension === INF) { + return 'Infinity'; + } + + if ($dimension === -INF) { + return '-Infinity'; + } + + if ($compiler) { + $unit = $this->unitStr(); + } elseif (isset($this->numeratorUnits[0])) { + $unit = $this->numeratorUnits[0]; + } else { + $unit = ''; + } + + $dimension = number_format($dimension, self::PRECISION, '.', ''); + + return rtrim(rtrim($dimension, '0'), '.') . $unit; + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->output(); + } + + /** + * @param Number $other + * @param callable $operation + * + * @return Number + * + * @phpstan-param callable(int|float, int|float): (int|float) $operation + */ + private function coerceNumber(Number $other, $operation) + { + $result = $this->coerceUnits($other, $operation); + + if (!$this->unitless()) { + return new Number($result, $this->numeratorUnits, $this->denominatorUnits); + } + + return new Number($result, $other->numeratorUnits, $other->denominatorUnits); + } + + /** + * @param Number $other + * @param callable $operation + * + * @return mixed + * + * @phpstan-template T + * @phpstan-param callable(int|float, int|float): T $operation + * @phpstan-return T + */ + private function coerceUnits(Number $other, $operation) + { + if (!$this->unitless()) { + $num1 = $this->dimension; + $num2 = $other->valueInUnits($this->numeratorUnits, $this->denominatorUnits); + } else { + $num1 = $this->valueInUnits($other->numeratorUnits, $other->denominatorUnits); + $num2 = $other->dimension; + } + + return \call_user_func($operation, $num1, $num2); + } + + /** + * @param string[] $numeratorUnits + * @param string[] $denominatorUnits + * + * @return int|float + * + * @phpstan-param list $numeratorUnits + * @phpstan-param list $denominatorUnits + * + * @throws SassScriptException if this number's units are not compatible with $numeratorUnits and $denominatorUnits + */ + private function valueInUnits(array $numeratorUnits, array $denominatorUnits) + { + if ( + $this->unitless() + || (\count($numeratorUnits) === 0 && \count($denominatorUnits) === 0) + || ($this->numeratorUnits === $numeratorUnits && $this->denominatorUnits === $denominatorUnits) + ) { + return $this->dimension; + } + + $value = $this->dimension; + $oldNumerators = $this->numeratorUnits; + + foreach ($numeratorUnits as $newNumerator) { + foreach ($oldNumerators as $key => $oldNumerator) { + $conversionFactor = self::getConversionFactor($newNumerator, $oldNumerator); + + if (\is_null($conversionFactor)) { + continue; + } + + $value *= $conversionFactor; + unset($oldNumerators[$key]); + continue 2; + } + + throw new SassScriptException(sprintf( + 'Incompatible units %s and %s.', + self::getUnitString($this->numeratorUnits, $this->denominatorUnits), + self::getUnitString($numeratorUnits, $denominatorUnits) + )); + } + + $oldDenominators = $this->denominatorUnits; + + foreach ($denominatorUnits as $newDenominator) { + foreach ($oldDenominators as $key => $oldDenominator) { + $conversionFactor = self::getConversionFactor($newDenominator, $oldDenominator); + + if (\is_null($conversionFactor)) { + continue; + } + + $value /= $conversionFactor; + unset($oldDenominators[$key]); + continue 2; + } + + throw new SassScriptException(sprintf( + 'Incompatible units %s and %s.', + self::getUnitString($this->numeratorUnits, $this->denominatorUnits), + self::getUnitString($numeratorUnits, $denominatorUnits) + )); + } + + if (\count($oldNumerators) || \count($oldDenominators)) { + throw new SassScriptException(sprintf( + 'Incompatible units %s and %s.', + self::getUnitString($this->numeratorUnits, $this->denominatorUnits), + self::getUnitString($numeratorUnits, $denominatorUnits) + )); + } + + return $value; + } + + /** + * @param int|float $value + * @param string[] $numerators1 + * @param string[] $denominators1 + * @param string[] $numerators2 + * @param string[] $denominators2 + * + * @return Number + * + * @phpstan-param list $numerators1 + * @phpstan-param list $denominators1 + * @phpstan-param list $numerators2 + * @phpstan-param list $denominators2 + */ + private function multiplyUnits($value, array $numerators1, array $denominators1, array $numerators2, array $denominators2) + { + $newNumerators = array(); + + foreach ($numerators1 as $numerator) { + foreach ($denominators2 as $key => $denominator) { + $conversionFactor = self::getConversionFactor($numerator, $denominator); + + if (\is_null($conversionFactor)) { + continue; + } + + $value /= $conversionFactor; + unset($denominators2[$key]); + continue 2; + } + + $newNumerators[] = $numerator; + } + + foreach ($numerators2 as $numerator) { + foreach ($denominators1 as $key => $denominator) { + $conversionFactor = self::getConversionFactor($numerator, $denominator); + + if (\is_null($conversionFactor)) { + continue; + } + + $value /= $conversionFactor; + unset($denominators1[$key]); + continue 2; + } + + $newNumerators[] = $numerator; + } + + $newDenominators = array_values(array_merge($denominators1, $denominators2)); + + return new Number($value, $newNumerators, $newDenominators); + } + + /** + * Returns the number of [unit1]s per [unit2]. + * + * Equivalently, `1unit1 * conversionFactor(unit1, unit2) = 1unit2`. + * + * @param string $unit1 + * @param string $unit2 + * + * @return float|int|null + */ + private static function getConversionFactor($unit1, $unit2) + { + if ($unit1 === $unit2) { + return 1; + } + + foreach (static::$unitTable as $unitVariants) { + if (isset($unitVariants[$unit1]) && isset($unitVariants[$unit2])) { + return $unitVariants[$unit1] / $unitVariants[$unit2]; + } + } + + return null; + } + + /** + * Returns unit(s) as the product of numerator units divided by the product of denominator units + * + * @param string[] $numerators + * @param string[] $denominators + * + * @phpstan-param list $numerators + * @phpstan-param list $denominators + * + * @return string + */ + private static function getUnitString(array $numerators, array $denominators) + { + if (!\count($numerators)) { + if (\count($denominators) === 0) { + return 'no units'; + } + + if (\count($denominators) === 1) { + return $denominators[0] . '^-1'; + } + + return '(' . implode('*', $denominators) . ')^-1'; + } + + return implode('*', $numerators) . (\count($denominators) ? '/' . implode('*', $denominators) : ''); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/OutputStyle.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/OutputStyle.php new file mode 100644 index 00000000..c284639c --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/OutputStyle.php @@ -0,0 +1,9 @@ + + * + * @internal + */ +class Parser +{ + const SOURCE_INDEX = -1; + const SOURCE_LINE = -2; + const SOURCE_COLUMN = -3; + + /** + * @var array + */ + protected static $precedence = [ + '=' => 0, + 'or' => 1, + 'and' => 2, + '==' => 3, + '!=' => 3, + '<=' => 4, + '>=' => 4, + '<' => 4, + '>' => 4, + '+' => 5, + '-' => 5, + '*' => 6, + '/' => 6, + '%' => 6, + ]; + + /** + * @var string + */ + protected static $commentPattern; + /** + * @var string + */ + protected static $operatorPattern; + /** + * @var string + */ + protected static $whitePattern; + + /** + * @var Cache|null + */ + protected $cache; + + private $sourceName; + private $sourceIndex; + /** + * @var array + */ + private $sourcePositions; + /** + * @var array|null + */ + private $charset; + /** + * The current offset in the buffer + * + * @var int + */ + private $count; + /** + * @var Block|null + */ + private $env; + /** + * @var bool + */ + private $inParens; + /** + * @var bool + */ + private $eatWhiteDefault; + /** + * @var bool + */ + private $discardComments; + private $allowVars; + /** + * @var string + */ + private $buffer; + private $utf8; + /** + * @var string|null + */ + private $encoding; + private $patternModifiers; + private $commentsSeen; + + private $cssOnly; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * Constructor + * + * @api + * + * @param string|null $sourceName + * @param int $sourceIndex + * @param string|null $encoding + * @param Cache|null $cache + * @param bool $cssOnly + * @param LoggerInterface|null $logger + */ + public function __construct($sourceName, $sourceIndex = 0, $encoding = 'utf-8', Cache $cache = null, $cssOnly = false, LoggerInterface $logger = null) + { + $this->sourceName = $sourceName ?: '(stdin)'; + $this->sourceIndex = $sourceIndex; + $this->charset = null; + $this->utf8 = ! $encoding || strtolower($encoding) === 'utf-8'; + $this->patternModifiers = $this->utf8 ? 'Aisu' : 'Ais'; + $this->commentsSeen = []; + $this->commentsSeen = []; + $this->allowVars = true; + $this->cssOnly = $cssOnly; + $this->logger = $logger ?: new QuietLogger(); + + if (empty(static::$operatorPattern)) { + static::$operatorPattern = '([*\/%+-]|[!=]\=|\>\=?|\<\=?|and|or)'; + + $commentSingle = '\/\/'; + $commentMultiLeft = '\/\*'; + $commentMultiRight = '\*\/'; + + static::$commentPattern = $commentMultiLeft . '.*?' . $commentMultiRight; + static::$whitePattern = $this->utf8 + ? '/' . $commentSingle . '[^\n]*\s*|(' . static::$commentPattern . ')\s*|\s+/AisuS' + : '/' . $commentSingle . '[^\n]*\s*|(' . static::$commentPattern . ')\s*|\s+/AisS'; + } + + $this->cache = $cache; + } + + /** + * Get source file name + * + * @api + * + * @return string + */ + public function getSourceName() + { + return $this->sourceName; + } + + /** + * Throw parser error + * + * @api + * + * @param string $msg + * + * @phpstan-return never-return + * + * @throws ParserException + * + * @deprecated use "parseError" and throw the exception in the caller instead. + */ + public function throwParseError($msg = 'parse error') + { + @trigger_error( + 'The method "throwParseError" is deprecated. Use "parseError" and throw the exception in the caller instead', + E_USER_DEPRECATED + ); + + throw $this->parseError($msg); + } + + /** + * Creates a parser error + * + * @api + * + * @param string $msg + * + * @return ParserException + */ + public function parseError($msg = 'parse error') + { + list($line, $column) = $this->getSourcePosition($this->count); + + $loc = empty($this->sourceName) + ? "line: $line, column: $column" + : "$this->sourceName on line $line, at column $column"; + + if ($this->peek('(.*?)(\n|$)', $m, $this->count)) { + $this->restoreEncoding(); + + $e = new ParserException("$msg: failed at `$m[1]` $loc"); + $e->setSourcePosition([$this->sourceName, $line, $column]); + + return $e; + } + + $this->restoreEncoding(); + + $e = new ParserException("$msg: $loc"); + $e->setSourcePosition([$this->sourceName, $line, $column]); + + return $e; + } + + /** + * Parser buffer + * + * @api + * + * @param string $buffer + * + * @return Block + */ + public function parse($buffer) + { + if ($this->cache) { + $cacheKey = $this->sourceName . ':' . md5($buffer); + $parseOptions = [ + 'charset' => $this->charset, + 'utf8' => $this->utf8, + ]; + $v = $this->cache->getCache('parse', $cacheKey, $parseOptions); + + if (! \is_null($v)) { + return $v; + } + } + + // strip BOM (byte order marker) + if (substr($buffer, 0, 3) === "\xef\xbb\xbf") { + $buffer = substr($buffer, 3); + } + + $this->buffer = rtrim($buffer, "\x00..\x1f"); + $this->count = 0; + $this->env = null; + $this->inParens = false; + $this->eatWhiteDefault = true; + + $this->saveEncoding(); + $this->extractLineNumbers($buffer); + + $this->pushBlock(null); // root block + $this->whitespace(); + $this->pushBlock(null); + $this->popBlock(); + + while ($this->parseChunk()) { + ; + } + + if ($this->count !== \strlen($this->buffer)) { + throw $this->parseError(); + } + + if (! empty($this->env->parent)) { + throw $this->parseError('unclosed block'); + } + + if ($this->charset) { + array_unshift($this->env->children, $this->charset); + } + + $this->restoreEncoding(); + + if ($this->cache) { + $this->cache->setCache('parse', $cacheKey, $this->env, $parseOptions); + } + + return $this->env; + } + + /** + * Parse a value or value list + * + * @api + * + * @param string $buffer + * @param string|array $out + * + * @return bool + */ + public function parseValue($buffer, &$out) + { + $this->count = 0; + $this->env = null; + $this->inParens = false; + $this->eatWhiteDefault = true; + $this->buffer = (string) $buffer; + + $this->saveEncoding(); + $this->extractLineNumbers($this->buffer); + + $list = $this->valueList($out); + + $this->restoreEncoding(); + + return $list; + } + + /** + * Parse a selector or selector list + * + * @api + * + * @param string $buffer + * @param string|array $out + * @param bool $shouldValidate + * + * @return bool + */ + public function parseSelector($buffer, &$out, $shouldValidate = true) + { + $this->count = 0; + $this->env = null; + $this->inParens = false; + $this->eatWhiteDefault = true; + $this->buffer = (string) $buffer; + + $this->saveEncoding(); + $this->extractLineNumbers($this->buffer); + + // discard space/comments at the start + $this->discardComments = true; + $this->whitespace(); + $this->discardComments = false; + + $selector = $this->selectors($out); + + $this->restoreEncoding(); + + if ($shouldValidate && $this->count !== strlen($buffer)) { + throw $this->parseError("`" . substr($buffer, $this->count) . "` is not a valid Selector in `$buffer`"); + } + + return $selector; + } + + /** + * Parse a media Query + * + * @api + * + * @param string $buffer + * @param string|array $out + * + * @return bool + */ + public function parseMediaQueryList($buffer, &$out) + { + $this->count = 0; + $this->env = null; + $this->inParens = false; + $this->eatWhiteDefault = true; + $this->buffer = (string) $buffer; + + $this->saveEncoding(); + $this->extractLineNumbers($this->buffer); + + $isMediaQuery = $this->mediaQueryList($out); + + $this->restoreEncoding(); + + return $isMediaQuery; + } + + /** + * Parse a single chunk off the head of the buffer and append it to the + * current parse environment. + * + * Returns false when the buffer is empty, or when there is an error. + * + * This function is called repeatedly until the entire document is + * parsed. + * + * This parser is most similar to a recursive descent parser. Single + * functions represent discrete grammatical rules for the language, and + * they are able to capture the text that represents those rules. + * + * Consider the function Compiler::keyword(). (All parse functions are + * structured the same.) + * + * The function takes a single reference argument. When calling the + * function it will attempt to match a keyword on the head of the buffer. + * If it is successful, it will place the keyword in the referenced + * argument, advance the position in the buffer, and return true. If it + * fails then it won't advance the buffer and it will return false. + * + * All of these parse functions are powered by Compiler::match(), which behaves + * the same way, but takes a literal regular expression. Sometimes it is + * more convenient to use match instead of creating a new function. + * + * Because of the format of the functions, to parse an entire string of + * grammatical rules, you can chain them together using &&. + * + * But, if some of the rules in the chain succeed before one fails, then + * the buffer position will be left at an invalid state. In order to + * avoid this, Compiler::seek() is used to remember and set buffer positions. + * + * Before parsing a chain, use $s = $this->count to remember the current + * position into $s. Then if a chain fails, use $this->seek($s) to + * go back where we started. + * + * @return bool + */ + protected function parseChunk() + { + $s = $this->count; + + // the directives + if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] === '@') { + if ( + $this->literal('@at-root', 8) && + ($this->selectors($selector) || true) && + ($this->map($with) || true) && + (($this->matchChar('(') && + $this->interpolation($with) && + $this->matchChar(')')) || true) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $atRoot = new AtRootBlock(); + $this->registerPushedBlock($atRoot, $s); + $atRoot->selector = $selector; + $atRoot->with = $with; + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@media', 6) && + $this->mediaQueryList($mediaQueryList) && + $this->matchChar('{', false) + ) { + $media = new MediaBlock(); + $this->registerPushedBlock($media, $s); + $media->queryList = $mediaQueryList[2]; + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@mixin', 6) && + $this->keyword($mixinName) && + ($this->argumentDef($args) || true) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $mixin = new CallableBlock(Type::T_MIXIN); + $this->registerPushedBlock($mixin, $s); + $mixin->name = $mixinName; + $mixin->args = $args; + + return true; + } + + $this->seek($s); + + if ( + ($this->literal('@include', 8) && + $this->keyword($mixinName) && + ($this->matchChar('(') && + ($this->argValues($argValues) || true) && + $this->matchChar(')') || true) && + ($this->end()) || + ($this->literal('using', 5) && + $this->argumentDef($argUsing) && + ($this->end() || $this->matchChar('{') && $hasBlock = true)) || + $this->matchChar('{') && $hasBlock = true) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $child = [ + Type::T_INCLUDE, + $mixinName, + isset($argValues) ? $argValues : null, + null, + isset($argUsing) ? $argUsing : null + ]; + + if (! empty($hasBlock)) { + $include = new ContentBlock(); + $this->registerPushedBlock($include, $s); + $include->child = $child; + } else { + $this->append($child, $s); + } + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@scssphp-import-once', 20) && + $this->valueList($importPath) && + $this->end() + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + list($line, $column) = $this->getSourcePosition($s); + $file = $this->sourceName; + $this->logger->warn("The \"@scssphp-import-once\" directive is deprecated and will be removed in ScssPhp 2.0, in \"$file\", line $line, column $column.", true); + + $this->append([Type::T_SCSSPHP_IMPORT_ONCE, $importPath], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@import', 7) && + $this->valueList($importPath) && + $importPath[0] !== Type::T_FUNCTION_CALL && + $this->end() + ) { + if ($this->cssOnly) { + $this->assertPlainCssValid([Type::T_IMPORT, $importPath], $s); + $this->append([Type::T_COMMENT, rtrim(substr($this->buffer, $s, $this->count - $s))]); + return true; + } + + $this->append([Type::T_IMPORT, $importPath], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@import', 7) && + $this->url($importPath) && + $this->end() + ) { + if ($this->cssOnly) { + $this->assertPlainCssValid([Type::T_IMPORT, $importPath], $s); + $this->append([Type::T_COMMENT, rtrim(substr($this->buffer, $s, $this->count - $s))]); + return true; + } + + $this->append([Type::T_IMPORT, $importPath], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@extend', 7) && + $this->selectors($selectors) && + $this->end() + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + // check for '!flag' + $optional = $this->stripOptionalFlag($selectors); + $this->append([Type::T_EXTEND, $selectors, $optional], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@function', 9) && + $this->keyword($fnName) && + $this->argumentDef($args) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $func = new CallableBlock(Type::T_FUNCTION); + $this->registerPushedBlock($func, $s); + $func->name = $fnName; + $func->args = $args; + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@return', 7) && + ($this->valueList($retVal) || true) && + $this->end() + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $this->append([Type::T_RETURN, isset($retVal) ? $retVal : [Type::T_NULL]], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@each', 5) && + $this->genericList($varNames, 'variable', ',', false) && + $this->literal('in', 2) && + $this->valueList($list) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $each = new EachBlock(); + $this->registerPushedBlock($each, $s); + + foreach ($varNames[2] as $varName) { + $each->vars[] = $varName[1]; + } + + $each->list = $list; + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@while', 6) && + $this->expression($cond) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + while ( + $cond[0] === Type::T_LIST && + ! empty($cond['enclosing']) && + $cond['enclosing'] === 'parent' && + \count($cond[2]) == 1 + ) { + $cond = reset($cond[2]); + } + + $while = new WhileBlock(); + $this->registerPushedBlock($while, $s); + $while->cond = $cond; + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@for', 4) && + $this->variable($varName) && + $this->literal('from', 4) && + $this->expression($start) && + ($this->literal('through', 7) || + ($forUntil = true && $this->literal('to', 2))) && + $this->expression($end) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $for = new ForBlock(); + $this->registerPushedBlock($for, $s); + $for->var = $varName[1]; + $for->start = $start; + $for->end = $end; + $for->until = isset($forUntil); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@if', 3) && + $this->functionCallArgumentsList($cond, false, '{', false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $if = new IfBlock(); + $this->registerPushedBlock($if, $s); + + while ( + $cond[0] === Type::T_LIST && + ! empty($cond['enclosing']) && + $cond['enclosing'] === 'parent' && + \count($cond[2]) == 1 + ) { + $cond = reset($cond[2]); + } + + $if->cond = $cond; + $if->cases = []; + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@debug', 6) && + $this->functionCallArgumentsList($value, false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $this->append([Type::T_DEBUG, $value], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@warn', 5) && + $this->functionCallArgumentsList($value, false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $this->append([Type::T_WARN, $value], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@error', 6) && + $this->functionCallArgumentsList($value, false) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $this->append([Type::T_ERROR, $value], $s); + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@content', 8) && + ($this->end() || + $this->matchChar('(') && + $this->argValues($argContent) && + $this->matchChar(')') && + $this->end()) + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + $this->append([Type::T_MIXIN_CONTENT, isset($argContent) ? $argContent : null], $s); + + return true; + } + + $this->seek($s); + + $last = $this->last(); + + if (isset($last) && $last[0] === Type::T_IF) { + list(, $if) = $last; + assert($if instanceof IfBlock); + + if ($this->literal('@else', 5)) { + if ($this->matchChar('{', false)) { + $else = new ElseBlock(); + } elseif ( + $this->literal('if', 2) && + $this->functionCallArgumentsList($cond, false, '{', false) + ) { + $else = new ElseifBlock(); + $else->cond = $cond; + } + + if (isset($else)) { + $this->registerPushedBlock($else, $s); + $if->cases[] = $else; + + return true; + } + } + + $this->seek($s); + } + + // only retain the first @charset directive encountered + if ( + $this->literal('@charset', 8) && + $this->valueList($charset) && + $this->end() + ) { + if (! isset($this->charset)) { + $statement = [Type::T_CHARSET, $charset]; + + list($line, $column) = $this->getSourcePosition($s); + + $statement[static::SOURCE_LINE] = $line; + $statement[static::SOURCE_COLUMN] = $column; + $statement[static::SOURCE_INDEX] = $this->sourceIndex; + + $this->charset = $statement; + } + + return true; + } + + $this->seek($s); + + if ( + $this->literal('@supports', 9) && + ($t1 = $this->supportsQuery($supportQuery)) && + ($t2 = $this->matchChar('{', false)) + ) { + $directive = new DirectiveBlock(); + $this->registerPushedBlock($directive, $s); + $directive->name = 'supports'; + $directive->value = $supportQuery; + + return true; + } + + $this->seek($s); + + // doesn't match built in directive, do generic one + if ( + $this->matchChar('@', false) && + $this->mixedKeyword($dirName) && + $this->directiveValue($dirValue, '{') + ) { + if (count($dirName) === 1 && is_string(reset($dirName))) { + $dirName = reset($dirName); + } else { + $dirName = [Type::T_STRING, '', $dirName]; + } + if ($dirName === 'media') { + $directive = new MediaBlock(); + } else { + $directive = new DirectiveBlock(); + $directive->name = $dirName; + } + $this->registerPushedBlock($directive, $s); + + if (isset($dirValue)) { + ! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue)); + $directive->value = $dirValue; + } + + return true; + } + + $this->seek($s); + + // maybe it's a generic blockless directive + if ( + $this->matchChar('@', false) && + $this->mixedKeyword($dirName) && + ! $this->isKnownGenericDirective($dirName) && + ($this->end(false) || ($this->directiveValue($dirValue, '') && $this->end(false))) + ) { + if (\count($dirName) === 1 && \is_string(\reset($dirName))) { + $dirName = \reset($dirName); + } else { + $dirName = [Type::T_STRING, '', $dirName]; + } + if ( + ! empty($this->env->parent) && + $this->env->type && + ! \in_array($this->env->type, [Type::T_DIRECTIVE, Type::T_MEDIA]) + ) { + $plain = \trim(\substr($this->buffer, $s, $this->count - $s)); + throw $this->parseError( + "Unknown directive `{$plain}` not allowed in `" . $this->env->type . "` block" + ); + } + // blockless directives with a blank line after keeps their blank lines after + // sass-spec compliance purpose + $s = $this->count; + $hasBlankLine = false; + if ($this->match('\s*?\n\s*\n', $out, false)) { + $hasBlankLine = true; + $this->seek($s); + } + $isNotRoot = ! empty($this->env->parent); + $this->append([Type::T_DIRECTIVE, [$dirName, $dirValue, $hasBlankLine, $isNotRoot]], $s); + $this->whitespace(); + + return true; + } + + $this->seek($s); + + return false; + } + + $inCssSelector = null; + if ($this->cssOnly) { + $inCssSelector = (! empty($this->env->parent) && + ! in_array($this->env->type, [Type::T_DIRECTIVE, Type::T_MEDIA])); + } + // custom properties : right part is static + if (($this->customProperty($name) ) && $this->matchChar(':', false)) { + $start = $this->count; + + // but can be complex and finish with ; or } + foreach ([';','}'] as $ending) { + if ( + $this->openString($ending, $stringValue, '(', ')', false) && + $this->end() + ) { + $end = $this->count; + $value = $stringValue; + + // check if we have only a partial value due to nested [] or { } to take in account + $nestingPairs = [['[', ']'], ['{', '}']]; + + foreach ($nestingPairs as $nestingPair) { + $p = strpos($this->buffer, $nestingPair[0], $start); + + if ($p && $p < $end) { + $this->seek($start); + + if ( + $this->openString($ending, $stringValue, $nestingPair[0], $nestingPair[1], false) && + $this->end() && + $this->count > $end + ) { + $end = $this->count; + $value = $stringValue; + } + } + } + + $this->seek($end); + $this->append([Type::T_CUSTOM_PROPERTY, $name, $value], $s); + + return true; + } + } + + // TODO: output an error here if nothing found according to sass spec + } + + $this->seek($s); + + // property shortcut + // captures most properties before having to parse a selector + if ( + $this->keyword($name, false) && + $this->literal(': ', 2) && + $this->valueList($value) && + $this->end() + ) { + $name = [Type::T_STRING, '', [$name]]; + $this->append([Type::T_ASSIGN, $name, $value], $s); + + return true; + } + + $this->seek($s); + + // variable assigns + if ( + $this->variable($name) && + $this->matchChar(':') && + $this->valueList($value) && + $this->end() + ) { + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + + // check for '!flag' + $assignmentFlags = $this->stripAssignmentFlags($value); + $this->append([Type::T_ASSIGN, $name, $value, $assignmentFlags], $s); + + return true; + } + + $this->seek($s); + + // opening css block + if ( + $this->selectors($selectors) && + $this->matchChar('{', false) + ) { + ! $this->cssOnly || ! $inCssSelector || $this->assertPlainCssValid(false); + + $this->pushBlock($selectors, $s); + + if ($this->eatWhiteDefault) { + $this->whitespace(); + $this->append(null); // collect comments at the beginning if needed + } + + return true; + } + + $this->seek($s); + + // property assign, or nested assign + if ( + $this->propertyName($name) && + $this->matchChar(':') + ) { + $foundSomething = false; + + if ($this->valueList($value)) { + if (empty($this->env->parent)) { + throw $this->parseError('expected "{"'); + } + + $this->append([Type::T_ASSIGN, $name, $value], $s); + $foundSomething = true; + } + + if ($this->matchChar('{', false)) { + ! $this->cssOnly || $this->assertPlainCssValid(false); + + $propBlock = new NestedPropertyBlock(); + $this->registerPushedBlock($propBlock, $s); + $propBlock->prefix = $name; + $propBlock->hasValue = $foundSomething; + + $foundSomething = true; + } elseif ($foundSomething) { + $foundSomething = $this->end(); + } + + if ($foundSomething) { + return true; + } + } + + $this->seek($s); + + // closing a block + if ($this->matchChar('}', false)) { + $block = $this->popBlock(); + + if (! isset($block->type) || $block->type !== Type::T_IF) { + if ($this->env->parent) { + $this->append(null); // collect comments before next statement if needed + } + } + + if ($block instanceof ContentBlock) { + $include = $block->child; + assert(\is_array($include)); + unset($block->child); + $include[3] = $block; + $this->append($include, $s); + } elseif (!$block instanceof ElseBlock && !$block instanceof ElseifBlock) { + $type = isset($block->type) ? $block->type : Type::T_BLOCK; + $this->append([$type, $block], $s); + } + + // collect comments just after the block closing if needed + if ($this->eatWhiteDefault) { + $this->whitespace(); + + if ($this->env->comments) { + $this->append(null); + } + } + + return true; + } + + // extra stuff + if ($this->matchChar(';')) { + return true; + } + + return false; + } + + /** + * Push block onto parse tree + * + * @param array|null $selectors + * @param int $pos + * + * @return Block + */ + protected function pushBlock($selectors, $pos = 0) + { + $b = new Block(); + $b->selectors = $selectors; + + $this->registerPushedBlock($b, $pos); + + return $b; + } + + /** + * @param Block $b + * @param int $pos + * + * @return void + */ + private function registerPushedBlock(Block $b, $pos) + { + list($line, $column) = $this->getSourcePosition($pos); + + $b->sourceName = $this->sourceName; + $b->sourceLine = $line; + $b->sourceColumn = $column; + $b->sourceIndex = $this->sourceIndex; + $b->comments = []; + $b->parent = $this->env; + + if (! $this->env) { + $b->children = []; + } elseif (empty($this->env->children)) { + $this->env->children = $this->env->comments; + $b->children = []; + $this->env->comments = []; + } else { + $b->children = $this->env->comments; + $this->env->comments = []; + } + + $this->env = $b; + + // collect comments at the beginning of a block if needed + if ($this->eatWhiteDefault) { + $this->whitespace(); + + if ($this->env->comments) { + $this->append(null); + } + } + } + + /** + * Push special (named) block onto parse tree + * + * @deprecated + * + * @param string $type + * @param int $pos + * + * @return Block + */ + protected function pushSpecialBlock($type, $pos) + { + $block = $this->pushBlock(null, $pos); + $block->type = $type; + + return $block; + } + + /** + * Pop scope and return last block + * + * @return Block + * + * @throws \Exception + */ + protected function popBlock() + { + + // collect comments ending just before of a block closing + if ($this->env->comments) { + $this->append(null); + } + + // pop the block + $block = $this->env; + + if (empty($block->parent)) { + throw $this->parseError('unexpected }'); + } + + if ($block->type == Type::T_AT_ROOT) { + // keeps the parent in case of self selector & + $block->selfParent = $block->parent; + } + + $this->env = $block->parent; + + unset($block->parent); + + return $block; + } + + /** + * Peek input stream + * + * @param string $regex + * @param array $out + * @param int $from + * + * @return int + */ + protected function peek($regex, &$out, $from = null) + { + if (! isset($from)) { + $from = $this->count; + } + + $r = '/' . $regex . '/' . $this->patternModifiers; + $result = preg_match($r, $this->buffer, $out, 0, $from); + + return $result; + } + + /** + * Seek to position in input stream (or return current position in input stream) + * + * @param int $where + */ + protected function seek($where) + { + $this->count = $where; + } + + /** + * Assert a parsed part is plain CSS Valid + * + * @param array|false $parsed + * @param int $startPos + * + * @throws ParserException + */ + protected function assertPlainCssValid($parsed, $startPos = null) + { + $type = ''; + if ($parsed) { + $type = $parsed[0]; + $parsed = $this->isPlainCssValidElement($parsed); + } + if (! $parsed) { + if (! \is_null($startPos)) { + $plain = rtrim(substr($this->buffer, $startPos, $this->count - $startPos)); + $message = "Error : `{$plain}` isn't allowed in plain CSS"; + } else { + $message = 'Error: SCSS syntax not allowed in CSS file'; + } + if ($type) { + $message .= " ($type)"; + } + throw $this->parseError($message); + } + + return $parsed; + } + + /** + * Check a parsed element is plain CSS Valid + * + * @param array $parsed + * @param bool $allowExpression + * + * @return bool|array + */ + protected function isPlainCssValidElement($parsed, $allowExpression = false) + { + // keep string as is + if (is_string($parsed)) { + return $parsed; + } + + if ( + \in_array($parsed[0], [Type::T_FUNCTION, Type::T_FUNCTION_CALL]) && + !\in_array($parsed[1], [ + 'alpha', + 'attr', + 'calc', + 'cubic-bezier', + 'env', + 'grayscale', + 'hsl', + 'hsla', + 'hwb', + 'invert', + 'linear-gradient', + 'min', + 'max', + 'radial-gradient', + 'repeating-linear-gradient', + 'repeating-radial-gradient', + 'rgb', + 'rgba', + 'rotate', + 'saturate', + 'var', + ]) && + Compiler::isNativeFunction($parsed[1]) + ) { + return false; + } + + switch ($parsed[0]) { + case Type::T_BLOCK: + case Type::T_KEYWORD: + case Type::T_NULL: + case Type::T_NUMBER: + case Type::T_MEDIA: + return $parsed; + + case Type::T_COMMENT: + if (isset($parsed[2])) { + return false; + } + return $parsed; + + case Type::T_DIRECTIVE: + if (\is_array($parsed[1])) { + $parsed[1][1] = $this->isPlainCssValidElement($parsed[1][1]); + if (! $parsed[1][1]) { + return false; + } + } + + return $parsed; + + case Type::T_IMPORT: + if ($parsed[1][0] === Type::T_LIST) { + return false; + } + $parsed[1] = $this->isPlainCssValidElement($parsed[1]); + if ($parsed[1] === false) { + return false; + } + return $parsed; + + case Type::T_STRING: + foreach ($parsed[2] as $k => $substr) { + if (\is_array($substr)) { + $parsed[2][$k] = $this->isPlainCssValidElement($substr); + if (! $parsed[2][$k]) { + return false; + } + } + } + return $parsed; + + case Type::T_LIST: + if (!empty($parsed['enclosing'])) { + return false; + } + foreach ($parsed[2] as $k => $listElement) { + $parsed[2][$k] = $this->isPlainCssValidElement($listElement); + if (! $parsed[2][$k]) { + return false; + } + } + return $parsed; + + case Type::T_ASSIGN: + foreach ([1, 2, 3] as $k) { + if (! empty($parsed[$k])) { + $parsed[$k] = $this->isPlainCssValidElement($parsed[$k]); + if (! $parsed[$k]) { + return false; + } + } + } + return $parsed; + + case Type::T_EXPRESSION: + list( ,$op, $lhs, $rhs, $inParens, $whiteBefore, $whiteAfter) = $parsed; + if (! $allowExpression && ! \in_array($op, ['and', 'or', '/'])) { + return false; + } + $lhs = $this->isPlainCssValidElement($lhs, true); + if (! $lhs) { + return false; + } + $rhs = $this->isPlainCssValidElement($rhs, true); + if (! $rhs) { + return false; + } + + return [ + Type::T_STRING, + '', [ + $this->inParens ? '(' : '', + $lhs, + ($whiteBefore ? ' ' : '') . $op . ($whiteAfter ? ' ' : ''), + $rhs, + $this->inParens ? ')' : '' + ] + ]; + + case Type::T_CUSTOM_PROPERTY: + case Type::T_UNARY: + $parsed[2] = $this->isPlainCssValidElement($parsed[2]); + if (! $parsed[2]) { + return false; + } + return $parsed; + + case Type::T_FUNCTION: + $argsList = $parsed[2]; + foreach ($argsList[2] as $argElement) { + if (! $this->isPlainCssValidElement($argElement)) { + return false; + } + } + return $parsed; + + case Type::T_FUNCTION_CALL: + $parsed[0] = Type::T_FUNCTION; + $argsList = [Type::T_LIST, ',', []]; + foreach ($parsed[2] as $arg) { + if ($arg[0] || ! empty($arg[2])) { + // no named arguments possible in a css function call + // nor ... argument + return false; + } + $arg = $this->isPlainCssValidElement($arg[1], $parsed[1] === 'calc'); + if (! $arg) { + return false; + } + $argsList[2][] = $arg; + } + $parsed[2] = $argsList; + return $parsed; + } + + return false; + } + + /** + * Match string looking for either ending delim, escape, or string interpolation + * + * {@internal This is a workaround for preg_match's 250K string match limit. }} + * + * @param array $m Matches (passed by reference) + * @param string $delim Delimiter + * + * @return bool True if match; false otherwise + */ + protected function matchString(&$m, $delim) + { + $token = null; + + $end = \strlen($this->buffer); + + // look for either ending delim, escape, or string interpolation + foreach (['#{', '\\', "\r", $delim] as $lookahead) { + $pos = strpos($this->buffer, $lookahead, $this->count); + + if ($pos !== false && $pos < $end) { + $end = $pos; + $token = $lookahead; + } + } + + if (! isset($token)) { + return false; + } + + $match = substr($this->buffer, $this->count, $end - $this->count); + $m = [ + $match . $token, + $match, + $token + ]; + $this->count = $end + \strlen($token); + + return true; + } + + /** + * Try to match something on head of buffer + * + * @param string $regex + * @param array $out + * @param bool $eatWhitespace + * + * @return bool + */ + protected function match($regex, &$out, $eatWhitespace = null) + { + $r = '/' . $regex . '/' . $this->patternModifiers; + + if (! preg_match($r, $this->buffer, $out, 0, $this->count)) { + return false; + } + + $this->count += \strlen($out[0]); + + if (! isset($eatWhitespace)) { + $eatWhitespace = $this->eatWhiteDefault; + } + + if ($eatWhitespace) { + $this->whitespace(); + } + + return true; + } + + /** + * Match a single string + * + * @param string $char + * @param bool $eatWhitespace + * + * @return bool + */ + protected function matchChar($char, $eatWhitespace = null) + { + if (! isset($this->buffer[$this->count]) || $this->buffer[$this->count] !== $char) { + return false; + } + + $this->count++; + + if (! isset($eatWhitespace)) { + $eatWhitespace = $this->eatWhiteDefault; + } + + if ($eatWhitespace) { + $this->whitespace(); + } + + return true; + } + + /** + * Match literal string + * + * @param string $what + * @param int $len + * @param bool $eatWhitespace + * + * @return bool + */ + protected function literal($what, $len, $eatWhitespace = null) + { + if (strcasecmp(substr($this->buffer, $this->count, $len), $what) !== 0) { + return false; + } + + $this->count += $len; + + if (! isset($eatWhitespace)) { + $eatWhitespace = $this->eatWhiteDefault; + } + + if ($eatWhitespace) { + $this->whitespace(); + } + + return true; + } + + /** + * Match some whitespace + * + * @return bool + */ + protected function whitespace() + { + $gotWhite = false; + + while (preg_match(static::$whitePattern, $this->buffer, $m, 0, $this->count)) { + if (isset($m[1]) && empty($this->commentsSeen[$this->count])) { + // comment that are kept in the output CSS + $comment = []; + $startCommentCount = $this->count; + $endCommentCount = $this->count + \strlen($m[1]); + + // find interpolations in comment + $p = strpos($this->buffer, '#{', $this->count); + + while ($p !== false && $p < $endCommentCount) { + $c = substr($this->buffer, $this->count, $p - $this->count); + $comment[] = $c; + $this->count = $p; + $out = null; + + if ($this->interpolation($out)) { + // keep right spaces in the following string part + if ($out[3]) { + while ($this->buffer[$this->count - 1] !== '}') { + $this->count--; + } + + $out[3] = ''; + } + + $comment[] = [Type::T_COMMENT, substr($this->buffer, $p, $this->count - $p), $out]; + } else { + list($line, $column) = $this->getSourcePosition($this->count); + $file = $this->sourceName; + if (!$this->discardComments) { + $this->logger->warn("Unterminated interpolations in multiline comments are deprecated and will be removed in ScssPhp 2.0, in \"$file\", line $line, column $column.", true); + } + $comment[] = substr($this->buffer, $this->count, 2); + + $this->count += 2; + } + + $p = strpos($this->buffer, '#{', $this->count); + } + + // remaining part + $c = substr($this->buffer, $this->count, $endCommentCount - $this->count); + + if (! $comment) { + // single part static comment + $this->appendComment([Type::T_COMMENT, $c]); + } else { + $comment[] = $c; + $staticComment = substr($this->buffer, $startCommentCount, $endCommentCount - $startCommentCount); + $commentStatement = [Type::T_COMMENT, $staticComment, [Type::T_STRING, '', $comment]]; + + list($line, $column) = $this->getSourcePosition($startCommentCount); + $commentStatement[self::SOURCE_LINE] = $line; + $commentStatement[self::SOURCE_COLUMN] = $column; + $commentStatement[self::SOURCE_INDEX] = $this->sourceIndex; + + $this->appendComment($commentStatement); + } + + $this->commentsSeen[$startCommentCount] = true; + $this->count = $endCommentCount; + } else { + // comment that are ignored and not kept in the output css + $this->count += \strlen($m[0]); + // silent comments are not allowed in plain CSS files + ! $this->cssOnly + || ! \strlen(trim($m[0])) + || $this->assertPlainCssValid(false, $this->count - \strlen($m[0])); + } + + $gotWhite = true; + } + + return $gotWhite; + } + + /** + * Append comment to current block + * + * @param array $comment + */ + protected function appendComment($comment) + { + if (! $this->discardComments) { + $this->env->comments[] = $comment; + } + } + + /** + * Append statement to current block + * + * @param array|null $statement + * @param int $pos + */ + protected function append($statement, $pos = null) + { + if (! \is_null($statement)) { + ! $this->cssOnly || ($statement = $this->assertPlainCssValid($statement, $pos)); + + if (! \is_null($pos)) { + list($line, $column) = $this->getSourcePosition($pos); + + $statement[static::SOURCE_LINE] = $line; + $statement[static::SOURCE_COLUMN] = $column; + $statement[static::SOURCE_INDEX] = $this->sourceIndex; + } + + $this->env->children[] = $statement; + } + + $comments = $this->env->comments; + + if ($comments) { + $this->env->children = array_merge($this->env->children, $comments); + $this->env->comments = []; + } + } + + /** + * Returns last child was appended + * + * @return array|null + */ + protected function last() + { + $i = \count($this->env->children) - 1; + + if (isset($this->env->children[$i])) { + return $this->env->children[$i]; + } + } + + /** + * Parse media query list + * + * @param array $out + * + * @return bool + */ + protected function mediaQueryList(&$out) + { + return $this->genericList($out, 'mediaQuery', ',', false); + } + + /** + * Parse media query + * + * @param array $out + * + * @return bool + */ + protected function mediaQuery(&$out) + { + $expressions = null; + $parts = []; + + if ( + ($this->literal('only', 4) && ($only = true) || + $this->literal('not', 3) && ($not = true) || true) && + $this->mixedKeyword($mediaType) + ) { + $prop = [Type::T_MEDIA_TYPE]; + + if (isset($only)) { + $prop[] = [Type::T_KEYWORD, 'only']; + } + + if (isset($not)) { + $prop[] = [Type::T_KEYWORD, 'not']; + } + + $media = [Type::T_LIST, '', []]; + + foreach ((array) $mediaType as $type) { + if (\is_array($type)) { + $media[2][] = $type; + } else { + $media[2][] = [Type::T_KEYWORD, $type]; + } + } + + $prop[] = $media; + $parts[] = $prop; + } + + if (empty($parts) || $this->literal('and', 3)) { + $this->genericList($expressions, 'mediaExpression', 'and', false); + + if (\is_array($expressions)) { + $parts = array_merge($parts, $expressions[2]); + } + } + + $out = $parts; + + return true; + } + + /** + * Parse supports query + * + * @param array $out + * + * @return bool + */ + protected function supportsQuery(&$out) + { + $expressions = null; + $parts = []; + + $s = $this->count; + + $not = false; + + if ( + ($this->literal('not', 3) && ($not = true) || true) && + $this->matchChar('(') && + ($this->expression($property)) && + $this->literal(': ', 2) && + $this->valueList($value) && + $this->matchChar(')') + ) { + $support = [Type::T_STRING, '', [[Type::T_KEYWORD, ($not ? 'not ' : '') . '(']]]; + $support[2][] = $property; + $support[2][] = [Type::T_KEYWORD, ': ']; + $support[2][] = $value; + $support[2][] = [Type::T_KEYWORD, ')']; + + $parts[] = $support; + $s = $this->count; + } else { + $this->seek($s); + } + + if ( + $this->matchChar('(') && + $this->supportsQuery($subQuery) && + $this->matchChar(')') + ) { + $parts[] = [Type::T_STRING, '', [[Type::T_KEYWORD, '('], $subQuery, [Type::T_KEYWORD, ')']]]; + $s = $this->count; + } else { + $this->seek($s); + } + + if ( + $this->literal('not', 3) && + $this->supportsQuery($subQuery) + ) { + $parts[] = [Type::T_STRING, '', [[Type::T_KEYWORD, 'not '], $subQuery]]; + $s = $this->count; + } else { + $this->seek($s); + } + + if ( + $this->literal('selector(', 9) && + $this->selector($selector) && + $this->matchChar(')') + ) { + $support = [Type::T_STRING, '', [[Type::T_KEYWORD, 'selector(']]]; + + $selectorList = [Type::T_LIST, '', []]; + + foreach ($selector as $sc) { + $compound = [Type::T_STRING, '', []]; + + foreach ($sc as $scp) { + if (\is_array($scp)) { + $compound[2][] = $scp; + } else { + $compound[2][] = [Type::T_KEYWORD, $scp]; + } + } + + $selectorList[2][] = $compound; + } + + $support[2][] = $selectorList; + $support[2][] = [Type::T_KEYWORD, ')']; + $parts[] = $support; + $s = $this->count; + } else { + $this->seek($s); + } + + if ($this->variable($var) or $this->interpolation($var)) { + $parts[] = $var; + $s = $this->count; + } else { + $this->seek($s); + } + + if ( + $this->literal('and', 3) && + $this->genericList($expressions, 'supportsQuery', ' and', false) + ) { + array_unshift($expressions[2], [Type::T_STRING, '', $parts]); + + $parts = [$expressions]; + $s = $this->count; + } else { + $this->seek($s); + } + + if ( + $this->literal('or', 2) && + $this->genericList($expressions, 'supportsQuery', ' or', false) + ) { + array_unshift($expressions[2], [Type::T_STRING, '', $parts]); + + $parts = [$expressions]; + $s = $this->count; + } else { + $this->seek($s); + } + + if (\count($parts)) { + if ($this->eatWhiteDefault) { + $this->whitespace(); + } + + $out = [Type::T_STRING, '', $parts]; + + return true; + } + + return false; + } + + + /** + * Parse media expression + * + * @param array $out + * + * @return bool + */ + protected function mediaExpression(&$out) + { + $s = $this->count; + $value = null; + + if ( + $this->matchChar('(') && + $this->expression($feature) && + ($this->matchChar(':') && + $this->expression($value) || true) && + $this->matchChar(')') + ) { + $out = [Type::T_MEDIA_EXPRESSION, $feature]; + + if ($value) { + $out[] = $value; + } + + return true; + } + + $this->seek($s); + + return false; + } + + /** + * Parse argument values + * + * @param array $out + * + * @return bool + */ + protected function argValues(&$out) + { + $discardComments = $this->discardComments; + $this->discardComments = true; + + if ($this->genericList($list, 'argValue', ',', false)) { + $out = $list[2]; + + $this->discardComments = $discardComments; + + return true; + } + + $this->discardComments = $discardComments; + + return false; + } + + /** + * Parse argument value + * + * @param array $out + * + * @return bool + */ + protected function argValue(&$out) + { + $s = $this->count; + + $keyword = null; + + if (! $this->variable($keyword) || ! $this->matchChar(':')) { + $this->seek($s); + + $keyword = null; + } + + if ($this->genericList($value, 'expression', '', true)) { + $out = [$keyword, $value, false]; + $s = $this->count; + + if ($this->literal('...', 3)) { + $out[2] = true; + } else { + $this->seek($s); + } + + return true; + } + + return false; + } + + /** + * Check if a generic directive is known to be able to allow almost any syntax or not + * @param mixed $directiveName + * @return bool + */ + protected function isKnownGenericDirective($directiveName) + { + if (\is_array($directiveName) && \is_string(reset($directiveName))) { + $directiveName = reset($directiveName); + } + if (! \is_string($directiveName)) { + return false; + } + if ( + \in_array($directiveName, [ + 'at-root', + 'media', + 'mixin', + 'include', + 'scssphp-import-once', + 'import', + 'extend', + 'function', + 'break', + 'continue', + 'return', + 'each', + 'while', + 'for', + 'if', + 'debug', + 'warn', + 'error', + 'content', + 'else', + 'charset', + 'supports', + // Todo + 'use', + 'forward', + ]) + ) { + return true; + } + return false; + } + + /** + * Parse directive value list that considers $vars as keyword + * + * @param array $out + * @param bool|string $endChar + * + * @return bool + */ + protected function directiveValue(&$out, $endChar = false) + { + $s = $this->count; + + if ($this->variable($out)) { + if ($endChar && $this->matchChar($endChar, false)) { + return true; + } + + if (! $endChar && $this->end()) { + return true; + } + } + + $this->seek($s); + + if (\is_string($endChar) && $this->openString($endChar ? $endChar : ';', $out, null, null, true, ";}{")) { + if ($endChar && $this->matchChar($endChar, false)) { + return true; + } + $ss = $this->count; + if (!$endChar && $this->end()) { + $this->seek($ss); + return true; + } + } + + $this->seek($s); + + $allowVars = $this->allowVars; + $this->allowVars = false; + + $res = $this->genericList($out, 'spaceList', ','); + $this->allowVars = $allowVars; + + if ($res) { + if ($endChar && $this->matchChar($endChar, false)) { + return true; + } + + if (! $endChar && $this->end()) { + return true; + } + } + + $this->seek($s); + + if ($endChar && $this->matchChar($endChar, false)) { + return true; + } + + return false; + } + + /** + * Parse comma separated value list + * + * @param array $out + * + * @return bool + */ + protected function valueList(&$out) + { + $discardComments = $this->discardComments; + $this->discardComments = true; + $res = $this->genericList($out, 'spaceList', ','); + $this->discardComments = $discardComments; + + return $res; + } + + /** + * Parse a function call, where externals () are part of the call + * and not of the value list + * + * @param array $out + * @param bool $mandatoryEnclos + * @param null|string $charAfter + * @param null|bool $eatWhiteSp + * + * @return bool + */ + protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null) + { + $s = $this->count; + + if ( + $this->matchChar('(') && + $this->valueList($out) && + $this->matchChar(')') && + ($charAfter ? $this->matchChar($charAfter, $eatWhiteSp) : $this->end()) + ) { + return true; + } + + if (! $mandatoryEnclos) { + $this->seek($s); + + if ( + $this->valueList($out) && + ($charAfter ? $this->matchChar($charAfter, $eatWhiteSp) : $this->end()) + ) { + return true; + } + } + + $this->seek($s); + + return false; + } + + /** + * Parse space separated value list + * + * @param array $out + * + * @return bool + */ + protected function spaceList(&$out) + { + return $this->genericList($out, 'expression'); + } + + /** + * Parse generic list + * + * @param array $out + * @param string $parseItem The name of the method used to parse items + * @param string $delim + * @param bool $flatten + * + * @return bool + */ + protected function genericList(&$out, $parseItem, $delim = '', $flatten = true) + { + $s = $this->count; + $items = []; + $value = null; + + while ($this->$parseItem($value)) { + $trailing_delim = false; + $items[] = $value; + + if ($delim) { + if (! $this->literal($delim, \strlen($delim))) { + break; + } + + $trailing_delim = true; + } else { + // if no delim watch that a keyword didn't eat the single/double quote + // from the following starting string + if ($value[0] === Type::T_KEYWORD) { + $word = $value[1]; + + $last_char = substr($word, -1); + + if ( + strlen($word) > 1 && + in_array($last_char, [ "'", '"']) && + substr($word, -2, 1) !== '\\' + ) { + // if there is a non escaped opening quote in the keyword, this seems unlikely a mistake + $word = str_replace('\\' . $last_char, '\\\\', $word); + if (strpos($word, $last_char) < strlen($word) - 1) { + continue; + } + + $currentCount = $this->count; + + // let's try to rewind to previous char and try a parse + $this->count--; + // in case the keyword also eat spaces + while (substr($this->buffer, $this->count, 1) !== $last_char) { + $this->count--; + } + + $nextValue = null; + if ($this->$parseItem($nextValue)) { + if ($nextValue[0] === Type::T_KEYWORD && $nextValue[1] === $last_char) { + // bad try, forget it + $this->seek($currentCount); + continue; + } + if ($nextValue[0] !== Type::T_STRING) { + // bad try, forget it + $this->seek($currentCount); + continue; + } + + // OK it was a good idea + $value[1] = substr($value[1], 0, -1); + array_pop($items); + $items[] = $value; + $items[] = $nextValue; + } else { + // bad try, forget it + $this->seek($currentCount); + continue; + } + } + } + } + } + + if (! $items) { + $this->seek($s); + + return false; + } + + if ($trailing_delim) { + $items[] = [Type::T_NULL]; + } + + if ($flatten && \count($items) === 1) { + $out = $items[0]; + } else { + $out = [Type::T_LIST, $delim, $items]; + } + + return true; + } + + /** + * Parse expression + * + * @param array $out + * @param bool $listOnly + * @param bool $lookForExp + * + * @return bool + */ + protected function expression(&$out, $listOnly = false, $lookForExp = true) + { + $s = $this->count; + $discard = $this->discardComments; + $this->discardComments = true; + $allowedTypes = ($listOnly ? [Type::T_LIST] : [Type::T_LIST, Type::T_MAP]); + + if ($this->matchChar('(')) { + if ($this->enclosedExpression($lhs, $s, ')', $allowedTypes)) { + if ($lookForExp) { + $out = $this->expHelper($lhs, 0); + } else { + $out = $lhs; + } + + $this->discardComments = $discard; + + return true; + } + + $this->seek($s); + } + + if (\in_array(Type::T_LIST, $allowedTypes) && $this->matchChar('[')) { + if ($this->enclosedExpression($lhs, $s, ']', [Type::T_LIST])) { + if ($lookForExp) { + $out = $this->expHelper($lhs, 0); + } else { + $out = $lhs; + } + + $this->discardComments = $discard; + + return true; + } + + $this->seek($s); + } + + if (! $listOnly && $this->value($lhs)) { + if ($lookForExp) { + $out = $this->expHelper($lhs, 0); + } else { + $out = $lhs; + } + + $this->discardComments = $discard; + + return true; + } + + $this->discardComments = $discard; + + return false; + } + + /** + * Parse expression specifically checking for lists in parenthesis or brackets + * + * @param array $out + * @param int $s + * @param string $closingParen + * @param array $allowedTypes + * + * @return bool + */ + protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP]) + { + if ($this->matchChar($closingParen) && \in_array(Type::T_LIST, $allowedTypes)) { + $out = [Type::T_LIST, '', []]; + + switch ($closingParen) { + case ')': + $out['enclosing'] = 'parent'; // parenthesis list + break; + + case ']': + $out['enclosing'] = 'bracket'; // bracketed list + break; + } + + return true; + } + + if ( + $this->valueList($out) && + $this->matchChar($closingParen) && ! ($closingParen === ')' && + \in_array($out[0], [Type::T_EXPRESSION, Type::T_UNARY])) && + \in_array(Type::T_LIST, $allowedTypes) + ) { + if ($out[0] !== Type::T_LIST || ! empty($out['enclosing'])) { + $out = [Type::T_LIST, '', [$out]]; + } + + switch ($closingParen) { + case ')': + $out['enclosing'] = 'parent'; // parenthesis list + break; + + case ']': + $out['enclosing'] = 'bracket'; // bracketed list + break; + } + + return true; + } + + $this->seek($s); + + if (\in_array(Type::T_MAP, $allowedTypes) && $this->map($out)) { + return true; + } + + return false; + } + + /** + * Parse left-hand side of subexpression + * + * @param array $lhs + * @param int $minP + * + * @return array + */ + protected function expHelper($lhs, $minP) + { + $operators = static::$operatorPattern; + + $ss = $this->count; + $whiteBefore = isset($this->buffer[$this->count - 1]) && + ctype_space($this->buffer[$this->count - 1]); + + while ($this->match($operators, $m, false) && static::$precedence[$m[1]] >= $minP) { + $whiteAfter = isset($this->buffer[$this->count]) && + ctype_space($this->buffer[$this->count]); + $varAfter = isset($this->buffer[$this->count]) && + $this->buffer[$this->count] === '$'; + + $this->whitespace(); + + $op = $m[1]; + + // don't turn negative numbers into expressions + if ($op === '-' && $whiteBefore && ! $whiteAfter && ! $varAfter) { + break; + } + + if (! $this->value($rhs) && ! $this->expression($rhs, true, false)) { + break; + } + + if ($op === '-' && ! $whiteAfter && $rhs[0] === Type::T_KEYWORD) { + break; + } + + // consume higher-precedence operators on the right-hand side + $rhs = $this->expHelper($rhs, static::$precedence[$op] + 1); + + $lhs = [Type::T_EXPRESSION, $op, $lhs, $rhs, $this->inParens, $whiteBefore, $whiteAfter]; + + $ss = $this->count; + $whiteBefore = isset($this->buffer[$this->count - 1]) && + ctype_space($this->buffer[$this->count - 1]); + } + + $this->seek($ss); + + return $lhs; + } + + /** + * Parse value + * + * @param array $out + * + * @return bool + */ + protected function value(&$out) + { + if (! isset($this->buffer[$this->count])) { + return false; + } + + $s = $this->count; + $char = $this->buffer[$this->count]; + + if ( + $this->literal('url(', 4) && + $this->match('data:([a-z]+)\/([a-z0-9.+-]+);base64,', $m, false) + ) { + $len = strspn( + $this->buffer, + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyxz0123456789+/=', + $this->count + ); + + $this->count += $len; + + if ($this->matchChar(')')) { + $content = substr($this->buffer, $s, $this->count - $s); + $out = [Type::T_KEYWORD, $content]; + + return true; + } + } + + $this->seek($s); + + if ( + $this->literal('url(', 4, false) && + $this->match('\s*(\/\/[^\s\)]+)\s*', $m) + ) { + $content = 'url(' . $m[1]; + + if ($this->matchChar(')')) { + $content .= ')'; + $out = [Type::T_KEYWORD, $content]; + + return true; + } + } + + $this->seek($s); + + // not + if ($char === 'n' && $this->literal('not', 3, false)) { + if ( + $this->whitespace() && + $this->value($inner) + ) { + $out = [Type::T_UNARY, 'not', $inner, $this->inParens]; + + return true; + } + + $this->seek($s); + + if ($this->parenValue($inner)) { + $out = [Type::T_UNARY, 'not', $inner, $this->inParens]; + + return true; + } + + $this->seek($s); + } + + // addition + if ($char === '+') { + $this->count++; + + $follow_white = $this->whitespace(); + + if ($this->value($inner)) { + $out = [Type::T_UNARY, '+', $inner, $this->inParens]; + + return true; + } + + if ($follow_white) { + $out = [Type::T_KEYWORD, $char]; + return true; + } + + $this->seek($s); + + return false; + } + + // negation + if ($char === '-') { + if ($this->customProperty($out)) { + return true; + } + + $this->count++; + + $follow_white = $this->whitespace(); + + if ($this->variable($inner) || $this->unit($inner) || $this->parenValue($inner)) { + $out = [Type::T_UNARY, '-', $inner, $this->inParens]; + + return true; + } + + if ( + $this->keyword($inner) && + ! $this->func($inner, $out) + ) { + $out = [Type::T_UNARY, '-', $inner, $this->inParens]; + + return true; + } + + if ($follow_white) { + $out = [Type::T_KEYWORD, $char]; + + return true; + } + + $this->seek($s); + } + + // paren + if ($char === '(' && $this->parenValue($out)) { + return true; + } + + if ($char === '#') { + if ($this->interpolation($out) || $this->color($out)) { + return true; + } + + $this->count++; + + if ($this->keyword($keyword)) { + $out = [Type::T_KEYWORD, '#' . $keyword]; + + return true; + } + + $this->count--; + } + + if ($this->matchChar('&', true)) { + $out = [Type::T_SELF]; + + return true; + } + + if ($char === '$' && $this->variable($out)) { + return true; + } + + if ($char === 'p' && $this->progid($out)) { + return true; + } + + if (($char === '"' || $char === "'") && $this->string($out)) { + return true; + } + + if ($this->unit($out)) { + return true; + } + + // unicode range with wildcards + if ( + $this->literal('U+', 2) && + $this->match('\?+|([0-9A-F]+(\?+|(-[0-9A-F]+))?)', $m, false) + ) { + $unicode = explode('-', $m[0]); + if (strlen(reset($unicode)) <= 6 && strlen(end($unicode)) <= 6) { + $out = [Type::T_KEYWORD, 'U+' . $m[0]]; + + return true; + } + $this->count -= strlen($m[0]) + 2; + } + + if ($this->keyword($keyword, false)) { + if ($this->func($keyword, $out)) { + return true; + } + + $this->whitespace(); + + if ($keyword === 'null') { + $out = [Type::T_NULL]; + } else { + $out = [Type::T_KEYWORD, $keyword]; + } + + return true; + } + + return false; + } + + /** + * Parse parenthesized value + * + * @param array $out + * + * @return bool + */ + protected function parenValue(&$out) + { + $s = $this->count; + + $inParens = $this->inParens; + + if ($this->matchChar('(')) { + if ($this->matchChar(')')) { + $out = [Type::T_LIST, '', []]; + + return true; + } + + $this->inParens = true; + + if ( + $this->expression($exp) && + $this->matchChar(')') + ) { + $out = $exp; + $this->inParens = $inParens; + + return true; + } + } + + $this->inParens = $inParens; + $this->seek($s); + + return false; + } + + /** + * Parse "progid:" + * + * @param array $out + * + * @return bool + */ + protected function progid(&$out) + { + $s = $this->count; + + if ( + $this->literal('progid:', 7, false) && + $this->openString('(', $fn) && + $this->matchChar('(') + ) { + $this->openString(')', $args, '('); + + if ($this->matchChar(')')) { + $out = [Type::T_STRING, '', [ + 'progid:', $fn, '(', $args, ')' + ]]; + + return true; + } + } + + $this->seek($s); + + return false; + } + + /** + * Parse function call + * + * @param string $name + * @param array $func + * + * @return bool + */ + protected function func($name, &$func) + { + $s = $this->count; + + if ($this->matchChar('(')) { + if ($name === 'alpha' && $this->argumentList($args)) { + $func = [Type::T_FUNCTION, $name, [Type::T_STRING, '', $args]]; + + return true; + } + + if ($name !== 'expression' && ! preg_match('/^(-[a-z]+-)?calc$/', $name)) { + $ss = $this->count; + + if ( + $this->argValues($args) && + $this->matchChar(')') + ) { + $func = [Type::T_FUNCTION_CALL, $name, $args]; + + return true; + } + + $this->seek($ss); + } + + if ( + ($this->openString(')', $str, '(') || true) && + $this->matchChar(')') + ) { + $args = []; + + if (! empty($str)) { + $args[] = [null, [Type::T_STRING, '', [$str]]]; + } + + $func = [Type::T_FUNCTION_CALL, $name, $args]; + + return true; + } + } + + $this->seek($s); + + return false; + } + + /** + * Parse function call argument list + * + * @param array $out + * + * @return bool + */ + protected function argumentList(&$out) + { + $s = $this->count; + $this->matchChar('('); + + $args = []; + + while ($this->keyword($var)) { + if ( + $this->matchChar('=') && + $this->expression($exp) + ) { + $args[] = [Type::T_STRING, '', [$var . '=']]; + $arg = $exp; + } else { + break; + } + + $args[] = $arg; + + if (! $this->matchChar(',')) { + break; + } + + $args[] = [Type::T_STRING, '', [', ']]; + } + + if (! $this->matchChar(')') || ! $args) { + $this->seek($s); + + return false; + } + + $out = $args; + + return true; + } + + /** + * Parse mixin/function definition argument list + * + * @param array $out + * + * @return bool + */ + protected function argumentDef(&$out) + { + $s = $this->count; + $this->matchChar('('); + + $args = []; + + while ($this->variable($var)) { + $arg = [$var[1], null, false]; + + $ss = $this->count; + + if ( + $this->matchChar(':') && + $this->genericList($defaultVal, 'expression', '', true) + ) { + $arg[1] = $defaultVal; + } else { + $this->seek($ss); + } + + $ss = $this->count; + + if ($this->literal('...', 3)) { + $sss = $this->count; + + if (! $this->matchChar(')')) { + throw $this->parseError('... has to be after the final argument'); + } + + $arg[2] = true; + + $this->seek($sss); + } else { + $this->seek($ss); + } + + $args[] = $arg; + + if (! $this->matchChar(',')) { + break; + } + } + + if (! $this->matchChar(')')) { + $this->seek($s); + + return false; + } + + $out = $args; + + return true; + } + + /** + * Parse map + * + * @param array $out + * + * @return bool + */ + protected function map(&$out) + { + $s = $this->count; + + if (! $this->matchChar('(')) { + return false; + } + + $keys = []; + $values = []; + + while ( + $this->genericList($key, 'expression', '', true) && + $this->matchChar(':') && + $this->genericList($value, 'expression', '', true) + ) { + $keys[] = $key; + $values[] = $value; + + if (! $this->matchChar(',')) { + break; + } + } + + if (! $keys || ! $this->matchChar(')')) { + $this->seek($s); + + return false; + } + + $out = [Type::T_MAP, $keys, $values]; + + return true; + } + + /** + * Parse color + * + * @param array $out + * + * @return bool + */ + protected function color(&$out) + { + $s = $this->count; + + if ($this->match('(#([0-9a-f]+)\b)', $m)) { + if (\in_array(\strlen($m[2]), [3,4,6,8])) { + $out = [Type::T_KEYWORD, $m[0]]; + + return true; + } + + $this->seek($s); + + return false; + } + + return false; + } + + /** + * Parse number with unit + * + * @param array $unit + * + * @return bool + */ + protected function unit(&$unit) + { + $s = $this->count; + + if ($this->match('([0-9]*(\.)?[0-9]+)([%a-zA-Z]+)?', $m, false)) { + if (\strlen($this->buffer) === $this->count || ! ctype_digit($this->buffer[$this->count])) { + $this->whitespace(); + + $unit = new Node\Number($m[1], empty($m[3]) ? '' : $m[3]); + + return true; + } + + $this->seek($s); + } + + return false; + } + + /** + * Parse string + * + * @param array $out + * @param bool $keepDelimWithInterpolation + * + * @return bool + */ + protected function string(&$out, $keepDelimWithInterpolation = false) + { + $s = $this->count; + + if ($this->matchChar('"', false)) { + $delim = '"'; + } elseif ($this->matchChar("'", false)) { + $delim = "'"; + } else { + return false; + } + + $content = []; + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + $hasInterpolation = false; + + while ($this->matchString($m, $delim)) { + if ($m[1] !== '') { + $content[] = $m[1]; + } + + if ($m[2] === '#{') { + $this->count -= \strlen($m[2]); + + if ($this->interpolation($inter, false)) { + $content[] = $inter; + $hasInterpolation = true; + } else { + $this->count += \strlen($m[2]); + $content[] = '#{'; // ignore it + } + } elseif ($m[2] === "\r") { + $content[] = chr(10); + // TODO : warning + # DEPRECATION WARNING on line x, column y of zzz: + # Unescaped multiline strings are deprecated and will be removed in a future version of Sass. + # To include a newline in a string, use "\a" or "\a " as in CSS. + if ($this->matchChar("\n", false)) { + $content[] = ' '; + } + } elseif ($m[2] === '\\') { + if ( + $this->literal("\r\n", 2, false) || + $this->matchChar("\r", false) || + $this->matchChar("\n", false) || + $this->matchChar("\f", false) + ) { + // this is a continuation escaping, to be ignored + } elseif ($this->matchEscapeCharacter($c)) { + $content[] = $c; + } else { + throw $this->parseError('Unterminated escape sequence'); + } + } else { + $this->count -= \strlen($delim); + break; // delim + } + } + + $this->eatWhiteDefault = $oldWhite; + + if ($this->literal($delim, \strlen($delim))) { + if ($hasInterpolation && ! $keepDelimWithInterpolation) { + $delim = '"'; + } + + $out = [Type::T_STRING, $delim, $content]; + + return true; + } + + $this->seek($s); + + return false; + } + + /** + * @param string $out + * @param bool $inKeywords + * + * @return bool + */ + protected function matchEscapeCharacter(&$out, $inKeywords = false) + { + $s = $this->count; + if ($this->match('[a-f0-9]', $m, false)) { + $hex = $m[0]; + + for ($i = 5; $i--;) { + if ($this->match('[a-f0-9]', $m, false)) { + $hex .= $m[0]; + } else { + break; + } + } + + // CSS allows Unicode escape sequences to be followed by a delimiter space + // (necessary in some cases for shorter sequences to disambiguate their end) + $this->matchChar(' ', false); + + $value = hexdec($hex); + + if (!$inKeywords && ($value == 0 || ($value >= 0xD800 && $value <= 0xDFFF) || $value >= 0x10FFFF)) { + $out = "\xEF\xBF\xBD"; // "\u{FFFD}" but with a syntax supported on PHP 5 + } elseif ($value < 0x20) { + $out = Util::mbChr($value); + } else { + $out = Util::mbChr($value); + } + + return true; + } + + if ($this->match('.', $m, false)) { + if ($inKeywords && in_array($m[0], ["'",'"','@','&',' ','\\',':','/','%'])) { + $this->seek($s); + return false; + } + $out = $m[0]; + + return true; + } + + return false; + } + + /** + * Parse keyword or interpolation + * + * @param array $out + * @param bool $restricted + * + * @return bool + */ + protected function mixedKeyword(&$out, $restricted = false) + { + $parts = []; + + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + for (;;) { + if ($restricted ? $this->restrictedKeyword($key) : $this->keyword($key)) { + $parts[] = $key; + continue; + } + + if ($this->interpolation($inter)) { + $parts[] = $inter; + continue; + } + + break; + } + + $this->eatWhiteDefault = $oldWhite; + + if (! $parts) { + return false; + } + + if ($this->eatWhiteDefault) { + $this->whitespace(); + } + + $out = $parts; + + return true; + } + + /** + * Parse an unbounded string stopped by $end + * + * @param string $end + * @param array $out + * @param string $nestOpen + * @param string $nestClose + * @param bool $rtrim + * @param string $disallow + * + * @return bool + */ + protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null) + { + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + if ($nestOpen && ! $nestClose) { + $nestClose = $end; + } + + $patt = ($disallow ? '[^' . $this->pregQuote($disallow) . ']' : '.'); + $patt = '(' . $patt . '*?)([\'"]|#\{|' + . $this->pregQuote($end) . '|' + . (($nestClose && $nestClose !== $end) ? $this->pregQuote($nestClose) . '|' : '') + . static::$commentPattern . ')'; + + $nestingLevel = 0; + + $content = []; + + while ($this->match($patt, $m, false)) { + if (isset($m[1]) && $m[1] !== '') { + $content[] = $m[1]; + + if ($nestOpen) { + $nestingLevel += substr_count($m[1], $nestOpen); + } + } + + $tok = $m[2]; + + $this->count -= \strlen($tok); + + if ($tok === $end && ! $nestingLevel) { + break; + } + + if ($tok === $nestClose) { + $nestingLevel--; + } + + if (($tok === "'" || $tok === '"') && $this->string($str, true)) { + $content[] = $str; + continue; + } + + if ($tok === '#{' && $this->interpolation($inter)) { + $content[] = $inter; + continue; + } + + $content[] = $tok; + $this->count += \strlen($tok); + } + + $this->eatWhiteDefault = $oldWhite; + + if (! $content || $tok !== $end) { + return false; + } + + // trim the end + if ($rtrim && \is_string(end($content))) { + $content[\count($content) - 1] = rtrim(end($content)); + } + + $out = [Type::T_STRING, '', $content]; + + return true; + } + + /** + * Parser interpolation + * + * @param string|array $out + * @param bool $lookWhite save information about whitespace before and after + * + * @return bool + */ + protected function interpolation(&$out, $lookWhite = true) + { + $oldWhite = $this->eatWhiteDefault; + $allowVars = $this->allowVars; + $this->allowVars = true; + $this->eatWhiteDefault = true; + + $s = $this->count; + + if ( + $this->literal('#{', 2) && + $this->valueList($value) && + $this->matchChar('}', false) + ) { + if ($value === [Type::T_SELF]) { + $out = $value; + } else { + if ($lookWhite) { + $left = ($s > 0 && preg_match('/\s/', $this->buffer[$s - 1])) ? ' ' : ''; + $right = ( + ! empty($this->buffer[$this->count]) && + preg_match('/\s/', $this->buffer[$this->count]) + ) ? ' ' : ''; + } else { + $left = $right = false; + } + + $out = [Type::T_INTERPOLATE, $value, $left, $right]; + } + + $this->eatWhiteDefault = $oldWhite; + $this->allowVars = $allowVars; + + if ($this->eatWhiteDefault) { + $this->whitespace(); + } + + return true; + } + + $this->seek($s); + + $this->eatWhiteDefault = $oldWhite; + $this->allowVars = $allowVars; + + return false; + } + + /** + * Parse property name (as an array of parts or a string) + * + * @param array $out + * + * @return bool + */ + protected function propertyName(&$out) + { + $parts = []; + + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + for (;;) { + if ($this->interpolation($inter)) { + $parts[] = $inter; + continue; + } + + if ($this->keyword($text)) { + $parts[] = $text; + continue; + } + + if (! $parts && $this->match('[:.#]', $m, false)) { + // css hacks + $parts[] = $m[0]; + continue; + } + + break; + } + + $this->eatWhiteDefault = $oldWhite; + + if (! $parts) { + return false; + } + + // match comment hack + if (preg_match(static::$whitePattern, $this->buffer, $m, 0, $this->count)) { + if (! empty($m[0])) { + $parts[] = $m[0]; + $this->count += \strlen($m[0]); + } + } + + $this->whitespace(); // get any extra whitespace + + $out = [Type::T_STRING, '', $parts]; + + return true; + } + + /** + * Parse custom property name (as an array of parts or a string) + * + * @param array $out + * + * @return bool + */ + protected function customProperty(&$out) + { + $s = $this->count; + + if (! $this->literal('--', 2, false)) { + return false; + } + + $parts = ['--']; + + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + for (;;) { + if ($this->interpolation($inter)) { + $parts[] = $inter; + continue; + } + + if ($this->matchChar('&', false)) { + $parts[] = [Type::T_SELF]; + continue; + } + + if ($this->variable($var)) { + $parts[] = $var; + continue; + } + + if ($this->keyword($text)) { + $parts[] = $text; + continue; + } + + break; + } + + $this->eatWhiteDefault = $oldWhite; + + if (\count($parts) == 1) { + $this->seek($s); + + return false; + } + + $this->whitespace(); // get any extra whitespace + + $out = [Type::T_STRING, '', $parts]; + + return true; + } + + /** + * Parse comma separated selector list + * + * @param array $out + * @param string|bool $subSelector + * + * @return bool + */ + protected function selectors(&$out, $subSelector = false) + { + $s = $this->count; + $selectors = []; + + while ($this->selector($sel, $subSelector)) { + $selectors[] = $sel; + + if (! $this->matchChar(',', true)) { + break; + } + + while ($this->matchChar(',', true)) { + ; // ignore extra + } + } + + if (! $selectors) { + $this->seek($s); + + return false; + } + + $out = $selectors; + + return true; + } + + /** + * Parse whitespace separated selector list + * + * @param array $out + * @param string|bool $subSelector + * + * @return bool + */ + protected function selector(&$out, $subSelector = false) + { + $selector = []; + + $discardComments = $this->discardComments; + $this->discardComments = true; + + for (;;) { + $s = $this->count; + + if ($this->match('[>+~]+', $m, true)) { + if ( + $subSelector && \is_string($subSelector) && strpos($subSelector, 'nth-') === 0 && + $m[0] === '+' && $this->match("(\d+|n\b)", $counter) + ) { + $this->seek($s); + } else { + $selector[] = [$m[0]]; + continue; + } + } + + if ($this->selectorSingle($part, $subSelector)) { + $selector[] = $part; + $this->whitespace(); + continue; + } + + break; + } + + $this->discardComments = $discardComments; + + if (! $selector) { + return false; + } + + $out = $selector; + + return true; + } + + /** + * parsing escaped chars in selectors: + * - escaped single chars are kept escaped in the selector but in a normalized form + * (if not in 0-9a-f range as this would be ambigous) + * - other escaped sequences (multibyte chars or 0-9a-f) are kept in their initial escaped form, + * normalized to lowercase + * + * TODO: this is a fallback solution. Ideally escaped chars in selectors should be encoded as the genuine chars, + * and escaping added when printing in the Compiler, where/if it's mandatory + * - but this require a better formal selector representation instead of the array we have now + * + * @param string $out + * @param bool $keepEscapedNumber + * + * @return bool + */ + protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false) + { + $s_escape = $this->count; + if ($this->match('\\\\', $m)) { + $out = '\\' . $m[0]; + return true; + } + + if ($this->matchEscapeCharacter($escapedout, true)) { + if (strlen($escapedout) === 1) { + if (!preg_match(",\w,", $escapedout)) { + $out = '\\' . $escapedout; + return true; + } elseif (! $keepEscapedNumber || ! \is_numeric($escapedout)) { + $out = $escapedout; + return true; + } + } + $escape_sequence = rtrim(substr($this->buffer, $s_escape, $this->count - $s_escape)); + if (strlen($escape_sequence) < 6) { + $escape_sequence .= ' '; + } + $out = '\\' . strtolower($escape_sequence); + return true; + } + if ($this->match('\\S', $m)) { + $out = '\\' . $m[0]; + return true; + } + + + return false; + } + + /** + * Parse the parts that make up a selector + * + * {@internal + * div[yes=no]#something.hello.world:nth-child(-2n+1)%placeholder + * }} + * + * @param array $out + * @param string|bool $subSelector + * + * @return bool + */ + protected function selectorSingle(&$out, $subSelector = false) + { + $oldWhite = $this->eatWhiteDefault; + $this->eatWhiteDefault = false; + + $parts = []; + + if ($this->matchChar('*', false)) { + $parts[] = '*'; + } + + for (;;) { + if (! isset($this->buffer[$this->count])) { + break; + } + + $s = $this->count; + $char = $this->buffer[$this->count]; + + // see if we can stop early + if ($char === '{' || $char === ',' || $char === ';' || $char === '}' || $char === '@') { + break; + } + + // parsing a sub selector in () stop with the closing ) + if ($subSelector && $char === ')') { + break; + } + + //self + switch ($char) { + case '&': + $parts[] = Compiler::$selfSelector; + $this->count++; + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + continue 2; + + case '.': + $parts[] = '.'; + $this->count++; + continue 2; + + case '|': + $parts[] = '|'; + $this->count++; + continue 2; + } + + // handling of escaping in selectors : get the escaped char + if ($char === '\\') { + $this->count++; + if ($this->matchEscapeCharacterInSelector($escaped, true)) { + $parts[] = $escaped; + continue; + } + $this->count--; + } + + if ($char === '%') { + $this->count++; + + if ($this->placeholder($placeholder)) { + $parts[] = '%'; + $parts[] = $placeholder; + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + continue; + } + + break; + } + + if ($char === '#') { + if ($this->interpolation($inter)) { + $parts[] = $inter; + ! $this->cssOnly || $this->assertPlainCssValid(false, $s); + continue; + } + + $parts[] = '#'; + $this->count++; + continue; + } + + // a pseudo selector + if ($char === ':') { + if ($this->buffer[$this->count + 1] === ':') { + $this->count += 2; + $part = '::'; + } else { + $this->count++; + $part = ':'; + } + + if ($this->mixedKeyword($nameParts, true)) { + $parts[] = $part; + + foreach ($nameParts as $sub) { + $parts[] = $sub; + } + + $ss = $this->count; + + if ( + $nameParts === ['not'] || + $nameParts === ['is'] || + $nameParts === ['has'] || + $nameParts === ['where'] || + $nameParts === ['slotted'] || + $nameParts === ['nth-child'] || + $nameParts === ['nth-last-child'] || + $nameParts === ['nth-of-type'] || + $nameParts === ['nth-last-of-type'] + ) { + if ( + $this->matchChar('(', true) && + ($this->selectors($subs, reset($nameParts)) || true) && + $this->matchChar(')') + ) { + $parts[] = '('; + + while ($sub = array_shift($subs)) { + while ($ps = array_shift($sub)) { + foreach ($ps as &$p) { + $parts[] = $p; + } + + if (\count($sub) && reset($sub)) { + $parts[] = ' '; + } + } + + if (\count($subs) && reset($subs)) { + $parts[] = ', '; + } + } + + $parts[] = ')'; + } else { + $this->seek($ss); + } + } elseif ( + $this->matchChar('(', true) && + ($this->openString(')', $str, '(') || true) && + $this->matchChar(')') + ) { + $parts[] = '('; + + if (! empty($str)) { + $parts[] = $str; + } + + $parts[] = ')'; + } else { + $this->seek($ss); + } + + continue; + } + } + + $this->seek($s); + + // 2n+1 + if ($subSelector && \is_string($subSelector) && strpos($subSelector, 'nth-') === 0) { + if ($this->match("(\s*(\+\s*|\-\s*)?(\d+|n|\d+n))+", $counter)) { + $parts[] = $counter[0]; + //$parts[] = str_replace(' ', '', $counter[0]); + continue; + } + } + + $this->seek($s); + + // attribute selector + if ( + $char === '[' && + $this->matchChar('[') && + ($this->openString(']', $str, '[') || true) && + $this->matchChar(']') + ) { + $parts[] = '['; + + if (! empty($str)) { + $parts[] = $str; + } + + $parts[] = ']'; + continue; + } + + $this->seek($s); + + // for keyframes + if ($this->unit($unit)) { + $parts[] = $unit; + continue; + } + + if ($this->restrictedKeyword($name, false, true)) { + $parts[] = $name; + continue; + } + + break; + } + + $this->eatWhiteDefault = $oldWhite; + + if (! $parts) { + return false; + } + + $out = $parts; + + return true; + } + + /** + * Parse a variable + * + * @param array $out + * + * @return bool + */ + protected function variable(&$out) + { + $s = $this->count; + + if ( + $this->matchChar('$', false) && + $this->keyword($name) + ) { + if ($this->allowVars) { + $out = [Type::T_VARIABLE, $name]; + } else { + $out = [Type::T_KEYWORD, '$' . $name]; + } + + return true; + } + + $this->seek($s); + + return false; + } + + /** + * Parse a keyword + * + * @param string $word + * @param bool $eatWhitespace + * @param bool $inSelector + * + * @return bool + */ + protected function keyword(&$word, $eatWhitespace = null, $inSelector = false) + { + $s = $this->count; + $match = $this->match( + $this->utf8 + ? '(([\pL\w\x{00A0}-\x{10FFFF}_\-\*!"\']|\\\\[a-f0-9]{6} ?|\\\\[a-f0-9]{1,5}(?![a-f0-9]) ?|[\\\\].)([\pL\w\x{00A0}-\x{10FFFF}\-_"\']|\\\\[a-f0-9]{6} ?|\\\\[a-f0-9]{1,5}(?![a-f0-9]) ?|[\\\\].)*)' + : '(([\w_\-\*!"\']|\\\\[a-f0-9]{6} ?|\\\\[a-f0-9]{1,5}(?![a-f0-9]) ?|[\\\\].)([\w\-_"\']|\\\\[a-f0-9]{6} ?|\\\\[a-f0-9]{1,5}(?![a-f0-9]) ?|[\\\\].)*)', + $m, + false + ); + + if ($match) { + $word = $m[1]; + + // handling of escaping in keyword : get the escaped char + if (strpos($word, '\\') !== false) { + $send = $this->count; + $escapedWord = []; + $this->seek($s); + $previousEscape = false; + while ($this->count < $send) { + $char = $this->buffer[$this->count]; + $this->count++; + if ( + $this->count < $send + && $char === '\\' + && !$previousEscape + && ( + $inSelector ? + $this->matchEscapeCharacterInSelector($out) + : + $this->matchEscapeCharacter($out, true) + ) + ) { + $escapedWord[] = $out; + } else { + if ($previousEscape) { + $previousEscape = false; + } elseif ($char === '\\') { + $previousEscape = true; + } + $escapedWord[] = $char; + } + } + + $word = implode('', $escapedWord); + } + + if (is_null($eatWhitespace) ? $this->eatWhiteDefault : $eatWhitespace) { + $this->whitespace(); + } + + return true; + } + + return false; + } + + /** + * Parse a keyword that should not start with a number + * + * @param string $word + * @param bool $eatWhitespace + * @param bool $inSelector + * + * @return bool + */ + protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false) + { + $s = $this->count; + + if ($this->keyword($word, $eatWhitespace, $inSelector) && (\ord($word[0]) > 57 || \ord($word[0]) < 48)) { + return true; + } + + $this->seek($s); + + return false; + } + + /** + * Parse a placeholder + * + * @param string|array $placeholder + * + * @return bool + */ + protected function placeholder(&$placeholder) + { + $match = $this->match( + $this->utf8 + ? '([\pL\w\-_]+)' + : '([\w\-_]+)', + $m + ); + + if ($match) { + $placeholder = $m[1]; + + return true; + } + + if ($this->interpolation($placeholder)) { + return true; + } + + return false; + } + + /** + * Parse a url + * + * @param array $out + * + * @return bool + */ + protected function url(&$out) + { + if ($this->literal('url(', 4)) { + $s = $this->count; + + if ( + ($this->string($out) || $this->spaceList($out)) && + $this->matchChar(')') + ) { + $out = [Type::T_STRING, '', ['url(', $out, ')']]; + + return true; + } + + $this->seek($s); + + if ( + $this->openString(')', $out) && + $this->matchChar(')') + ) { + $out = [Type::T_STRING, '', ['url(', $out, ')']]; + + return true; + } + } + + return false; + } + + /** + * Consume an end of statement delimiter + * @param bool $eatWhitespace + * + * @return bool + */ + protected function end($eatWhitespace = null) + { + if ($this->matchChar(';', $eatWhitespace)) { + return true; + } + + if ($this->count === \strlen($this->buffer) || $this->buffer[$this->count] === '}') { + // if there is end of file or a closing block next then we don't need a ; + return true; + } + + return false; + } + + /** + * Strip assignment flag from the list + * + * @param array $value + * + * @return array + */ + protected function stripAssignmentFlags(&$value) + { + $flags = []; + + for ($token = &$value; $token[0] === Type::T_LIST && ($s = \count($token[2])); $token = &$lastNode) { + $lastNode = &$token[2][$s - 1]; + + while ($lastNode[0] === Type::T_KEYWORD && \in_array($lastNode[1], ['!default', '!global'])) { + array_pop($token[2]); + + $node = end($token[2]); + $token = $this->flattenList($token); + $flags[] = $lastNode[1]; + $lastNode = $node; + } + } + + return $flags; + } + + /** + * Strip optional flag from selector list + * + * @param array $selectors + * + * @return string + */ + protected function stripOptionalFlag(&$selectors) + { + $optional = false; + $selector = end($selectors); + $part = end($selector); + + if ($part === ['!optional']) { + array_pop($selectors[\count($selectors) - 1]); + + $optional = true; + } + + return $optional; + } + + /** + * Turn list of length 1 into value type + * + * @param array $value + * + * @return array + */ + protected function flattenList($value) + { + if ($value[0] === Type::T_LIST && \count($value[2]) === 1) { + return $this->flattenList($value[2][0]); + } + + return $value; + } + + /** + * Quote regular expression + * + * @param string $what + * + * @return string + */ + private function pregQuote($what) + { + return preg_quote($what, '/'); + } + + /** + * Extract line numbers from buffer + * + * @param string $buffer + */ + private function extractLineNumbers($buffer) + { + $this->sourcePositions = [0 => 0]; + $prev = 0; + + while (($pos = strpos($buffer, "\n", $prev)) !== false) { + $this->sourcePositions[] = $pos; + $prev = $pos + 1; + } + + $this->sourcePositions[] = \strlen($buffer); + + if (substr($buffer, -1) !== "\n") { + $this->sourcePositions[] = \strlen($buffer) + 1; + } + } + + /** + * Get source line number and column (given character position in the buffer) + * + * @param int $pos + * + * @return array + */ + private function getSourcePosition($pos) + { + $low = 0; + $high = \count($this->sourcePositions); + + while ($low < $high) { + $mid = (int) (($high + $low) / 2); + + if ($pos < $this->sourcePositions[$mid]) { + $high = $mid - 1; + continue; + } + + if ($pos >= $this->sourcePositions[$mid + 1]) { + $low = $mid + 1; + continue; + } + + return [$mid + 1, $pos - $this->sourcePositions[$mid]]; + } + + return [$low + 1, $pos - $this->sourcePositions[$low]]; + } + + /** + * Save internal encoding of mbstring + * + * When mbstring.func_overload is used to replace the standard PHP string functions, + * this method configures the internal encoding to a single-byte one so that the + * behavior matches the normal behavior of PHP string functions while using the parser. + * The existing internal encoding is saved and will be restored when calling {@see restoreEncoding}. + * + * If mbstring.func_overload is not used (or does not override string functions), this method is a no-op. + * + * @return void + */ + private function saveEncoding() + { + if (\PHP_VERSION_ID < 80000 && \extension_loaded('mbstring') && (2 & (int) ini_get('mbstring.func_overload')) > 0) { + $this->encoding = mb_internal_encoding(); + + mb_internal_encoding('iso-8859-1'); + } + } + + /** + * Restore internal encoding + * + * @return void + */ + private function restoreEncoding() + { + if (\extension_loaded('mbstring') && $this->encoding) { + mb_internal_encoding($this->encoding); + } + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/Base64.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/Base64.php new file mode 100644 index 00000000..00b6b454 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/Base64.php @@ -0,0 +1,187 @@ + + * + * @internal + */ +class Base64 +{ + /** + * @var array + */ + private static $encodingMap = [ + 0 => 'A', + 1 => 'B', + 2 => 'C', + 3 => 'D', + 4 => 'E', + 5 => 'F', + 6 => 'G', + 7 => 'H', + 8 => 'I', + 9 => 'J', + 10 => 'K', + 11 => 'L', + 12 => 'M', + 13 => 'N', + 14 => 'O', + 15 => 'P', + 16 => 'Q', + 17 => 'R', + 18 => 'S', + 19 => 'T', + 20 => 'U', + 21 => 'V', + 22 => 'W', + 23 => 'X', + 24 => 'Y', + 25 => 'Z', + 26 => 'a', + 27 => 'b', + 28 => 'c', + 29 => 'd', + 30 => 'e', + 31 => 'f', + 32 => 'g', + 33 => 'h', + 34 => 'i', + 35 => 'j', + 36 => 'k', + 37 => 'l', + 38 => 'm', + 39 => 'n', + 40 => 'o', + 41 => 'p', + 42 => 'q', + 43 => 'r', + 44 => 's', + 45 => 't', + 46 => 'u', + 47 => 'v', + 48 => 'w', + 49 => 'x', + 50 => 'y', + 51 => 'z', + 52 => '0', + 53 => '1', + 54 => '2', + 55 => '3', + 56 => '4', + 57 => '5', + 58 => '6', + 59 => '7', + 60 => '8', + 61 => '9', + 62 => '+', + 63 => '/', + ]; + + /** + * @var array + */ + private static $decodingMap = [ + 'A' => 0, + 'B' => 1, + 'C' => 2, + 'D' => 3, + 'E' => 4, + 'F' => 5, + 'G' => 6, + 'H' => 7, + 'I' => 8, + 'J' => 9, + 'K' => 10, + 'L' => 11, + 'M' => 12, + 'N' => 13, + 'O' => 14, + 'P' => 15, + 'Q' => 16, + 'R' => 17, + 'S' => 18, + 'T' => 19, + 'U' => 20, + 'V' => 21, + 'W' => 22, + 'X' => 23, + 'Y' => 24, + 'Z' => 25, + 'a' => 26, + 'b' => 27, + 'c' => 28, + 'd' => 29, + 'e' => 30, + 'f' => 31, + 'g' => 32, + 'h' => 33, + 'i' => 34, + 'j' => 35, + 'k' => 36, + 'l' => 37, + 'm' => 38, + 'n' => 39, + 'o' => 40, + 'p' => 41, + 'q' => 42, + 'r' => 43, + 's' => 44, + 't' => 45, + 'u' => 46, + 'v' => 47, + 'w' => 48, + 'x' => 49, + 'y' => 50, + 'z' => 51, + 0 => 52, + 1 => 53, + 2 => 54, + 3 => 55, + 4 => 56, + 5 => 57, + 6 => 58, + 7 => 59, + 8 => 60, + 9 => 61, + '+' => 62, + '/' => 63, + ]; + + /** + * Convert to base64 + * + * @param int $value + * + * @return string + */ + public static function encode($value) + { + return self::$encodingMap[$value]; + } + + /** + * Convert from base64 + * + * @param string $value + * + * @return int + */ + public static function decode($value) + { + return self::$decodingMap[$value]; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php new file mode 100644 index 00000000..2a5210c6 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/Base64VLQ.php @@ -0,0 +1,151 @@ + + * @author Anthon Pang + * + * @internal + */ +class Base64VLQ +{ + // A Base64 VLQ digit can represent 5 bits, so it is base-32. + const VLQ_BASE_SHIFT = 5; + + // A mask of bits for a VLQ digit (11111), 31 decimal. + const VLQ_BASE_MASK = 31; + + // The continuation bit is the 6th bit. + const VLQ_CONTINUATION_BIT = 32; + + /** + * Returns the VLQ encoded value. + * + * @param int $value + * + * @return string + */ + public static function encode($value) + { + $encoded = ''; + $vlq = self::toVLQSigned($value); + + do { + $digit = $vlq & self::VLQ_BASE_MASK; + + //$vlq >>>= self::VLQ_BASE_SHIFT; // unsigned right shift + $vlq = (($vlq >> 1) & PHP_INT_MAX) >> (self::VLQ_BASE_SHIFT - 1); + + if ($vlq > 0) { + $digit |= self::VLQ_CONTINUATION_BIT; + } + + $encoded .= Base64::encode($digit); + } while ($vlq > 0); + + return $encoded; + } + + /** + * Decodes VLQValue. + * + * @param string $str + * @param int $index + * + * @return int + */ + public static function decode($str, &$index) + { + $result = 0; + $shift = 0; + + do { + $c = $str[$index++]; + $digit = Base64::decode($c); + $continuation = ($digit & self::VLQ_CONTINUATION_BIT) != 0; + $digit &= self::VLQ_BASE_MASK; + $result = $result + ($digit << $shift); + $shift = $shift + self::VLQ_BASE_SHIFT; + } while ($continuation); + + return self::fromVLQSigned($result); + } + + /** + * Converts from a two-complement value to a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + * + * @param int $value + * + * @return int + */ + private static function toVLQSigned($value) + { + if ($value < 0) { + return ((-$value) << 1) + 1; + } + + return ($value << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + * + * @param int $value + * + * @return int + */ + private static function fromVLQSigned($value) + { + $negate = ($value & 1) === 1; + + //$value >>>= 1; // unsigned right shift + $value = ($value >> 1) & PHP_INT_MAX; + + if (! $negate) { + return $value; + } + + // We need to OR 0x80000000 here to ensure the 32nd bit (the sign bit) is + // always set for negative numbers. If `value` were 1, (meaning `negate` is + // true and all other bits were zeros), `value` would now be 0. -0 is just + // 0, and doesn't flip the 32nd bit as intended. All positive numbers will + // successfully flip the 32nd bit without issue, so it's a noop for them. + return -$value | 0x80000000; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php new file mode 100644 index 00000000..65dc24da --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php @@ -0,0 +1,381 @@ + + * @author Nicolas FRANÇOIS + * + * @internal + */ +class SourceMapGenerator +{ + /** + * What version of source map does the generator generate? + */ + const VERSION = 3; + + /** + * Array of default options + * + * @var array + * @phpstan-var array{sourceRoot: string, sourceMapFilename: string|null, sourceMapURL: string|null, sourceMapWriteTo: string|null, outputSourceFiles: bool, sourceMapRootpath: string, sourceMapBasepath: string} + */ + protected $defaultOptions = [ + // an optional source root, useful for relocating source files + // on a server or removing repeated values in the 'sources' entry. + // This value is prepended to the individual entries in the 'source' field. + 'sourceRoot' => '', + + // an optional name of the generated code that this source map is associated with. + 'sourceMapFilename' => null, + + // url of the map + 'sourceMapURL' => null, + + // absolute path to a file to write the map to + 'sourceMapWriteTo' => null, + + // output source contents? + 'outputSourceFiles' => false, + + // base path for filename normalization + 'sourceMapRootpath' => '', + + // base path for filename normalization + 'sourceMapBasepath' => '' + ]; + + /** + * The base64 VLQ encoder + * + * @var \ScssPhp\ScssPhp\SourceMap\Base64VLQ + */ + protected $encoder; + + /** + * Array of mappings + * + * @var array + * @phpstan-var list + */ + protected $mappings = []; + + /** + * Array of contents map + * + * @var array + */ + protected $contentsMap = []; + + /** + * File to content map + * + * @var array + */ + protected $sources = []; + + /** + * @var array + */ + protected $sourceKeys = []; + + /** + * @var array + * @phpstan-var array{sourceRoot: string, sourceMapFilename: string|null, sourceMapURL: string|null, sourceMapWriteTo: string|null, outputSourceFiles: bool, sourceMapRootpath: string, sourceMapBasepath: string} + */ + private $options; + + /** + * @phpstan-param array{sourceRoot?: string, sourceMapFilename?: string|null, sourceMapURL?: string|null, sourceMapWriteTo?: string|null, outputSourceFiles?: bool, sourceMapRootpath?: string, sourceMapBasepath?: string} $options + */ + public function __construct(array $options = []) + { + $this->options = array_merge($this->defaultOptions, $options); + $this->encoder = new Base64VLQ(); + } + + /** + * Adds a mapping + * + * @param int $generatedLine The line number in generated file + * @param int $generatedColumn The column number in generated file + * @param int $originalLine The line number in original file + * @param int $originalColumn The column number in original file + * @param string $sourceFile The original source file + * + * @return void + */ + public function addMapping($generatedLine, $generatedColumn, $originalLine, $originalColumn, $sourceFile) + { + $this->mappings[] = [ + 'generated_line' => $generatedLine, + 'generated_column' => $generatedColumn, + 'original_line' => $originalLine, + 'original_column' => $originalColumn, + 'source_file' => $sourceFile + ]; + + $this->sources[$sourceFile] = $sourceFile; + } + + /** + * Saves the source map to a file + * + * @param string $content The content to write + * + * @return string + * + * @throws \ScssPhp\ScssPhp\Exception\CompilerException If the file could not be saved + * @deprecated + */ + public function saveMap($content) + { + $file = $this->options['sourceMapWriteTo']; + $dir = \dirname($file); + + // directory does not exist + if (! is_dir($dir)) { + // FIXME: create the dir automatically? + throw new CompilerException( + sprintf('The directory "%s" does not exist. Cannot save the source map.', $dir) + ); + } + + // FIXME: proper saving, with dir write check! + if (file_put_contents($file, $content) === false) { + throw new CompilerException(sprintf('Cannot save the source map to "%s"', $file)); + } + + return $this->options['sourceMapURL']; + } + + /** + * Generates the JSON source map + * + * @param string $prefix A prefix added in the output file, which needs to shift mappings + * + * @return string + * + * @see https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit# + */ + public function generateJson($prefix = '') + { + $sourceMap = []; + $mappings = $this->generateMappings($prefix); + + // File version (always the first entry in the object) and must be a positive integer. + $sourceMap['version'] = self::VERSION; + + // An optional name of the generated code that this source map is associated with. + $file = $this->options['sourceMapFilename']; + + if ($file) { + $sourceMap['file'] = $file; + } + + // An optional source root, useful for relocating source files on a server or removing repeated values in the + // 'sources' entry. This value is prepended to the individual entries in the 'source' field. + $root = $this->options['sourceRoot']; + + if ($root) { + $sourceMap['sourceRoot'] = $root; + } + + // A list of original sources used by the 'mappings' entry. + $sourceMap['sources'] = []; + + foreach ($this->sources as $sourceUri => $sourceFilename) { + $sourceMap['sources'][] = $this->normalizeFilename($sourceFilename); + } + + // A list of symbol names used by the 'mappings' entry. + $sourceMap['names'] = []; + + // A string with the encoded mapping data. + $sourceMap['mappings'] = $mappings; + + if ($this->options['outputSourceFiles']) { + // An optional list of source content, useful when the 'source' can't be hosted. + // The contents are listed in the same order as the sources above. + // 'null' may be used if some original sources should be retrieved by name. + $sourceMap['sourcesContent'] = $this->getSourcesContent(); + } + + // less.js compat fixes + if (\count($sourceMap['sources']) && empty($sourceMap['sourceRoot'])) { + unset($sourceMap['sourceRoot']); + } + + return json_encode($sourceMap, JSON_UNESCAPED_SLASHES); + } + + /** + * Returns the sources contents + * + * @return string[]|null + */ + protected function getSourcesContent() + { + if (empty($this->sources)) { + return null; + } + + $content = []; + + foreach ($this->sources as $sourceFile) { + $content[] = file_get_contents($sourceFile); + } + + return $content; + } + + /** + * Generates the mappings string + * + * @param string $prefix A prefix added in the output file, which needs to shift mappings + * + * @return string + */ + public function generateMappings($prefix = '') + { + if (! \count($this->mappings)) { + return ''; + } + + $prefixLines = substr_count($prefix, "\n"); + $lastPrefixNewLine = strrpos($prefix, "\n"); + $lastPrefixLineStart = false === $lastPrefixNewLine ? 0 : $lastPrefixNewLine + 1; + $prefixColumn = strlen($prefix) - $lastPrefixLineStart; + + $this->sourceKeys = array_flip(array_keys($this->sources)); + + // group mappings by generated line number. + $groupedMap = $groupedMapEncoded = []; + + foreach ($this->mappings as $m) { + $groupedMap[$m['generated_line']][] = $m; + } + + ksort($groupedMap); + + $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0; + + foreach ($groupedMap as $lineNumber => $lineMap) { + if ($lineNumber > 1) { + // The prefix only impacts the column for the first line of the original output + $prefixColumn = 0; + } + $lineNumber += $prefixLines; + + while (++$lastGeneratedLine < $lineNumber) { + $groupedMapEncoded[] = ';'; + } + + $lineMapEncoded = []; + $lastGeneratedColumn = 0; + + foreach ($lineMap as $m) { + $generatedColumn = $m['generated_column'] + $prefixColumn; + + $mapEncoded = $this->encoder->encode($generatedColumn - $lastGeneratedColumn); + $lastGeneratedColumn = $generatedColumn; + + // find the index + if ($m['source_file']) { + $index = $this->findFileIndex($m['source_file']); + + if ($index !== false) { + $mapEncoded .= $this->encoder->encode($index - $lastOriginalIndex); + $lastOriginalIndex = $index; + // lines are stored 0-based in SourceMap spec version 3 + $mapEncoded .= $this->encoder->encode($m['original_line'] - 1 - $lastOriginalLine); + $lastOriginalLine = $m['original_line'] - 1; + $mapEncoded .= $this->encoder->encode($m['original_column'] - $lastOriginalColumn); + $lastOriginalColumn = $m['original_column']; + } + } + + $lineMapEncoded[] = $mapEncoded; + } + + $groupedMapEncoded[] = implode(',', $lineMapEncoded) . ';'; + } + + return rtrim(implode($groupedMapEncoded), ';'); + } + + /** + * Finds the index for the filename + * + * @param string $filename + * + * @return int|false + */ + protected function findFileIndex($filename) + { + return $this->sourceKeys[$filename]; + } + + /** + * Normalize filename + * + * @param string $filename + * + * @return string + */ + protected function normalizeFilename($filename) + { + $filename = $this->fixWindowsPath($filename); + $rootpath = $this->options['sourceMapRootpath']; + $basePath = $this->options['sourceMapBasepath']; + + // "Trim" the 'sourceMapBasepath' from the output filename. + if (\strlen($basePath) && strpos($filename, $basePath) === 0) { + $filename = substr($filename, \strlen($basePath)); + } + + // Remove extra leading path separators. + if (strpos($filename, '\\') === 0 || strpos($filename, '/') === 0) { + $filename = substr($filename, 1); + } + + return $rootpath . $filename; + } + + /** + * Fix windows paths + * + * @param string $path + * @param bool $addEndSlash + * + * @return string + */ + public function fixWindowsPath($path, $addEndSlash = false) + { + $slash = ($addEndSlash) ? '/' : ''; + + if (! empty($path)) { + $path = str_replace('\\', '/', $path); + $path = rtrim($path, '/') . $slash; + } + + return $path; + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Type.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Type.php new file mode 100644 index 00000000..d4308878 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Type.php @@ -0,0 +1,208 @@ + + */ +class Type +{ + /** + * @internal + */ + const T_ASSIGN = 'assign'; + /** + * @internal + */ + const T_AT_ROOT = 'at-root'; + /** + * @internal + */ + const T_BLOCK = 'block'; + /** + * @deprecated + * @internal + */ + const T_BREAK = 'break'; + /** + * @internal + */ + const T_CHARSET = 'charset'; + const T_COLOR = 'color'; + /** + * @internal + */ + const T_COMMENT = 'comment'; + /** + * @deprecated + * @internal + */ + const T_CONTINUE = 'continue'; + /** + * @deprecated + * @internal + */ + const T_CONTROL = 'control'; + /** + * @internal + */ + const T_CUSTOM_PROPERTY = 'custom'; + /** + * @internal + */ + const T_DEBUG = 'debug'; + /** + * @internal + */ + const T_DIRECTIVE = 'directive'; + /** + * @internal + */ + const T_EACH = 'each'; + /** + * @internal + */ + const T_ELSE = 'else'; + /** + * @internal + */ + const T_ELSEIF = 'elseif'; + /** + * @internal + */ + const T_ERROR = 'error'; + /** + * @internal + */ + const T_EXPRESSION = 'exp'; + /** + * @internal + */ + const T_EXTEND = 'extend'; + /** + * @internal + */ + const T_FOR = 'for'; + const T_FUNCTION = 'function'; + /** + * @internal + */ + const T_FUNCTION_REFERENCE = 'function-reference'; + /** + * @internal + */ + const T_FUNCTION_CALL = 'fncall'; + /** + * @internal + */ + const T_HSL = 'hsl'; + /** + * @internal + */ + const T_HWB = 'hwb'; + /** + * @internal + */ + const T_IF = 'if'; + /** + * @internal + */ + const T_IMPORT = 'import'; + /** + * @internal + */ + const T_INCLUDE = 'include'; + /** + * @internal + */ + const T_INTERPOLATE = 'interpolate'; + /** + * @internal + */ + const T_INTERPOLATED = 'interpolated'; + /** + * @internal + */ + const T_KEYWORD = 'keyword'; + const T_LIST = 'list'; + const T_MAP = 'map'; + /** + * @internal + */ + const T_MEDIA = 'media'; + /** + * @internal + */ + const T_MEDIA_EXPRESSION = 'mediaExp'; + /** + * @internal + */ + const T_MEDIA_TYPE = 'mediaType'; + /** + * @internal + */ + const T_MEDIA_VALUE = 'mediaValue'; + /** + * @internal + */ + const T_MIXIN = 'mixin'; + /** + * @internal + */ + const T_MIXIN_CONTENT = 'mixin_content'; + /** + * @internal + */ + const T_NESTED_PROPERTY = 'nestedprop'; + /** + * @internal + */ + const T_NOT = 'not'; + const T_NULL = 'null'; + const T_NUMBER = 'number'; + /** + * @internal + */ + const T_RETURN = 'return'; + /** + * @internal + */ + const T_ROOT = 'root'; + /** + * @internal + */ + const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once'; + /** + * @internal + */ + const T_SELF = 'self'; + const T_STRING = 'string'; + /** + * @internal + */ + const T_UNARY = 'unary'; + /** + * @internal + */ + const T_VARIABLE = 'var'; + /** + * @internal + */ + const T_WARN = 'warn'; + /** + * @internal + */ + const T_WHILE = 'while'; +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Util.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Util.php new file mode 100644 index 00000000..ad608ceb --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Util.php @@ -0,0 +1,184 @@ + + * + * @internal + */ +class Util +{ + /** + * Asserts that `value` falls within `range` (inclusive), leaving + * room for slight floating-point errors. + * + * @param string $name The name of the value. Used in the error message. + * @param Range $range Range of values. + * @param array|Number $value The value to check. + * @param string $unit The unit of the value. Used in error reporting. + * + * @return mixed `value` adjusted to fall within range, if it was outside by a floating-point margin. + * + * @throws \ScssPhp\ScssPhp\Exception\RangeException + */ + public static function checkRange($name, Range $range, $value, $unit = '') + { + $val = $value[1]; + $grace = new Range(-0.00001, 0.00001); + + if (! \is_numeric($val)) { + throw new RangeException("$name {$val} is not a number."); + } + + if ($range->includes($val)) { + return $val; + } + + if ($grace->includes($val - $range->first)) { + return $range->first; + } + + if ($grace->includes($val - $range->last)) { + return $range->last; + } + + throw new RangeException("$name {$val} must be between {$range->first} and {$range->last}$unit"); + } + + /** + * Encode URI component + * + * @param string $string + * + * @return string + */ + public static function encodeURIComponent($string) + { + $revert = ['%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')']; + + return strtr(rawurlencode($string), $revert); + } + + /** + * mb_chr() wrapper + * + * @param int $code + * + * @return string + */ + public static function mbChr($code) + { + // Use the native implementation if available, but not on PHP 7.2 as mb_chr(0) is buggy there + if (\PHP_VERSION_ID > 70300 && \function_exists('mb_chr')) { + return mb_chr($code, 'UTF-8'); + } + + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6) . \chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12) . \chr(0x80 | $code >> 6 & 0x3F) . \chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18) . \chr(0x80 | $code >> 12 & 0x3F) + . \chr(0x80 | $code >> 6 & 0x3F) . \chr(0x80 | $code & 0x3F); + } + + return $s; + } + + /** + * mb_strlen() wrapper + * + * @param string $string + * @return int + */ + public static function mbStrlen($string) + { + // Use the native implementation if available. + if (\function_exists('mb_strlen')) { + return mb_strlen($string, 'UTF-8'); + } + + if (\function_exists('iconv_strlen')) { + return (int) @iconv_strlen($string, 'UTF-8'); + } + + throw new \LogicException('Either mbstring (recommended) or iconv is necessary to use Scssphp.'); + } + + /** + * mb_substr() wrapper + * @param string $string + * @param int $start + * @param null|int $length + * @return string + */ + public static function mbSubstr($string, $start, $length = null) + { + // Use the native implementation if available. + if (\function_exists('mb_substr')) { + return mb_substr($string, $start, $length, 'UTF-8'); + } + + if (\function_exists('iconv_substr')) { + if ($start < 0) { + $start = static::mbStrlen($string) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = static::mbStrlen($string) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string)iconv_substr($string, $start, $length, 'UTF-8'); + } + + throw new \LogicException('Either mbstring (recommended) or iconv is necessary to use Scssphp.'); + } + + /** + * mb_strpos wrapper + * @param string $haystack + * @param string $needle + * @param int $offset + * + * @return int|false + */ + public static function mbStrpos($haystack, $needle, $offset = 0) + { + if (\function_exists('mb_strpos')) { + return mb_strpos($haystack, $needle, $offset, 'UTF-8'); + } + + if (\function_exists('iconv_strpos')) { + return iconv_strpos($haystack, $needle, $offset, 'UTF-8'); + } + + throw new \LogicException('Either mbstring (recommended) or iconv is necessary to use Scssphp.'); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Util/Path.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Util/Path.php new file mode 100644 index 00000000..f399e41a --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Util/Path.php @@ -0,0 +1,77 @@ +parseValue($source, $value)) { + throw new \InvalidArgumentException(sprintf('Invalid value source "%s".', $source)); + } + + return $value; + } + + /** + * Converts a PHP value to a Sass value + * + * The returned value is guaranteed to be supported by the + * Compiler methods for registering custom variables. No other + * guarantee about it is provided. It should be considered + * opaque values by the caller. + * + * @param mixed $value + * + * @return mixed + */ + public static function fromPhp($value) + { + if ($value instanceof Number) { + return $value; + } + + if (is_array($value) && isset($value[0]) && \in_array($value[0], [Type::T_NULL, Type::T_COLOR, Type::T_KEYWORD, Type::T_LIST, Type::T_MAP, Type::T_STRING])) { + return $value; + } + + if ($value === null) { + return Compiler::$null; + } + + if ($value === true) { + return Compiler::$true; + } + + if ($value === false) { + return Compiler::$false; + } + + if ($value === '') { + return Compiler::$emptyString; + } + + if (\is_int($value) || \is_float($value)) { + return new Number($value, ''); + } + + if (\is_string($value)) { + return [Type::T_STRING, '"', [$value]]; + } + + throw new \InvalidArgumentException(sprintf('Cannot convert the value of type "%s" to a Sass value.', gettype($value))); + } +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Version.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Version.php new file mode 100644 index 00000000..f8d72847 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Version.php @@ -0,0 +1,23 @@ + + */ +class Version +{ + const VERSION = '1.10.0'; +} diff --git a/dev/plugins/admin/vendor/scssphp/scssphp/src/Warn.php b/dev/plugins/admin/vendor/scssphp/scssphp/src/Warn.php new file mode 100644 index 00000000..592b44c7 --- /dev/null +++ b/dev/plugins/admin/vendor/scssphp/scssphp/src/Warn.php @@ -0,0 +1,84 @@ + + + + + + \ No newline at end of file diff --git a/dev/plugins/anchors/CHANGELOG.md b/dev/plugins/anchors/CHANGELOG.md new file mode 100644 index 00000000..d5ada54b --- /dev/null +++ b/dev/plugins/anchors/CHANGELOG.md @@ -0,0 +1,65 @@ +# v1.6.0 +## 11/24/2021 + +1. [](#new) + * Added new option `copy_to_clipboard` to automatically copy the link to clipboard +2. [](#improved) + * Removed reliance on `JQuery` for DOM ready check + * Updated `anchors.js` to version 4.3.1 + +# v1.5.4 +## 12/02/2020 + +1. [](#improved) + * Updated `anchors.js` to version 4.3.0 + * Requires Grav 1.6 + +# v1.5.3 +## 03/30/2019 + +1. [](#improved) + * Updated `anchors.js` to version 4.2.0 + * Improved documentation + +# v1.5.2 +## 09/28/2017 + +1. [](#improved) + * Updated `anchors.js` to version 4.1.0 + +# v1.5.1 +## 07/14/2016 + +1. [](#improved) + * Translate some blueprint options + +# v1.5.0 +## 01/06/2016 + +1. [](#improved) + * Disable anchors in Admin + +# v1.4.0 +## 08/25/2015 + +1. [](#improved) + * Added blueprints for Grav Admin plugin + +# v1.3.0 +## 07/20/2015 + +1. [](#new) + * Updated `anchors.js` to version 1.2.1 + * Added new options such as 'placement', 'visible', 'icon' and 'class' + +# v1.2.0 +## 03/01/2015 + +1. [](#new) + * Updated `anchors.js` to version 0.3.0 + +# v1.1.0 +## 11/30/2014 + +1. [](#new) + * ChangeLog started... diff --git a/dev/plugins/anchors/LICENSE b/dev/plugins/anchors/LICENSE new file mode 100644 index 00000000..484793ad --- /dev/null +++ b/dev/plugins/anchors/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Grav + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dev/plugins/anchors/README.md b/dev/plugins/anchors/README.md new file mode 100644 index 00000000..cb615da6 --- /dev/null +++ b/dev/plugins/anchors/README.md @@ -0,0 +1,106 @@ +# Grav Anchors Plugin + + +`anchors` is a [Grav](http://github.com/getgrav/grav) plugin that provides automatic header anchors via the [anchorjs](http://bryanbraun.github.io/anchorjs) Vanilla JS plugin. + +# Installation + +## GPM Installation (Preferred) + +The simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). From the root of your Grav install type: + + bin/gpm install anchors + +## Manual Installation + +If for some reason you can't use GPM you can manually install this plugin. Download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `anchors`. + +You should now have all the plugin files under + + /your/site/grav/user/plugins/anchors + +# Usage + +To best understand how Anchors works, you should read through the original [project documentation](https://github.com/bryanbraun/anchorjs). + +## Show Menu of Anchors + +If you want to use the generated links to also generate a menu from these anchors, just put the function below in the template file Twig: + +``` +{{ anchors(content, tag, terms) }} +``` + +The function accepts 3 parameters: + +* **content:** this parameter is the content of the page in which the function will search for all content and separate only the tags and their contents defined by the second parameter. E.g. `page.content` +* **tag:** this parameter will be the string of the tag used to make the menu. E.g. `h2` +* **terms:** this parameter is to exclude terms that you do not wish to include in the menu formation that is between the tag passed in the second parameter. The value passed is a string separated by comma to identify each term. Ex: `title 01, title 02` + +For example: + +``` +{{ anchors(page.content, 'h2') }} +``` + +When rendered the function will return a formed HTML with `
    ` and the links of the anchors in each `
  • `. + +## Configuration: + +Simply copy the `user/plugins/breadcrumbs/anchors.yaml` into `user/config/plugins/anchors.yaml` and make your modifications. + + enabled: true # enable or disable the plugin + active: true # active by default, if false then you must activate per-page + selectors: 'h1,h2,h3,h4' # css elements to activate on. Uses jQuery style selectors + placement: right # either "left" or "right" + visible: hover # Active on "hover" or "always" visible + icon: # default link or a specific character like: #, ¶, â¡, and §. + class: # adds the provided class to the anchor html + truncate: 64 # truncates the generated ID to the specified character length + +You can override any default settings from the page headers: + +eg: + + --- + title: Sample Code With Custom Theme + anchors: + active: true + selectors: .blog h1, .blog h2 + --- + + # Header + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas accumsan porta diam, + nec sagittis odio euismod nec. Etiam eu rutrum eros. + + ## Sub Header + + Proin commodo lobortis elementum. + Integer vel ultrices massa, nec ornare urna. Phasellus tincidunt rutrum dolor, vestibulum + faucibus ligula laoreet id. Donec hendrerit arcu vitae lacus mattis facilisis. Praesent + tortor nibh, pulvinar nec orci ac, rhoncus pharetra nunc. + + +You can also disable anchors for a particular page if causes issues: + + --- + title: Sample Code with Highlight disabled + anchors: + active: false + --- + + # Header + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas accumsan porta diam, + nec sagittis odio euismod nec. Etiam eu rutrum eros. + + ## Sub Header + + Proin commodo lobortis elementum. + Integer vel ultrices massa, nec ornare urna. Phasellus tincidunt rutrum dolor, vestibulum + faucibus ligula laoreet id. Donec hendrerit arcu vitae lacus mattis facilisis. Praesent + tortor nibh, pulvinar nec orci ac, rhoncus pharetra nunc. + + +> Note: If you want to see this plugin in action, have a look at [Grav Learn Site](http://learn.getgrav.org) diff --git a/dev/plugins/anchors/anchors.php b/dev/plugins/anchors/anchors.php new file mode 100644 index 00000000..45d4797e --- /dev/null +++ b/dev/plugins/anchors/anchors.php @@ -0,0 +1,109 @@ + ['onPluginsInitialized', 0] + ]; + } + + /** + * Initialize configuration + */ + public function onPluginsInitialized() + { + if ($this->isAdmin()) { + $this->active = false; + } else { + $this->enable([ + 'onPageInitialized' => ['onPageInitialized', 0], + 'onTwigSiteVariables' => ['onTwigSiteVariables', 0], + 'onTwigExtensions' => ['onTwigExtensions', 0] + ]); + } + } + + public function onTwigExtensions() + { + $config = $this->config->get('plugins.anchors.selectors'); + require_once(__DIR__ . '/twig/AnchorsTwigExtension.php'); + $this->grav['twig']->twig->addExtension(new AnchorsTwigExtension($config)); + } + + /** + * Initialize configuration + */ + public function onPageInitialized() + { + $defaults = (array) $this->config->get('plugins.anchors'); + + /** @var Page $page */ + $page = $this->grav['page']; + if (isset($page->header()->anchors)) { + $this->config->set('plugins.anchors', array_merge($defaults, $page->header()->anchors)); + } + } + + /** + * if enabled on this page, load the JS + CSS and set the selectors. + */ + public function onTwigSiteVariables() + { + if ($this->config->get('plugins.anchors.active')) { + $selectors = $this->config->get('plugins.anchors.selectors', 'h1,h2,h3,h4'); + $visible = "visible: '{$this->config->get('plugins.anchors.visible', 'hover')}',"; + $placement = "placement: '{$this->config->get('plugins.anchors.placement', 'right')}',"; + $icon = $this->config->get('plugins.anchors.icon') ? "icon: '{$this->config->get('plugins.anchors.icon')}'," : ''; + $class = $this->config->get('plugins.anchors.class') ? "class: '{$this->config->get('plugins.anchors.class')}'," : ''; + $truncate = "truncate: {$this->config->get('plugins.anchors.truncate', 64)}"; + $this->grav['assets']->addJs('plugin://anchors/js/anchor.min.js'); + + $anchors_init = + "document.addEventListener('DOMContentLoaded', function() { + anchors.options = { + $visible + $placement + $icon + $class + $truncate + }; + anchors.add('$selectors'); + });"; + + + $this->grav['assets']->addInlineJs($anchors_init); + + if ($this->config->get('plugins.anchors.copy_to_clipboard')) { + $clipboard_init = + 'document.addEventListener("DOMContentLoaded", function() { + for (var r=0; r < document.getElementsByClassName("anchorjs-link").length; r++) { + var danchors = document.getElementsByClassName("anchorjs-link"); + var danchorshref = danchors[r].href; + danchors[r].setAttribute("data-clipboard-text",danchorshref); + } + let anchorjsLinks = document.querySelectorAll(".anchorjs-link"); + anchorjsLinks.forEach(el => { + el.addEventListener("click", event => { + event.preventDefault(); + // add custom "copy to clipboard" code + new ClipboardJS(".anchorjs-link"); + }); + }); + });'; + + $this->grav['assets']->addJs('plugin://anchors/js/clipboard.min.js'); + $this->grav['assets']->addInlineJs($clipboard_init); + } + } + } +} diff --git a/dev/plugins/anchors/anchors.yaml b/dev/plugins/anchors/anchors.yaml new file mode 100644 index 00000000..33e385ff --- /dev/null +++ b/dev/plugins/anchors/anchors.yaml @@ -0,0 +1,9 @@ +enabled: true # enable or disable the plugin +active: true # active by default, if false then you must activate per-page +selectors: 'h1,h2,h3,h4' # css elements to activate on. Uses jQuery style selectors +placement: right # either "left" or "right" +visible: hover # Active on "hover" or "always" visible +icon: # default link or a specific character like: #, ¶, â¡, and §. +class: # adds the provided class to the anchor html +truncate: 64 # truncates the generated ID to the specified character length +copy_to_clipboard: false # copies the link to clipboard when clicking diff --git a/dev/plugins/anchors/blueprints.yaml b/dev/plugins/anchors/blueprints.yaml new file mode 100644 index 00000000..05276f7a --- /dev/null +++ b/dev/plugins/anchors/blueprints.yaml @@ -0,0 +1,107 @@ +name: Anchors +type: plugin +slug: anchors +version: 1.6.0 +description: "This plugin provides automatic header anchors via the [anchorjs](http://bryanbraun.github.io/anchorjs) jQuery plugin." +icon: anchor +author: + name: Team Grav + email: devs@getgrav.org + url: http://getgrav.org +homepage: https://github.com/getgrav/grav-plugin-anchors +demo: http://learn.getgrav.org +keywords: anchor, header, plugin, code +bugs: https://github.com/getgrav/grav-plugin-anchors/issues +license: MIT +dependencies: + - { name: grav, version: '>=1.6.0' } + +form: + validation: strict + fields: + enabled: + type: toggle + label: PLUGIN_ADMIN.PLUGIN_STATUS + highlight: 1 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + active: + type: toggle + label: Active + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + help: Activate for all pages. If disabled then you must activate per-page + + selectors: + type: text + label: Selectors + size: large + default: 'h1,h2,h3,h4' + placeholder: "Anchor Selectors" + help: Comma separated list of header selectors to activate on + + placement: + type: select + label: Placement + classes: fancy + help: "Either `left` or `right`" + default: 'right' + options: + 'left': 'left' + 'right': 'right' + + visible: + type: select + label: Visible + classes: fancy + help: "Hover activates on `hover` else will always display" + default: 'hover' + options: + 'hover': 'hover' + 'always': 'always' + + icon: + type: text + label: Icon + size: medium + default: '' + help: "Replace the default link icon with the character(s) provided, e.g. #, ¶, â¡ or §" + + class: + type: text + label: Class + size: medium + default: '' + help: "Adds the provided class to the anchor html" + + truncate: + type: text + size: x-small + label: Truncate + help: "Truncates the generated ID to the specified character length" + default: 64 + validate: + type: number + min: 0 + + copy_to_clipboard: + type: toggle + label: Copy to clipboard + highlight: 0 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + help: Instead of scrolling to the item when clicking, you can enabled this option to copy the link to the clipboard automatically \ No newline at end of file diff --git a/dev/plugins/anchors/hebe.json b/dev/plugins/anchors/hebe.json new file mode 100644 index 00000000..28916e31 --- /dev/null +++ b/dev/plugins/anchors/hebe.json @@ -0,0 +1,15 @@ +{ + "project":"grav-plugin-anchors", + "platforms":{ + "grav":{ + "nodes":{ + "plugin":[ + { + "source":"/", + "destination":"/user/plugins/anchors" + } + ] + } + } + } +} diff --git a/dev/plugins/anchors/js/anchor.min.js b/dev/plugins/anchors/js/anchor.min.js new file mode 100644 index 00000000..1c2b86fa --- /dev/null +++ b/dev/plugins/anchors/js/anchor.min.js @@ -0,0 +1,9 @@ +// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat +// +// AnchorJS - v4.3.1 - 2021-04-17 +// https://www.bryanbraun.com/anchorjs/ +// Copyright (c) 2021 Bryan Braun; Licensed MIT +// +// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat +!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function d(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function w(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],d(this.options),this.isTouchDevice=function(){return Boolean("ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,o,i,n,s,a,c,r,l,h,u,p=[];if(d(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=w(A=A||"h2, h3, h4, h5, h6")).length)return this;for(null===document.head.querySelector("style.anchorjs")&&((u=document.createElement("style")).className="anchorjs",u.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(u):document.head.insertBefore(u,A),u.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",u.sheet.cssRules.length),u.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",u.sheet.cssRules.length),u.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",u.sheet.cssRules.length),u.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',u.sheet.cssRules.length)),u=document.querySelectorAll("[id]"),t=[].map.call(u,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); +// @license-end \ No newline at end of file diff --git a/dev/plugins/anchors/js/clipboard.min.js b/dev/plugins/anchors/js/clipboard.min.js new file mode 100644 index 00000000..54b3c463 --- /dev/null +++ b/dev/plugins/anchors/js/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.8 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1config = $config; + } + + public function getName() + { + return 'AnchorsTwigExtension'; + } + public function getFunctions() + { + return [ + new \Twig_SimpleFunction('anchors', [$this, 'anchorsFunction']) + ]; + } + + + /** + * Get a list of anchors link + * + * @param $content + * @param $tag + * @return string + */ + public function anchorsFunction($content, $tag = 'h2', $terms = null) + { + + $configTags = array_map('trim', explode(',',$this->config)); + + if (in_array($tag, $configTags)){ + $textMenu = []; + $rx = '/<'.$tag.'>(.*)<\/'.$tag.'>/'; + + preg_match_all($rx, $content, $group); + + if (!empty($group[1])){ + + if (!empty($terms)){ + $termsArray = array_map('trim', explode(',',$terms)); + $elements = array_diff($group[1],$termsArray); + }else{ + $elements = $group[1]; + } + + foreach($elements as $element){ + $textMenu[] = $element; + } + $html = $this->getHtmlTag($textMenu); + }else{ + $html = ''; + } + }else{ + $tag = current($configTags); + $html = $this->anchorsFunction($tag, $content); + } + + return $html; + + } + + + /** + * Mount the html of anchors link + * + * @param $itens + * @return string + */ + private function getHtmlTag($itens) + { + $html = ''; + + $html .= ''; + + return $html; + } + + + /** + * Get url whithout special characters + * + * @param $text + * @return string + */ + private function getUrl($text) + { + $rx1 = array('ä','ã','à','á','â','ê','ë','è','é','ï','ì','í','ö','õ','ò','ó','ô','ü','ù','ú','û','À','Ã','Â','Ã','É','Ê','Ô','Ã','Ó','Õ','Ú','ñ','Ñ','ç','Ç'); + $rx2 = '/\'/'; + $rx3 = '/[& \+\$,:;=\?@"#\{\}\|\^~\[`%!\'<>\]\.\/\(\)\*ºª]/'; + $rx4 = '/-{2,}/'; + $rx5 = '/\^-+|-+$/'; + + + $urlAnchor1 = str_replace('–', '-', str_replace($rx1, '', $text)); + $urlAnchor2 = preg_replace($rx2, '', $urlAnchor1); + $urlAnchor3 = preg_replace($rx3, '-', $urlAnchor2); + $urlAnchor4 = $this->textLimit(preg_replace($rx4, '-', $urlAnchor3), 64); + $urlAnchor5 = preg_replace($rx5, '', $urlAnchor4); + + $urlAnchorFinal = strtolower($urlAnchor5); + + return $urlAnchorFinal; + } + + + /** + * It limit characters total in exit + * + * @param $text + * @param $limit + * @param bool|true $url //verify if type content is url or title + * @return string + */ + private function textLimit($text, $limit, $url = true) + { + $count = strlen($text); + if ( $count >= $limit ) { + if ($url){ + $text = substr($text, 0, $limit); + return $text; + }else { + $text = substr($text, 0, strrpos(substr($text, 0, $limit), ' ')) . '...'; + return $text; + } + } + else{ + return $text; + } + } +} diff --git a/dev/plugins/breadcrumbs/CHANGELOG.md b/dev/plugins/breadcrumbs/CHANGELOG.md new file mode 100644 index 00000000..6080f6c2 --- /dev/null +++ b/dev/plugins/breadcrumbs/CHANGELOG.md @@ -0,0 +1,67 @@ +# v1.6.1 +## 12/02/2020 + +1. [](#improved) + * Minor default template improvements + +# v1.6.0 +## 04/22/2020 + +1. [](#new) + * Added `schema.org/BreadcrumbList` [#29] + * Added per-page option to control breadcrumbs [#20] + * Added various translations [#17][#18][#19] + * Pass phpstan level 1 tests + * Require Grav v1.6 + +# v1.5.1 +## 10/24/2017 + +1. [](#improved) + * Add option to ignore current page [#11] + * Removed Grav trait in favor of `Grav::instance()` + +# v1.5.0 +## 07/14/2016 + +1. [](#improved) + * non-routable pages are not linked + +# v1.4.0 +## 08/25/2015 + +1. [](#improved) + * Added blueprints for Grav Admin plugin + +# v1.3.0 +## 03/06/2015 + +1. [](#new) + * Added toggle for showing home item + * Added configurable home icon + * Added configurable divider icon + * Added toggle to link trailing item + +# v1.2.3 +## 02/05/2015 + +2. [](#improved) + * Added support for HHVM + +# v1.2.2 +## 01/23/2015 + +2. [](#improved) + * Added microdata information + +# v1.2.1 +## 01/09/2015 + +2. [](#improved) + * NOTE: BREAKING CHANGE: Moved templates into `partials/` subfolder for consistency. + +# v1.2.0 +## 11/30/2014 + +1. [](#new) + * ChangeLog started... diff --git a/dev/plugins/breadcrumbs/LICENSE b/dev/plugins/breadcrumbs/LICENSE new file mode 100644 index 00000000..484793ad --- /dev/null +++ b/dev/plugins/breadcrumbs/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Grav + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dev/plugins/breadcrumbs/README.md b/dev/plugins/breadcrumbs/README.md new file mode 100644 index 00000000..5f8d4246 --- /dev/null +++ b/dev/plugins/breadcrumbs/README.md @@ -0,0 +1,101 @@ +# Grav Breadcrumbs Plugin + +![Breadcrumbs](assets/readme_1.png) + +`Breadcrumbs` is a [Grav](http://github.com/getgrav/grav) plugin that adds links to the previous pages (following the hierarchical structure). +It is particularly useful if you are using Grav to run a blog. + +# Installation + +Installing the Breadcrumbs plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file. + +## GPM Installation (Preferred) + +The simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line). From the root of your Grav install type: + + bin/gpm install breadcrumbs + +This will install the Breadcrumbs plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/breadcrumbs`. + +## Manual Installation + +To install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `breadcrumbs`. You can find these files either on [GitHub](https://github.com/getgrav/grav-plugin-breadcrumbs) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras). + +You should now have all the plugin files under + + /your/site/grav/user/plugins/breadcrumbs + +>> NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav), the [Error](https://github.com/getgrav/grav-plugin-error) and [Problems](https://github.com/getgrav/grav-plugin-problems) plugins, and a theme to be installed in order to operate. + +# Usage + +The `breadcrumbs` plugin doesn't require any configuration. The moment you install it, it is ready to use. + +Something you might want to do is to override the look and feel of the breadcrumbs, and with Grav it is super easy. + +Copy the template file [breadcrumbs.html.twig](templates/partials/breadcrumbs.html.twig) into the `templates` folder of your custom theme, and that is it. + +``` +/your/site/grav/user/themes/custom-theme/templates/partials/breadcrumbs.html.twig +``` + +You can now edit the override and tweak it however you prefer. + +## Per-page Settings + +The following options are available for use in a page's YAML frontmatter, placed within the `breadcrumbs` mapping: + +| Option | Default | Values | Description | +|-------------|---------|-------------------|--------------------------------------------------------------------------------------| +| `max_depth` | `true` | `true` or `false` | Determines whether breadcrumbs for pages beneath the current page will be generated. | + +### Example Per-page Settings + +```yaml +--- +title: Some page you wrote +breadcrumbs: + may_descend: false # Breadcrumbs will not be generated for pages underneath this one. +--- +``` + +# Updating + +As development for the Breadcrumbs plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Breadcrumbs is easy, and can be done through Grav's GPM system, as well as manually. + +## GPM Update (Preferred) + +The simplest way to update this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following: + + bin/gpm update breadcrumbs + +This command will check your Grav install to see if your Breadcrumbs plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The plugin will automatically update and clear Grav's cache. + +## Manual Update + +Manually updating Breadcrumbs is pretty simple. Here is what you will need to do to get this done: + +* Delete the `your/site/user/plugins/breadcrumbs` directory. +* Download the new version of the Breadcrumbs plugin from either [GitHub](https://github.com/getgrav/grav-plugin-breadcrumbs) or [GetGrav.org](http://getgrav.org/downloads/plugins#extras). +* Unzip the zip file in `your/site/user/plugins` and rename the resulting folder to `breadcrumbs`. +* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`. + +> Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in `user/config/plugins`) will remain intact. + +## Configuration + +Simply copy the `user/plugins/breadcrumbs/breadcrumbs.yaml` into `user/config/plugins/breadcrumbs.yaml` and make your modifications. + +``` +enabled: true +show_all: true +built_in_css: true +include_home: true +include_current: true +icon_home: '' +icon_divider_classes: 'fa fa-angle-right' +link_trailing: false +``` + +Options are pretty self explanatory. + diff --git a/dev/plugins/breadcrumbs/assets/readme_1.png b/dev/plugins/breadcrumbs/assets/readme_1.png new file mode 100644 index 00000000..78374123 Binary files /dev/null and b/dev/plugins/breadcrumbs/assets/readme_1.png differ diff --git a/dev/plugins/breadcrumbs/blueprints.yaml b/dev/plugins/breadcrumbs/blueprints.yaml new file mode 100644 index 00000000..f9f8f399 --- /dev/null +++ b/dev/plugins/breadcrumbs/blueprints.yaml @@ -0,0 +1,99 @@ +name: Breadcrumbs +type: plugin +slug: breadcrumbs +version: 1.6.1 +description: The **Breadcrumbs** plugin provides a simple method to display the depth of your content/navigation structure. +icon: caret-square-o-right +author: + name: Team Grav + email: devs@getgrav.org + url: http://getgrav.org +homepage: https://github.com/getgrav/grav-plugin-breadcrumbs +demo: http://demo.getgrav.org/blog-skeleton +keywords: breadcrumbs, plugin, navigation, depth +bugs: https://github.com/getgrav/grav-plugin-breadcrumbs/issues +license: MIT +dependencies: + - { name: grav, version: '>=1.6.0' } + +form: + validation: strict + fields: + enabled: + type: toggle + label: PLUGIN_ADMIN.PLUGIN_STATUS + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + show_all: + type: toggle + label: PLUGIN_BREADCRUMBS.SHOW_WITH_ONE_ITEM + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + built_in_css: + type: toggle + label: PLUGIN_BREADCRUMBS.BUILTIN_CSS + highlight: 1 + default: 1 + help: PLUGIN_BREADCRUMBS.BUILTIN_CSS_HELP + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + include_home: + type: toggle + label: PLUGIN_BREADCRUMBS.INCLUDE_HOME + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + include_current: + type: toggle + label: PLUGIN_BREADCRUMBS.INCLUDE_CURRENT_PAGE + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + icon_home: + type: text + size: medium + label: PLUGIN_BREADCRUMBS.ICON_HOME + default: '' + + icon_divider_classes: + type: text + size: medium + label: PLUGIN_BREADCRUMBS.ICON_DIVIDER_CLASSES + default: 'fa fa-angle-right' + + link_trailing: + type: toggle + label: PLUGIN_BREADCRUMBS.LINK_TRAILING + highlight: 1 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool diff --git a/dev/plugins/breadcrumbs/breadcrumbs.php b/dev/plugins/breadcrumbs/breadcrumbs.php new file mode 100644 index 00000000..7c58ee4c --- /dev/null +++ b/dev/plugins/breadcrumbs/breadcrumbs.php @@ -0,0 +1,70 @@ + [ + ['autoload', 100001], + ['onPluginsInitialized', 0] + ] + ]; + } + + /** + * [onPluginsInitialized:100000] Composer autoload. + * + * @return ClassLoader + */ + public function autoload() + { + return require __DIR__ . '/vendor/autoload.php'; + } + + /** + * Initialize configuration + */ + public function onPluginsInitialized() + { + if ($this->isAdmin()) { + $this->active = false; + return; + } + + class_alias(Breadcrumbs::class, 'Grav\\Plugin\\Breadcrumbs'); + + $this->enable([ + 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], + 'onTwigSiteVariables' => ['onTwigSiteVariables', 0] + ]); + } + + /** + * Add current directory to twig lookup paths. + */ + public function onTwigTemplatePaths() + { + $this->grav['twig']->twig_paths[] = __DIR__ . '/templates'; + } + + /** + * Set needed variables to display breadcrumbs. + */ + public function onTwigSiteVariables() + { + $this->grav['twig']->twig_vars['breadcrumbs'] = new Breadcrumbs($this->config->get('plugins.breadcrumbs')); + + if ($this->config->get('plugins.breadcrumbs.built_in_css')) { + $this->grav['assets']->add('plugin://breadcrumbs/css/breadcrumbs.css'); + } + } +} diff --git a/dev/plugins/breadcrumbs/breadcrumbs.yaml b/dev/plugins/breadcrumbs/breadcrumbs.yaml new file mode 100644 index 00000000..5364d9d4 --- /dev/null +++ b/dev/plugins/breadcrumbs/breadcrumbs.yaml @@ -0,0 +1,8 @@ +enabled: true +show_all: true +built_in_css: true +include_home: true +include_current: true +icon_home: '' +icon_divider_classes: 'fa fa-angle-right' +link_trailing: false diff --git a/dev/plugins/breadcrumbs/classes/plugin/Breadcrumbs.php b/dev/plugins/breadcrumbs/classes/plugin/Breadcrumbs.php new file mode 100644 index 00000000..4e3aef1b --- /dev/null +++ b/dev/plugins/breadcrumbs/classes/plugin/Breadcrumbs.php @@ -0,0 +1,123 @@ +config = $config; + } + + /** + * Return an array of breadcrumbs for the current page. + * + * @return array An array of breadcrumbs. + */ + public function get() + { + // If the breadcrumbs have not yet been generated... + if (!$this->breadcrumbs) { + // Generate them now. + $this->build(); + } + + return $this->breadcrumbs; + } + + /** + * Build the array of breadcrumbs. + * + * The array is generated by starting at the current page and then climbing + * the hierarchy until the root is reached. The resulting crumbs are then + * stored in the $breadcrumbs instance variable. + * + * @internal + */ + protected function build() + { + // Used to hold the breadcrumbs as they are being generated. + $hierarchy = array(); + + $grav = Grav::instance(); + $current = $grav['page']; + + // If the page is not routable... + if (!$current) { + // Set up an empty array of crumbs. + $this->breadcrumbs = array(); + return; + } + + // If we are not at the root page... + if (!$current->root()) { + + // If we are configured to include the current page... + if ($this->config['include_current']) { + // Place the current page in the hierarchy. + $hierarchy[$current->url()] = $current; + } + + $current = $current->parent(); + + // As long as $current does not contain the root page... + while ($current && !$current->root()) { + // Get the frontmatter of the page. + $header = $current->header(); + + // Assume we may descend unless otherwise told. + $may_descend = true; + + // If the frontmatter contains a value for $may_descend... + if(isset( + $header->breadcrumbs, + $header->breadcrumbs['may_descend'] + )) { + // Get that value. + $may_descend = $header->breadcrumbs['may_descend']; + } + + // Then, if breadcrumbs should stop at this page... + if ($may_descend === false) { + // Empty the $hierarchy. + $hierarchy = []; + } + + // Place the current page in the hierarchy. + $hierarchy[$current->url()] = $current; + + // Get the parent of the current page. + $current = $current->parent(); + } + } + + // If we are configured to include the home page... + if ($this->config['include_home']) { + // Get the home page. + $home = $grav['pages']->dispatch('/'); + + // If the home page isn't already in the hierarchy... + if ($home && !array_key_exists($home->url(), $hierarchy)) { + // Place the home page in the hierarchy. + $hierarchy[] = $home; + } + } + + // Reverse the array of breadcrumbs, so that they are in descending + // order. + $this->breadcrumbs = array_reverse($hierarchy); + } +} diff --git a/dev/plugins/breadcrumbs/composer.json b/dev/plugins/breadcrumbs/composer.json new file mode 100644 index 00000000..21f19794 --- /dev/null +++ b/dev/plugins/breadcrumbs/composer.json @@ -0,0 +1,32 @@ +{ + "name": "grav-plugin-breadcrumbs", + "type": "grav-plugin", + "description": "Breadcrumbs plugin for Grav CMS", + "keywords": ["breadcrumbs"], + "homepage": "https://github.com/getgrav/grav-plugin-breadcrumbs/", + "license": "MIT", + "authors": [ + { + "name": "Team Grav", + "email": "devs@getgrav.org", + "homepage": "http://getgrav.org", + "role": "Developer" + } + ], + "require": { + "php": ">=7.1.3", + "ext-json": "*", + "ext-mbstring": "*" + }, + "autoload": { + "psr-4": { + "Grav\\Plugin\\Breadcrumbs\\": "classes/plugin" + }, + "classmap": ["breadcrumbs.php"] + }, + "config": { + "platform": { + "php": "7.1.3" + } + } +} diff --git a/dev/plugins/breadcrumbs/composer.lock b/dev/plugins/breadcrumbs/composer.lock new file mode 100644 index 00000000..87e59c50 --- /dev/null +++ b/dev/plugins/breadcrumbs/composer.lock @@ -0,0 +1,24 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "df6ebb29e1322fb9746644198a99943b", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.1.3", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.1.3" + } +} diff --git a/dev/plugins/breadcrumbs/css/breadcrumbs.css b/dev/plugins/breadcrumbs/css/breadcrumbs.css new file mode 100644 index 00000000..90a9df69 --- /dev/null +++ b/dev/plugins/breadcrumbs/css/breadcrumbs.css @@ -0,0 +1,18 @@ +#breadcrumbs { + height: 3rem; + line-height: 3rem; + padding-left: 3rem; +} +#breadcrumbs span { + display: inline-block; + padding: 0 1rem; +} +#breadcrumbs span:first-child { + padding-left: 0; +} +#breadcrumbs i { + display: inline-block; + width: 20px; + text-align: center; +} + diff --git a/dev/plugins/breadcrumbs/hebe.json b/dev/plugins/breadcrumbs/hebe.json new file mode 100644 index 00000000..4550344e --- /dev/null +++ b/dev/plugins/breadcrumbs/hebe.json @@ -0,0 +1,15 @@ +{ + "project":"grav-plugin-breadcrumbs", + "platforms":{ + "grav":{ + "nodes":{ + "plugin":[ + { + "source":"/", + "destination":"/user/plugins/breadcrumbs" + } + ] + } + } + } +} diff --git a/dev/plugins/breadcrumbs/languages.yaml b/dev/plugins/breadcrumbs/languages.yaml new file mode 100644 index 00000000..8f20b37a --- /dev/null +++ b/dev/plugins/breadcrumbs/languages.yaml @@ -0,0 +1,32 @@ +en: + PLUGIN_BREADCRUMBS: + SHOW_WITH_ONE_ITEM: 'Show even with one item' + BUILTIN_CSS: 'Use built in CSS' + BUILTIN_CSS_HELP: 'Include the CSS provided by the plugin' + INCLUDE_HOME: 'Include Home' + INCLUDE_CURRENT_PAGE: 'Include Current Page' + ICON_HOME: 'Icon home' + ICON_DIVIDER_CLASSES: 'Icon Divider Classes' + LINK_TRAILING: 'Link Trailing' + +uk: + PLUGIN_BREADCRUMBS: + SHOW_WITH_ONE_ITEM: 'Показувати навіть з одним елементом' + BUILTIN_CSS: 'ВикориÑтовувати вбудований CSS' + BUILTIN_CSS_HELP: 'Включити CSS, що надаєтьÑÑ Ð¿Ð»Ð°Ð³Ñ–Ð½Ð¾Ð¼' + INCLUDE_HOME: 'Включити головну Ñторінку' + INCLUDE_CURRENT_PAGE: 'Включати активну Ñторінку' + ICON_HOME: 'Іконка головної Ñторінки' + ICON_DIVIDER_CLASSES: 'ÐšÐ»Ð°Ñ Ñ–ÐºÐ¾Ð½ÐºÐ¸ розділювача' + LINK_TRAILING: 'Трейлінг поÑиланнÑ' + +ru: + PLUGIN_BREADCRUMBS: + SHOW_WITH_ONE_ITEM: 'Показывать даже Ñ Ð¾Ð´Ð½Ð¸Ð¼ Ñлементом' + BUILTIN_CSS: 'ИÑпользовать вÑтроенный CSS' + BUILTIN_CSS_HELP: 'Включить CSS, предоÑтавлÑемый плагином' + INCLUDE_HOME: 'Включить главную Ñтраницу' + INCLUDE_CURRENT_PAGE: 'Включать текущую Ñтраницу' + ICON_HOME: 'Иконка главной Ñтраницы' + ICON_DIVIDER_CLASSES: 'КлаÑÑ Ð¸ÐºÐ¾Ð½ÐºÐ¸ разделителÑ' + LINK_TRAILING: 'Трейлинг ÑÑылки' diff --git a/dev/plugins/breadcrumbs/templates/partials/breadcrumbs.html.twig b/dev/plugins/breadcrumbs/templates/partials/breadcrumbs.html.twig new file mode 100644 index 00000000..fcb255a0 --- /dev/null +++ b/dev/plugins/breadcrumbs/templates/partials/breadcrumbs.html.twig @@ -0,0 +1,38 @@ +{% set crumbs = breadcrumbs.get() %} +{% set breadcrumbs_config = config.plugins.breadcrumbs %} +{% set divider = breadcrumbs_config.icon_divider_classes %} + +{% if crumbs|length > 1 or breadcrumbs_config.show_all %} + +{% endif %} diff --git a/dev/plugins/breadcrumbs/vendor/autoload.php b/dev/plugins/breadcrumbs/vendor/autoload.php new file mode 100644 index 00000000..e0bc823a --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/dev/plugins/breadcrumbs/vendor/composer/LICENSE b/dev/plugins/breadcrumbs/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/dev/plugins/breadcrumbs/vendor/composer/autoload_classmap.php b/dev/plugins/breadcrumbs/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..1e48ed94 --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/composer/autoload_classmap.php @@ -0,0 +1,10 @@ + $baseDir . '/breadcrumbs.php', +); diff --git a/dev/plugins/breadcrumbs/vendor/composer/autoload_namespaces.php b/dev/plugins/breadcrumbs/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..b7fc0125 --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($baseDir . '/classes/plugin'), +); diff --git a/dev/plugins/breadcrumbs/vendor/composer/autoload_real.php b/dev/plugins/breadcrumbs/vendor/composer/autoload_real.php new file mode 100644 index 00000000..c1891fd1 --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/composer/autoload_real.php @@ -0,0 +1,52 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit3ccdcd6f1ac1044c32372e7c5a66846a::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/dev/plugins/breadcrumbs/vendor/composer/autoload_static.php b/dev/plugins/breadcrumbs/vendor/composer/autoload_static.php new file mode 100644 index 00000000..6dbff437 --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/composer/autoload_static.php @@ -0,0 +1,36 @@ + + array ( + 'Grav\\Plugin\\Breadcrumbs\\' => 24, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Grav\\Plugin\\Breadcrumbs\\' => + array ( + 0 => __DIR__ . '/../..' . '/classes/plugin', + ), + ); + + public static $classMap = array ( + 'Grav\\Plugin\\BreadcrumbsPlugin' => __DIR__ . '/../..' . '/breadcrumbs.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit3ccdcd6f1ac1044c32372e7c5a66846a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit3ccdcd6f1ac1044c32372e7c5a66846a::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit3ccdcd6f1ac1044c32372e7c5a66846a::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/dev/plugins/breadcrumbs/vendor/composer/installed.json b/dev/plugins/breadcrumbs/vendor/composer/installed.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/dev/plugins/breadcrumbs/vendor/composer/installed.json @@ -0,0 +1 @@ +[] diff --git a/dev/plugins/email/CHANGELOG.md b/dev/plugins/email/CHANGELOG.md new file mode 100644 index 00000000..65546754 --- /dev/null +++ b/dev/plugins/email/CHANGELOG.md @@ -0,0 +1,320 @@ +# v3.1.5 +## 01/03/22 + +1. [](#improved) + * Updated to Swiftmailer `v6.3.0` with PHP 8.1 compatibility [#157](https://github.com/getgrav/grav-plugin-email/issues/157) + +# v3.1.4 +## 11/16/2021 + +1. [](#improved) + * Added second parameter to `Email::send()` to get failed recipients + +# v3.1.3 +## 07/19/2021 + +1. [](#improved) + * Pass page variable to processed forms [#141](https://github.com/getgrav/grav-plugin-email/pull/141) + * Email configuration available to templates [#152](https://github.com/getgrav/grav-plugin-email/pull/152) + * New Event after eMail was sent [#151](https://github.com/getgrav/grav-plugin-email/pull/151) + +# v3.1.2 +## 04/06/2021 + +1. [](#new) + * Added new `onEmailMessage` event to make object available for editing [#150](https://github.com/getgrav/grav-plugin-email/pull/150) + +# v3.1.1 +## 01/31/2021 + +1. [](#improved) + * Latest vendor updates including SwiftMailer `6.2.5` + * Updated CLI commands + * Minor code cleanup + +# v3.1.0 +## 12/02/2020 + +1. [](#improved) + * Added support for `auth_mode` in SMTP engine [#101](https://github.com/getgrav/grav-plugin-email/pull/101) + * Obfuscate the password shown in the CLI `test-email` command [#140](https://github.com/getgrav/grav-plugin-email/pull/140) + +# v3.0.10 +## 11/09/2020 + +1. [](#improved) + * Tweaked default `base.html.twig` template to better support dark-mode clients + * Latest vendor updates +1. [](#bugfix) + * Add missing support for `template:` in body array + * Added check to process markdown with `text/html` content type only + +# v3.0.9 +## 06/08/2020 + +1. [](#improved) + * Disable password autocomplete in password field + * Don't save empty string in password field [#134](https://github.com/getgrav/grav-plugin-email/issues/134) + +# v3.0.8 +## 04/27/2020 + +1. [](#improved) + * Updated vendor library files + * Use Grav's Parsedown class + +# v3.0.7 +## 03/05/2020 + +1. [](#improved) + * Updated email validator library +1. [](#bugfix) + * Fixed `Invalid resource theme://` on CLI command `test-email` on Grav 1.6.21 and later versions [#128](https://github.com/getgrav/grav-plugin-email/issues/128) + +# v3.0.6 +## 02/11/2020 + +1. [](#improved) + * Updated email validator library + +# v3.0.5 +## 02/03/2020 + +1. [](#bugfix) + * Fixed a date in changelog (no other changes) + +# v3.0.4 +## 01/17/2020 + +1. [](#improved) + * Added ZOHO configuration example + * Updated SwiftMailer library for PHP 7.4 support + +# v3.0.3 +## 08/16/2019 + +1. [](#new) + * Support an array of multiple emails in `email:` form process + * Allow form values in email templates +1. [](#improved) + * Added Twig blocks for `content` and `footer` in `email/base.html.twig` template + * Updated `README.md` to reflect working setup for GMail + +# v3.0.2 +## 05/09/2019 + +1. [](#new) + * Requires Form Plugin v3.0.3 + * Added Russian translation [#113](https://github.com/getgrav/grav-plugin-email/pull/113) +1. [](#bugfix) + * Better fix for missing attachments when sending an email using a form [form#333](https://github.com/getgrav/grav-plugin-form/issues/333) + +# v3.0.1 +## 04/15/2019 + +1. [](#improved) + * Put a `try/catch` around email attachments and log any errors rather than hard fail +1. [](#bugfix) + * Fixed missing attachments when sending an email using a form [form#333](https://github.com/getgrav/grav-plugin-form/issues/333) + +# v3.0.0 +## 04/11/2019 + +1. [](#new) + * Added new `template:` to choose twig template option for email form processing + * Moved `buildMessage()` and `parseAddressValue()` to Email object and made public + * Refactored the `EmailUtils::sendEmail()` to take an array of params or the old param list + * Switched to SwiftMailer v.6.1.3 (requires PHP7/Grav 1.6) + * SwiftMailer 6.x compatibility fixes + * Updated various translations + * Added support for Email Queue with Scheduler support + * Code cleanup, composer update + * Added a new `clear-queue-failures` CLI command to flush out failed sends +1. [](#improved) + * Added backlink for scheduler task + * Added support for `environment` option to `flushqueue` CLI command + * Fixed mailtrap hostname in README.md + * Disable autocomplete on SMTP `user` and `password` fields + +# v2.7.2 +## 01/25/2019 + +1. [](#improved) + * Added default for `to` address + * Updated EN language [#99](https://github.com/getgrav/grav-plugin-email/pull/99) + * Updated UK language [#98](https://github.com/getgrav/grav-plugin-email/pull/98) + * Updated RU language [#100](https://github.com/getgrav/grav-plugin-email/pull/100) + * Updated to SwiftMailer v5.4.12 +1. [](#bugfix) + * Fixed `mailtrap` hostname + +# v2.7.1 +## 12/05/2017 + +1. [](#new) + * Added new `onEmailSend()` event hook before sending [#70](https://github.com/getgrav/grav-plugin-email/pull/70) +1. [](#improved) + * Added examples of setting up Email plugin with various SMTP providers + * Updated RU language [#60](https://github.com/getgrav/grav-plugin-email/pull/60) + * Updated to SwiftMailer v5.4.8 + +# v2.7.0 +## 10/26/2017 + +1. [](#improved) + * Now uses a dedicated `logs/email.log` file when `debug: true` + * Improved the README.txt file with examples, and troubleshooting + * Changed default engine to `sendmail` as `mail` is deprecated and not functioning [swiftmailer#866](https://github.com/swiftmailer/swiftmailer/issues/866} + +# v2.6.2 +## 09/30/2017 + +1. [](#improved) + * Removed extraneous files from vendor folder + +# v2.6.1 +## 09/07/2017 + +1. [](#improved) + * Improved the error message when missing `from` in the configuration + * Silently catch malformed email exceptions + +# v2.6.0 +## 05/22/2017 + +1. [](#improved) + * Inherit options from plugin configuration [#39](https://github.com/getgrav/grav-plugin-email/pull/39) +1. [](#bugfix) + * Also process translation on the email subject [https://github.com/getgrav/grav-plugin-comments/issues/38](https://github.com/getgrav/grav-plugin-comments/issues/38) + +# v2.5.3 +## 01/03/2017 + +1. [](#improved) + * Updated to SwiftMailer 5.4.5 [#45](https://github.com/getgrav/grav-plugin-email/issues/45) + +# v2.5.2 +## 12/13/2016 + +1. [](#new) + * RC released as stable + +# v2.5.2-rc.1 +## 11/26/2016 + +1. [](#new) + * Added a new `process_markdown` option for emails in forms +1. [](#improved) + * Improved the `Utils::sendEmail()` method to take the email type as an option + +# v2.5.1 +## 10/19/2016 + +1. [](#improved) + * CLI command will fallback to use the `to` from email plugin config if not provided + * Explicit Composer based class loader to fix issues with class case + +# v2.5.0 +## 09/07/2016 + +1. [](#new) + * Added a new `bin/plugin email test-email` CLI command +1. [](#improved) + * Moved Email `Utils` class from Login to Email plugin + * Provide a sample base `email/base.html.twig` template for emails +1. [](#bugfix) + * Fix handling attachments with the updated file upload field + +# v2.4.3 +## 08/16/2016 + +1. [](#improved) + * Added Russian translation + * Updated Swiftmailer to 5.4.3 [#37](https://github.com/getgrav/grav-plugin-email/issues/37) + +# v2.4.2 +## 08/10/2016 + +1. [](#improved) + * Added Croatian translation + +# v2.4.1 +## 07/14/2016 + +1. [](#improved) + * Allow multiple email recipients (comma separated) [#31](https://github.com/getgrav/grav-plugin-email/issues/31) + * Added Danish and Spanish translations + +# v2.4.0 +## 05/11/2016 + +1. [](#improved) + * Now includes Swiftmailer v5.4.2 which introduces a number of bug fixes and improvements +1. [](#bugfix) + * Correct `starttls` implementation, bundled in TLS + +# v2.3.0 +## 04/20/2016 + +1. [](#improved) + * Added debug option to enable logging on SwiftMailer. + * Updated SwiftMailer from v5.1.0 to v5.4.1. + * Added an option in the Admin settings to enable `starttls` +1. [](#bugfix) + * Correctly name TLS in the Admin settings, the label was `TTS` (but the value was correctly named `tls`) + +# v2.2.0 +## 02/05/2016 + +1. [](#new) + * Allow to send attachments in forms + * Added French translation +1. [](#improved) + * Throw an exception when trying to send emails without a `from` or `to` parameters setup, to intercept less meaningful errors and provide a better description on how to fix the problem + * Changed SMTP password in admin to use a password field instead of plain text + +# v2.1.0 +## 12/18/2015 + +1. [](#new) + * Added missing `content_type` to email.yaml + * Added default values for CC and BCC + 1. [](#improved) + * Improved documentation of new email params in `README.md` + * Moved config setting of `mailer.default` to `mailer.engine` + +# v2.0.0 +## 12/11/2015 + +1. [](#new) + * Added support for from/sender name (Thomas Keitel) + * Added support for message content type (Thomas Keitel) + * Added support for reply addresses (Thomas Keitel) + * Added support for CC/BCC (Thomas Keitel) + * Added support for multiple body parts (Thomas Keitel) +1. [](#bugfix) + * Fix email engine selection (z38) + +# v1.0.0 +## 11/20/2015 + +1. [](#bugfix) + * Fix for issue with no body parameter specified + +# v0.2.1 +## 09/11/2015 + +1. [](#bugfix) + * Fix onFormProcessed event + +# v0.2.0 +## 08/11/2015 + +1. [](#improved) + * Disable `enable` in admin + +# v0.1.0 +## 08/04/2015 + +1. [](#new) + * ChangeLog started... diff --git a/dev/plugins/email/LICENSE b/dev/plugins/email/LICENSE new file mode 100644 index 00000000..0e788c6a --- /dev/null +++ b/dev/plugins/email/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Grav + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dev/plugins/email/README.md b/dev/plugins/email/README.md new file mode 100644 index 00000000..ec37e95c --- /dev/null +++ b/dev/plugins/email/README.md @@ -0,0 +1,491 @@ +# Grav Email Plugin + +The **email plugin** for [Grav](http://github.com/getgrav/grav) adds the ability to send email. This is particularly useful for the **admin** and **login** plugins. + +# Installation + +The email plugin is easy to install with GPM. + +``` +$ bin/gpm install email +``` + +# Configuration + +By default, the plugin uses PHP Mail as the mail engine. + +``` +enabled: true +from: +from_name: +to: +to_name: +queue: + enabled: true + flush_frequency: '* * * * *' + flush_msg_limit: 10 + flush_time_limit: 100 +mailer: + engine: sendmail + smtp: + server: localhost + port: 25 + encryption: none + user: '' + password: '' + auth_mode: '' + sendmail: + bin: '/usr/sbin/sendmail -bs' +content_type: text/html +debug: false +``` + +You can configure the Email plugin by using the Admin plugin, navigating to the Plugins list and choosing `Email`. + +That's the easiest route. Or you can also alter the Plugin configuration by copying the `user/plugins/email/email.yaml` file into `user/config/plugins/email.yaml` and make your modifications there. + +The first setting you'd likely change is your `Email from` / `Email to` names and emails. + +Also, you'd likely want to setup a SMTP server instead of using PHP Mail, as the latter is not 100% reliable and you might experience problems with emails. + +Valid values for `auth_mode` include `plain`, `login`, `cram-md5`, or `null`. + +> NOTE: `engine: mail` has been deprecated from the SwiftMail library that this plugin uses as it does not funtion at all. Please use `smtp` if at all possibe, and `sendmail` if SMTP is not an option. + +### Mailtrap.io + +A good way to test emails is to use a SMTP server service that's built for testing emails, for example [https://mailtrap.io](https://mailtrap.io) + +Setup the Email plugin to use that SMTP server with the fake inbox data. For example enter this configuration in `user/config/plugins/email.yaml` or through the Admin panel: + +``` +mailer: + engine: smtp + smtp: + server: smtp.mailtrap.io + port: 2525 + encryption: none + user: YOUR_MAILTRAP_INBOX_USER + password: YOUR_MAILTRAP_INBOX_PASSWORD +``` + +That service will intercept emails and show them on their web-based interface instead of sending them for real. + +You can try and fine tune the emails there while testing. + +### Google Email + +A popular option for sending email is to simply use your Google Accounts SMTP server. To set this up you will need to do 2 things first: + +1. Enable IMAP in your Gmail `Settings` -> `Forwarding and POP/IMAP` -> `IMAP Access` +2. Enable `Less secure apps` in your [user account settings](https://myaccount.google.com/lesssecureapps) +3. If you have 2-factor authentication, you will need to create a unique application password to use rather than your personal password + +Then configure the Email plugin: + +``` +mailer: + engine: smtp + smtp: + server: smtp.gmail.com + port: 587 + encryption: tls + user: 'YOUR_GOOGLE_EMAIL_ADDRESS' + password: 'YOUR_GOOGLE_PASSWORD' +``` + +> NOTE: Check your email sending limits: https://support.google.com/a/answer/166852?hl=en + +#### Sparkpost + +Generous email sending limits even in the free tier, and simple setup, make [Sparkpost](https://www.sparkpost.com) a great option for email sending. You just need to create an account, then setup a verified sending domain. Sparkpost does a nice job of making this process very easy and undertandable. Then just click on the SMTP Relay option to get your details for the configuration: + +``` +mailer: + engine: smtp + smtp: + server: smtp.sparkpostmail.com + port: 587 + encryption: tls + user: 'SMTP_Injection' + password: 'SEND_EMAIL_API_KEY' +``` + +Then try sending a test email... + +#### Sendgrid + +[Sendgrid](https://sendgrid.com) offers a very easy-to-setup serivce with 100 emails/day for free. The next level allows you to send 40k/email a day for just $10/month. Configuration is pretty simple, just create an account, then click SMTP integration and click the button to create an API key. The configuration is as follows: + +``` +mailer: + engine: smtp + smtp: + server: smtp.sendgrid.net + port: 587 + encryption: tls + user: 'apikey' + password: 'YOUR_SENDGRID_API_KEY' +``` + +#### Mailgun + +[Mailgun is a great service](https://www.mailgun.com/) that offers 10k/emails per month for free. Setup does require SPIF domain verification so that means you need to add at least a TXT entry in your DNS. This is pretty standard for SMTP sending services and does provide verification for remote email servers and makes your email sending more reliable. The Mailgun site, walks you through this process however, and the verification process is simple and fast. + +``` +mailer: + engine: smtp + smtp: + server: smtp.mailgun.org + port: 587 + encryption: tls + user: 'MAILGUN_EMAIL_ADDRESS' + password: 'MAILGUN_EMAIL_PASSWORD' +``` + +Adjust these configurations for your account. + +#### MailJet + +Mailjet is another great service that is easy to quickly setup and get started sending email. The free account gives you 200 emails/day or 600 emails/month. Just signup and setup your SPF and DKIM entries for your domain. Then click on the SMTP settings and use those to configure the email plugin: + +``` +mailer: + engine: smtp + smtp: + server: in-v3.mailjet.com + port: 587 + encryption: tls + user: 'MAILJUST_USERNAME_API_KEY' + password: 'MAILJUST_PASSWORD_SECRET_KEY' +``` + +It's that easy! + +#### ZOHO + +ZOHO is a popular solution for hosted email due to it's great 'FREE' tier. It's paid options are also very reasonable and combined with the latest UI updates and outstanding security features, it's a solid email option. + +In order to get ZOHO working with Grav, you need to send email via a user account. You can either use your users' password or generate an **App Password** via your ZOHO account (clicking on your avatar once logged in), then navigating to `Two Factor Authentication -> App Passwords -> Generate`. Just enter a unique app name (i.e. `Grav Website`). + +NOTE: The SMTP host required can be found in `Settings -> Mail - > Mail Accounts -> POP/IMAP -> SMTP`. This will provide the SMTP server for this account (it may not be `imap.zoho.com` depending on what region you are in) + +``` +mailer: + engine: smtp + smtp: + server: smtp.zoho.com + port: 587 + encryption: tls + user: 'ZOHO_EMAIL_ADDRESS' + password: 'ZOHO_EMAIL_PASSWORD' +``` + +#### Sendmail + +Although not as reliable as SMTP not providing as much debug information, sendmail is a simple option as long as your hosting provider is not blocking the default SMTP port `25`: + +``` +mailer: + engine: sendmail + sendmail: + bin: '/usr/sbin/sendmail -bs' +``` + +Simply adjust your binary command line to suite your environment + +### SMTP Email Services + +Solid SMTP options that even provide a FREE tier for low email volumes include: + +* SendGrid (100/day free) - https://sendgrid.com +* Mailgun - (10k/month free) - https://www.mailgun.com +* Mailjet - (6k/month free) - https://www.mailjet.com/ +* Sparkpost - (15k/month free) - https://www.sparkpost.com +* Amazon SES (62k/month free) - https://aws.amazon.com/ses/ + +If you are still unsure why should be using one in the first place, check out this article: https://zapier.com/learn/email-marketing/best-transactional-email-sending-services/ + +## Email Queue + +For performance reasons, it's often desirable to queue emails and send them in batches, rather than forcing Grav to wait while an email is sent. This is because email servers are sometimes slow and you might not want to wait for the whole email-sending process before continuing with Grav processing. + +To address this, you can enable the **Email Queue** and this will ensure all email's in Grav are actually sent to the queue, and not sent directly. In order for the emails to be actually sent, you need to flush the queue. By default this is handled by the **Grav Scheduler**, so you need to ensure you have that enabled and setup correctly or **your emails will not be sent!!!**. + +You can also manually flush the queue by using the provided CLI command: + +``` +$ bin/plugin email flush-queue +``` + +## Testing with CLI Command + +You can test your email configuration with the following CLI Command: + +``` +$ bin/plugin email test-email -t steve@apple.com +``` + +You can also pass in a configuration environment: + +``` +$ bin/plugin email test-email -t steve@apple.com -e mysite.com +``` + +This will use the email configuration you have located in `user/mysite.com/config/plugins/email.yaml`. Read the docs to find out more about environment-based configuration: https://learn.getgrav.org/advanced/environment-config + +# Programmatically send emails + +Add this code in your plugins: + +```php + + $to = 'email@test.com'; + $from = 'email@test.com'; + + $subject = 'Test'; + $content = 'Test'; + + $message = $this->grav['Email']->message($subject, $content, 'text/html') + ->setFrom($from) + ->setTo($to); + + $sent = $this->grav['Email']->send($message); +``` + +# Emails sent with Forms + +When executing email actions during form processing, action parameters are inherited from the global configuration but may also be overridden on a per-action basis. + +``` +title: Custom form + +form: + name: custom_form + fields: + + # Any fields you'd like to add to the form: + # Their values may be referenced in email actions via '{{ form.value.FIELDNAME|e }}' + + process: + email: + subject: "[Custom form] {{ form.value.name|e }}" + body: "{% include 'forms/data.txt.twig' %}" + from: sender@example.com + from_name: 'Custom sender name' + to: recipient@example.com + to_name: 'Custom recipient name' + content_type: 'text/plain' + process_markdown: true +``` + +## Multiple Emails + +You can send multiple emails by creating an array of emails under the `process: email:` option in the form: + +``` +title: Custom form + +form: + name: custom_form + fields: + + # Any fields you'd like to add to the form: + # Their values may be referenced in email actions via '{{ form.value.FIELDNAME|e }}' + + process: + email: + - + subject: "[Custom Email 1] {{ form.value.name|e }}" + body: "{% include 'forms/data.txt.twig' %}" + from: {mail: "owner@mysite.com", name: "Site OWner"} + to: {mail: "recepient_1@example.com", name: "Recepient 1"} + template: "email/base.html.twig" + - + subject: "[Custom Email 2] {{ form.value.name|e }}" + body: "{% include 'forms/data.txt.twig' %}" + from: {mail: "owner@mysite.com", name: "Site OWner"} + to: {mail: "recepient_2@example.com", name: "Recepient 1"} + template: "email/base.html.twig" +``` + +## Templating Emails + +You can specify a Twig template for HTML rendering, else Grav will use the default one `email/base.html.twig` which is included in this plugin. You can also specify a custom template that extends the base, where you can customize the `{% block content %}` and `{% block footer %}`. For example: + +```twig +{% extends 'email/base.html.twig' %} + +{% block content %} +

    + Greetings {{ form.value.name|e }}, +

    + +

    + We have received your request for help. Our team will get in touch with you within 3 Business Days. +

    + +

    + Regards, +

    + +

    + My Company +

    + E - help@mycompany.com
    + M - +1 555-123-4567
    + W - mycompany.com +

    +{% endblock %} + +{% block footer %} +

    My Company - All Rights Reserved

    +{% endblock %} +``` + +## Sending Attachments + +You can add file inputs to your form, and send those files via Email. +Just add an `attachments` field and list the file input fields names. You can have multiple file fields, and this will send all the files as attachments. Example: + +``` +form: + name: custom_form + fields: + + my-file: + label: 'Add a file' + type: file + multiple: false + destination: user/data/files + accept: + - application/pdf + - application/x-pdf + - image/png + - text/plain + + process: + + email: + body: '{% include "forms/data.html.twig" %}' + attachments: + - 'my-file' +``` + +## Additional action parameters + +To have more control over your generated email, you may also use the following additional parameters: + +* `reply_to`: Set one or more addresses that should be used to reply to the message. +* `cc` _(Carbon copy)_: Add one or more addresses to the delivery list. Many email clients will mark email in one's inbox differently depending on whether they are in the `To:` or `Cc:` list. +* `bcc` _(Blind carbon copy)_: Add one or more addresses to the delivery list that should (usually) not be listed in the message data, remaining invisible to other recipients. +* `charset`: Explicitly set a charset for the generated email body (only takes effect if `body` parameter is a string, defaults to `utf-8`) + +### Specifying email addresses + +Email-related parameters (`from`, `to`, `reply_to`, `cc`and `bcc`) allow different notations for single / multiple values: + +#### Single email address string + +``` +to: mail@example.com +``` + +#### Multiple email address strings + +``` +to: + - mail@example.com + - mail+1@example.com + - mail+2@example.com +``` + +#### Single email address with name + +``` +to: + mail: mail@example.com + name: Human-readable name +``` + +or inline: + +``` +to: {mail: 'mail@example.com', name: 'Human-readable name'} +``` + +#### Multiple email addresses (with and without names) + +``` +to: + - + mail: mail@example.com + name: Human-readable name + - + mail: mail+2@example.com + name: Another human-readable name + - + mail+3@example.com + - + mail+4@example.com +``` + +or inline: + +``` +to: + - {mail: 'mail@example.com', name: 'Human-readable name'} + - {mail: 'mail+2@example.com', name: 'Another human-readable name'} + - mail+3@example.com + - mail+4@example.com +``` + +## Multi-part MIME messages + +Apart from a simple string, an email body may contain different MIME parts (e.g. HTML body with plain text fallback). You may even specify a different charset for each part (default to `utf-8`): + +``` +body: + - + content_type: 'text/html' + body: "{% include 'forms/default/data.html.twig' %}" + - + content_type: 'text/plain' + body: "{% include 'forms/default/data.txt.twig' %}" + charset: 'iso-8859-1' +``` + +# Troubleshooting + +## Emails are not sent + +#### Debugging + +The first step in determining why emails are not sent is to enable debugging. This can be done via the `user/config/email.yaml` file or via the plugin settings in the admin. Just enable this and then try sending an email again. Then inspect the `logs/email.log` file for potential problems. + +#### ISP Port 25 blocking + +By default, when sending via PHP or Sendmail the machine running the webserver will attempt to send mail using the SMTP protocol. This uses port `25` which is often blocked by ISPs to protected against spamming. You can determine if this port is blocked by running this command in your temrinal (mac/linux only): + +``` +(echo >/dev/tcp/localhost/25) &>/dev/null && echo "TCP port 25 opened" || echo "TCP port 25 closed" +``` + +If it's blocked there are ways to configure relays to different ports, but the simplest solution is to use SMTP for mail sending. + + +#### Exceptions + +If you get an exception when sending email but you cannot see what the error is, you need to enable more verbose exception messages. In the `user/config/system.yaml` file ensure your have the following configuration: + +``` +errors: + display: 1 + log: true +``` + +## Configuration Issues + +As explained above in the Configuration section, if you're using the default settings, set the Plugin configuration to use a SMTP server. It can be [Gmail](https://www.digitalocean.com/community/tutorials/how-to-use-google-s-smtp-server) or another SMTP server you have at your disposal. + +This is the first thing to check. The reason is that PHP Mail, the default system used by the Plugin, is not 100% reliable and emails might not arrive. diff --git a/dev/plugins/email/blueprints.yaml b/dev/plugins/email/blueprints.yaml new file mode 100644 index 00000000..d0e77749 --- /dev/null +++ b/dev/plugins/email/blueprints.yaml @@ -0,0 +1,251 @@ +name: Email +slug: email +type: plugin +version: 3.1.5 +testing: false +description: Enables the emailing system for Grav +icon: envelope +author: + name: Team Grav + email: devs@getgrav.org + url: http://getgrav.org +keywords: plugin, email, sender +homepage: https://github.com/getgrav/grav-plugin-email +bugs: https://github.com/getgrav/grav-plugin-email/issues +license: MIT + +dependencies: + - { name: grav, version: '>=1.6.0' } + - { name: form, version: '>=3.0.3' } + +form: + validation: loose + + fields: + enabled: + type: hidden + label: PLUGIN_ADMIN.PLUGIN_STATUS + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + mailer.engine: + type: select + label: PLUGIN_EMAIL.MAIL_ENGINE + size: medium + options: + none: PLUGIN_ADMIN.DISABLED + smtp: SMTP + sendmail: Sendmail + + content_type: + type: select + label: PLUGIN_EMAIL.CONTENT_TYPE + size: medium + default: 'text/html' + options: + 'text/plain': PLUGIN_EMAIL.CONTENT_TYPE_PLAIN_TEXT + 'text/html': HTML + + charset: + type: text + size: medium + label: PLUGIN_EMAIL.CHARSET + placeholder: PLUGIN_EMAIL.CHARSET_PLACEHOLDER + + email_Defaults: + type: section + title: PLUGIN_EMAIL.EMAIL_DEFAULTS + underline: true + + from: + type: email + size: medium + label: PLUGIN_EMAIL.EMAIL_FORM + placeholder: PLUGIN_EMAIL.EMAIL_FORM_PLACEHOLDER + validate: + required: true + type: email + + from_name: + type: text + size: medium + label: PLUGIN_EMAIL.EMAIL_FROM_NAME + placeholder: PLUGIN_EMAIL.EMAIL_FROM_NAME_PLACEHOLDER + + to: + type: email + size: medium + label: PLUGIN_EMAIL.EMAIL_TO + placeholder: PLUGIN_EMAIL.EMAIL_TO_PLACEHOLDER + multiple: true + validate: + required: true + type: email + + to_name: + type: text + size: medium + label: PLUGIN_EMAIL.EMAIL_TO_NAME + placeholder: PLUGIN_EMAIL.EMAIL_TO_NAME_PLACEHOLDER + + cc: + type: email + size: medium + label: PLUGIN_EMAIL.EMAIL_CC + placeholder: PLUGIN_EMAIL.EMAIL_CC_PLACEHOLDER + multiple: true + validate: + type: email + + cc_name: + type: text + size: medium + label: PLUGIN_EMAIL.EMAIL_CC_NAME + placeholder: PLUGIN_EMAIL.EMAIL_CC_NAME_PLACEHOLDER + + bcc: + type: email + size: medium + label: PLUGIN_EMAIL.EMAIL_BCC + placeholder: PLUGIN_EMAIL.EMAIL_BCC_PLACEHOLDER + multiple: true + validate: + type: email + + reply_to: + type: email + size: medium + label: PLUGIN_EMAIL.EMAIL_REPLY_TO + placeholder: PLUGIN_EMAIL.EMAIL_REPLY_TO_PLACEHOLDER + multiple: true + validate: + type: email + + reply_to_name: + type: text + size: medium + label: PLUGIN_EMAIL.EMAIL_REPLY_TO_NAME + placeholder: PLUGIN_EMAIL.EMAIL_REPLY_TO_NAME_PLACEHOLDER + + body: + type: textarea + size: medium + label: PLUGIN_EMAIL.EMAIL_BODY + placeholder: PLUGIN_EMAIL.EMAIL_BODY_PLACEHOLDER + + smtp_config: + type: section + title: PLUGIN_EMAIL.SMTP_CONFIGURATION + underline: true + + mailer.smtp.server: + type: text + size: medium + label: PLUGIN_EMAIL.SMTP_SERVER + placeholder: PLUGIN_EMAIL.SMTP_SERVER_PLACEHOLDER + + mailer.smtp.port: + type: text + size: small + label: PLUGIN_EMAIL.SMTP_PORT + placeholder: PLUGIN_EMAIL.SMTP_PORT_PLACEHOLDER + validate: + type: number + min: 1 + max: 65535 + + mailer.smtp.encryption: + type: select + size: medium + label: PLUGIN_EMAIL.SMTP_ENCRYPTION + options: + none: PLUGIN_EMAIL.SMTP_ENCRYPTION_NONE + ssl: SSL + tls: TLS + + mailer.smtp.user: + type: text + size: medium + autocomplete: 'off' + label: PLUGIN_EMAIL.SMTP_LOGIN_NAME + + mailer.smtp.password: + type: password + size: medium + autocomplete: 'new-password' + label: PLUGIN_EMAIL.SMTP_PASSWORD + + mailer.smtp.auth_mode: + type: text + size: medium + label: PLUGIN_EMAIL.SMTP_AUTH_MODE + + sendmail_config: + type: section + title: PLUGIN_EMAIL.SENDMAIL_CONFIGURATION + underline: true + + mailer.sendmail.bin: + type: text + size: medium + label: PLUGIN_EMAIL.PATH_TO_SENDMAIL + placeholder: "/usr/sbin/sendmail" + + queue_section: + type: section + title: PLUGIN_EMAIL.QUEUE_TITLE + text: PLUGIN_EMAIL.QUEUE_DESC + markdown: true + underline: true + + queue.enabled: + type: toggle + label: PLUGIN_EMAIL.QUEUE_ENABLED + highlight: 0 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + queue.flush_frequency: + type: cron + label: PLUGIN_EMAIL.QUEUE_FLUSH_FREQUENCY + size: medium + help: PLUGIN_EMAIL.QUEUE_FLUSH_FREQUENCY_HELP + default: '* * * * *' + placeholder: '* * * * *' + + queue.flush_msg_limit: + type: number + label: PLUGIN_EMAIL.QUEUE_FLUSH_MSG_LIMIT + size: x-small + append: PLUGIN_EMAIL.QUEUE_FLUSH_MSG_LIMIT_APPEND + + queue.flush_time_limit: + type: number + label: PLUGIN_EMAIL.QUEUE_FLUSH_TIME_LIMIT + size: x-small + append: PLUGIN_EMAIL.QUEUE_FLUSH_TIME_LIMIT_APPEND + + advanced_section: + type: section + title: PLUGIN_EMAIL.ADVANCED + underline: true + + debug: + type: toggle + label: PLUGIN_EMAIL.DEBUG + highlight: 1 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool diff --git a/dev/plugins/email/classes/Email.php b/dev/plugins/email/classes/Email.php new file mode 100644 index 00000000..689a7cd8 --- /dev/null +++ b/dev/plugins/email/classes/Email.php @@ -0,0 +1,560 @@ +get('plugins.email.mailer.engine') !== 'none'; + } + + /** + * Returns true if debugging on emails has been enabled. + * + * @return bool + */ + public static function debug() + { + return Grav::instance()['config']->get('plugins.email.debug') == 'true'; + } + + /** + * Creates an email message. + * + * @param string $subject + * @param string $body + * @param string $contentType + * @param string $charset + * @return \Swift_Message + */ + public function message($subject = null, $body = null, $contentType = null, $charset = null) + { + return new \Swift_Message($subject, $body, $contentType, $charset); + } + + /** + * Creates an attachment. + * + * @param string $data + * @param string $filename + * @param string $contentType + * @return \Swift_Attachment + */ + public function attachment($data = null, $filename = null, $contentType = null) + { + return new \Swift_Attachment($data, $filename, $contentType); + } + + /** + * Creates an embedded attachment. + * + * @param string $data + * @param string $filename + * @param string $contentType + * @return \Swift_EmbeddedFile + */ + public function embedded($data = null, $filename = null, $contentType = null) + { + return new \Swift_EmbeddedFile($data, $filename, $contentType); + } + + /** + * Creates an image attachment. + * + * @param string $data + * @param string $filename + * @param string $contentType + * @return \Swift_Image + */ + public function image($data = null, $filename = null, $contentType = null) + { + return new \Swift_Image($data, $filename, $contentType); + } + + /** + * Send email. + * + * @param \Swift_Message $message + * @param array|null $failedRecipients + * @return int + */ + public function send($message, &$failedRecipients = null) + { + $mailer = $this->getMailer(); + + $result = $mailer ? $mailer->send($message, $failedRecipients) : 0; + + // Check if emails and debugging are both enabled. + if ($mailer && $this->debug()) { + + $log = new Logger('email'); + $locator = Grav::instance()['locator']; + $log_file = $locator->findResource('log://email.log', true, true); + $log->pushHandler(new StreamHandler($log_file, Logger::DEBUG)); + + // Append the SwiftMailer log to the log. + $log->addDebug($this->getLogs()); + } + + return $result; + } + + /** + * Build e-mail message. + * + * @param array $params + * @param array $vars + * @return \Swift_Message + */ + public function buildMessage(array $params, array $vars = []) + { + /** @var Twig $twig */ + $twig = Grav::instance()['twig']; + + /** @var Config $config */ + $config = Grav::instance()['config']; + + /** @var Language $language */ + $language = Grav::instance()['language']; + + // Extend parameters with defaults. + $params += [ + 'bcc' => $config->get('plugins.email.bcc', []), + 'body' => $config->get('plugins.email.body', '{% include "forms/data.html.twig" %}'), + 'cc' => $config->get('plugins.email.cc', []), + 'cc_name' => $config->get('plugins.email.cc_name'), + 'charset' => $config->get('plugins.email.charset', 'utf-8'), + 'from' => $config->get('plugins.email.from'), + 'from_name' => $config->get('plugins.email.from_name'), + 'content_type' => $config->get('plugins.email.content_type', 'text/html'), + 'reply_to' => $config->get('plugins.email.reply_to', []), + 'reply_to_name' => $config->get('plugins.email.reply_to_name'), + 'subject' => !empty($vars['form']) && $vars['form'] instanceof FormInterface ? $vars['form']->page()->title() : null, + 'to' => $config->get('plugins.email.to'), + 'to_name' => $config->get('plugins.email.to_name'), + 'process_markdown' => false, + 'template' => false + ]; + + // Create message object. + $message = $this->message(); + + if (!$params['to']) { + throw new \RuntimeException($language->translate('PLUGIN_EMAIL.PLEASE_CONFIGURE_A_TO_ADDRESS')); + } + if (!$params['from']) { + throw new \RuntimeException($language->translate('PLUGIN_EMAIL.PLEASE_CONFIGURE_A_FROM_ADDRESS')); + } + + // make email configuration available to templates + $vars += [ + 'email' => $params, + ]; + + // Process parameters. + foreach ($params as $key => $value) { + switch ($key) { + case 'body': + if (is_string($value)) { + if (strpos($value, '{{') !== false || strpos($value, '{%') !== false) { + $body = $twig->processString($value, $vars); + } else { + $body = $value; + } + + if ($params['process_markdown'] && $params['content_type'] === 'text/html') { + $parsedown = new Parsedown(); + $body = $parsedown->text($body); + } + + if ($params['template']) { + $body = $twig->processTemplate($params['template'], ['content' => $body] + $vars); + } + + $content_type = !empty($params['content_type']) ? $twig->processString($params['content_type'], $vars) : null; + $charset = !empty($params['charset']) ? $twig->processString($params['charset'], $vars) : null; + + $message->setBody($body, $content_type, $charset); + } elseif (is_array($value)) { + foreach ($value as $body_part) { + $body_part += [ + 'charset' => $params['charset'], + 'content_type' => $params['content_type'], + ]; + + $body = !empty($body_part['body']) ? $twig->processString($body_part['body'], $vars) : null; + + if ($params['process_markdown'] && $body_part['content_type'] === 'text/html') { + $parsedown = new Parsedown(); + $body = $parsedown->text($body); + } + + if (isset($body_part['template'])) { + $body = $twig->processTemplate($body_part['template'], ['content' => $body] + $vars); + } + + $content_type = !empty($body_part['content_type']) ? $twig->processString($body_part['content_type'], $vars) : null; + $charset = !empty($body_part['charset']) ? $twig->processString($body_part['charset'], $vars) : null; + + if (!$message->getBody()) { + $message->setBody($body, $content_type, $charset); + } + else { + $message->addPart($body, $content_type, $charset); + } + } + } + break; + + case 'subject': + $message->setSubject($twig->processString($language->translate($value), $vars)); + break; + + case 'to': + if (is_string($value) && !empty($params['to_name'])) { + $value = [ + 'mail' => $twig->processString($value, $vars), + 'name' => $twig->processString($params['to_name'], $vars), + ]; + } + + foreach ($this->parseAddressValue($value, $vars) as $address) { + $message->addTo($address->mail, $address->name); + } + break; + + case 'cc': + if (is_string($value) && !empty($params['cc_name'])) { + $value = [ + 'mail' => $twig->processString($value, $vars), + 'name' => $twig->processString($params['cc_name'], $vars), + ]; + } + + foreach ($this->parseAddressValue($value, $vars) as $address) { + $message->addCc($address->mail, $address->name); + } + break; + + case 'bcc': + foreach ($this->parseAddressValue($value, $vars) as $address) { + $message->addBcc($address->mail, $address->name); + } + break; + + case 'from': + if (is_string($value) && !empty($params['from_name'])) { + $value = [ + 'mail' => $twig->processString($value, $vars), + 'name' => $twig->processString($params['from_name'], $vars), + ]; + } + + foreach ($this->parseAddressValue($value, $vars) as $address) { + $message->addFrom($address->mail, $address->name); + } + break; + + case 'reply_to': + if (is_string($value) && !empty($params['reply_to_name'])) { + $value = [ + 'mail' => $twig->processString($value, $vars), + 'name' => $twig->processString($params['reply_to_name'], $vars), + ]; + } + + foreach ($this->parseAddressValue($value, $vars) as $address) { + $message->addReplyTo($address->mail, $address->name); + } + break; + + } + } + + return $message; + } + + /** + * Return parsed e-mail address value. + * + * @param string|string[] $value + * @param array $vars + * @return array + */ + public function parseAddressValue($value, array $vars = []) + { + $parsed = []; + + /** @var Twig $twig */ + $twig = Grav::instance()['twig']; + + // Single e-mail address string + if (is_string($value)) { + $parsed[] = (object) [ + 'mail' => $twig->processString($value, $vars), + 'name' => null, + ]; + } + + else { + // Cast value as array + $value = (array) $value; + + // Single e-mail address array + if (!empty($value['mail'])) { + $parsed[] = (object) [ + 'mail' => $twig->processString($value['mail'], $vars), + 'name' => !empty($value['name']) ? $twig->processString($value['name'], $vars) : NULL, + ]; + } + + // Multiple addresses (either as strings or arrays) + elseif (!(empty($value['mail']) && !empty($value['name']))) { + foreach ($value as $y => $itemx) { + $addresses = $this->parseAddressValue($itemx, $vars); + + if (($address = reset($addresses))) { + $parsed[] = $address; + } + } + } + } + + return $parsed; + } + + /** + * Return debugging logs if enabled + * + * @return string + */ + public function getLogs() + { + if ($this->debug()) { + return $this->logger->dump(); + } + return ''; + } + + /** + * @internal + * @return null|\Swift_Mailer + */ + protected function getMailer() + { + if (!$this->enabled()) { + return null; + } + + if (!$this->mailer) { + /** @var Config $config */ + $config = Grav::instance()['config']; + $queue_enabled = $config->get('plugins.email.queue.enabled'); + + $transport = $queue_enabled === true ? $this->getQueue() : $this->getTransport(); + + // Create the Mailer using your created Transport + $this->mailer = new \Swift_Mailer($transport); + + // Register the logger if we're debugging. + if ($this->debug()) { + $this->logger = new \Swift_Plugins_Loggers_ArrayLogger(); + $this->mailer->registerPlugin(new \Swift_Plugins_LoggerPlugin($this->logger)); + } + } + + return $this->mailer; + } + + protected static function getQueuePath() + { + $queue_path = Grav::instance()['locator']->findResource('user://data', true) . '/email-queue'; + + if (!file_exists($queue_path)) { + mkdir($queue_path); + } + + return $queue_path; + } + + protected static function getQueue() + { + $queue_path = static::getQueuePath(); + + $spool = new \Swift_FileSpool($queue_path); + $transport = new \Swift_SpoolTransport($spool); + + return $transport; + } + + public static function flushQueue() + { + $grav = Grav::instance(); + + $grav['debugger']->enabled(false); + + $config = $grav['config']->get('plugins.email.queue'); + + try { + $queue = static::getQueue(); + $spool = $queue->getSpool(); + $spool->setMessageLimit($config['flush_msg_limit']); + $spool->setTimeLimit($config['flush_time_limit']); + $failures = []; + $result = $spool->flushQueue(static::getTransport(), $failures); + return $result . ' messages flushed from queue...'; + } catch (\Exception $e) { + $grav['log']->error($e->getMessage()); + return $e->getMessage(); + } + + } + + public static function clearQueueFailures() + { + $grav = Grav::instance(); + $grav['debugger']->enabled(false); + + $preferences = \Swift_Preferences::getInstance(); + $preferences->setTempDir(sys_get_temp_dir()); + + /** @var \Swift_Transport $transport */ + $transport = static::getTransport(); + if (!$transport->isStarted()) { + $transport->start(); + } + + $queue_path = static::getQueuePath(); + + foreach (new \GlobIterator($queue_path . '/*.sending') as $file) { + $final_message = $file->getPathname(); + + /** @var \Swift_Message $message */ + $message = unserialize(file_get_contents($final_message)); + + echo(sprintf( + 'Retrying "%s" to "%s"', + $message->getSubject(), + implode(', ', array_keys($message->getTo())) + ) . "\n"); + + try { + $clean = static::cloneMessage($message); + $transport->send($clean); + echo("sent!\n"); + + // DOn't want to trip up any errors from sending too fast + sleep(1); + } catch (\Swift_TransportException $e) { + echo("ERROR: Send failed - deleting spooled message\n"); + } + + // Remove the file + unlink($final_message); + } + } + + /** + * Clean copy a message + * + * @param \Swift_Message $message + */ + public static function cloneMessage($message) + { + $clean = new \Swift_Message(); + + $clean->setBoundary($message->getBoundary()); + $clean->setBcc($message->getBcc()); + $clean->setBody($message->getBody()); + $clean->setCharset($message->getCharset()); + $clean->setChildren($message->getChildren()); + $clean->setContentType($message->getContentType()); + $clean->setCc($message->getCc()); + $clean->setDate($message->getDate()); + $clean->setDescription($message->getDescription()); + $clean->setEncoder($message->getEncoder()); + $clean->setFormat($message->getFormat()); + $clean->setFrom($message->getFrom()); + $clean->setId($message->getId()); + $clean->setMaxLineLength($message->getMaxLineLength()); + $clean->setPriority($message->getPriority()); + $clean->setReplyTo($message->getReplyTo()); + $clean->setReturnPath($message->getReturnPath()); + $clean->setSender($message->getSender()); + $clean->setSubject($message->getSubject()); + $clean->setTo($message->getTo()); + $clean->setAuthMode($message->getAuthMode()); + + return $clean; + + } + + protected static function getTransport() + { + /** @var Config $config */ + $config = Grav::instance()['config']; + + $engine = $config->get('plugins.email.mailer.engine'); + + // Create the Transport and initialize it. + switch ($engine) { + case 'smtp': + $transport = new \Swift_SmtpTransport(); + + $options = $config->get('plugins.email.mailer.smtp'); + if (!empty($options['server'])) { + $transport->setHost($options['server']); + } + if (!empty($options['port'])) { + $transport->setPort($options['port']); + } + if (!empty($options['encryption']) && $options['encryption'] !== 'none') { + $transport->setEncryption($options['encryption']); + } + if (!empty($options['user'])) { + $transport->setUsername($options['user']); + } + if (!empty($options['password'])) { + $transport->setPassword($options['password']); + } + if (!empty($options['auth_mode'])) { + $transport->setAuthMode($options['auth_mode']); + } + break; + case 'sendmail': + default: + $options = $config->get('plugins.email.mailer.sendmail'); + $bin = !empty($options['bin']) ? $options['bin'] : '/usr/sbin/sendmail'; + $transport = new \Swift_SendmailTransport($bin); + break; + } + + return $transport; + } +} diff --git a/dev/plugins/email/classes/Utils.php b/dev/plugins/email/classes/Utils.php new file mode 100644 index 00000000..69b85b4a --- /dev/null +++ b/dev/plugins/email/classes/Utils.php @@ -0,0 +1,48 @@ + $params + * + * @return bool True if the action was performed. + */ + public static function sendEmail(...$params) + { + if (is_array($params[0])) { + $params = array_shift($params); + } else { + $keys = ['subject', 'body', 'to', 'from', 'content_type']; + $params = GravUtils::arrayCombine($keys, $params); + } + + //Initialize twig if not yet initialized + /** @var Twig $twig */ + $twig = Grav::instance()['twig']->init(); + + /** @var Email $email */ + $email = Grav::instance()['Email']; + + if (empty($params['to']) || empty($params['subject']) || empty($params['body'])) { + return false; + } + + $params['body'] = $twig->processTemplate('email/base.html.twig', ['content' => $params['body']]); + + $message = $email->buildMessage($params); + + return $email->send($message); + } +} diff --git a/dev/plugins/email/cli/ClearQueueFailuresCommand.php b/dev/plugins/email/cli/ClearQueueFailuresCommand.php new file mode 100644 index 00000000..705c8253 --- /dev/null +++ b/dev/plugins/email/cli/ClearQueueFailuresCommand.php @@ -0,0 +1,62 @@ +setName('clear-queue-failures') + ->setAliases(['clearqueue']) + ->addOption( + 'env', + 'e', + InputOption::VALUE_OPTIONAL, + 'The environment to trigger a specific configuration. For example: localhost, mysite.dev, www.mysite.com' + ) + ->setDescription('Clears any queue failures that have accumulated') + ->setHelp('The clear-queue-failures command clears any queue failures that have accumulated'); + } + + /** + * @return int + */ + protected function serve() + { + // TODO: remove when requiring Grav 1.7+ + if (method_exists($this, 'initializeGrav')) { + $this->initializeGrav(); + } + + + $this->output->writeln(''); + $this->output->writeln('Current Configuration:'); + $this->output->writeln(''); + + $grav = Grav::instance(); + dump($grav['config']->get('plugins.email')); + + $this->output->writeln(''); + + require_once __DIR__ . '/../vendor/autoload.php'; + + Email::clearQueueFailures(); + + return 0; + } +} diff --git a/dev/plugins/email/cli/FlushQueueCommand.php b/dev/plugins/email/cli/FlushQueueCommand.php new file mode 100644 index 00000000..3a735a88 --- /dev/null +++ b/dev/plugins/email/cli/FlushQueueCommand.php @@ -0,0 +1,63 @@ +setName('flush-queue') + ->setAliases(['flushqueue']) + ->addOption( + 'env', + 'e', + InputOption::VALUE_OPTIONAL, + 'The environment to trigger a specific configuration. For example: localhost, mysite.dev, www.mysite.com' + ) + ->setDescription('Flushes the email queue of any pending emails') + ->setHelp('The flush-queue command flushes the email queue of any pending emails'); + } + + /** + * @return int + */ + protected function serve() + { + // TODO: remove when requiring Grav 1.7+ + if (method_exists($this, 'initializeGrav')) { + $this->initializeGrav(); + } + + $this->output->writeln(''); + $this->output->writeln('Current Configuration:'); + $this->output->writeln(''); + + $grav = Grav::instance(); + dump($grav['config']->get('plugins.email')); + + $this->output->writeln(''); + + require_once __DIR__ . '/../vendor/autoload.php'; + + $output = Email::flushQueue(); + + $this->output->writeln('' . $output . ''); + + return 0; + } +} diff --git a/dev/plugins/email/cli/TestEmailCommand.php b/dev/plugins/email/cli/TestEmailCommand.php new file mode 100644 index 00000000..0c07dd04 --- /dev/null +++ b/dev/plugins/email/cli/TestEmailCommand.php @@ -0,0 +1,107 @@ +setName('test-email') + ->setAliases(['testemail']) + ->addOption( + 'to', + 't', + InputOption::VALUE_REQUIRED, + 'An email address to send the email to' + ) + ->addOption( + 'env', + 'e', + InputOption::VALUE_OPTIONAL, + 'The environment to trigger a specific configuration. For example: localhost, mysite.dev, www.mysite.com' + ) + ->addOption( + 'subject', + 's', + InputOption::VALUE_OPTIONAL, + 'A subject for the email' + ) + ->addOption( + 'body', + 'b', + InputOption::VALUE_OPTIONAL, + 'The body of the email' + ) + ->setDescription('Sends a test email using the plugin\'s configuration') + ->setHelp('The test-email command sends a test email using the plugin\'s configuration'); + } + + /** + * @return int + */ + protected function serve() + { + // TODO: remove when requiring Grav 1.7+ + if (method_exists($this, 'initializeGrav')) { + $this->initializeThemes(); + } + + $this->output->writeln(''); + $this->output->writeln('Current Configuration:'); + $this->output->writeln(''); + + $grav = Grav::instance(); + $email_config = new Data($grav['config']->get('plugins.email')); + if ($email_config->get('mailer.smtp.password')) { + $password = $email_config->get('mailer.smtp.password'); + $obfuscated_password = str_repeat('*', strlen($password) - 2) . substr($password, -2); + $email_config->set('mailer.smtp.password', $obfuscated_password); + } + + dump($email_config); + + $this->output->writeln(''); + + $grav['Email'] = new Email(); + + $to = $this->input->getOption('to') ?: $grav['config']->get('plugins.email.to'); + $subject = $this->input->getOption('subject'); + $body = $this->input->getOption('body'); + + if (!$subject) { + $subject = 'Testing Grav Email Plugin'; + } + + if (!$body) { + $configuration = print_r($email_config, true); + $body = $grav['language']->translate(['PLUGIN_EMAIL.TEST_EMAIL_BODY', $configuration]); + } + + $sent = EmailUtils::sendEmail(['subject'=>$subject, 'body'=>$body, 'to'=>$to]); + + if ($sent) { + $this->output->writeln("Message sent successfully!"); + } else { + $this->output->writeln("Problem sending email..."); + } + + return 0; + } +} diff --git a/dev/plugins/email/composer.json b/dev/plugins/email/composer.json new file mode 100644 index 00000000..56997068 --- /dev/null +++ b/dev/plugins/email/composer.json @@ -0,0 +1,33 @@ +{ + "name": "getgrav/grav-plugin-email", + "type": "grav-plugin", + "description": "Email plugin for Grav CMS", + "keywords": ["email", "plugin", "sender"], + "homepage": "https://github.com/getgrav/grav-plugin-email", + "license": "MIT", + "authors": [ + { + "name": "Team Grav", + "email": "devs@getgrav.org", + "homepage": "https://getgrav.org", + "role": "Developer" + } + ], + "support": { + "issues": "https://github.com/getgrav/grav-plugin-email/issues", + "irc": "https://chat.getgrav.org", + "forum": "https://getgrav.org/forum", + "docs": "https://github.com/getgrav/grav-plugin-email/blob/master/README.md" + }, + "require": { + "php": ">=7.1.3", + "swiftmailer/swiftmailer": "~6.0" + }, + "autoload": { + "psr-4": { + "Grav\\Plugin\\Email\\": "classes/", + "Grav\\Plugin\\Console\\": "cli/" + }, + "classmap": ["email.php"] + } +} diff --git a/dev/plugins/email/composer.lock b/dev/plugins/email/composer.lock new file mode 100644 index 00000000..738a9c47 --- /dev/null +++ b/dev/plugins/email/composer.lock @@ -0,0 +1,652 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "a841aff1de7e0364fe3e92ecd7b2fb56", + "packages": [ + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "egulias/email-validator", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "ee0db30118f661fb166bcffbf5d82032df484697" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", + "reference": "ee0db30118f661fb166bcffbf5d82032df484697", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2021-10-11T09:18:27+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.0|^3.1", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.4" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "abandoned": "symfony/mailer", + "time": "2021-10-18T15:26:12+00:00" + }, + { + "name": "symfony/polyfill-iconv", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Iconv extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "iconv", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T12:26:48+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:17:38+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.1.3" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/dev/plugins/email/email.php b/dev/plugins/email/email.php new file mode 100644 index 00000000..93e2b1cb --- /dev/null +++ b/dev/plugins/email/email.php @@ -0,0 +1,181 @@ + ['onPluginsInitialized', 0], + 'onFormProcessed' => ['onFormProcessed', 0], + 'onTwigTemplatePaths' => ['onTwigTemplatePaths', 0], + 'onSchedulerInitialized' => ['onSchedulerInitialized', 0], + 'onAdminSave' => ['onAdminSave', 0], + ]; + } + + /** + * Initialize emailing. + */ + public function onPluginsInitialized() + { + require_once __DIR__ . '/vendor/autoload.php'; + + $this->email = new Email(); + + if ($this->email->enabled()) { + $this->grav['Email'] = $this->email; + } + } + + /** + * Add twig paths to plugin templates. + */ + public function onTwigTemplatePaths() + { + $twig = $this->grav['twig']; + $twig->twig_paths[] = __DIR__ . '/templates'; + } + + /** + * Force compile during save if admin plugin save + * + * @param Event $event + */ + public function onAdminSave(Event $event) + { + /** @var Data $obj */ + $obj = $event['object']; + + + + if ($obj instanceof Data && $obj->blueprints()->getFilename() === 'email/blueprints') { + $current_pw = $this->grav['config']->get('plugins.email.mailer.smtp.password'); + $new_pw = $obj->get('mailer.smtp.password'); + if (!empty($current_pw) && empty($new_pw)) { + $obj->set('mailer.smtp.password', $current_pw); + } + + } + } + + /** + * Send email when processing the form data. + * + * @param Event $event + */ + public function onFormProcessed(Event $event) + { + $form = $event['form']; + $action = $event['action']; + $params = $event['params']; + + if (!$this->email->enabled()) { + return; + } + + switch ($action) { + case 'email': + // Prepare Twig variables + $vars = array( + 'form' => $form, + 'page' => $this->grav['page'] + ); + + // Copy files now, we need those. + // TODO: needs an update + $form->legacyUploads(); + $form->copyFiles(); + + $this->grav->fireEvent('onEmailSend', new Event(['params' => &$params, 'vars' => &$vars])); + + if ($this->isAssocArray($params)) { + $this->sendFormEmail($form, $params, $vars); + } else { + foreach ($params as $email) { + $this->sendFormEmail($form, $email, $vars); + } + } + + break; + } + } + + /** + * Add index job to Grav Scheduler + * Requires Grav 1.6.0 - Scheduler + */ + public function onSchedulerInitialized(Event $e) + { + if ($this->config->get('plugins.email.queue.enabled')) { + + /** @var Scheduler $scheduler */ + $scheduler = $e['scheduler']; + $at = $this->config->get('plugins.email.queue.flush_frequency'); + $logs = 'logs/email-queue.out'; + $job = $scheduler->addFunction('Grav\Plugin\Email\Email::flushQueue', [], 'email-flushqueue'); + $job->at($at); + $job->output($logs); + $job->backlink('/plugins/email'); + } + } + + protected function sendFormEmail($form, $params, $vars) + { + // Build message + $message = $this->email->buildMessage($params, $vars); + + if (isset($params['attachments'])) { + $filesToAttach = (array)$params['attachments']; + if ($filesToAttach) foreach ($filesToAttach as $fileToAttach) { + $filesValues = $form->value($fileToAttach); + + if ($filesValues) foreach($filesValues as $fileValues) { + if (isset($fileValues['file'])) { + $filename = $fileValues['file']; + } else { + $filename = ROOT_DIR . $fileValues['path']; + } + + try { + $message->attach(\Swift_Attachment::fromPath($filename)); + } catch (\Exception $e) { + // Log any issues + $this->grav['log']->error($e->getMessage()); + } + } + } + } + + //fire event to apply optional signers + $this->grav->fireEvent('onEmailMessage', new Event(['message' => $message, 'params' => $params, 'form' => $form])); + + // Send e-mail + $this->email->send($message); + + //fire event after eMail was sent + $this->grav->fireEvent('onEmailSent', new Event(['message' => $message, 'params' => $params, 'form' => $form])); + } + + protected function isAssocArray(array $arr) + { + if (array() === $arr) return false; + $keys = array_keys($arr); + $index_keys = range(0, count($arr) - 1); + return $keys !== $index_keys; + } + +} diff --git a/dev/plugins/email/email.yaml b/dev/plugins/email/email.yaml new file mode 100644 index 00000000..6ddf7221 --- /dev/null +++ b/dev/plugins/email/email.yaml @@ -0,0 +1,23 @@ +enabled: true +from: +from_name: +to: +to_name: +queue: + enabled: false + flush_frequency: '* * * * *' + flush_msg_limit: 10 + flush_time_limit: 100 +mailer: + engine: sendmail + smtp: + server: localhost + port: 25 + encryption: none + user: '' + password: '' + auth_mode: '' + sendmail: + bin: '/usr/sbin/sendmail -bs' +content_type: text/html +debug: false \ No newline at end of file diff --git a/dev/plugins/email/languages.yaml b/dev/plugins/email/languages.yaml new file mode 100644 index 00000000..fa89ac45 --- /dev/null +++ b/dev/plugins/email/languages.yaml @@ -0,0 +1,165 @@ +en: + PLUGIN_EMAIL: + MAIL_ENGINE: "Mail Engine" + MAIL_ENGINE_DISABLED: "Disabled" + CONTENT_TYPE: "Content type" + CONTENT_TYPE_PLAIN_TEXT: "Plain text" + CHARSET: "Charset" + CHARSET_PLACEHOLDER: "Defaults to UTF-8" + EMAIL_FORM: "From address" + EMAIL_FORM_PLACEHOLDER: "Default email from address" + EMAIL_FROM_NAME: "From name" + EMAIL_FROM_NAME_PLACEHOLDER: "Default email from name" + EMAIL_TO: "To address" + EMAIL_TO_PLACEHOLDER: "Default email to address" + EMAIL_TO_NAME: "To name" + EMAIL_TO_NAME_PLACEHOLDER: "Default email to name" + EMAIL_CC: "CC address" + EMAIL_CC_PLACEHOLDER: "Default email CC address" + EMAIL_CC_NAME: "CC name" + EMAIL_CC_NAME_PLACEHOLDER: "Default email CC name" + EMAIL_BCC: "BCC address" + EMAIL_BCC_PLACEHOLDER: "Default email BCC address" + EMAIL_REPLY_TO: "Reply-to address" + EMAIL_REPLY_TO_PLACEHOLDER: "Default email reply-to address" + EMAIL_REPLY_TO_NAME: "Reply-to name" + EMAIL_REPLY_TO_NAME_PLACEHOLDER: "Default email reply-to name" + EMAIL_BODY: "Body" + EMAIL_BODY_PLACEHOLDER: "Defaults to a table of all form fields" + SMTP_SERVER: "SMTP server" + SMTP_SERVER_PLACEHOLDER: "e.g. smtp.google.com" + SMTP_PORT: "SMTP port" + SMTP_PORT_PLACEHOLDER: "Defaults to 25 (plaintext) / 587 (encrypted)" + SMTP_ENCRYPTION: "SMTP encryption" + SMTP_ENCRYPTION_NONE: "None" + SMTP_LOGIN_NAME: "SMTP login name" + SMTP_PASSWORD: "SMTP password" + SMTP_AUTH_MODE: "SMTP auth mode" + PATH_TO_SENDMAIL: "Path to sendmail" + DEBUG: "Debug" + EMAIL_NOT_CONFIGURED: "Email not configured" + PLEASE_CONFIGURE_A_TO_ADDRESS: "Please configure a 'to' address in the Email Plugin settings, or in the form" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Please configure a 'from' address in the Email Plugin settings, or in the form" + TEST_EMAIL_BODY: "

    Testing Email

    This test email has been sent based on the following configuration:

    %1$s

    " + EMAIL_DEFAULTS: "Email Defaults" + SMTP_CONFIGURATION: "SMTP Configuration" + SENDMAIL_CONFIGURATION: "Sendmail Configuration" + ADVANCED: "Advanced" + EMAIL_FOOTER: "GetGrav.org" + QUEUE_TITLE: "Email Queue" + QUEUE_DESC: "When you enable the email queue, email is not sent immediately, rather the email is sent to the queue, and then the Grav scheduler will flush the queue and actually send the email based on the configured frequency. This ensures Grav is not waiting around for email connections to complete." + QUEUE_ENABLED: "Enabled" + QUEUE_FLUSH_FREQUENCY: "Flush Frequency" + QUEUE_FLUSH_FREQUENCY_HELP: "Use 'cron' format" + QUEUE_FLUSH_MSG_LIMIT: "Messages per flush" + QUEUE_FLUSH_MSG_LIMIT_APPEND: "Messages" + QUEUE_FLUSH_TIME_LIMIT: "Flush time limit" + QUEUE_FLUSH_TIME_LIMIT_APPEND: "Seconds" + + + +da: + PLUGIN_EMAIL: + PLEASE_CONFIGURE_A_TO_ADDRESS: "Konfigurere venligst en 'til' email adresse i Email Plugin indstillingerne eller her i formularen" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Konfigurere venligst en 'fra' email adresse i Email Plugin indstillingerne eller her i formularen" + +de: + PLUGIN_EMAIL: + EMAIL_NOT_CONFIGURED: "E-Mail ist nicht konfiguriert" + PLEASE_CONFIGURE_A_TO_ADDRESS: "Bitte konfigurieren sie eine 'An' ('to') Adresse in den Email-Plugin-Einstellungen oder im Formular." + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Bitte konfigurieren sie eine 'Von' ('from') Adresse in den Email-Plugin-Einstellungen oder im Formular." + +es: + PLUGIN_EMAIL: + PLEASE_CONFIGURE_A_TO_ADDRESS: "Por favor configura una dirección de 'remitente' en la configuración del Plugin de Email o en el formulario" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Por favor configura una dirección de 'destinatario' en la configuración del Plugin de Email o en el formulario" + +fr: + PLUGIN_EMAIL: + EMAIL_NOT_CONFIGURED: "L’e-mail n’est pas configuré" + PLEASE_CONFIGURE_A_TO_ADDRESS: "Veuillez configurer une adresse de 'destinataire' dans les paramètres du Plugin ou dans le formulaire." + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Veuillez configurer une adresse 'd'expéditeur' dans les paramètres du Plugin ou dans le formulaire." + TEST_EMAIL_BODY: "

    E-mail de test

    Cet e-mail de test est basé sur la configuration suivante :

    %1$s

    " + EMAIL_FOOTER: "GetGrav.org" + +hr: + PLUGIN_EMAIL: + EMAIL_NOT_CONFIGURED: "Email nije konfiguriran" + PLEASE_CONFIGURE_A_TO_ADDRESS: "Konfigurirajte 'za' ('to') adresu u postavkama Email dodatka ili u obrascu" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Konfigurirajte 'od' ('from') adresu u postavkama Email dodatka ili u obrascu" + +it: + PLUGIN_EMAIL: + PLEASE_CONFIGURE_A_TO_ADDRESS: "Per favore, configura l'indirizzo di destinazione ('to') nella configurazione del Plugin Email, oppure direttamente nella form." + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Per favore, configura l'indirizzo di provenienza ('from') nella configurazione del Plugin Email, oppure direttamente nella form" + +ro: + PLUGIN_EMAIL: + EMAIL_NOT_CONFIGURED: "Adresa de email nu este configurată" + PLEASE_CONFIGURE_A_TO_ADDRESS: "Vă rugam setaÈ›i o adresă 'către' în setările modulului Email sau în formular" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Vă rugam setaÈ›i o adresă 'de la' în setările modulului Email sau în formular" + +ru: + PLUGIN_EMAIL: + MAIL_ENGINE: "ÐŸÐ¾Ñ‡Ñ‚Ð¾Ð²Ð°Ñ ÑиÑтема" + MAIL_ENGINE_DISABLED: "Отключена" + CONTENT_TYPE: "Тип контента" + CONTENT_TYPE_PLAIN_TEXT: "ПроÑтой текÑÑ‚" + CHARSET: "Кодировка" + CHARSET_PLACEHOLDER: "По умолчанию UTF-8" + EMAIL_DEFAULTS: "Email наÑтройки по умолчанию" + EMAIL_FORM: "Почта отправителÑ" + EMAIL_FORM_PLACEHOLDER: "Email Ð°Ð´Ñ€ÐµÑ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²Ð¸Ñ‚ÐµÐ»Ñ Ð¿Ð¾ умолчанию" + EMAIL_FROM_NAME: "Ð˜Ð¼Ñ Ð¿Ð¾Ñ‡Ñ‚Ñ‹ отправителÑ" + EMAIL_FROM_NAME_PLACEHOLDER: "Email Ð¸Ð¼Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²Ð¸Ñ‚ÐµÐ»Ñ Ð¿Ð¾ умолчанию" + EMAIL_TO: "Почта получателÑ" + EMAIL_TO_PLACEHOLDER: "Email Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ð»ÑƒÑ‡Ð°Ñ‚ÐµÐ»Ñ Ð¿Ð¾ умолчанию" + EMAIL_TO_NAME: "Ð˜Ð¼Ñ Ð¿Ð¾Ñ‡Ñ‚Ñ‹ получателÑ" + EMAIL_TO_NAME_PLACEHOLDER: "Email Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑƒÑ‡Ð°Ñ‚ÐµÐ»Ñ Ð¿Ð¾ умолчанию" + EMAIL_CC: "Почта CC" + EMAIL_CC_PLACEHOLDER: "Email CC Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾ умолчанию" + EMAIL_CC_NAME: "Ð˜Ð¼Ñ Ð¿Ð¾Ñ‡Ñ‚Ñ‹ CC" + EMAIL_CC_NAME_PLACEHOLDER: "Email CC Ð¸Ð¼Ñ Ð¿Ð¾ умолчанию" + EMAIL_BCC: "Почта BCC" + EMAIL_BCC_PLACEHOLDER: "Email BCC Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾ умолчанию" + EMAIL_REPLY_TO: "Почта Ð´Ð»Ñ Ð¾Ñ‚Ð²ÐµÑ‚Ð¾Ð²" + EMAIL_REPLY_TO_PLACEHOLDER: "Email Ð´Ð»Ñ Ð¾Ñ‚Ð²ÐµÑ‚Ð¾Ð² Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾ умолчанию" + EMAIL_REPLY_TO_NAME: "Ð˜Ð¼Ñ Ð¿Ð¾Ñ‡Ñ‚Ñ‹ Ð´Ð»Ñ Ð¾Ñ‚Ð²ÐµÑ‚Ð¾Ð²" + EMAIL_REPLY_TO_NAME_PLACEHOLDER: "Email Ð´Ð»Ñ Ð¾Ñ‚Ð²ÐµÑ‚Ð¾Ð² Ð¸Ð¼Ñ Ð¿Ð¾ умолчанию" + EMAIL_BODY: "Тело ÑообщениÑ" + EMAIL_BODY_PLACEHOLDER: "По умолчанию иÑпользуетÑÑ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ð° вÑех полей формы" + SMTP_CONFIGURATION: "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ SMTP" + SMTP_SERVER: "SMTP Ñервер" + SMTP_SERVER_PLACEHOLDER: "e.g. smtp.google.com" + SMTP_PORT: "SMTP порт" + SMTP_PORT_PLACEHOLDER: "По умолчанию 25 (plaintext) / 587 (encrypted)" + SMTP_ENCRYPTION: "SMTP шифрование" + SMTP_ENCRYPTION_NONE: "Ðет" + SMTP_LOGIN_NAME: "SMTP логин" + SMTP_PASSWORD: "SMTP пароль" + SENDMAIL_CONFIGURATION: "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Sendmail" + PATH_TO_SENDMAIL: "Путь к sendmail" + QUEUE_TITLE: "Очередь Email" + QUEUE_DESC: "Когда вы включаете очередь email, ÑÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ð¿Ð¾Ñ‡Ñ‚Ð° не отправлÑетÑÑ Ð½ÐµÐ¼ÐµÐ´Ð»ÐµÐ½Ð½Ð¾, а отправлÑетÑÑ Ð² очередь, затем планировщик Grav обрабатывает очередь и на оÑнове наÑтроенной чаÑтоты фактичеÑки отправлÑет Ñлектронную почту. Это гарантирует, что Grav не ждет Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº Ñлектронной почте." + QUEUE_ENABLED: "Включено" + QUEUE_FLUSH_FREQUENCY: "ЧаÑтота обраблтки" + QUEUE_FLUSH_FREQUENCY_HELP: "ИÑпользовать формат 'cron'" + QUEUE_FLUSH_MSG_LIMIT: "КоличеÑтво Ñообщений на задачу" + QUEUE_FLUSH_MSG_LIMIT_APPEND: "Сообщений" + QUEUE_FLUSH_TIME_LIMIT: "Ограничение времени обработки" + QUEUE_FLUSH_TIME_LIMIT_APPEND: "Секунд" + ADVANCED: "РаÑширенные" + DEBUG: "Отладка" + EMAIL_NOT_CONFIGURED: "Ð­Ð»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð°Ñ Ð¿Ð¾Ñ‡Ñ‚Ð° не наÑтроена" + PLEASE_CONFIGURE_A_TO_ADDRESS: "ПожалуйÑта наÑтройте Ð°Ð´Ñ€ÐµÑ Ð¿Ð¾Ð»ÑƒÑ‡Ð°Ñ‚ÐµÐ»Ñ ('to') в наÑтройках плагина Email Plugin, или на форме" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "ПожалуйÑта наÑтройте Ð°Ð´Ñ€ÐµÑ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²Ð¸Ñ‚ÐµÐ»Ñ ('from') в наÑтройках плагина Email Plugin, или на форме" + TEST_EMAIL_BODY: "

    ТеÑтирование Ñлектронной почты

    Это теÑтовое пиÑьмо отправлено на оÑнове Ñледующей конфигурации:

    %1$s

    " + EMAIL_FOOTER: "GetGrav.org" + +uk: + PLUGIN_EMAIL: + EMAIL_NOT_CONFIGURED: "Електронна пошта не налаштована" + PLEASE_CONFIGURE_A_TO_ADDRESS: "Будь лаÑка налаштуйте адреÑу одержувача ('to') в налаштуваннÑÑ… плагіна Email Plugin, або на формі" + PLEASE_CONFIGURE_A_FROM_ADDRESS: "Будь лаÑка налаштуйте адреÑу відправника ('from') в налаштуваннÑÑ… плагіна Email Plugin, або на формі" + TEST_EMAIL_BODY: "

    ТеÑÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ ÐµÐ»ÐµÐºÑ‚Ñ€Ð¾Ð½Ð½Ð¾Ñ— пошти

    Це теÑтовий лиÑÑ‚ відправлено на оÑнові такої конфігурації:

    %1$s

    " + EMAIL_FOOTER: "GetGrav.org" diff --git a/dev/plugins/email/templates/email/base.html.twig b/dev/plugins/email/templates/email/base.html.twig new file mode 100644 index 00000000..0dd827fc --- /dev/null +++ b/dev/plugins/email/templates/email/base.html.twig @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + {% block content %} + {{ content|raw }} + {% endblock content %} +
    +
    +
    + + + + + + + + + + + + + + diff --git a/dev/plugins/email/vendor/autoload.php b/dev/plugins/email/vendor/autoload.php new file mode 100644 index 00000000..26a2db7f --- /dev/null +++ b/dev/plugins/email/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var ?string */ + private $vendorDir; + + // PSR-4 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array + */ + private $missingClasses = array(); + + /** @var ?string */ + private $apcuPrefix; + + /** + * @var self[] + */ + private static $registeredLoaders = array(); + + /** + * @param ?string $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + /** + * @return string[] + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array[] + * @psalm-return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return string[] Array of classname => path + * @psalm-var array + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; +} diff --git a/dev/plugins/email/vendor/composer/InstalledVersions.php b/dev/plugins/email/vendor/composer/InstalledVersions.php new file mode 100644 index 00000000..d50e0c9f --- /dev/null +++ b/dev/plugins/email/vendor/composer/InstalledVersions.php @@ -0,0 +1,350 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/dev/plugins/email/vendor/composer/LICENSE b/dev/plugins/email/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/dev/plugins/email/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/dev/plugins/email/vendor/composer/autoload_classmap.php b/dev/plugins/email/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..17e18aa4 --- /dev/null +++ b/dev/plugins/email/vendor/composer/autoload_classmap.php @@ -0,0 +1,12 @@ + $vendorDir . '/composer/InstalledVersions.php', + 'Grav\\Plugin\\EmailPlugin' => $baseDir . '/email.php', + 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', +); diff --git a/dev/plugins/email/vendor/composer/autoload_files.php b/dev/plugins/email/vendor/composer/autoload_files.php new file mode 100644 index 00000000..ac0724d5 --- /dev/null +++ b/dev/plugins/email/vendor/composer/autoload_files.php @@ -0,0 +1,15 @@ + $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', + 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', +); diff --git a/dev/plugins/email/vendor/composer/autoload_namespaces.php b/dev/plugins/email/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..b7fc0125 --- /dev/null +++ b/dev/plugins/email/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($vendorDir . '/symfony/polyfill-php72'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'), + 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), + 'Symfony\\Polyfill\\Iconv\\' => array($vendorDir . '/symfony/polyfill-iconv'), + 'Grav\\Plugin\\Email\\' => array($baseDir . '/classes'), + 'Grav\\Plugin\\Console\\' => array($baseDir . '/cli'), + 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'), + 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), +); diff --git a/dev/plugins/email/vendor/composer/autoload_real.php b/dev/plugins/email/vendor/composer/autoload_real.php new file mode 100644 index 00000000..81fda326 --- /dev/null +++ b/dev/plugins/email/vendor/composer/autoload_real.php @@ -0,0 +1,75 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit73924571ea6ee98bb12d10ff20aff2ab::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit73924571ea6ee98bb12d10ff20aff2ab::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire73924571ea6ee98bb12d10ff20aff2ab($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire73924571ea6ee98bb12d10ff20aff2ab($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/dev/plugins/email/vendor/composer/autoload_static.php b/dev/plugins/email/vendor/composer/autoload_static.php new file mode 100644 index 00000000..bea65a04 --- /dev/null +++ b/dev/plugins/email/vendor/composer/autoload_static.php @@ -0,0 +1,96 @@ + __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', + 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'S' => + array ( + 'Symfony\\Polyfill\\Php72\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, + 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, + 'Symfony\\Polyfill\\Iconv\\' => 23, + ), + 'G' => + array ( + 'Grav\\Plugin\\Email\\' => 18, + 'Grav\\Plugin\\Console\\' => 20, + ), + 'E' => + array ( + 'Egulias\\EmailValidator\\' => 23, + ), + 'D' => + array ( + 'Doctrine\\Common\\Lexer\\' => 22, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Symfony\\Polyfill\\Php72\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Polyfill\\Intl\\Normalizer\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', + ), + 'Symfony\\Polyfill\\Intl\\Idn\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', + ), + 'Symfony\\Polyfill\\Iconv\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-iconv', + ), + 'Grav\\Plugin\\Email\\' => + array ( + 0 => __DIR__ . '/../..' . '/classes', + ), + 'Grav\\Plugin\\Console\\' => + array ( + 0 => __DIR__ . '/../..' . '/cli', + ), + 'Egulias\\EmailValidator\\' => + array ( + 0 => __DIR__ . '/..' . '/egulias/email-validator/src', + ), + 'Doctrine\\Common\\Lexer\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + 'Grav\\Plugin\\EmailPlugin' => __DIR__ . '/../..' . '/email.php', + 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit73924571ea6ee98bb12d10ff20aff2ab::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit73924571ea6ee98bb12d10ff20aff2ab::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit73924571ea6ee98bb12d10ff20aff2ab::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/dev/plugins/email/vendor/composer/installed.json b/dev/plugins/email/vendor/composer/installed.json new file mode 100644 index 00000000..78fd46bc --- /dev/null +++ b/dev/plugins/email/vendor/composer/installed.json @@ -0,0 +1,661 @@ +{ + "packages": [ + { + "name": "doctrine/lexer", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "time": "2020-05-25T17:44:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "install-path": "../doctrine/lexer" + }, + { + "name": "egulias/email-validator", + "version": "3.1.2", + "version_normalized": "3.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "ee0db30118f661fb166bcffbf5d82032df484697" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", + "reference": "ee0db30118f661fb166bcffbf5d82032df484697", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "time": "2021-10-11T09:18:27+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "install-path": "../egulias/email-validator" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.3.0", + "version_normalized": "6.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.0|^3.1", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.4" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses" + }, + "time": "2021-10-18T15:26:12+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "abandoned": "symfony/mailer", + "install-path": "../swiftmailer/swiftmailer" + }, + { + "name": "symfony/polyfill-iconv", + "version": "v1.23.0", + "version_normalized": "1.23.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "time": "2021-05-27T09:27:20+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Iconv extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "iconv", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-iconv" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.23.0", + "version_normalized": "1.23.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2021-05-27T09:27:20+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-intl-idn" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", + "version_normalized": "1.23.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2021-02-19T12:13:01+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-intl-normalizer" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.1", + "version_normalized": "1.23.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2021-05-27T12:26:48+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-mbstring" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.23.0", + "version_normalized": "1.23.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "time": "2021-05-27T09:17:38+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/polyfill-php72" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/dev/plugins/email/vendor/composer/installed.php b/dev/plugins/email/vendor/composer/installed.php new file mode 100644 index 00000000..7677ed2c --- /dev/null +++ b/dev/plugins/email/vendor/composer/installed.php @@ -0,0 +1,95 @@ + array( + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'type' => 'grav-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => 'da36c458eae6fd7d7e27282a9d5bec0b9cf78aae', + 'name' => 'getgrav/grav-plugin-email', + 'dev' => true, + ), + 'versions' => array( + 'doctrine/lexer' => array( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../doctrine/lexer', + 'aliases' => array(), + 'reference' => 'e864bbf5904cb8f5bb334f99209b48018522f042', + 'dev_requirement' => false, + ), + 'egulias/email-validator' => array( + 'pretty_version' => '3.1.2', + 'version' => '3.1.2.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../egulias/email-validator', + 'aliases' => array(), + 'reference' => 'ee0db30118f661fb166bcffbf5d82032df484697', + 'dev_requirement' => false, + ), + 'getgrav/grav-plugin-email' => array( + 'pretty_version' => 'dev-develop', + 'version' => 'dev-develop', + 'type' => 'grav-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => 'da36c458eae6fd7d7e27282a9d5bec0b9cf78aae', + 'dev_requirement' => false, + ), + 'swiftmailer/swiftmailer' => array( + 'pretty_version' => 'v6.3.0', + 'version' => '6.3.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../swiftmailer/swiftmailer', + 'aliases' => array(), + 'reference' => '8a5d5072dca8f48460fce2f4131fcc495eec654c', + 'dev_requirement' => false, + ), + 'symfony/polyfill-iconv' => array( + 'pretty_version' => 'v1.23.0', + 'version' => '1.23.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-iconv', + 'aliases' => array(), + 'reference' => '63b5bb7db83e5673936d6e3b8b3e022ff6474933', + 'dev_requirement' => false, + ), + 'symfony/polyfill-intl-idn' => array( + 'pretty_version' => 'v1.23.0', + 'version' => '1.23.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', + 'aliases' => array(), + 'reference' => '65bd267525e82759e7d8c4e8ceea44f398838e65', + 'dev_requirement' => false, + ), + 'symfony/polyfill-intl-normalizer' => array( + 'pretty_version' => 'v1.23.0', + 'version' => '1.23.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', + 'aliases' => array(), + 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', + 'dev_requirement' => false, + ), + 'symfony/polyfill-mbstring' => array( + 'pretty_version' => 'v1.23.1', + 'version' => '1.23.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', + 'aliases' => array(), + 'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', + 'dev_requirement' => false, + ), + 'symfony/polyfill-php72' => array( + 'pretty_version' => 'v1.23.0', + 'version' => '1.23.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/polyfill-php72', + 'aliases' => array(), + 'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976', + 'dev_requirement' => false, + ), + ), +); diff --git a/dev/plugins/email/vendor/composer/platform_check.php b/dev/plugins/email/vendor/composer/platform_check.php new file mode 100644 index 00000000..589e9e77 --- /dev/null +++ b/dev/plugins/email/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ += 70200)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/dev/plugins/email/vendor/doctrine/lexer/LICENSE b/dev/plugins/email/vendor/doctrine/lexer/LICENSE new file mode 100644 index 00000000..e8fdec4a --- /dev/null +++ b/dev/plugins/email/vendor/doctrine/lexer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2006-2018 Doctrine Project + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dev/plugins/email/vendor/doctrine/lexer/README.md b/dev/plugins/email/vendor/doctrine/lexer/README.md new file mode 100644 index 00000000..e1b419a6 --- /dev/null +++ b/dev/plugins/email/vendor/doctrine/lexer/README.md @@ -0,0 +1,9 @@ +# Doctrine Lexer + +Build Status: [![Build Status](https://travis-ci.org/doctrine/lexer.svg?branch=master)](https://travis-ci.org/doctrine/lexer) + +Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. + +This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). + +https://www.doctrine-project.org/projects/lexer.html diff --git a/dev/plugins/email/vendor/doctrine/lexer/composer.json b/dev/plugins/email/vendor/doctrine/lexer/composer.json new file mode 100644 index 00000000..3432bae4 --- /dev/null +++ b/dev/plugins/email/vendor/doctrine/lexer/composer.json @@ -0,0 +1,41 @@ +{ + "name": "doctrine/lexer", + "type": "library", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "keywords": [ + "php", + "parser", + "lexer", + "annotations", + "docblock" + ], + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "license": "MIT", + "authors": [ + {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, + {"name": "Roman Borschel", "email": "roman@code-factory.org"}, + {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} + ], + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "autoload": { + "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } + }, + "autoload-dev": { + "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "config": { + "sort-packages": true + } +} diff --git a/dev/plugins/email/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/dev/plugins/email/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php new file mode 100644 index 00000000..385643a4 --- /dev/null +++ b/dev/plugins/email/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php @@ -0,0 +1,328 @@ +input = $input; + $this->tokens = []; + + $this->reset(); + $this->scan($input); + } + + /** + * Resets the lexer. + * + * @return void + */ + public function reset() + { + $this->lookahead = null; + $this->token = null; + $this->peek = 0; + $this->position = 0; + } + + /** + * Resets the peek pointer to 0. + * + * @return void + */ + public function resetPeek() + { + $this->peek = 0; + } + + /** + * Resets the lexer position on the input to the given position. + * + * @param int $position Position to place the lexical scanner. + * + * @return void + */ + public function resetPosition($position = 0) + { + $this->position = $position; + } + + /** + * Retrieve the original lexer's input until a given position. + * + * @param int $position + * + * @return string + */ + public function getInputUntilPosition($position) + { + return substr($this->input, 0, $position); + } + + /** + * Checks whether a given token matches the current lookahead. + * + * @param int|string $token + * + * @return bool + */ + public function isNextToken($token) + { + return $this->lookahead !== null && $this->lookahead['type'] === $token; + } + + /** + * Checks whether any of the given tokens matches the current lookahead. + * + * @param array $tokens + * + * @return bool + */ + public function isNextTokenAny(array $tokens) + { + return $this->lookahead !== null && in_array($this->lookahead['type'], $tokens, true); + } + + /** + * Moves to the next token in the input string. + * + * @return bool + */ + public function moveNext() + { + $this->peek = 0; + $this->token = $this->lookahead; + $this->lookahead = isset($this->tokens[$this->position]) + ? $this->tokens[$this->position++] : null; + + return $this->lookahead !== null; + } + + /** + * Tells the lexer to skip input tokens until it sees a token with the given value. + * + * @param string $type The token type to skip until. + * + * @return void + */ + public function skipUntil($type) + { + while ($this->lookahead !== null && $this->lookahead['type'] !== $type) { + $this->moveNext(); + } + } + + /** + * Checks if given value is identical to the given token. + * + * @param mixed $value + * @param int|string $token + * + * @return bool + */ + public function isA($value, $token) + { + return $this->getType($value) === $token; + } + + /** + * Moves the lookahead token forward. + * + * @return array|null The next token or NULL if there are no more tokens ahead. + */ + public function peek() + { + if (isset($this->tokens[$this->position + $this->peek])) { + return $this->tokens[$this->position + $this->peek++]; + } + + return null; + } + + /** + * Peeks at the next token, returns it and immediately resets the peek. + * + * @return array|null The next token or NULL if there are no more tokens ahead. + */ + public function glimpse() + { + $peek = $this->peek(); + $this->peek = 0; + + return $peek; + } + + /** + * Scans the input string for tokens. + * + * @param string $input A query string. + * + * @return void + */ + protected function scan($input) + { + if (! isset($this->regex)) { + $this->regex = sprintf( + '/(%s)|%s/%s', + implode(')|(', $this->getCatchablePatterns()), + implode('|', $this->getNonCatchablePatterns()), + $this->getModifiers() + ); + } + + $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; + $matches = preg_split($this->regex, $input, -1, $flags); + + if ($matches === false) { + // Work around https://bugs.php.net/78122 + $matches = [[$input, 0]]; + } + + foreach ($matches as $match) { + // Must remain before 'value' assignment since it can change content + $type = $this->getType($match[0]); + + $this->tokens[] = [ + 'value' => $match[0], + 'type' => $type, + 'position' => $match[1], + ]; + } + } + + /** + * Gets the literal for a given token. + * + * @param int|string $token + * + * @return int|string + */ + public function getLiteral($token) + { + $className = static::class; + $reflClass = new ReflectionClass($className); + $constants = $reflClass->getConstants(); + + foreach ($constants as $name => $value) { + if ($value === $token) { + return $className . '::' . $name; + } + } + + return $token; + } + + /** + * Regex modifiers + * + * @return string + */ + protected function getModifiers() + { + return 'iu'; + } + + /** + * Lexical catchable patterns. + * + * @return array + */ + abstract protected function getCatchablePatterns(); + + /** + * Lexical non-catchable patterns. + * + * @return array + */ + abstract protected function getNonCatchablePatterns(); + + /** + * Retrieve token type. Also processes the token value if necessary. + * + * @param string $value + * + * @return int|string|null + */ + abstract protected function getType(&$value); +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/CHANGELOG.md b/dev/plugins/email/vendor/egulias/email-validator/CHANGELOG.md new file mode 100644 index 00000000..83fd62e0 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/CHANGELOG.md @@ -0,0 +1,33 @@ +# EmailValidator v3 Changelog + +## New Features + +* Access to local part and domain part from EmailParser +* Validations outside of the scope of the RFC will be considered "extra" validations, thus opening the door for adding new; will live in their own folder "extra" (as requested in #248, #195, #183). + +## Breacking changes + +* PHP version upgraded to match Symfony's (as of 12/2020). +* DNSCheckValidation now fails for missing MX records. While the RFC argues that the existence of only A records to be valid, starting in v3 they will be considered invalid. +* Emails domain part are now intenteded to be RFC 1035 compliant, rendering previous valid emails (e.g example@examp&) invalid. + +## PHP versions upgrade policy +PHP version upgrade requirement will happen via MINOR (3.x) version upgrades of the library, following the adoption level by major frameworks. + +## Changes +* #235 +* #215 +* #130 +* #258 +* #188 +* #181 +* #217 +* #214 +* #249 +* #236 +* #257 +* #210 + +## Thanks +To contributors, be it with PRs, reporting issues or supporting otherwise. + diff --git a/dev/plugins/email/vendor/egulias/email-validator/CONTRIBUTING.md b/dev/plugins/email/vendor/egulias/email-validator/CONTRIBUTING.md new file mode 100644 index 00000000..7b79e108 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/CONTRIBUTING.md @@ -0,0 +1,153 @@ +# Contributing + +When contributing to this repository make sure to follow the Pull request process below. +Reduce to the minimum 3rd party dependencies. + +Please note we have a [code of conduct](#Code of Conduct), please follow it in all your interactions with the project. + +## Pull Request Process + +When doing a PR to v2 remember that you also have to do the PR port to v3, or tests confirming the bug is not reproducible. + +1. Supported version is v3. If you are fixing a bug in v2, please port to v3 +2. Use the title as a brief description of the changes +3. Describe the changes you are proposing + 1. If adding an extra validation state the benefits of adding it and the problem is solving + 2. Document in the readme, by adding it to the list +4. Provide appropiate tests for the code you are submitting: aim to keep the existing coverage percentage. +5. Add your Twitter handle (if you have) so we can thank you there. + +## License +By contributing, you agree that your contributions will be licensed under its MIT License. + +## Code of Conduct + +### Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +### Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +### Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at . +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +#### Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +#### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +#### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +#### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +#### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available +at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/dev/plugins/email/vendor/egulias/email-validator/LICENSE b/dev/plugins/email/vendor/egulias/email-validator/LICENSE new file mode 100644 index 00000000..1f0f2678 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2021 Eduardo Gulias Davis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/egulias/email-validator/composer.json b/dev/plugins/email/vendor/egulias/email-validator/composer.json new file mode 100644 index 00000000..d598d1b6 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/composer.json @@ -0,0 +1,38 @@ +{ + "name": "egulias/email-validator", + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": ["email", "validation", "validator", "emailvalidation", "emailvalidator"], + "license": "MIT", + "authors": [ + {"name": "Eduardo Gulias Davis"} + ], + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "require": { + "php": ">=7.2", + "doctrine/lexer": "^1.2", + "symfony/polyfill-intl-idn": "^1.15" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Egulias\\EmailValidator\\Tests\\": "tests" + } + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/composer.lock b/dev/plugins/email/vendor/egulias/email-validator/composer.lock new file mode 100644 index 00000000..c575e7fc --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/composer.lock @@ -0,0 +1,4440 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "a77d36b64bc1213fecf4d4f92d759c3b", + "packages": [ + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/2d63434d922daf7da8dd863e7907e67ee3031483", + "reference": "2d63434d922daf7da8dd863e7907e67ee3031483", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + } + ], + "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9", + "shasum": "" + }, + "require": { + "php": ">=7" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6.0.9 | ^7", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\": "lib" + }, + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "http://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-01-10T17:06:37+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f0c20cf598a958ba2aa8c6e5a71c697d652c7088", + "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Amp\\ByteStream\\": "lib" + }, + "files": [ + "lib/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/master" + }, + "time": "2020-06-29T18:35:05+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.1", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-11T10:22:58+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.4", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:59:24+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "f28d44c286812c714741478d968104c5e604a1d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", + "reference": "f28d44c286812c714741478d968104c5e604a1d4", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:04:11+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.0", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e", + "reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0" + }, + "time": "2021-01-10T17:48:47+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "reference": "9d846d1f5cf101deee7a61c8ba7caa0a975cd730", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/1.5.1" + }, + "time": "2021-02-22T14:02:09+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79", + "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "psr/log": "^1.1" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.1-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.2.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2020-10-10T11:47:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "60d379c243457e073cff02bc323a2a86cb355631" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", + "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.0" + }, + "time": "2020-09-30T07:37:28+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.7.0" + }, + "time": "2020-09-30T07:37:11+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "reference": "e0f1e33a71587aca81be5cffbb9746510e1fe04e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4 || ~7.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/master" + }, + "time": "2020-04-16T18:48:43+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + }, + "time": "2020-12-20T10:01:03+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" + } + ], + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", + "keywords": [ + "array", + "array conversion", + "xml", + "xml conversion" + ], + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, + "time": "2020-06-27T14:33:11+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.4.3", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "909381bd40a17ae6e9076051f0d73293c1c091af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/909381bd40a17ae6e9076051f0d73293c1c091af", + "reference": "909381bd40a17ae6e9076051f0d73293c1c091af", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0 || ^7.0", + "php": "^5.5 || ^7.0 || ^8.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0 || ^5.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0 || ^5.0", + "symfony/yaml": "^2.0.5 || ^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "sanmai/phpunit-legacy-adapter": "^6.1 || ^8.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "PhpCoveralls\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "support": { + "issues": "https://github.com/php-coveralls/php-coveralls/issues", + "source": "https://github.com/php-coveralls/php-coveralls/tree/v2.4.3" + }, + "time": "2020-12-24T09:17:03+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.12.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "245710e971a030f42e08f4912863805570f23d39" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + }, + "time": "2020-12-19T10:15:11+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "7.0.14", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.1 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-02T13:39:03+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:25:21+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-11-30T08:38:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "8.5.14", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c25f79895d27b6ecd5abfa63de1606b786a461a3", + "reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.14" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-01-17T07:37:30+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:47:53+00:00" + }, + { + "name": "sebastian/global-state", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:43:24+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/config", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "50e0e1314a3b2609d32b6a5a0d0fb5342494c4ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/50e0e1314a3b2609d32b6a5a0d0fb5342494c4ab", + "reference": "50e0e1314a3b2609d32b6a5a0d0fb5342494c4ab", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/filesystem": "^4.4|^5.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/finder": "<4.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v5.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:15:41+00:00" + }, + { + "name": "symfony/console", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/89d4b176d12a2946a1ae4e34906a025b7b6b135a", + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-28T22:06:19+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/master" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-09-07T11:33:47+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "262d033b57c73e8b59cd6e68a45c528318b15038" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/262d033b57c73e8b59cd6e68a45c528318b15038", + "reference": "262d033b57c73e8b59cd6e68a45c528318b15038", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/master" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-09-07T11:33:47+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b12274acfab9d9850c52583d136a24398cdf1a0c", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:15:41+00:00" + }, + { + "name": "symfony/string", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "c95468897f408dd0aca2ff582074423dd0455122" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/c95468897f408dd0aca2ff582074423dd0455122", + "reference": "c95468897f408dd0aca2ff582074423dd0455122", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-25T15:14:59+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "338cddc6d74929f6adf19ca5682ac4b8e109cdb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/338cddc6d74929f6adf19ca5682ac4b8e109cdb0", + "reference": "338cddc6d74929f6adf19ca5682ac4b8e109cdb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.2.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-03T04:42:09+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "vimeo/psalm", + "version": "4.6.2", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "bca09d74adc704c4eaee36a3c3e9d379e290fc3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/bca09d74adc704c4eaee36a3c3e9d379e290fc3b", + "reference": "bca09d74adc704c4eaee36a3c3e9d379e290fc3b", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.1", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.5", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.10.1", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "amphp/amp": "^2.4.2", + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0||^6.0", + "ext-curl": "*", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpdocumentor/reflection-docblock": "^5", + "phpmyadmin/sql-parser": "5.1.0||dev-master", + "phpspec/prophecy": ">=1.9.0", + "phpunit/phpunit": "^9.0", + "psalm/plugin-phpunit": "^0.13", + "slevomat/coding-standard": "^6.3.11", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "suggest": { + "ext-igbinary": "^2.0.5" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + }, + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], + "support": { + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.6.2" + }, + "time": "2021-02-26T02:24:18+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.9.1" + }, + "time": "2020-07-08T17:02:28+00:00" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "support": { + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" + }, + "time": "2015-12-17T08:42:14+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=7.2" + }, + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/EmailLexer.php b/dev/plugins/email/vendor/egulias/email-validator/src/EmailLexer.php new file mode 100644 index 00000000..41e9ea94 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/EmailLexer.php @@ -0,0 +1,361 @@ + self::S_OPENCURLYBRACES, + '}' => self::S_CLOSECURLYBRACES, + '(' => self::S_OPENPARENTHESIS, + ')' => self::S_CLOSEPARENTHESIS, + '<' => self::S_LOWERTHAN, + '>' => self::S_GREATERTHAN, + '[' => self::S_OPENBRACKET, + ']' => self::S_CLOSEBRACKET, + ':' => self::S_COLON, + ';' => self::S_SEMICOLON, + '@' => self::S_AT, + '\\' => self::S_BACKSLASH, + '/' => self::S_SLASH, + ',' => self::S_COMMA, + '.' => self::S_DOT, + "'" => self::S_SQUOTE, + "`" => self::S_BACKTICK, + '"' => self::S_DQUOTE, + '-' => self::S_HYPHEN, + '::' => self::S_DOUBLECOLON, + ' ' => self::S_SP, + "\t" => self::S_HTAB, + "\r" => self::S_CR, + "\n" => self::S_LF, + "\r\n" => self::CRLF, + 'IPv6' => self::S_IPV6TAG, + '' => self::S_EMPTY, + '\0' => self::C_NUL, + '*' => self::ASTERISK, + '!' => self::EXCLAMATION, + '&' => self::AMPERSAND, + '^' => self::CARET, + '$' => self::DOLLAR, + '%' => self::PERCENTAGE, + '~' => self::S_TILDE, + '|' => self::S_PIPE, + '_' => self::S_UNDERSCORE, + '=' => self::S_EQUAL, + '+' => self::S_PLUS, + '¿' => self::INVERT_QUESTIONMARK, + '?' => self::QUESTIONMARK, + '#' => self::NUMBER_SIGN, + '¡' => self::INVERT_EXCLAMATION, + ); + + /** + * @var bool + */ + protected $hasInvalidTokens = false; + + /** + * @var array + * + * @psalm-var array{value:string, type:null|int, position:int}|array + */ + protected $previous = []; + + /** + * The last matched/seen token. + * + * @var array + * + * @psalm-suppress NonInvariantDocblockPropertyType + * @psalm-var array{value:string, type:null|int, position:int} + * @psalm-suppress NonInvariantDocblockPropertyType + */ + public $token; + + /** + * The next token in the input. + * + * @var array|null + */ + public $lookahead; + + /** + * @psalm-var array{value:'', type:null, position:0} + */ + private static $nullToken = [ + 'value' => '', + 'type' => null, + 'position' => 0, + ]; + + /** + * @var string + */ + private $accumulator = ''; + + /** + * @var bool + */ + private $hasToRecord = false; + + public function __construct() + { + $this->previous = $this->token = self::$nullToken; + $this->lookahead = null; + } + + /** + * @return void + */ + public function reset() + { + $this->hasInvalidTokens = false; + parent::reset(); + $this->previous = $this->token = self::$nullToken; + } + + /** + * @return bool + */ + public function hasInvalidTokens() + { + return $this->hasInvalidTokens; + } + + /** + * @param int $type + * @throws \UnexpectedValueException + * @return boolean + * + * @psalm-suppress InvalidScalarArgument + */ + public function find($type) + { + $search = clone $this; + $search->skipUntil($type); + + if (!$search->lookahead) { + throw new \UnexpectedValueException($type . ' not found'); + } + return true; + } + + /** + * getPrevious + * + * @return array + */ + public function getPrevious() + { + return $this->previous; + } + + /** + * moveNext + * + * @return boolean + */ + public function moveNext() + { + if ($this->hasToRecord && $this->previous === self::$nullToken) { + $this->accumulator .= $this->token['value']; + } + + $this->previous = $this->token; + $hasNext = parent::moveNext(); + $this->token = $this->token ?: self::$nullToken; + + if ($this->hasToRecord) { + $this->accumulator .= $this->token['value']; + } + + return $hasNext; + } + + /** + * Lexical catchable patterns. + * + * @return string[] + */ + protected function getCatchablePatterns() + { + return array( + '[a-zA-Z]+[46]?', //ASCII and domain literal + '[^\x00-\x7F]', //UTF-8 + '[0-9]+', + '\r\n', + '::', + '\s+?', + '.', + ); + } + + /** + * Lexical non-catchable patterns. + * + * @return string[] + */ + protected function getNonCatchablePatterns() + { + return [ + '[\xA0-\xff]+', + ]; + } + + /** + * Retrieve token type. Also processes the token value if necessary. + * + * @param string $value + * @throws \InvalidArgumentException + * @return integer + */ + protected function getType(&$value) + { + $encoded = $value; + + if (mb_detect_encoding($value, 'auto', true) !== 'UTF-8') { + $encoded = utf8_encode($value); + } + + if ($this->isValid($encoded)) { + return $this->charValue[$encoded]; + } + + if ($this->isNullType($encoded)) { + return self::C_NUL; + } + + if ($this->isInvalidChar($encoded)) { + $this->hasInvalidTokens = true; + return self::INVALID; + } + + + return self::GENERIC; + } + + protected function isInvalidChar(string $value) : bool + { + if(preg_match("/[^\p{S}\p{C}\p{Cc}]+/iu", $value) ) { + return false; + } + return true; + } + + protected function isValid(string $value) : bool + { + if (isset($this->charValue[$value])) { + return true; + } + + return false; + } + + /** + * @param string $value + * @return bool + */ + protected function isNullType($value) + { + if ($value === "\0") { + return true; + } + + return false; + } + + protected function isUTF8Invalid(string $value) : bool + { + if (preg_match('/\p{Cc}+/u', $value)) { + return true; + } + + return false; + } + + /** + * @return string + */ + protected function getModifiers() + { + return 'iu'; + } + + public function getAccumulatedValues() : string + { + return $this->accumulator; + } + + public function startRecording() : void + { + $this->hasToRecord = true; + } + + public function stopRecording() : void + { + $this->hasToRecord = false; + } + + public function clearRecorded() : void + { + $this->accumulator = ''; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/EmailParser.php b/dev/plugins/email/vendor/egulias/email-validator/src/EmailParser.php new file mode 100644 index 00000000..c78f74a9 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/EmailParser.php @@ -0,0 +1,91 @@ +addLongEmailWarning($this->localPart, $this->domainPart); + + return $result; + } + + protected function preLeftParsing(): Result + { + if (!$this->hasAtToken()) { + return new InvalidEmail(new NoLocalPart(), $this->lexer->token["value"]); + } + return new ValidEmail(); + } + + protected function parseLeftFromAt(): Result + { + return $this->processLocalPart(); + } + + protected function parseRightFromAt(): Result + { + return $this->processDomainPart(); + } + + private function processLocalPart() : Result + { + $localPartParser = new LocalPart($this->lexer); + $localPartResult = $localPartParser->parse(); + $this->localPart = $localPartParser->localPart(); + $this->warnings = array_merge($localPartParser->getWarnings(), $this->warnings); + + return $localPartResult; + } + + private function processDomainPart() : Result + { + $domainPartParser = new DomainPart($this->lexer); + $domainPartResult = $domainPartParser->parse(); + $this->domainPart = $domainPartParser->domainPart(); + $this->warnings = array_merge($domainPartParser->getWarnings(), $this->warnings); + + return $domainPartResult; + } + + public function getDomainPart() : string + { + return $this->domainPart; + } + + public function getLocalPart() : string + { + return $this->localPart; + } + + private function addLongEmailWarning(string $localPart, string $parsedDomainPart) : void + { + if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) { + $this->warnings[EmailTooLong::CODE] = new EmailTooLong(); + } + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/EmailValidator.php b/dev/plugins/email/vendor/egulias/email-validator/src/EmailValidator.php new file mode 100644 index 00000000..5a2e5c82 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/EmailValidator.php @@ -0,0 +1,67 @@ +lexer = new EmailLexer(); + } + + /** + * @param string $email + * @param EmailValidation $emailValidation + * @return bool + */ + public function isValid(string $email, EmailValidation $emailValidation) + { + $isValid = $emailValidation->isValid($email, $this->lexer); + $this->warnings = $emailValidation->getWarnings(); + $this->error = $emailValidation->getError(); + + return $isValid; + } + + /** + * @return boolean + */ + public function hasWarnings() + { + return !empty($this->warnings); + } + + /** + * @return array + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * @return InvalidEmail|null + */ + public function getError() + { + return $this->error; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/MessageIDParser.php b/dev/plugins/email/vendor/egulias/email-validator/src/MessageIDParser.php new file mode 100644 index 00000000..9b029e14 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/MessageIDParser.php @@ -0,0 +1,93 @@ +addLongEmailWarning($this->idLeft, $this->idRight); + + return $result; + } + + protected function preLeftParsing(): Result + { + if (!$this->hasAtToken()) { + return new InvalidEmail(new NoLocalPart(), $this->lexer->token["value"]); + } + return new ValidEmail(); + } + + protected function parseLeftFromAt(): Result + { + return $this->processIDLeft(); + } + + protected function parseRightFromAt(): Result + { + return $this->processIDRight(); + } + + private function processIDLeft() : Result + { + $localPartParser = new IDLeftPart($this->lexer); + $localPartResult = $localPartParser->parse(); + $this->idLeft = $localPartParser->localPart(); + $this->warnings = array_merge($localPartParser->getWarnings(), $this->warnings); + + return $localPartResult; + } + + private function processIDRight() : Result + { + $domainPartParser = new IDRightPart($this->lexer); + $domainPartResult = $domainPartParser->parse(); + $this->idRight = $domainPartParser->domainPart(); + $this->warnings = array_merge($domainPartParser->getWarnings(), $this->warnings); + + return $domainPartResult; + } + + public function getLeftPart() : string + { + return $this->idLeft; + } + + public function getRightPart() : string + { + return $this->idRight; + } + + private function addLongEmailWarning(string $localPart, string $parsedDomainPart) : void + { + if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAILID_MAX_LENGTH) { + $this->warnings[EmailTooLong::CODE] = new EmailTooLong(); + } + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser.php new file mode 100644 index 00000000..b1905f9a --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser.php @@ -0,0 +1,78 @@ +lexer = $lexer; + } + + public function parse(string $str) : Result + { + $this->lexer->setInput($str); + + if ($this->lexer->hasInvalidTokens()) { + return new InvalidEmail(new ExpectingATEXT("Invalid tokens found"), $this->lexer->token["value"]); + } + + $preParsingResult = $this->preLeftParsing(); + if ($preParsingResult->isInvalid()) { + return $preParsingResult; + } + + $localPartResult = $this->parseLeftFromAt(); + + if ($localPartResult->isInvalid()) { + return $localPartResult; + } + + $domainPartResult = $this->parseRightFromAt(); + + if ($domainPartResult->isInvalid()) { + return $domainPartResult; + } + + return new ValidEmail(); + } + + /** + * @return Warning\Warning[] + */ + public function getWarnings() : array + { + return $this->warnings; + } + + protected function hasAtToken() : bool + { + $this->lexer->moveNext(); + $this->lexer->moveNext(); + + return $this->lexer->token['type'] !== EmailLexer::S_AT; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/Comment.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/Comment.php new file mode 100644 index 00000000..ffa61281 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/Comment.php @@ -0,0 +1,103 @@ +lexer = $lexer; + $this->commentStrategy = $commentStrategy; + } + + public function parse() : Result + { + if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { + $this->openedParenthesis++; + if($this->noClosingParenthesis()) { + return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']); + } + } + + if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { + return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); + } + + $this->warnings[WarningComment::CODE] = new WarningComment(); + + $moreTokens = true; + while ($this->commentStrategy->exitCondition($this->lexer, $this->openedParenthesis) && $moreTokens){ + + if ($this->lexer->isNextToken(EmailLexer::S_OPENPARENTHESIS)) { + $this->openedParenthesis++; + } + $this->warnEscaping(); + if($this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { + $this->openedParenthesis--; + } + $moreTokens = $this->lexer->moveNext(); + } + + if($this->openedParenthesis >= 1) { + return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']); + } else if ($this->openedParenthesis < 0) { + return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); + } + + $finalValidations = $this->commentStrategy->endOfLoopValidations($this->lexer); + + $this->warnings = array_merge($this->warnings, $this->commentStrategy->getWarnings()); + + return $finalValidations; + } + + + /** + * @return bool + */ + private function warnEscaping() : bool + { + //Backslash found + if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { + return false; + } + + if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) { + return false; + } + + $this->warnings[QuotedPart::CODE] = + new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']); + return true; + + } + + private function noClosingParenthesis() : bool + { + try { + $this->lexer->find(EmailLexer::S_CLOSEPARENTHESIS); + return false; + } catch (\RuntimeException $e) { + return true; + } + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/CommentStrategy/CommentStrategy.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/CommentStrategy/CommentStrategy.php new file mode 100644 index 00000000..c388efd6 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/CommentStrategy/CommentStrategy.php @@ -0,0 +1,18 @@ +isNextToken(EmailLexer::S_DOT))){ // || !$internalLexer->moveNext()) { + return false; + } + + return true; + } + + public function endOfLoopValidations(EmailLexer $lexer) : Result + { + //test for end of string + if (!$lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->token['value']); + } + //add warning + //Address is valid within the message but cannot be used unmodified for the envelope + return new ValidEmail(); + } + + public function getWarnings(): array + { + return []; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php new file mode 100644 index 00000000..73bc7b2b --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php @@ -0,0 +1,37 @@ +isNextToken(EmailLexer::S_AT); + } + + public function endOfLoopValidations(EmailLexer $lexer) : Result + { + if (!$lexer->isNextToken(EmailLexer::S_AT)) { + return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->token['value']); + } + $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); + return new ValidEmail(); + } + + public function getWarnings(): array + { + return $this->warnings; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DomainLiteral.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DomainLiteral.php new file mode 100644 index 00000000..54a6fab9 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DomainLiteral.php @@ -0,0 +1,212 @@ +addTagWarnings(); + + $IPv6TAG = false; + $addressLiteral = ''; + + do { + if ($this->lexer->token['type'] === EmailLexer::C_NUL) { + return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']); + } + + $this->addObsoleteWarnings(); + + if ($this->lexer->isNextTokenAny(array(EmailLexer::S_OPENBRACKET, EmailLexer::S_OPENBRACKET))) { + return new InvalidEmail(new ExpectingDTEXT(), $this->lexer->token['value']); + } + + if ($this->lexer->isNextTokenAny( + array(EmailLexer::S_HTAB, EmailLexer::S_SP, $this->lexer->token['type'] === EmailLexer::CRLF) + )) { + $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); + $this->parseFWS(); + } + + if ($this->lexer->isNextToken(EmailLexer::S_CR)) { + return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) { + return new InvalidEmail(new UnusualElements($this->lexer->token['value']), $this->lexer->token['value']); + } + if ($this->lexer->token['type'] === EmailLexer::S_IPV6TAG) { + $IPv6TAG = true; + } + + if ($this->lexer->token['type'] === EmailLexer::S_CLOSEBRACKET) { + break; + } + + $addressLiteral .= $this->lexer->token['value']; + + } while ($this->lexer->moveNext()); + + + //Encapsulate + $addressLiteral = str_replace('[', '', $addressLiteral); + $isAddressLiteralIPv4 = $this->checkIPV4Tag($addressLiteral); + + if (!$isAddressLiteralIPv4) { + return new ValidEmail(); + } else { + $addressLiteral = $this->convertIPv4ToIPv6($addressLiteral); + } + + if (!$IPv6TAG) { + $this->warnings[WarningDomainLiteral::CODE] = new WarningDomainLiteral(); + return new ValidEmail(); + } + + $this->warnings[AddressLiteral::CODE] = new AddressLiteral(); + + $this->checkIPV6Tag($addressLiteral); + + return new ValidEmail(); + } + + /** + * @param string $addressLiteral + * @param int $maxGroups + */ + public function checkIPV6Tag($addressLiteral, $maxGroups = 8) : void + { + $prev = $this->lexer->getPrevious(); + if ($prev['type'] === EmailLexer::S_COLON) { + $this->warnings[IPV6ColonEnd::CODE] = new IPV6ColonEnd(); + } + + $IPv6 = substr($addressLiteral, 5); + //Daniel Marschall's new IPv6 testing strategy + $matchesIP = explode(':', $IPv6); + $groupCount = count($matchesIP); + $colons = strpos($IPv6, '::'); + + if (count(preg_grep('/^[0-9A-Fa-f]{0,4}$/', $matchesIP, PREG_GREP_INVERT)) !== 0) { + $this->warnings[IPV6BadChar::CODE] = new IPV6BadChar(); + } + + if ($colons === false) { + // We need exactly the right number of groups + if ($groupCount !== $maxGroups) { + $this->warnings[IPV6GroupCount::CODE] = new IPV6GroupCount(); + } + return; + } + + if ($colons !== strrpos($IPv6, '::')) { + $this->warnings[IPV6DoubleColon::CODE] = new IPV6DoubleColon(); + return; + } + + if ($colons === 0 || $colons === (strlen($IPv6) - 2)) { + // RFC 4291 allows :: at the start or end of an address + //with 7 other groups in addition + ++$maxGroups; + } + + if ($groupCount > $maxGroups) { + $this->warnings[IPV6MaxGroups::CODE] = new IPV6MaxGroups(); + } elseif ($groupCount === $maxGroups) { + $this->warnings[IPV6Deprecated::CODE] = new IPV6Deprecated(); + } + } + + public function convertIPv4ToIPv6(string $addressLiteralIPv4) : string + { + $matchesIP = array(); + $IPv4Match = preg_match( + '/\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/', + $addressLiteralIPv4, + $matchesIP); + + // Extract IPv4 part from the end of the address-literal (if there is one) + if ($IPv4Match > 0) { + $index = (int) strrpos($addressLiteralIPv4, $matchesIP[0]); + //There's a match but it is at the start + if ($index > 0) { + // Convert IPv4 part to IPv6 format for further testing + return substr($addressLiteralIPv4, 0, $index) . '0:0'; + } + } + + return $addressLiteralIPv4; + } + + /** + * @param string $addressLiteral + * + * @return bool + */ + protected function checkIPV4Tag($addressLiteral) : bool + { + $matchesIP = array(); + $IPv4Match = preg_match( + '/\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/', + $addressLiteral, + $matchesIP); + + // Extract IPv4 part from the end of the address-literal (if there is one) + + if ($IPv4Match > 0) { + $index = strrpos($addressLiteral, $matchesIP[0]); + //There's a match but it is at the start + if ($index === 0) { + $this->warnings[AddressLiteral::CODE] = new AddressLiteral(); + return false; + } + } + + return true; + } + + private function addObsoleteWarnings() : void + { + if ($this->lexer->token['type'] === EmailLexer::INVALID || + $this->lexer->token['type'] === EmailLexer::C_DEL || + $this->lexer->token['type'] === EmailLexer::S_LF || + $this->lexer->token['type'] === EmailLexer::S_BACKSLASH + ) { + $this->warnings[ObsoleteDTEXT::CODE] = new ObsoleteDTEXT(); + } + } + + private function addTagWarnings() : void + { + if ($this->lexer->isNextToken(EmailLexer::S_COLON)) { + $this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart(); + } + if ($this->lexer->isNextToken(EmailLexer::S_IPV6TAG)) { + $lexer = clone $this->lexer; + $lexer->moveNext(); + if ($lexer->isNextToken(EmailLexer::S_DOUBLECOLON)) { + $this->warnings[IPV6ColonStart::CODE] = new IPV6ColonStart(); + } + } + } + +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DomainPart.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DomainPart.php new file mode 100644 index 00000000..4ca54f2d --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DomainPart.php @@ -0,0 +1,312 @@ +lexer->clearRecorded(); + $this->lexer->startRecording(); + + $this->lexer->moveNext(); + + $domainChecks = $this->performDomainStartChecks(); + if ($domainChecks->isInvalid()) { + return $domainChecks; + } + + if ($this->lexer->token['type'] === EmailLexer::S_AT) { + return new InvalidEmail(new ConsecutiveAt(), $this->lexer->token['value']); + } + + $result = $this->doParseDomainPart(); + if ($result->isInvalid()) { + return $result; + } + + $end = $this->checkEndOfDomain(); + if ($end->isInvalid()) { + return $end; + } + + $this->lexer->stopRecording(); + $this->domainPart = $this->lexer->getAccumulatedValues(); + + $length = strlen($this->domainPart); + if ($length > self::DOMAIN_MAX_LENGTH) { + return new InvalidEmail(new DomainTooLong(), $this->lexer->token['value']); + } + + return new ValidEmail(); + } + + private function checkEndOfDomain() : Result + { + $prev = $this->lexer->getPrevious(); + if ($prev['type'] === EmailLexer::S_DOT) { + return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']); + } + if ($prev['type'] === EmailLexer::S_HYPHEN) { + return new InvalidEmail(new DomainHyphened('Hypen found at the end of the domain'), $prev['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_SP) { + return new InvalidEmail(new CRLFAtTheEnd(), $prev['value']); + } + return new ValidEmail(); + + } + + private function performDomainStartChecks() : Result + { + $invalidTokens = $this->checkInvalidTokensAfterAT(); + if ($invalidTokens->isInvalid()) { + return $invalidTokens; + } + + $missingDomain = $this->checkEmptyDomain(); + if ($missingDomain->isInvalid()) { + return $missingDomain; + } + + if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { + $this->warnings[DeprecatedComment::CODE] = new DeprecatedComment(); + } + return new ValidEmail(); + } + + private function checkEmptyDomain() : Result + { + $thereIsNoDomain = $this->lexer->token['type'] === EmailLexer::S_EMPTY || + ($this->lexer->token['type'] === EmailLexer::S_SP && + !$this->lexer->isNextToken(EmailLexer::GENERIC)); + + if ($thereIsNoDomain) { + return new InvalidEmail(new NoDomainPart(), $this->lexer->token['value']); + } + + return new ValidEmail(); + } + + private function checkInvalidTokensAfterAT() : Result + { + if ($this->lexer->token['type'] === EmailLexer::S_DOT) { + return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); + } + if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) { + return new InvalidEmail(new DomainHyphened('After AT'), $this->lexer->token['value']); + } + return new ValidEmail(); + } + + protected function parseComments(): Result + { + $commentParser = new Comment($this->lexer, new DomainComment()); + $result = $commentParser->parse(); + $this->warnings = array_merge($this->warnings, $commentParser->getWarnings()); + + return $result; + } + + protected function doParseDomainPart() : Result + { + $tldMissing = true; + $hasComments = false; + $domain = ''; + do { + $prev = $this->lexer->getPrevious(); + + $notAllowedChars = $this->checkNotAllowedChars($this->lexer->token); + if ($notAllowedChars->isInvalid()) { + return $notAllowedChars; + } + + if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || + $this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { + $hasComments = true; + $commentsResult = $this->parseComments(); + + //Invalid comment parsing + if($commentsResult->isInvalid()) { + return $commentsResult; + } + } + + $dotsResult = $this->checkConsecutiveDots(); + if ($dotsResult->isInvalid()) { + return $dotsResult; + } + + if ($this->lexer->token['type'] === EmailLexer::S_OPENBRACKET) { + $literalResult = $this->parseDomainLiteral(); + + $this->addTLDWarnings($tldMissing); + return $literalResult; + } + + $labelCheck = $this->checkLabelLength(); + if ($labelCheck->isInvalid()) { + return $labelCheck; + } + + $FwsResult = $this->parseFWS(); + if($FwsResult->isInvalid()) { + return $FwsResult; + } + + $domain .= $this->lexer->token['value']; + + if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::GENERIC)) { + $tldMissing = false; + } + + $exceptionsResult = $this->checkDomainPartExceptions($prev, $hasComments); + if ($exceptionsResult->isInvalid()) { + return $exceptionsResult; + } + $this->lexer->moveNext(); + + } while (null !== $this->lexer->token['type']); + + $labelCheck = $this->checkLabelLength(true); + if ($labelCheck->isInvalid()) { + return $labelCheck; + } + $this->addTLDWarnings($tldMissing); + + $this->domainPart = $domain; + return new ValidEmail(); + } + + private function checkNotAllowedChars(array $token) : Result + { + $notAllowed = [EmailLexer::S_BACKSLASH => true, EmailLexer::S_SLASH=> true]; + if (isset($notAllowed[$token['type']])) { + return new InvalidEmail(new CharNotAllowed(), $token['value']); + } + return new ValidEmail(); + } + + /** + * @return Result + */ + protected function parseDomainLiteral() : Result + { + try { + $this->lexer->find(EmailLexer::S_CLOSEBRACKET); + } catch (\RuntimeException $e) { + return new InvalidEmail(new ExpectingDomainLiteralClose(), $this->lexer->token['value']); + } + + $domainLiteralParser = new DomainLiteralParser($this->lexer); + $result = $domainLiteralParser->parse(); + $this->warnings = array_merge($this->warnings, $domainLiteralParser->getWarnings()); + return $result; + } + + protected function checkDomainPartExceptions(array $prev, bool $hasComments) : Result + { + if ($this->lexer->token['type'] === EmailLexer::S_OPENBRACKET && $prev['type'] !== EmailLexer::S_AT) { + return new InvalidEmail(new ExpectingATEXT('OPENBRACKET not after AT'), $this->lexer->token['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new DomainHyphened('Hypen found near DOT'), $this->lexer->token['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH + && $this->lexer->isNextToken(EmailLexer::GENERIC)) { + return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), $this->lexer->token['value']); + } + + return $this->validateTokens($hasComments); + } + + protected function validateTokens(bool $hasComments) : Result + { + $validDomainTokens = array( + EmailLexer::GENERIC => true, + EmailLexer::S_HYPHEN => true, + EmailLexer::S_DOT => true, + ); + + if ($hasComments) { + $validDomainTokens[EmailLexer::S_OPENPARENTHESIS] = true; + $validDomainTokens[EmailLexer::S_CLOSEPARENTHESIS] = true; + } + + if (!isset($validDomainTokens[$this->lexer->token['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']); + } + + return new ValidEmail(); + } + + private function checkLabelLength(bool $isEndOfDomain = false) : Result + { + if ($this->lexer->token['type'] === EmailLexer::S_DOT || $isEndOfDomain) { + if ($this->isLabelTooLong($this->label)) { + return new InvalidEmail(new LabelTooLong(), $this->lexer->token['value']); + } + $this->label = ''; + } + $this->label .= $this->lexer->token['value']; + return new ValidEmail(); + } + + + private function isLabelTooLong(string $label) : bool + { + if (preg_match('/[^\x00-\x7F]/', $label)) { + idn_to_ascii(utf8_decode($label), IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46, $idnaInfo); + return (bool) ($idnaInfo['errors'] & IDNA_ERROR_LABEL_TOO_LONG); + } + return strlen($label) > self::LABEL_MAX_LENGTH; + } + + private function addTLDWarnings(bool $isTLDMissing) : void + { + if ($isTLDMissing) { + $this->warnings[TLD::CODE] = new TLD(); + } + } + + public function domainPart() : string + { + return $this->domainPart; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DoubleQuote.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DoubleQuote.php new file mode 100644 index 00000000..19c098e8 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/DoubleQuote.php @@ -0,0 +1,87 @@ +checkDQUOTE(); + if($validQuotedString->isInvalid()) return $validQuotedString; + + $special = array( + EmailLexer::S_CR => true, + EmailLexer::S_HTAB => true, + EmailLexer::S_LF => true + ); + + $invalid = array( + EmailLexer::C_NUL => true, + EmailLexer::S_HTAB => true, + EmailLexer::S_CR => true, + EmailLexer::S_LF => true + ); + $setSpecialsWarning = true; + + $this->lexer->moveNext(); + + while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) { + if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) { + $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); + $setSpecialsWarning = false; + } + if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) { + $this->lexer->moveNext(); + } + + $this->lexer->moveNext(); + + if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) { + return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); + } + } + + $prev = $this->lexer->getPrevious(); + + if ($prev['type'] === EmailLexer::S_BACKSLASH) { + $validQuotedString = $this->checkDQUOTE(); + if($validQuotedString->isInvalid()) return $validQuotedString; + } + + if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { + return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); + } + + return new ValidEmail(); + } + + protected function checkDQUOTE() : Result + { + $previous = $this->lexer->getPrevious(); + + if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { + $description = 'https://tools.ietf.org/html/rfc5322#section-3.2.4 - quoted string should be a unit'; + return new InvalidEmail(new ExpectingATEXT($description), $this->lexer->token['value']); + } + + try { + $this->lexer->find(EmailLexer::S_DQUOTE); + } catch (\Exception $e) { + return new InvalidEmail(new UnclosedQuotedString(), $this->lexer->token['value']); + } + $this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], $this->lexer->token['value']); + + return new ValidEmail(); + } + +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php new file mode 100644 index 00000000..d32231e7 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/FoldingWhiteSpace.php @@ -0,0 +1,82 @@ +isFWS()) { + return new ValidEmail(); + } + + $previous = $this->lexer->getPrevious(); + + $resultCRLF = $this->checkCRLFInFWS(); + if ($resultCRLF->isInvalid()) { + return $resultCRLF; + } + + if ($this->lexer->token['type'] === EmailLexer::S_CR) { + return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']); + } + + if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { + return new InvalidEmail(new AtextAfterCFWS(), $this->lexer->token['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) { + return new InvalidEmail(new ExpectingCTEXT(), $this->lexer->token['value']); + } + + if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { + $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); + } else { + $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); + } + + return new ValidEmail(); + } + + protected function checkCRLFInFWS() : Result + { + if ($this->lexer->token['type'] !== EmailLexer::CRLF) { + return new ValidEmail(); + } + + if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { + return new InvalidEmail(new CRLFX2(), $this->lexer->token['value']); + } + + //this has no coverage. Condition is repeated from above one + if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { + return new InvalidEmail(new CRLFAtTheEnd(), $this->lexer->token['value']); + } + + return new ValidEmail(); + } + + protected function isFWS() : bool + { + if ($this->escaped()) { + return false; + } + + return $this->lexer->token['type'] === EmailLexer::S_SP || + $this->lexer->token['type'] === EmailLexer::S_HTAB || + $this->lexer->token['type'] === EmailLexer::S_CR || + $this->lexer->token['type'] === EmailLexer::S_LF || + $this->lexer->token['type'] === EmailLexer::CRLF; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/IDLeftPart.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/IDLeftPart.php new file mode 100644 index 00000000..abb4982b --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/IDLeftPart.php @@ -0,0 +1,16 @@ +lexer->token['value']); + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/IDRightPart.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/IDRightPart.php new file mode 100644 index 00000000..bcf80dd0 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/IDRightPart.php @@ -0,0 +1,29 @@ + true, + EmailLexer::S_SQUOTE => true, + EmailLexer::S_BACKTICK => true, + EmailLexer::S_SEMICOLON => true, + EmailLexer::S_GREATERTHAN => true, + EmailLexer::S_LOWERTHAN => true, + ); + + if (isset($invalidDomainTokens[$this->lexer->token['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']); + } + return new ValidEmail(); + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/LocalPart.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/LocalPart.php new file mode 100644 index 00000000..d505c618 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/LocalPart.php @@ -0,0 +1,164 @@ +lexer->startRecording(); + + while ($this->lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) { + if ($this->hasDotAtStart()) { + return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_DQUOTE) { + $dquoteParsingResult = $this->parseDoubleQuote(); + + //Invalid double quote parsing + if($dquoteParsingResult->isInvalid()) { + return $dquoteParsingResult; + } + } + + if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || + $this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { + $commentsResult = $this->parseComments(); + + //Invalid comment parsing + if($commentsResult->isInvalid()) { + return $commentsResult; + } + } + + if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); + } + + if ($this->lexer->token['type'] === EmailLexer::S_DOT && + $this->lexer->isNextToken(EmailLexer::S_AT) + ) { + return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']); + } + + $resultEscaping = $this->validateEscaping(); + if ($resultEscaping->isInvalid()) { + return $resultEscaping; + } + + $resultToken = $this->validateTokens(false); + if ($resultToken->isInvalid()) { + return $resultToken; + } + + $resultFWS = $this->parseLocalFWS(); + if($resultFWS->isInvalid()) { + return $resultFWS; + } + + $this->lexer->moveNext(); + } + + $this->lexer->stopRecording(); + $this->localPart = rtrim($this->lexer->getAccumulatedValues(), '@'); + if (strlen($this->localPart) > LocalTooLong::LOCAL_PART_LENGTH) { + $this->warnings[LocalTooLong::CODE] = new LocalTooLong(); + } + + return new ValidEmail(); + } + + protected function validateTokens(bool $hasComments) : Result + { + $invalidTokens = array( + EmailLexer::S_COMMA => EmailLexer::S_COMMA, + EmailLexer::S_CLOSEBRACKET => EmailLexer::S_CLOSEBRACKET, + EmailLexer::S_OPENBRACKET => EmailLexer::S_OPENBRACKET, + EmailLexer::S_GREATERTHAN => EmailLexer::S_GREATERTHAN, + EmailLexer::S_LOWERTHAN => EmailLexer::S_LOWERTHAN, + EmailLexer::S_COLON => EmailLexer::S_COLON, + EmailLexer::S_SEMICOLON => EmailLexer::S_SEMICOLON, + EmailLexer::INVALID => EmailLexer::INVALID + ); + if (isset($invalidTokens[$this->lexer->token['type']])) { + return new InvalidEmail(new ExpectingATEXT('Invalid token found'), $this->lexer->token['value']); + } + return new ValidEmail(); + } + + public function localPart() : string + { + return $this->localPart; + } + + private function parseLocalFWS() : Result + { + $foldingWS = new FoldingWhiteSpace($this->lexer); + $resultFWS = $foldingWS->parse(); + if ($resultFWS->isValid()) { + $this->warnings = array_merge($this->warnings, $foldingWS->getWarnings()); + } + return $resultFWS; + } + + private function hasDotAtStart() : bool + { + return $this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']; + } + + private function parseDoubleQuote() : Result + { + $dquoteParser = new DoubleQuote($this->lexer); + $parseAgain = $dquoteParser->parse(); + $this->warnings = array_merge($this->warnings, $dquoteParser->getWarnings()); + + return $parseAgain; + } + + protected function parseComments(): Result + { + $commentParser = new Comment($this->lexer, new LocalComment()); + $result = $commentParser->parse(); + $this->warnings = array_merge($this->warnings, $commentParser->getWarnings()); + if($result->isInvalid()) { + return $result; + } + return $result; + } + + private function validateEscaping() : Result + { + //Backslash found + if ($this->lexer->token['type'] !== EmailLexer::S_BACKSLASH) { + return new ValidEmail(); + } + + if ($this->lexer->isNextToken(EmailLexer::GENERIC)) { + return new InvalidEmail(new ExpectingATEXT('Found ATOM after escaping'), $this->lexer->token['value']); + } + + if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB, EmailLexer::C_DEL))) { + return new ValidEmail(); + } + + return new ValidEmail(); + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Parser/PartParser.php b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/PartParser.php new file mode 100644 index 00000000..fd65fc56 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Parser/PartParser.php @@ -0,0 +1,63 @@ +lexer = $lexer; + } + + abstract public function parse() : Result; + + /** + * @return \Egulias\EmailValidator\Warning\Warning[] + */ + public function getWarnings() + { + return $this->warnings; + } + + protected function parseFWS() : Result + { + $foldingWS = new FoldingWhiteSpace($this->lexer); + $resultFWS = $foldingWS->parse(); + $this->warnings = array_merge($this->warnings, $foldingWS->getWarnings()); + return $resultFWS; + } + + protected function checkConsecutiveDots() : Result + { + if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { + return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); + } + + return new ValidEmail(); + } + + protected function escaped() : bool + { + $previous = $this->lexer->getPrevious(); + + return $previous && $previous['type'] === EmailLexer::S_BACKSLASH + && + $this->lexer->token['type'] !== EmailLexer::GENERIC; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/InvalidEmail.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/InvalidEmail.php new file mode 100644 index 00000000..3d85e154 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/InvalidEmail.php @@ -0,0 +1,46 @@ +token = $token; + $this->reason = $reason; + } + + public function isValid(): bool + { + return false; + } + + public function isInvalid(): bool + { + return true; + } + + public function description(): string + { + return $this->reason->description() . " in char " . $this->token; + } + + public function code(): int + { + return $this->reason->code(); + } + + public function reason() : Reason + { + return $this->reason; + } + +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/MultipleErrors.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/MultipleErrors.php new file mode 100644 index 00000000..5fa85afc --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/MultipleErrors.php @@ -0,0 +1,56 @@ +reasons[$reason->code()] = $reason; + } + + /** + * @return Reason[] + */ + public function getReasons() : array + { + return $this->reasons; + } + + public function reason() : Reason + { + return 0 !== count($this->reasons) + ? current($this->reasons) + : new EmptyReason(); + } + + public function description() : string + { + $description = ''; + foreach($this->reasons as $reason) { + $description .= $reason->description() . PHP_EOL; + } + + return $description; + } + + public function code() : int + { + return 0; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/AtextAfterCFWS.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/AtextAfterCFWS.php new file mode 100644 index 00000000..76015a2d --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/AtextAfterCFWS.php @@ -0,0 +1,16 @@ +detailedDescription = $details; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/DomainAcceptsNoMail.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/DomainAcceptsNoMail.php new file mode 100644 index 00000000..55f44bba --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/DomainAcceptsNoMail.php @@ -0,0 +1,16 @@ +exception = $exception; + + } + public function code() : int + { + return 999; + } + + public function description() : string + { + return $this->exception->getMessage(); + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/ExpectingATEXT.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/ExpectingATEXT.php new file mode 100644 index 00000000..07ea8d23 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/ExpectingATEXT.php @@ -0,0 +1,16 @@ +detailedDescription; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/ExpectingCTEXT.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/ExpectingCTEXT.php new file mode 100644 index 00000000..64f5f7c3 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Reason/ExpectingCTEXT.php @@ -0,0 +1,16 @@ +element = $element; + } + + public function code() : int + { + return 201; + } + + public function description() : string + { + return 'Unusual element found, wourld render invalid in majority of cases. Element found: ' . $this->element; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/Result.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Result.php new file mode 100644 index 00000000..1e16bcca --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/Result.php @@ -0,0 +1,27 @@ +reason = new ReasonSpoofEmail(); + parent::__construct($this->reason, ''); + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Result/ValidEmail.php b/dev/plugins/email/vendor/egulias/email-validator/src/Result/ValidEmail.php new file mode 100644 index 00000000..4f3693a9 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Result/ValidEmail.php @@ -0,0 +1,27 @@ +error = new InvalidEmail(new LocalOrReservedDomain(), $host); + return false; + } + + return $this->checkDns($host); + } + + public function getError() : ?InvalidEmail + { + return $this->error; + } + + public function getWarnings() : array + { + return $this->warnings; + } + + /** + * @param string $host + * + * @return bool + */ + protected function checkDns($host) + { + $variant = INTL_IDNA_VARIANT_UTS46; + + $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.') . '.'; + + return $this->validateDnsRecords($host); + } + + + /** + * Validate the DNS records for given host. + * + * @param string $host A set of DNS records in the format returned by dns_get_record. + * + * @return bool True on success. + */ + private function validateDnsRecords($host) : bool + { + // A workaround to fix https://bugs.php.net/bug.php?id=73149 + /** @psalm-suppress InvalidArgument */ + set_error_handler( + static function (int $errorLevel, string $errorMessage): ?bool { + throw new \RuntimeException("Unable to get DNS record for the host: $errorMessage"); + } + ); + + try { + // Get all MX, A and AAAA DNS records for host + $dnsRecords = dns_get_record($host, static::DNS_RECORD_TYPES_TO_CHECK); + } catch (\RuntimeException $exception) { + $this->error = new InvalidEmail(new UnableToGetDNSRecord(), ''); + + return false; + } finally { + restore_error_handler(); + } + + // No MX, A or AAAA DNS records + if ($dnsRecords === [] || $dnsRecords === false) { + $this->error = new InvalidEmail(new ReasonNoDNSRecord(), ''); + return false; + } + + // For each DNS record + foreach ($dnsRecords as $dnsRecord) { + if (!$this->validateMXRecord($dnsRecord)) { + // No MX records (fallback to A or AAAA records) + if (empty($this->mxRecords)) { + $this->warnings[NoDNSMXRecord::CODE] = new NoDNSMXRecord(); + } + return false; + } + } + return true; + } + + /** + * Validate an MX record + * + * @param array $dnsRecord Given DNS record. + * + * @return bool True if valid. + */ + private function validateMxRecord($dnsRecord) : bool + { + if ($dnsRecord['type'] !== 'MX') { + return true; + } + + // "Null MX" record indicates the domain accepts no mail (https://tools.ietf.org/html/rfc7505) + if (empty($dnsRecord['target']) || $dnsRecord['target'] === '.') { + $this->error = new InvalidEmail(new DomainAcceptsNoMail(), ""); + return false; + } + + $this->mxRecords[] = $dnsRecord; + + return true; + } +} \ No newline at end of file diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Validation/EmailValidation.php b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/EmailValidation.php new file mode 100644 index 00000000..1bcc0a70 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/EmailValidation.php @@ -0,0 +1,34 @@ +setChecks(Spoofchecker::SINGLE_SCRIPT); + + if ($checker->isSuspicious($email)) { + $this->error = new SpoofEmail(); + } + + return $this->error === null; + } + + /** + * @return InvalidEmail + */ + public function getError() : ?InvalidEmail + { + return $this->error; + } + + public function getWarnings() : array + { + return []; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php new file mode 100644 index 00000000..0e020433 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php @@ -0,0 +1,51 @@ +parse($email); + $this->warnings = $parser->getWarnings(); + if ($result->isInvalid()) { + /** @psalm-suppress PropertyTypeCoercion */ + $this->error = $result; + return false; + } + } catch (\Exception $invalid) { + $this->error = new InvalidEmail(new ExceptionFound($invalid), ''); + return false; + } + + return true; + } + + public function getWarnings(): array + { + return $this->warnings; + } + + public function getError(): ?InvalidEmail + { + return $this->error; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Validation/MultipleValidationWithAnd.php b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/MultipleValidationWithAnd.php new file mode 100644 index 00000000..6debf22f --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/MultipleValidationWithAnd.php @@ -0,0 +1,117 @@ +validations = $validations; + $this->mode = $mode; + } + + /** + * {@inheritdoc} + */ + public function isValid(string $email, EmailLexer $emailLexer) : bool + { + $result = true; + foreach ($this->validations as $validation) { + $emailLexer->reset(); + $validationResult = $validation->isValid($email, $emailLexer); + $result = $result && $validationResult; + $this->warnings = array_merge($this->warnings, $validation->getWarnings()); + if (!$validationResult) { + $this->processError($validation); + } + + if ($this->shouldStop($result)) { + break; + } + } + + return $result; + } + + private function initErrorStorage() : void + { + if (null === $this->error) { + $this->error = new MultipleErrors(); + } + } + + private function processError(EmailValidation $validation) : void + { + if (null !== $validation->getError()) { + $this->initErrorStorage(); + /** @psalm-suppress PossiblyNullReference */ + $this->error->addReason($validation->getError()->reason()); + } + } + + private function shouldStop(bool $result) : bool + { + return !$result && $this->mode === self::STOP_ON_ERROR; + } + + /** + * Returns the validation errors. + */ + public function getError() : ?InvalidEmail + { + return $this->error; + } + + /** + * {@inheritdoc} + */ + public function getWarnings() : array + { + return $this->warnings; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Validation/NoRFCWarningsValidation.php b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/NoRFCWarningsValidation.php new file mode 100644 index 00000000..06885ed7 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/NoRFCWarningsValidation.php @@ -0,0 +1,41 @@ +getWarnings())) { + return true; + } + + $this->error = new InvalidEmail(new RFCWarnings(), ''); + + return false; + } + + /** + * {@inheritdoc} + */ + public function getError() : ?InvalidEmail + { + return $this->error ?: parent::getError(); + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Validation/RFCValidation.php b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/RFCValidation.php new file mode 100644 index 00000000..e2c27bac --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Validation/RFCValidation.php @@ -0,0 +1,55 @@ +parser = new EmailParser($emailLexer); + try { + $result = $this->parser->parse($email); + $this->warnings = $this->parser->getWarnings(); + if ($result->isInvalid()) { + /** @psalm-suppress PropertyTypeCoercion */ + $this->error = $result; + return false; + } + } catch (\Exception $invalid) { + $this->error = new InvalidEmail(new ExceptionFound($invalid), ''); + return false; + } + + return true; + } + + public function getError() : ?InvalidEmail + { + return $this->error; + } + + public function getWarnings() : array + { + return $this->warnings; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/AddressLiteral.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/AddressLiteral.php new file mode 100644 index 00000000..77e70f7f --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/AddressLiteral.php @@ -0,0 +1,14 @@ +message = 'Address literal in domain part'; + $this->rfcNumber = 5321; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/CFWSNearAt.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/CFWSNearAt.php new file mode 100644 index 00000000..be43bbe6 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/CFWSNearAt.php @@ -0,0 +1,13 @@ +message = "Deprecated folding white space near @"; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/CFWSWithFWS.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/CFWSWithFWS.php new file mode 100644 index 00000000..dea3450e --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/CFWSWithFWS.php @@ -0,0 +1,13 @@ +message = 'Folding whites space followed by folding white space'; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/Comment.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/Comment.php new file mode 100644 index 00000000..704c2908 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/Comment.php @@ -0,0 +1,13 @@ +message = "Comments found in this email"; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/DeprecatedComment.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/DeprecatedComment.php new file mode 100644 index 00000000..ad43bd7c --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/DeprecatedComment.php @@ -0,0 +1,13 @@ +message = 'Deprecated comments'; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/DomainLiteral.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/DomainLiteral.php new file mode 100644 index 00000000..6f36b5e2 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/DomainLiteral.php @@ -0,0 +1,14 @@ +message = 'Domain Literal'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/EmailTooLong.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/EmailTooLong.php new file mode 100644 index 00000000..497309db --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/EmailTooLong.php @@ -0,0 +1,15 @@ +message = 'Email is too long, exceeds ' . EmailParser::EMAIL_MAX_LENGTH; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6BadChar.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6BadChar.php new file mode 100644 index 00000000..ba2fcc01 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6BadChar.php @@ -0,0 +1,14 @@ +message = 'Bad char in IPV6 domain literal'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6ColonEnd.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6ColonEnd.php new file mode 100644 index 00000000..41afa78c --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6ColonEnd.php @@ -0,0 +1,14 @@ +message = ':: found at the end of the domain literal'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6ColonStart.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6ColonStart.php new file mode 100644 index 00000000..1bf754e3 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6ColonStart.php @@ -0,0 +1,14 @@ +message = ':: found at the start of the domain literal'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6Deprecated.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6Deprecated.php new file mode 100644 index 00000000..d752caaa --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6Deprecated.php @@ -0,0 +1,14 @@ +message = 'Deprecated form of IPV6'; + $this->rfcNumber = 5321; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6DoubleColon.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6DoubleColon.php new file mode 100644 index 00000000..4f823949 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6DoubleColon.php @@ -0,0 +1,14 @@ +message = 'Double colon found after IPV6 tag'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6GroupCount.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6GroupCount.php new file mode 100644 index 00000000..a59d317f --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6GroupCount.php @@ -0,0 +1,14 @@ +message = 'Group count is not IPV6 valid'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6MaxGroups.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6MaxGroups.php new file mode 100644 index 00000000..936274c1 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/IPV6MaxGroups.php @@ -0,0 +1,14 @@ +message = 'Reached the maximum number of IPV6 groups allowed'; + $this->rfcNumber = 5321; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/LocalTooLong.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/LocalTooLong.php new file mode 100644 index 00000000..0d08d8b3 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/LocalTooLong.php @@ -0,0 +1,15 @@ +message = 'Local part is too long, exceeds 64 chars (octets)'; + $this->rfcNumber = 5322; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/NoDNSMXRecord.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/NoDNSMXRecord.php new file mode 100644 index 00000000..b3c21a1f --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/NoDNSMXRecord.php @@ -0,0 +1,14 @@ +message = 'No MX DSN record was found for this email'; + $this->rfcNumber = 5321; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/ObsoleteDTEXT.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/ObsoleteDTEXT.php new file mode 100644 index 00000000..10f19e33 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/ObsoleteDTEXT.php @@ -0,0 +1,14 @@ +rfcNumber = 5322; + $this->message = 'Obsolete DTEXT in domain literal'; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/QuotedPart.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/QuotedPart.php new file mode 100644 index 00000000..36a4265a --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/QuotedPart.php @@ -0,0 +1,17 @@ +message = "Deprecated Quoted String found between $prevToken and $postToken"; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/QuotedString.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/QuotedString.php new file mode 100644 index 00000000..817e4e84 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/QuotedString.php @@ -0,0 +1,17 @@ +message = "Quoted String found between $prevToken and $postToken"; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/TLD.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/TLD.php new file mode 100644 index 00000000..2338b9f4 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/TLD.php @@ -0,0 +1,13 @@ +message = "RFC5321, TLD"; + } +} diff --git a/dev/plugins/email/vendor/egulias/email-validator/src/Warning/Warning.php b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/Warning.php new file mode 100644 index 00000000..bce7e7a5 --- /dev/null +++ b/dev/plugins/email/vendor/egulias/email-validator/src/Warning/Warning.php @@ -0,0 +1,47 @@ +message; + } + + /** + * @return int + */ + public function code() + { + return self::CODE; + } + + /** + * @return int + */ + public function RFCNumber() + { + return $this->rfcNumber; + } + + public function __toString() + { + return $this->message() . " rfc: " . $this->rfcNumber . "interal code: " . static::CODE; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/.gitattributes b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.gitattributes new file mode 100644 index 00000000..dc96281b --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.gitattributes @@ -0,0 +1,11 @@ +*.crt -crlf +*.key -crlf +*.srl -crlf +*.pub -crlf +*.priv -crlf +*.txt -crlf + +# ignore directories in the git-generated distributed .zip archive +/doc/notes export-ignore +/tests export-ignore +/phpunit.xml.dist export-ignore diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/.github/ISSUE_TEMPLATE.md b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..5db65246 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + + +| Q | A +| ------------------- | ----- +| Bug report? | yes/no +| Feature request? | yes/no +| RFC? | yes/no +| How used? | Standalone/Symfony/3party +| Swiftmailer version | x.y.z +| PHP version | x.y.z + +### Observed behaviour + + +### Expected behaviour + + +### Example + diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/.github/PULL_REQUEST_TEMPLATE.md b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..4b395107 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ + + +| Q | A +| ------------- | --- +| Bug fix? | yes/no +| New feature? | yes/no +| Doc update? | yes/no +| BC breaks? | yes/no +| Deprecations? | yes/no +| Fixed tickets | #... +| License | MIT + + + diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/.php_cs.dist b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.php_cs.dist new file mode 100644 index 00000000..563b48b9 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/.php_cs.dist @@ -0,0 +1,21 @@ +setRules([ + '@Symfony' => true, + '@Symfony:risky' => true, + '@PHPUnit75Migration:risky' => true, + 'php_unit_dedicate_assert' => ['target' => '5.6'], + 'array_syntax' => ['syntax' => 'short'], + 'php_unit_fqcn_annotation' => true, + 'no_unreachable_default_argument_value' => false, + 'braces' => ['allow_single_line_closure' => true], + 'heredoc_to_nowdoc' => false, + 'ordered_imports' => true, + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], + 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], + 'fopen_flags' => false, + ]) + ->setRiskyAllowed(true) + ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) +; diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/CHANGES b/dev/plugins/email/vendor/swiftmailer/swiftmailer/CHANGES new file mode 100644 index 00000000..a7ffa002 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/CHANGES @@ -0,0 +1,391 @@ +Changelog +========= + +**Swiftmailer will stop being maintained at the end of November 2021.** + +Please, move to Symfony Mailer at your earliest convenience. +Symfony Mailer is the next evolution of Swiftmailer. +It provides the same features with support for modern PHP code and support for third-party providers. +See https://symfony.com/doc/current/mailer.html for more information. + +6.3.0 (2021-10-18) +------------------ + + * Fix support for PHP 8.1 + +6.2.7 (2021-03-09) +------------------ + + * Allow egulias/email-validator 3.1+ + +6.2.6 (2021-03-05) +------------------ + + * Fix Bcc support + +6.2.5 (2021-01-12) +------------------ + + * Don't trust properties at destruct time + * Remove invalid PHPDocs param in EventDispatcher interface + * Bump license year + * Removes PHP version from README + +6.2.4 (2020-12-08) +------------------ + + * Prevent flushing of the bubble queue when event handler raises another event + * Add support for PHP 8 + * Code cleanups + +6.2.3 (2019-11-12) +------------------ + + * no changes + +6.2.2 (2019-11-12) +------------------ + + * fixed compat with PHP 7.4 + * fixed error message when connecting to a stream raises an error before connect() + +6.2.1 (2019-04-21) +------------------ + + * reverted "deprecated Swift_CharacterStream_ArrayCharacterStream and Swift_CharacterStream_NgCharacterStream in favor of Swift_CharacterStream_CharacterStream" + +6.2.0 (2019-03-10) +------------------ + + * added support for symfony/polyfill-intl-dn + * deprecated Swift_CharacterStream_ArrayCharacterStream and Swift_CharacterStream_NgCharacterStream in favor of Swift_CharacterStream_CharacterStream + +6.1.3 (2018-09-11) +------------------ + + * added auto-start to the SMTP transport when sending a message + * tweaked error message when the response from an SMTP server is empty + * fixed missing property in Swift_Mime_IdGenerator + * exposed original body content type with Swift_Mime_SimpleMimeEntity::getBodyContentType() + * fixed typo in variable name in Swift_AddressEncoder_IdnAddressEncoder + * fixed return type in MessageLogger + * fixed missing property addressEncoder in SimpleHeaderFactory class + +6.1.2 (2018-07-13) +------------------ + + * handled recipient errors when pipelining + +6.1.1 (2018-07-04) +------------------ + + * removed hard dependency on an IDN encoder + +6.1.0 (2018-07-02) +------------------ + + * added address encoder exceptions during send + * added support for bubbling up authenticator error messages + * added support for non-ASCII email addresses + * introduced new dependencies: transport.smtphandlers and transport.authhandlers + * deprecated Swift_Signers_OpenDKIMSigner; use Swift_Signers_DKIMSigner instead + * added support for SMTP pipelining + * added Swift_Transport_Esmtp_EightBitMimeHandler + * fixed startTLS only allowed tls1.0, now allowed: tls1.0, tls1.1, tls1.2 + +6.0.2 (2017-09-30) +------------------ + + * fixed DecoratorPlugin + * removed usage of getmypid() + +6.0.1 (2017-05-20) +------------------ + + * fixed BC break that can be avoided easily + +6.0.0 (2017-05-19) +------------------ + + * added Swift_Transport::ping() + * removed Swift_Mime_HeaderFactory, Swift_Mime_HeaderSet, Swift_Mime_Message, Swift_Mime_MimeEntity, + and Swift_Mime_ParameterizedHeader interfaces + * removed Swift_MailTransport and Swift_Transport_MailTransport + * removed Swift_Encoding + * removed the Swift_Transport_MailInvoker interface and Swift_Transport_SimpleMailInvoker class + * removed the Swift_SignedMessage class + * removed newInstance() methods everywhere + * methods operating on Date header now use DateTimeImmutable object instead of Unix timestamp; + Swift_Mime_Headers_DateHeader::getTimestamp()/setTimestamp() renamed to getDateTime()/setDateTime() + * bumped minimum version to PHP 7.0 + * removed Swift_Validate and replaced by egulias/email-validator + +5.4.9 (2018-01-23) +------------------ + + * no changes, last version of the 5.x series + +5.4.8 (2017-05-01) +------------------ + + * fixed encoding inheritance in addPart() + * fixed sorting MIME children when their types are equal + +5.4.7 (2017-04-20) +------------------ + + * fixed NTLMAuthenticator clobbering bcmath scale + +5.4.6 (2017-02-13) +------------------ + + * removed exceptions thrown in destructors as they lead to fatal errors + * switched to use sha256 by default in DKIM as per the RFC + * fixed an 'Undefined variable: pipes' PHP notice + * fixed long To headers when using the mail transport + * fixed NTLMAuthenticator when no domain is passed with the username + * prevented fatal error during unserialization of a message + * fixed a PHP warning when sending a message that has a length of a multiple of 8192 + +5.4.5 (2016-12-29) +------------------ + + * SECURITY FIX: fixed CVE-2016-10074 by disallowing potentially unsafe shell characters + + Prior to 5.4.5, the mail transport (Swift_Transport_MailTransport) was vulnerable to passing + arbitrary shell arguments if the "From", "ReturnPath" or "Sender" header came + from a non-trusted source, potentially allowing Remote Code Execution + * deprecated the mail transport + +5.4.4 (2016-11-23) +------------------ + + * reverted escaping command-line args to mail (PHP mail() function already does it) + +5.4.3 (2016-07-08) +------------------ + + * fixed SimpleHeaderSet::has()/get() when the 0 index is removed + * removed the need to have mcrypt installed + * fixed broken MIME header encoding with quotes/colons and non-ascii chars + * allowed mail transport send for messages without To header + * fixed PHP 7 support + +5.4.2 (2016-05-01) +------------------ + + * fixed support for IPv6 sockets + * added auto-retry when sending messages from the memory spool + * fixed consecutive read calls in Swift_ByteStream_FileByteStream + * added support for iso-8859-15 encoding + * fixed PHP mail extra params on missing reversePath + * added methods to set custom stream context options + * fixed charset changes in QpContentEncoderProxy + * added return-path header to the ignoredHeaders list of DKIMSigner + * fixed crlf for subject using mail + * fixed add soft line break only when necessary + * fixed escaping command-line args to mail + +5.4.1 (2015-06-06) +------------------ + + * made Swiftmailer exceptions confirm to PHP base exception constructor signature + * fixed MAIL FROM & RCPT TO headers to be RFC compliant + +5.4.0 (2015-03-14) +------------------ + + * added the possibility to add extra certs to PKCS#7 signature + * fix base64 encoding with streams + * added a new RESULT_SPOOLED status for SpoolTransport + * fixed getBody() on attachments when called more than once + * removed dots from generated filenames in filespool + +5.3.1 (2014-12-05) +------------------ + + * fixed cloning of messages with attachments + +5.3.0 (2014-10-04) +------------------ + + * fixed cloning when using signers + * reverted removal of Swift_Encoding + * drop support for PHP 5.2.x + +5.2.2 (2014-09-20) +------------------ + + * fixed Japanese support + * fixed the memory spool when the message changes when in the pool + * added support for cloning messages + * fixed PHP warning in the redirect plugin + * changed the way to and cc-ed email are sent to only use one transaction + +5.2.1 (2014-06-13) +------------------ + + * SECURITY FIX: fixed CLI escaping when using sendmail as a transport + + Prior to 5.2.1, the sendmail transport (Swift_Transport_SendmailTransport) + was vulnerable to an arbitrary shell execution if the "From" header came + from a non-trusted source and no "Return-Path" is configured. + + * fixed parameter in DKIMSigner + * fixed compatibility with PHP < 5.4 + +5.2.0 (2014-05-08) +------------------ + + * fixed Swift_ByteStream_FileByteStream::read() to match to the specification + * fixed from-charset and to-charset arguments in mbstring_convert_encoding() usages + * fixed infinite loop in StreamBuffer + * fixed NullTransport to return the number of ignored emails instead of 0 + * Use phpunit and mockery for unit testing (realityking) + +5.1.0 (2014-03-18) +------------------ + + * fixed data writing to stream when sending large messages + * added support for libopendkim (https://github.com/xdecock/php-opendkim) + * merged SignedMessage and Message + * added Gmail XOAuth2 authentication + * updated the list of known mime types + * added NTLM authentication + +5.0.3 (2013-12-03) +------------------ + + * fixed double-dot bug + * fixed DKIM signer + +5.0.2 (2013-08-30) +------------------ + + * handled correct exception type while reading IoBuffer output + +5.0.1 (2013-06-17) +------------------ + + * changed the spool to only start the transport when a mail has to be sent + * fixed compatibility with PHP 5.2 + * fixed LICENSE file + +5.0.0 (2013-04-30) +------------------ + + * changed the license from LGPL to MIT + +4.3.1 (2013-04-11) +------------------ + + * removed usage of the native QP encoder when the charset is not UTF-8 + * fixed usage of uniqid to avoid collisions + * made a performance improvement when tokenizing large headers + * fixed usage of the PHP native QP encoder on PHP 5.4.7+ + +4.3.0 (2013-01-08) +------------------ + + * made the temporary directory configurable via the TMPDIR env variable + * added S/MIME signer and encryption support + +4.2.2 (2012-10-25) +------------------ + + * added the possibility to throttle messages per second in ThrottlerPlugin (mostly for Amazon SES) + * switched mime.qpcontentencoder to automatically use the PHP native encoder on PHP 5.4.7+ + * allowed specifying a whitelist with regular expressions in RedirectingPlugin + +4.2.1 (2012-07-13) +------------------ + + * changed the coding standards to PSR-1/2 + * fixed issue with autoloading + * added NativeQpContentEncoder to enhance performance (for PHP 5.3+) + +4.2.0 (2012-06-29) +------------------ + + * added documentation about how to use the Japanese support introduced in 4.1.8 + * added a way to override the default configuration in a lazy way + * changed the PEAR init script to lazy-load the initialization + * fixed a bug when calling Swift_Preferences before anything else (regression introduced in 4.1.8) + +4.1.8 (2012-06-17) +------------------ + + * added Japanese iso-2022-jp support + * changed the init script to lazy-load the initialization + * fixed docblocks (@id) which caused some problems with libraries parsing the dobclocks + * fixed Swift_Mime_Headers_IdentificationHeader::setId() when passed an array of ids + * fixed encoding of email addresses in headers + * added replacements setter to the Decorator plugin + +4.1.7 (2012-04-26) +------------------ + + * fixed QpEncoder safeMapShareId property + +4.1.6 (2012-03-23) +------------------ + + * reduced the size of serialized Messages + +4.1.5 (2012-01-04) +------------------ + + * enforced Swift_Spool::queueMessage() to return a Boolean + * made an optimization to the memory spool: start the transport only when required + * prevented stream_socket_client() from generating an error and throw a Swift_TransportException instead + * fixed a PHP warning when calling to mail() when safe_mode is off + * many doc tweaks + +4.1.4 (2011-12-16) +------------------ + + * added a memory spool (Swift_MemorySpool) + * fixed too many opened files when sending emails with attachments + +4.1.3 (2011-10-27) +------------------ + + * added STARTTLS support + * added missing @return tags on fluent methods + * added a MessageLogger plugin that logs all sent messages + * added composer.json + +4.1.2 (2011-09-13) +------------------ + + * fixed wrong detection of magic_quotes_runtime + * fixed fatal errors when no To or Subject header has been set + * fixed charset on parameter header continuations + * added documentation about how to install Swiftmailer from the PEAR channel + * fixed various typos and markup problem in the documentation + * fixed warning when cache directory does not exist + * fixed "slashes are escaped" bug + * changed require_once() to require() in autoload + +4.1.1 (2011-07-04) +------------------ + + * added missing file in PEAR package + +4.1.0 (2011-06-30) +------------------ + + * documentation has been converted to ReST + +4.1.0 RC1 (2011-06-17) +---------------------- + +New features: + + * changed the Decorator Plugin to allow replacements in all headers + * added Swift_Mime_Grammar and Swift_Validate to validate an email address + * modified the autoloader to lazy-initialize Swiftmailer + * removed Swift_Mailer::batchSend() + * added NullTransport + * added new plugins: RedirectingPlugin and ImpersonatePlugin + * added a way to send messages asynchronously (Spool) diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/LICENSE b/dev/plugins/email/vendor/swiftmailer/swiftmailer/LICENSE new file mode 100644 index 00000000..ab720772 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013-2021 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/README.md b/dev/plugins/email/vendor/swiftmailer/swiftmailer/README.md new file mode 100644 index 00000000..788d7223 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/README.md @@ -0,0 +1,25 @@ +Swift Mailer +------------ + +**Swiftmailer will stop being maintained at the end of November 2021.** + +Please, move to [Symfony Mailer](https://symfony.com/doc/current/mailer.html) at your earliest convenience. +[Symfony Mailer](https://symfony.com/doc/current/mailer.html) is the next evolution of Swiftmailer. +It provides the same features with support for modern PHP code and support for third-party providers. + +Swift Mailer is a component based mailing solution for PHP. +It is released under the MIT license. + +Swift Mailer is highly object-oriented by design and lends itself +to use in complex web application with a great deal of flexibility. + +For full details on usage, read the [documentation](https://swiftmailer.symfony.com/docs/introduction.html). + +Sponsors +-------- + + diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/composer.json b/dev/plugins/email/vendor/swiftmailer/swiftmailer/composer.json new file mode 100644 index 00000000..546b3a1e --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/composer.json @@ -0,0 +1,44 @@ +{ + "name": "swiftmailer/swiftmailer", + "type": "library", + "description": "Swiftmailer, free feature-rich PHP mailer", + "keywords": ["mail","mailer","email"], + "homepage": "https://swiftmailer.symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "require": { + "php": ">=7.0.0", + "egulias/email-validator": "^2.0|^3.1", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-intl-idn": "^1.10" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.4" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses" + }, + "autoload": { + "files": ["lib/swift_required.php"] + }, + "autoload-dev": { + "psr-0": { "Swift_": "tests/unit" } + }, + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/headers.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/headers.rst new file mode 100644 index 00000000..8b8bece2 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/headers.rst @@ -0,0 +1,621 @@ +Message Headers +=============== + +Sometimes you'll want to add your own headers to a message or modify/remove +headers that are already present. You work with the message's HeaderSet to do +this. + +Header Basics +------------- + +All MIME entities in Swift Mailer -- including the message itself -- store +their headers in a single object called a HeaderSet. This HeaderSet is +retrieved with the ``getHeaders()`` method. + +As mentioned in the previous chapter, everything that forms a part of a message +in Swift Mailer is a MIME entity that is represented by an instance of +``Swift_Mime_SimpleMimeEntity``. This includes -- most notably -- the message +object itself, attachments, MIME parts and embedded images. Each of these MIME +entities consists of a body and a set of headers that describe the body. + +For all of the "standard" headers in these MIME entities, such as the +``Content-Type``, there are named methods for working with them, such as +``setContentType()`` and ``getContentType()``. This is because headers are a +moderately complex area of the library. Each header has a slightly different +required structure that it must meet in order to comply with the standards that +govern email (and that are checked by spam blockers etc). + +You fetch the HeaderSet from a MIME entity like so:: + + $message = new Swift_Message(); + + // Fetch the HeaderSet from a Message object + $headers = $message->getHeaders(); + + $attachment = Swift_Attachment::fromPath('document.pdf'); + + // Fetch the HeaderSet from an attachment object + $headers = $attachment->getHeaders(); + +The job of the HeaderSet is to contain and manage instances of Header objects. +Depending upon the MIME entity the HeaderSet came from, the contents of the +HeaderSet will be different, since an attachment for example has a different +set of headers to those in a message. + +You can find out what the HeaderSet contains with a quick loop, dumping out the +names of the headers:: + + foreach ($headers->getAll() as $header) { + printf("%s
    \n", $header->getFieldName()); + } + + /* + Content-Transfer-Encoding + Content-Type + MIME-Version + Date + Message-ID + From + Subject + To + */ + +You can also dump out the rendered HeaderSet by calling its ``toString()`` +method:: + + echo $headers->toString(); + + /* + Message-ID: <1234869991.499a9ee7f1d5e@swift.generated> + Date: Tue, 17 Feb 2009 22:26:31 +1100 + Subject: Awesome subject! + From: sender@example.org + To: recipient@example.org + MIME-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: quoted-printable + */ + +Where the complexity comes in is when you want to modify an existing header. +This complexity comes from the fact that each header can be of a slightly +different type (such as a Date header, or a header that contains email +addresses, or a header that has key-value parameters on it!). Each header in +the HeaderSet is an instance of ``Swift_Mime_Header``. They all have common +functionality, but knowing exactly what type of header you're working with will +allow you a little more control. + +You can determine the type of header by comparing the return value of its +``getFieldType()`` method with the constants ``TYPE_TEXT``, +``TYPE_PARAMETERIZED``, ``TYPE_DATE``, ``TYPE_MAILBOX``, ``TYPE_ID`` and +``TYPE_PATH`` which are defined in ``Swift_Mime_Header``:: + + foreach ($headers->getAll() as $header) { + switch ($header->getFieldType()) { + case Swift_Mime_Header::TYPE_TEXT: $type = 'text'; + break; + case Swift_Mime_Header::TYPE_PARAMETERIZED: $type = 'parameterized'; + break; + case Swift_Mime_Header::TYPE_MAILBOX: $type = 'mailbox'; + break; + case Swift_Mime_Header::TYPE_DATE: $type = 'date'; + break; + case Swift_Mime_Header::TYPE_ID: $type = 'ID'; + break; + case Swift_Mime_Header::TYPE_PATH: $type = 'path'; + break; + } + printf("%s: is a %s header
    \n", $header->getFieldName(), $type); + } + + /* + Content-Transfer-Encoding: is a text header + Content-Type: is a parameterized header + MIME-Version: is a text header + Date: is a date header + Message-ID: is a ID header + From: is a mailbox header + Subject: is a text header + To: is a mailbox header + */ + +Headers can be removed from the set, modified within the set, or added to the +set. + +The following sections show you how to work with the HeaderSet and explain the +details of each implementation of ``Swift_Mime_Header`` that may exist within +the HeaderSet. + +Header Types +------------ + +Because all headers are modeled on different data (dates, addresses, text!) +there are different types of Header in Swift Mailer. Swift Mailer attempts to +categorize all possible MIME headers into more general groups, defined by a +small number of classes. + +Text Headers +~~~~~~~~~~~~ + +Text headers are the simplest type of Header. They contain textual information +with no special information included within it -- for example the Subject +header in a message. + +There's nothing particularly interesting about a text header, though it is +probably the one you'd opt to use if you need to add a custom header to a +message. It represents text just like you'd think it does. If the text contains +characters that are not permitted in a message header (such as new lines, or +non-ascii characters) then the header takes care of encoding the text so that +it can be used. + +No header -- including text headers -- in Swift Mailer is vulnerable to +header-injection attacks. Swift Mailer breaks any attempt at header injection +by encoding the dangerous data into a non-dangerous form. + +It's easy to add a new text header to a HeaderSet. You do this by calling the +HeaderSet's ``addTextHeader()`` method:: + + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addTextHeader('Your-Header-Name', 'the header value'); + +Changing the value of an existing text header is done by calling it's +``setValue()`` method:: + + $subject = $message->getHeaders()->get('Subject'); + $subject->setValue('new subject'); + +When output via ``toString()``, a text header produces something like the +following:: + + $subject = $message->getHeaders()->get('Subject'); + $subject->setValue('amazing subject line'); + echo $subject->toString(); + + /* + + Subject: amazing subject line + + */ + +If the header contains any characters that are outside of the US-ASCII range +however, they will be encoded. This is nothing to be concerned about since mail +clients will decode them back:: + + $subject = $message->getHeaders()->get('Subject'); + $subject->setValue('contains – dash'); + echo $subject->toString(); + + /* + + Subject: contains =?utf-8?Q?=E2=80=93?= dash + + */ + +Parameterized Headers +~~~~~~~~~~~~~~~~~~~~~ + +Parameterized headers are text headers that contain key-value parameters +following the textual content. The Content-Type header of a message is a +parameterized header since it contains charset information after the content +type. + +The parameterized header type is a special type of text header. It extends the +text header by allowing additional information to follow it. All of the methods +from text headers are available in addition to the methods described here. + +Adding a parameterized header to a HeaderSet is done by using the +``addParameterizedHeader()`` method which takes a text value like +``addTextHeader()`` but it also accepts an associative array of key-value +parameters:: + + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addParameterizedHeader( + 'Header-Name', 'header value', + ['foo' => 'bar'] + ); + +To change the text value of the header, call it's ``setValue()`` method just as +you do with text headers. + +To change the parameters in the header, call the header's ``setParameters()`` +method or the ``setParameter()`` method (note the pluralization):: + + $type = $message->getHeaders()->get('Content-Type'); + + // setParameters() takes an associative array + $type->setParameters([ + 'name' => 'file.txt', + 'charset' => 'iso-8859-1' + ]); + + // setParameter() takes two args for $key and $value + $type->setParameter('charset', 'iso-8859-1'); + +When output via ``toString()``, a parameterized header produces something like +the following:: + + $type = $message->getHeaders()->get('Content-Type'); + $type->setValue('text/html'); + $type->setParameter('charset', 'utf-8'); + + echo $type->toString(); + + /* + + Content-Type: text/html; charset=utf-8 + + */ + +If the header contains any characters that are outside of the US-ASCII range +however, they will be encoded, just like they are for text headers. This is +nothing to be concerned about since mail clients will decode them back. +Likewise, if the parameters contain any non-ascii characters they will be +encoded so that they can be transmitted safely:: + + $attachment = new Swift_Attachment(); + $disp = $attachment->getHeaders()->get('Content-Disposition'); + $disp->setValue('attachment'); + $disp->setParameter('filename', 'report–may.pdf'); + echo $disp->toString(); + + /* + + Content-Disposition: attachment; filename*=utf-8''report%E2%80%93may.pdf + + */ + +Date Headers +~~~~~~~~~~~~ + +Date headers contains an RFC 2822 formatted date (i.e. what PHP's ``date('r')`` +returns). They are used anywhere a date or time is needed to be presented as a +message header. + +The data on which a date header is modeled as a DateTimeImmutable object. The +object is used to create a correctly structured RFC 2822 formatted date with +timezone such as ``Tue, 17 Feb 2009 22:26:31 +1100``. + +The obvious place this header type is used is in the ``Date:`` header of the +message itself. + +It's easy to add a new date header to a HeaderSet. You do this by calling the +HeaderSet's ``addDateHeader()`` method:: + + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addDateHeader('Your-Header', new DateTimeImmutable('3 days ago')); + +Changing the value of an existing date header is done by calling it's +``setDateTime()`` method:: + + $date = $message->getHeaders()->get('Date'); + $date->setDateTime(new DateTimeImmutable()); + +When output via ``toString()``, a date header produces something like the +following:: + + $date = $message->getHeaders()->get('Date'); + echo $date->toString(); + + /* + + Date: Wed, 18 Feb 2009 13:35:02 +1100 + + */ + +Mailbox (e-mail address) Headers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Mailbox headers contain one or more email addresses, possibly with personalized +names attached to them. The data on which they are modeled is represented by an +associative array of email addresses and names. + +Mailbox headers are probably the most complex header type to understand in +Swift Mailer because they accept their input as an array which can take various +forms, as described in the previous chapter. + +All of the headers that contain e-mail addresses in a message -- with the +exception of ``Return-Path:`` which has a stricter syntax -- use this header +type. That is, ``To:``, ``From:`` etc. + +You add a new mailbox header to a HeaderSet by calling the HeaderSet's +``addMailboxHeader()`` method:: + + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addMailboxHeader('Your-Header-Name', [ + 'person1@example.org' => 'Person Name One', + 'person2@example.org', + 'person3@example.org', + 'person4@example.org' => 'Another named person' + ]); + +Changing the value of an existing mailbox header is done by calling it's +``setNameAddresses()`` method:: + + $to = $message->getHeaders()->get('To'); + $to->setNameAddresses([ + 'joe@example.org' => 'Joe Bloggs', + 'john@example.org' => 'John Doe', + 'no-name@example.org' + ]); + +If you don't wish to concern yourself with the complicated accepted input +formats accepted by ``setNameAddresses()`` as described in the previous chapter +and you only want to set one or more addresses (not names) then you can just +use the ``setAddresses()`` method instead:: + + $to = $message->getHeaders()->get('To'); + $to->setAddresses([ + 'joe@example.org', + 'john@example.org', + 'no-name@example.org' + ]); + +.. note:: + + Both methods will accept the above input format in practice. + +If all you want to do is set a single address in the header, you can use a +string as the input parameter to ``setAddresses()`` and/or +``setNameAddresses()``:: + + $to = $message->getHeaders()->get('To'); + $to->setAddresses('joe-bloggs@example.org'); + +When output via ``toString()``, a mailbox header produces something like the +following:: + + $to = $message->getHeaders()->get('To'); + $to->setNameAddresses([ + 'person1@example.org' => 'Name of Person', + 'person2@example.org', + 'person3@example.org' => 'Another Person' + ]); + + echo $to->toString(); + + /* + + To: Name of Person , person2@example.org, Another Person + + + */ + +Internationalized domains are automatically converted to IDN encoding:: + + $to = $message->getHeaders()->get('To'); + $to->setAddresses('joe@ëxämple.org'); + + echo $to->toString(); + + /* + + To: joe@xn--xmple-gra1c.org + + */ + +ID Headers +~~~~~~~~~~ + +ID headers contain identifiers for the entity (or the message). The most +notable ID header is the Message-ID header on the message itself. + +An ID that exists inside an ID header looks more-or-less less like an email +address. For example, ``<1234955437.499becad62ec2@example.org>``. The part to +the left of the @ sign is usually unique, based on the current time and some +random factor. The part on the right is usually a domain name. + +Any ID passed to the header's ``setId()`` method absolutely MUST conform to +this structure, otherwise you'll get an Exception thrown at you by Swift Mailer +(a ``Swift_RfcComplianceException``). This is to ensure that the generated +email complies with relevant RFC documents and therefore is less likely to be +blocked as spam. + +It's easy to add a new ID header to a HeaderSet. You do this by calling the +HeaderSet's ``addIdHeader()`` method:: + + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addIdHeader('Your-Header-Name', '123456.unqiue@example.org'); + +Changing the value of an existing ID header is done by calling its ``setId()`` +method:: + + $msgId = $message->getHeaders()->get('Message-ID'); + $msgId->setId(time() . '.' . uniqid('thing') . '@example.org'); + +When output via ``toString()``, an ID header produces something like the +following:: + + $msgId = $message->getHeaders()->get('Message-ID'); + echo $msgId->toString(); + + /* + + Message-ID: <1234955437.499becad62ec2@example.org> + + */ + +Path Headers +~~~~~~~~~~~~ + +Path headers are like very-restricted mailbox headers. They contain a single +email address with no associated name. The Return-Path header of a message is a +path header. + +You add a new path header to a HeaderSet by calling the HeaderSet's +``addPathHeader()`` method:: + + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addPathHeader('Your-Header-Name', 'person@example.org'); + +Changing the value of an existing path header is done by calling its +``setAddress()`` method:: + + $return = $message->getHeaders()->get('Return-Path'); + $return->setAddress('my-address@example.org'); + +When output via ``toString()``, a path header produces something like the +following:: + + $return = $message->getHeaders()->get('Return-Path'); + $return->setAddress('person@example.org'); + echo $return->toString(); + + /* + + Return-Path: + + */ + +Header Operations +----------------- + +Working with the headers in a message involves knowing how to use the methods +on the HeaderSet and on the individual Headers within the HeaderSet. + +Adding new Headers +~~~~~~~~~~~~~~~~~~ + +New headers can be added to the HeaderSet by using one of the provided +``add..Header()`` methods. + +The added header will appear in the message when it is sent:: + + // Adding a custom header to a message + $message = new Swift_Message(); + $headers = $message->getHeaders(); + $headers->addTextHeader('X-Mine', 'something here'); + + // Adding a custom header to an attachment + $attachment = Swift_Attachment::fromPath('/path/to/doc.pdf'); + $attachment->getHeaders()->addDateHeader('X-Created-Time', time()); + +Retrieving Headers +~~~~~~~~~~~~~~~~~~ + +Headers are retrieved through the HeaderSet's ``get()`` and ``getAll()`` +methods:: + + $headers = $message->getHeaders(); + + // Get the To: header + $toHeader = $headers->get('To'); + + // Get all headers named "X-Foo" + $fooHeaders = $headers->getAll('X-Foo'); + + // Get the second header named "X-Foo" + $foo = $headers->get('X-Foo', 1); + + // Get all headers that are present + $all = $headers->getAll(); + +When using ``get()`` a single header is returned that matches the name (case +insensitive) that is passed to it. When using ``getAll()`` with a header name, +an array of headers with that name are returned. Calling ``getAll()`` with no +arguments returns an array of all headers present in the entity. + +.. note:: + + It's valid for some headers to appear more than once in a message (e.g. + the Received header). For this reason ``getAll()`` exists to fetch all + headers with a specified name. In addition, ``get()`` accepts an optional + numerical index, starting from zero to specify which header you want more + specifically. + +.. note:: + + If you want to modify the contents of the header and you don't know for + sure what type of header it is then you may need to check the type by + calling its ``getFieldType()`` method. + +Check if a Header Exists +~~~~~~~~~~~~~~~~~~~~~~~~ + +You can check if a named header is present in a HeaderSet by calling its +``has()`` method:: + + $headers = $message->getHeaders(); + + // Check if the To: header exists + if ($headers->has('To')) { + echo 'To: exists'; + } + + // Check if an X-Foo header exists twice (i.e. check for the 2nd one) + if ($headers->has('X-Foo', 1)) { + echo 'Second X-Foo header exists'; + } + +If the header exists, ``true`` will be returned or ``false`` if not. + +.. note:: + + It's valid for some headers to appear more than once in a message (e.g. + the Received header). For this reason ``has()`` accepts an optional + numerical index, starting from zero to specify which header you want to + check more specifically. + +Removing Headers +~~~~~~~~~~~~~~~~ + +Removing a Header from the HeaderSet is done by calling the HeaderSet's +``remove()`` or ``removeAll()`` methods:: + + $headers = $message->getHeaders(); + + // Remove the Subject: header + $headers->remove('Subject'); + + // Remove all X-Foo headers + $headers->removeAll('X-Foo'); + + // Remove only the second X-Foo header + $headers->remove('X-Foo', 1); + +When calling ``remove()`` a single header will be removed. When calling +``removeAll()`` all headers with the given name will be removed. If no headers +exist with the given name, no errors will occur. + +.. note:: + + It's valid for some headers to appear more than once in a message (e.g. + the Received header). For this reason ``remove()`` accepts an optional + numerical index, starting from zero to specify which header you want to + check more specifically. For the same reason, ``removeAll()`` exists to + remove all headers that have the given name. + +Modifying a Header's Content +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To change a Header's content you should know what type of header it is and then +call it's appropriate setter method. All headers also have a +``setFieldBodyModel()`` method that accepts a mixed parameter and delegates to +the correct setter:: + +The header will be updated inside the HeaderSet and the changes will be seen +when the message is sent:: + + $headers = $message->getHeaders(); + + // Change the Subject: header + $subj = $headers->get('Subject'); + $subj->setValue('new subject here'); + + // Change the To: header + $to = $headers->get('To'); + $to->setNameAddresses([ + 'person@example.org' => 'Person', + 'thing@example.org' + ]); + + // Using the setFieldBodyModel() just delegates to the correct method + // So here to calls setNameAddresses() + $to->setFieldBodyModel([ + 'person@example.org' => 'Person', + 'thing@example.org' + ]); diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/index.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/index.rst new file mode 100644 index 00000000..5d928891 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/index.rst @@ -0,0 +1,12 @@ +Swiftmailer +=========== + +.. toctree:: + :maxdepth: 2 + + introduction + messages + headers + sending + plugins + japanese diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/introduction.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/introduction.rst new file mode 100644 index 00000000..8a47ef1d --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/introduction.rst @@ -0,0 +1,67 @@ +Swiftmailer: A feature-rich PHP Mailer +====================================== + +Swift Mailer is a component based library for sending e-mails from PHP applications. + +**Swiftmailer will stop being maintained at the end of November 2021.** + +Please, move to `Symfony Mailer `_ at your earliest convenience. +`Symfony Mailer `_ is the next evolution of Swiftmailer. +It provides the same features with support for modern PHP code and support for third-party providers. + +System Requirements +------------------- + +Swift Mailer requires PHP 7.0 or higher (``proc_*`` functions must be +available). + +Swift Mailer does not work when used with function overloading as implemented +by ``mbstring`` when ``mbstring.func_overload`` is set to ``2``. + +Installation +------------ + +The recommended way to install Swiftmailer is via Composer: + +.. code-block:: bash + + $ composer require "swiftmailer/swiftmailer:^6.0" + +Basic Usage +----------- + +Here is the simplest way to send emails with Swift Mailer:: + + require_once '/path/to/vendor/autoload.php'; + + // Create the Transport + $transport = (new Swift_SmtpTransport('smtp.example.org', 25)) + ->setUsername('your username') + ->setPassword('your password') + ; + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + + // Create a message + $message = (new Swift_Message('Wonderful Subject')) + ->setFrom(['john@doe.com' => 'John Doe']) + ->setTo(['receiver@domain.org', 'other@domain.org' => 'A name']) + ->setBody('Here is the message itself') + ; + + // Send the message + $result = $mailer->send($message); + +You can also use Sendmail as a transport:: + + // Sendmail + $transport = new Swift_SendmailTransport('/usr/sbin/sendmail -bs'); + +Getting Help +------------ + +For general support, use `Stack Overflow `_. + +For bug reports and feature requests, create a new ticket in `GitHub +`_. diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/japanese.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/japanese.rst new file mode 100644 index 00000000..54548217 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/japanese.rst @@ -0,0 +1,19 @@ +Using Swift Mailer for Japanese Emails +====================================== + +To send emails in Japanese, you need to tweak the default configuration. + +Call the ``Swift::init()`` method with the following code as early as possible +in your code:: + + Swift::init(function () { + Swift_DependencyContainer::getInstance() + ->register('mime.qpheaderencoder') + ->asAliasOf('mime.base64headerencoder'); + + Swift_Preferences::getInstance()->setCharset('iso-2022-jp'); + }); + + /* rest of code goes here */ + +That's all! diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/messages.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/messages.rst new file mode 100644 index 00000000..e03859d8 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/messages.rst @@ -0,0 +1,949 @@ +Creating Messages +================= + +Creating messages in Swift Mailer is done by making use of the various MIME +entities provided with the library. Complex messages can be quickly created +with very little effort. + +Quick Reference +--------------- + +You can think of creating a Message as being similar to the steps you perform +when you click the Compose button in your mail client. You give it a subject, +specify some recipients, add any attachments and write your message:: + + // Create the message + $message = (new Swift_Message()) + + // Give the message a subject + ->setSubject('Your subject') + + // Set the From address with an associative array + ->setFrom(['john@doe.com' => 'John Doe']) + + // Set the To addresses with an associative array (setTo/setCc/setBcc) + ->setTo(['receiver@domain.org', 'other@domain.org' => 'A name']) + + // Give it a body + ->setBody('Here is the message itself') + + // And optionally an alternative body + ->addPart('Here is the message itself', 'text/html') + + // Optionally add any attachments + ->attach(Swift_Attachment::fromPath('my-document.pdf')) + ; + +Message Basics +-------------- + +A message is a container for anything you want to send to somebody else. There +are several basic aspects of a message that you should know. + +An e-mail message is made up of several relatively simple entities that are +combined in different ways to achieve different results. All of these entities +have the same fundamental outline but serve a different purpose. The Message +itself can be defined as a MIME entity, an Attachment is a MIME entity, all +MIME parts are MIME entities -- and so on! + +The basic units of each MIME entity -- be it the Message itself, or an +Attachment -- are its Headers and its body: + +.. code-block:: text + + Header-Name: A header value + Other-Header: Another value + + The body content itself + +The Headers of a MIME entity, and its body must conform to some strict +standards defined by various RFC documents. Swift Mailer ensures that these +specifications are followed by using various types of object, including +Encoders and different Header types to generate the entity. + +The Structure of a Message +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Of all of the MIME entities, a message -- ``Swift_Message`` is the largest and +most complex. It has many properties that can be updated and it can contain +other MIME entities -- attachments for example -- nested inside it. + +A Message has a lot of different Headers which are there to present information +about the message to the recipients' mail client. Most of these headers will be +familiar to the majority of users, but we'll list the basic ones. Although it's +possible to work directly with the Headers of a Message (or other MIME entity), +the standard Headers have accessor methods provided to abstract away the +complex details for you. For example, although the Date on a message is written +with a strict format, you only need to pass a DateTimeInterface instance to +``setDate()``. + ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| Header | Description | Accessors | ++===============================+====================================================================================================================================+=============================================+ +| ``Message-ID`` | Identifies this message with a unique ID, usually containing the domain name and time generated | ``getId()`` / ``setId()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Return-Path`` | Specifies where bounces should go (Swift Mailer reads this for other uses) | ``getReturnPath()`` / ``setReturnPath()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``From`` | Specifies the address of the person who the message is from. This can be multiple addresses if multiple people wrote the message. | ``getFrom()`` / ``setFrom()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Sender`` | Specifies the address of the person who physically sent the message (higher precedence than ``From:``) | ``getSender()`` / ``setSender()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``To`` | Specifies the addresses of the intended recipients | ``getTo()`` / ``setTo()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Cc`` | Specifies the addresses of recipients who will be copied in on the message | ``getCc()`` / ``setCc()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Bcc`` | Specifies the addresses of recipients who the message will be blind-copied to. Other recipients will not be aware of these copies. | ``getBcc()`` / ``setBcc()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Reply-To`` | Specifies the address where replies are sent to | ``getReplyTo()`` / ``setReplyTo()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Subject`` | Specifies the subject line that is displayed in the recipients' mail client | ``getSubject()`` / ``setSubject()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Date`` | Specifies the date at which the message was sent | ``getDate()`` / ``setDate()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Content-Type`` | Specifies the format of the message (usually ``text/plain`` or ``text/html``) | ``getContentType()`` / ``setContentType()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ +| ``Content-Transfer-Encoding`` | Specifies the encoding scheme in the message | ``getEncoder()`` / ``setEncoder()`` | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+ + +Working with a Message Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Although there are a lot of available methods on a message object, you only +need to make use of a small subset of them. Usually you'll use +``setSubject()``, ``setTo()`` and ``setFrom()`` before setting the body of your +message with ``setBody()``:: + + $message = new Swift_Message(); + $message->setSubject('My subject'); + +All MIME entities (including a message) have a ``toString()`` method that you +can call if you want to take a look at what is going to be sent. For example, +if you ``echo $message->toString();`` you would see something like this: + +.. code-block:: text + + Message-ID: <1230173678.4952f5eeb1432@swift.generated> + Date: Thu, 25 Dec 2008 13:54:38 +1100 + Subject: Example subject + From: Chris Corbyn + To: Receiver Name + MIME-Version: 1.0 + Content-Type: text/plain; charset=utf-8 + Content-Transfer-Encoding: quoted-printable + + Here is the message + +We'll take a closer look at the methods you use to create your message in the +following sections. + +Adding Content to Your Message +------------------------------ + +Rich content can be added to messages in Swift Mailer with relative ease by +calling methods such as ``setSubject()``, ``setBody()``, ``addPart()`` and +``attach()``. + +Setting the Subject Line +~~~~~~~~~~~~~~~~~~~~~~~~ + +The subject line, displayed in the recipients' mail client can be set with the +``setSubject()`` method, or as a parameter to ``new Swift_Message()``:: + + // Pass it as a parameter when you create the message + $message = new Swift_Message('My amazing subject'); + + // Or set it after like this + $message->setSubject('My amazing subject'); + +Setting the Body Content +~~~~~~~~~~~~~~~~~~~~~~~~ + +The body of the message -- seen when the user opens the message -- is specified +by calling the ``setBody()`` method. If an alternative body is to be included, +``addPart()`` can be used. + +The body of a message is the main part that is read by the user. Often people +want to send a message in HTML format (``text/html``), other times people want +to send in plain text (``text/plain``), or sometimes people want to send both +versions and allow the recipient to choose how they view the message. + +As a rule of thumb, if you're going to send a HTML email, always include a +plain-text equivalent of the same content so that users who prefer to read +plain text can do so. + +If the recipient's mail client offers preferences for displaying text vs. HTML +then the mail client will present that part to the user where available. In +other cases the mail client will display the "best" part it can - usually HTML +if you've included HTML:: + + // Pass it as a parameter when you create the message + $message = new Swift_Message('Subject here', 'My amazing body'); + + // Or set it after like this + $message->setBody('My amazing body', 'text/html'); + + // Add alternative parts with addPart() + $message->addPart('My amazing body in plain text', 'text/plain'); + +Attaching Files +--------------- + +Attachments are downloadable parts of a message and can be added by calling the +``attach()`` method on the message. You can add attachments that exist on disk, +or you can create attachments on-the-fly. + +Although we refer to files sent over e-mails as "attachments" -- because +they're attached to the message -- lots of other parts of the message are +actually "attached" even if we don't refer to these parts as attachments. + +File attachments are created by the ``Swift_Attachment`` class and then +attached to the message via the ``attach()`` method on it. For all of the +"every day" MIME types such as all image formats, word documents, PDFs and +spreadsheets you don't need to explicitly set the content-type of the +attachment, though it would do no harm to do so. For less common formats you +should set the content-type -- which we'll cover in a moment. + +Attaching Existing Files +~~~~~~~~~~~~~~~~~~~~~~~~ + +Files that already exist, either on disk or at a URL can be attached to a +message with just one line of code, using ``Swift_Attachment::fromPath()``. + +You can attach files that exist locally, or if your PHP installation has +``allow_url_fopen`` turned on you can attach files from other +websites. + +The attachment will be presented to the recipient as a downloadable file with +the same filename as the one you attached:: + + // Create the attachment + // * Note that you can technically leave the content-type parameter out + $attachment = Swift_Attachment::fromPath('/path/to/image.jpg', 'image/jpeg'); + + // Attach it to the message + $message->attach($attachment); + + // The two statements above could be written in one line instead + $message->attach(Swift_Attachment::fromPath('/path/to/image.jpg')); + + // You can attach files from a URL if allow_url_fopen is on in php.ini + $message->attach(Swift_Attachment::fromPath('http://site.tld/logo.png')); + +Setting the Filename +~~~~~~~~~~~~~~~~~~~~ + +Usually you don't need to explicitly set the filename of an attachment because +the name of the attached file will be used by default, but if you want to set +the filename you use the ``setFilename()`` method of the Attachment. + +The attachment will be attached in the normal way, but meta-data sent inside +the email will rename the file to something else:: + + // Create the attachment and call its setFilename() method + $attachment = Swift_Attachment::fromPath('/path/to/image.jpg') + ->setFilename('cool.jpg'); + + // Because there's a fluid interface, you can do this in one statement + $message->attach( + Swift_Attachment::fromPath('/path/to/image.jpg')->setFilename('cool.jpg') + ); + +Attaching Dynamic Content +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Files that are generated at runtime, such as PDF documents or images created +via GD can be attached directly to a message without writing them out to disk. +Use ``Swift_Attachment`` directly. + +The attachment will be presented to the recipient as a downloadable file +with the filename and content-type you specify:: + + // Create your file contents in the normal way, but don't write them to disk + $data = create_my_pdf_data(); + + // Create the attachment with your data + $attachment = new Swift_Attachment($data, 'my-file.pdf', 'application/pdf'); + + // Attach it to the message + $message->attach($attachment); + + + // You can alternatively use method chaining to build the attachment + $attachment = (new Swift_Attachment()) + ->setFilename('my-file.pdf') + ->setContentType('application/pdf') + ->setBody($data) + ; + +.. note:: + + If you would usually write the file to disk anyway you should just attach + it with ``Swift_Attachment::fromPath()`` since this will use less memory. + +Changing the Disposition +~~~~~~~~~~~~~~~~~~~~~~~~ + +Attachments just appear as files that can be saved to the Desktop if desired. +You can make attachment appear inline where possible by using the +``setDisposition()`` method of an attachment. + +The attachment will be displayed within the email viewing window if the mail +client knows how to display it:: + + // Create the attachment and call its setDisposition() method + $attachment = Swift_Attachment::fromPath('/path/to/image.jpg') + ->setDisposition('inline'); + + + // Because there's a fluid interface, you can do this in one statement + $message->attach( + Swift_Attachment::fromPath('/path/to/image.jpg')->setDisposition('inline') + ); + +.. note:: + + If you try to create an inline attachment for a non-displayable file type + such as a ZIP file, the mail client should just present the attachment as + normal. + +Embedding Inline Media Files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Often, people want to include an image or other content inline with a HTML +message. It's easy to do this with HTML linking to remote resources, but this +approach is usually blocked by mail clients. Swift Mailer allows you to embed +your media directly into the message. + +Mail clients usually block downloads from remote resources because this +technique was often abused as a mean of tracking who opened an email. If +you're sending a HTML email and you want to include an image in the message +another approach you can take is to embed the image directly. + +Swift Mailer makes embedding files into messages extremely streamlined. You +embed a file by calling the ``embed()`` method of the message, +which returns a value you can use in a ``src`` or +``href`` attribute in your HTML. + +Just like with attachments, it's possible to embed dynamically generated +content without having an existing file available. + +The embedded files are sent in the email as a special type of attachment that +has a unique ID used to reference them within your HTML attributes. On mail +clients that do not support embedded files they may appear as attachments. + +Although this is commonly done for images, in theory it will work for any +displayable (or playable) media type. Support for other media types (such as +video) is dependent on the mail client however. + +Embedding Existing Files +........................ + +Files that already exist, either on disk or at a URL can be embedded in a +message with just one line of code, using ``Swift_EmbeddedFile::fromPath()``. + +You can embed files that exist locally, or if your PHP installation has +``allow_url_fopen`` turned on you can embed files from other websites. + +The file will be displayed with the message inline with the HTML wherever its ID +is used as a ``src`` attribute:: + + // Create the message + $message = new Swift_Message('My subject'); + + // Set the body + $message->setBody( + '' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + + // You can embed files from a URL if allow_url_fopen is on in php.ini + $message->setBody( + '' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' + ); + +.. note:: + + ``Swift_Image`` and ``Swift_EmbeddedFile`` are just aliases of one another. + ``Swift_Image`` exists for semantic purposes. + +.. note:: + + You can embed files in two stages if you prefer. Just capture the return + value of ``embed()`` in a variable and use that as the ``src`` attribute:: + + // If placing the embed() code inline becomes cumbersome + // it's easy to do this in two steps + $cid = $message->embed(Swift_Image::fromPath('image.png')); + + $message->setBody( + '' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + +Embedding Dynamic Content +......................... + +Images that are generated at runtime, such as images created via GD can be +embedded directly to a message without writing them out to disk. Use the +standard ``new Swift_Image()`` method. + +The file will be displayed with the message inline with the HTML wherever its ID +is used as a ``src`` attribute:: + + // Create your file contents in the normal way, but don't write them to disk + $img_data = create_my_image_data(); + + // Create the message + $message = new Swift_Message('My subject'); + + // Set the body + $message->setBody( + '' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + +.. note:: + + ``Swift_Image`` and ``Swift_EmbeddedFile`` are just aliases of one another. + ``Swift_Image`` exists for semantic purposes. + +.. note:: + + You can embed files in two stages if you prefer. Just capture the return + value of ``embed()`` in a variable and use that as the ``src`` attribute:: + + // If placing the embed() code inline becomes cumbersome + // it's easy to do this in two steps + $cid = $message->embed(new Swift_Image($img_data, 'image.jpg', 'image/jpeg')); + + $message->setBody( + '' . + ' ' . + ' Here is an image Image' . + ' Rest of message' . + ' ' . + '', + 'text/html' // Mark the content-type as HTML + ); + +Adding Recipients to Your Message +--------------------------------- + +Recipients are specified within the message itself via ``setTo()``, ``setCc()`` +and ``setBcc()``. Swift Mailer reads these recipients from the message when it +gets sent so that it knows where to send the message to. + +Message recipients are one of three types: + +* ``To:`` recipients -- the primary recipients (required) + +* ``Cc:`` recipients -- receive a copy of the message (optional) + +* ``Bcc:`` recipients -- hidden from other recipients (optional) + +Each type can contain one, or several addresses. It's possible to list only the +addresses of the recipients, or you can personalize the address by providing +the real name of the recipient. + +Make sure to add only valid email addresses as recipients. If you try to add an +invalid email address with ``setTo()``, ``setCc()`` or ``setBcc()``, Swift +Mailer will throw a ``Swift_RfcComplianceException``. + +If you add recipients automatically based on a data source that may contain +invalid email addresses, you can prevent possible exceptions by validating the +addresses using:: + + use Egulias\EmailValidator\EmailValidator; + use Egulias\EmailValidator\Validation\RFCValidation; + + $validator = new EmailValidator(); + $validator->isValid("example@example.com", new RFCValidation()); //true + +and only adding addresses that validate. Another way would be to wrap your ``setTo()``, ``setCc()`` and +``setBcc()`` calls in a try-catch block and handle the +``Swift_RfcComplianceException`` in the catch block. + +.. sidebar:: Syntax for Addresses + + If you only wish to refer to a single email address (for example your + ``From:`` address) then you can just use a string:: + + $message->setFrom('some@address.tld'); + + If you want to include a name then you must use an associative array:: + + $message->setFrom(['some@address.tld' => 'The Name']); + + If you want to include multiple addresses then you must use an array:: + + $message->setTo(['some@address.tld', 'other@address.tld']); + + You can mix personalized (addresses with a name) and non-personalized + addresses in the same list by mixing the use of associative and + non-associative array syntax:: + + $message->setTo([ + 'recipient-with-name@example.org' => 'Recipient Name One', + 'no-name@example.org', // Note that this is not a key-value pair + 'named-recipient@example.org' => 'Recipient Name Two' + ]); + +Setting ``To:`` Recipients +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``To:`` recipients are required in a message and are set with the ``setTo()`` +or ``addTo()`` methods of the message. + +To set ``To:`` recipients, create the message object using either ``new +Swift_Message( ... )``, then call the ``setTo()`` method with a complete array +of addresses, or use the ``addTo()`` method to iteratively add recipients. + +The ``setTo()`` method accepts input in various formats as described earlier in +this chapter. The ``addTo()`` method takes either one or two parameters. The +first being the email address and the second optional parameter being the name +of the recipient. + +``To:`` recipients are visible in the message headers and will be seen by the +other recipients:: + + // Using setTo() to set all recipients in one go + $message->setTo([ + 'person1@example.org', + 'person2@otherdomain.org' => 'Person 2 Name', + 'person3@example.org', + 'person4@example.org', + 'person5@example.org' => 'Person 5 Name' + ]); + +.. note:: + + Multiple calls to ``setTo()`` will not add new recipients -- each + call overrides the previous calls. If you want to iteratively add + recipients, use the ``addTo()`` method:: + + // Using addTo() to add recipients iteratively + $message->addTo('person1@example.org'); + $message->addTo('person2@example.org', 'Person 2 Name'); + +Setting ``Cc:`` Recipients +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Cc:`` recipients are set with the ``setCc()`` or ``addCc()`` methods of the +message. + +To set ``Cc:`` recipients, create the message object using either ``new +Swift_Message( ... )``, then call the ``setCc()`` method with a complete array +of addresses, or use the ``addCc()`` method to iteratively add recipients. + +The ``setCc()`` method accepts input in various formats as described earlier in +this chapter. The ``addCc()`` method takes either one or two parameters. The +first being the email address and the second optional parameter being the name +of the recipient. + +``Cc:`` recipients are visible in the message headers and will be seen by the +other recipients:: + + // Using setTo() to set all recipients in one go + $message->setTo([ + 'person1@example.org', + 'person2@otherdomain.org' => 'Person 2 Name', + 'person3@example.org', + 'person4@example.org', + 'person5@example.org' => 'Person 5 Name' + ]); + +.. note:: + + Multiple calls to ``setCc()`` will not add new recipients -- each call + overrides the previous calls. If you want to iteratively add Cc: + recipients, use the ``addCc()`` method:: + + // Using addCc() to add recipients iteratively + $message->addCc('person1@example.org'); + $message->addCc('person2@example.org', 'Person 2 Name'); + +Setting ``Bcc:`` Recipients +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Bcc:`` recipients receive a copy of the message without anybody else knowing +it, and are set with the ``setBcc()`` or ``addBcc()`` methods of the message. + +To set ``Bcc:`` recipients, create the message object using either ``new +Swift_Message( ... )``, then call the ``setBcc()`` method with a complete array +of addresses, or use the ``addBcc()`` method to iteratively add recipients. + +The ``setBcc()`` method accepts input in various formats as described earlier +in this chapter. The ``addBcc()`` method takes either one or two parameters. +The first being the email address and the second optional parameter being the +name of the recipient. + +Only the individual ``Bcc:`` recipient will see their address in the message +headers. Other recipients (including other ``Bcc:`` recipients) will not see +the address:: + + // Using setBcc() to set all recipients in one go + $message->setBcc([ + 'person1@example.org', + 'person2@otherdomain.org' => 'Person 2 Name', + 'person3@example.org', + 'person4@example.org', + 'person5@example.org' => 'Person 5 Name' + ]); + +.. note:: + + Multiple calls to ``setBcc()`` will not add new recipients -- each call + overrides the previous calls. If you want to iteratively add Bcc: + recipients, use the ``addBcc()`` method:: + + // Using addBcc() to add recipients iteratively + $message->addBcc('person1@example.org'); + $message->addBcc('person2@example.org', 'Person 2 Name'); + +.. sidebar:: Internationalized Email Addresses + + Traditionally only ASCII characters have been allowed in email addresses. + With the introduction of internationalized domain names (IDNs), non-ASCII + characters may appear in the domain name. By default, Swiftmailer encodes + such domain names in Punycode (e.g. xn--xample-ova.invalid). This is + compatible with all mail servers. + + RFC 6531 introduced an SMTP extension, SMTPUTF8, that allows non-ASCII + characters in email addresses on both sides of the @ sign. To send to such + addresses, your outbound SMTP server must support the SMTPUTF8 extension. + You should use the ``Swift_AddressEncoder_Utf8AddressEncoder`` address + encoder and enable the ``Swift_Transport_Esmtp_SmtpUtf8Handler`` SMTP + extension handler:: + + $smtpUtf8 = new Swift_Transport_Esmtp_SmtpUtf8Handler(); + $transport->setExtensionHandlers([$smtpUtf8]); + $utf8Encoder = new Swift_AddressEncoder_Utf8AddressEncoder(); + $transport->setAddressEncoder($utf8Encoder); + +Specifying Sender Details +------------------------- + +An email must include information about who sent it. Usually this is managed by +the ``From:`` address, however there are other options. + +The sender information is contained in three possible places: + +* ``From:`` -- the address(es) of who wrote the message (required) + +* ``Sender:`` -- the address of the single person who sent the message + (optional) + +* ``Return-Path:`` -- the address where bounces should go to (optional) + +You must always include a ``From:`` address by using ``setFrom()`` on the +message. Swift Mailer will use this as the default ``Return-Path:`` unless +otherwise specified. + +The ``Sender:`` address exists because the person who actually sent the email +may not be the person who wrote the email. It has a higher precedence than the +``From:`` address and will be used as the ``Return-Path:`` unless otherwise +specified. + +Setting the ``From:`` Address +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A ``From:`` address is required and is set with the ``setFrom()`` method of the +message. ``From:`` addresses specify who actually wrote the email, and usually +who sent it. + +What most people probably don't realize is that you can have more than one +``From:`` address if more than one person wrote the email -- for example if an +email was put together by a committee. + +The ``From:`` address(es) are visible in the message headers and will be seen +by the recipients. + +.. note:: + + If you set multiple ``From:`` addresses then you absolutely must set a + ``Sender:`` address to indicate who physically sent the message. + +:: + + // Set a single From: address + $message->setFrom('your@address.tld'); + + // Set a From: address including a name + $message->setFrom(['your@address.tld' => 'Your Name']); + + // Set multiple From: addresses if multiple people wrote the email + $message->setFrom([ + 'person1@example.org' => 'Sender One', + 'person2@example.org' => 'Sender Two' + ]); + +Setting the ``Sender:`` Address +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A ``Sender:`` address specifies who sent the message and is set with the +``setSender()`` method of the message. + +The ``Sender:`` address is visible in the message headers and will be seen by +the recipients. + +This address will be used as the ``Return-Path:`` unless otherwise specified. + +.. note:: + + If you set multiple ``From:`` addresses then you absolutely must set a + ``Sender:`` address to indicate who physically sent the message. + +You must not set more than one sender address on a message because it's not +possible for more than one person to send a single message:: + + $message->setSender('your@address.tld'); + +Setting the ``Return-Path:`` (Bounce) Address +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``Return-Path:`` address specifies where bounce notifications should be +sent and is set with the ``setReturnPath()`` method of the message. + +You can only have one ``Return-Path:`` and it must not include a personal name. + +Bounce notifications will be sent to this address:: + + $message->setReturnPath('bounces@address.tld'); + +Signed/Encrypted Message +------------------------ + +To increase the integrity/security of a message it is possible to sign and/or +encrypt an message using one or multiple signers. + +S/MIME +~~~~~~ + +S/MIME can sign and/or encrypt a message using the OpenSSL extension. + +When signing a message, the signer creates a signature of the entire content of +the message (including attachments). + +The certificate and private key must be PEM encoded, and can be either created +using for example OpenSSL or obtained at an official Certificate Authority (CA). + +**The recipient must have the CA certificate in the list of trusted issuers in +order to verify the signature.** + +**Make sure the certificate supports emailProtection.** + +When using OpenSSL this can done by the including the *-addtrust +emailProtection* parameter when creating the certificate:: + + $message = new Swift_Message(); + + $smimeSigner = new Swift_Signers_SMimeSigner(); + $smimeSigner->setSignCertificate('/path/to/certificate.pem', '/path/to/private-key.pem'); + $message->attachSigner($smimeSigner); + +When the private key is secured using a passphrase use the following instead:: + + $message = new Swift_Message(); + + $smimeSigner = new Swift_Signers_SMimeSigner(); + $smimeSigner->setSignCertificate('/path/to/certificate.pem', ['/path/to/private-key.pem', 'passphrase']); + $message->attachSigner($smimeSigner); + +By default the signature is added as attachment, making the message still +readable for mailing agents not supporting signed messages. + +Storing the message as binary is also possible but not recommended:: + + $smimeSigner->setSignCertificate('/path/to/certificate.pem', '/path/to/private-key.pem', PKCS7_BINARY); + +When encrypting the message (also known as enveloping), the entire message +(including attachments) is encrypted using a certificate, and the recipient can +then decrypt the message using corresponding private key. + +Encrypting ensures nobody can read the contents of the message without the +private key. + +Normally the recipient provides a certificate for encrypting and keeping the +decryption key private. + +Using both signing and encrypting is also possible:: + + $message = new Swift_Message(); + + $smimeSigner = new Swift_Signers_SMimeSigner(); + $smimeSigner->setSignCertificate('/path/to/sign-certificate.pem', '/path/to/private-key.pem'); + $smimeSigner->setEncryptCertificate('/path/to/encrypt-certificate.pem'); + $message->attachSigner($smimeSigner); + +The used encryption cipher can be set as the second parameter of +setEncryptCertificate() + +See https://secure.php.net/manual/openssl.ciphers for a list of supported ciphers. + +By default the message is first signed and then encrypted, this can be changed +by adding:: + + $smimeSigner->setSignThenEncrypt(false); + +**Changing this is not recommended as most mail agents don't support this +none-standard way.** + +Only when having trouble with sign then encrypt method, this should be changed. + +Requesting a Read Receipt +------------------------- + +It is possible to request a read-receipt to be sent to an address when the +email is opened. To request a read receipt set the address with +``setReadReceiptTo()``:: + + $message->setReadReceiptTo('your@address.tld'); + +When the email is opened, if the mail client supports it a notification will be +sent to this address. + +.. note:: + + Read receipts won't work for the majority of recipients since many mail + clients auto-disable them. Those clients that will send a read receipt + will make the user aware that one has been requested. + +Setting the Character Set +------------------------- + +The character set of the message (and its MIME parts) is set with the +``setCharset()`` method. You can also change the global default of UTF-8 by +working with the ``Swift_Preferences`` class. + +Swift Mailer will default to the UTF-8 character set unless otherwise +overridden. UTF-8 will work in most instances since it includes all of the +standard US keyboard characters in addition to most international characters. + +It is absolutely vital however that you know what character set your message +(or it's MIME parts) are written in otherwise your message may be received +completely garbled. + +There are two places in Swift Mailer where you can change the character set: + +* In the ``Swift_Preferences`` class + +* On each individual message and/or MIME part + +To set the character set of your Message: + +* Change the global UTF-8 setting by calling + ``Swift_Preferences::setCharset()``; or + +* Call the ``setCharset()`` method on the message or the MIME part:: + + // Approach 1: Change the global setting (suggested) + Swift_Preferences::getInstance()->setCharset('iso-8859-2'); + + // Approach 2: Call the setCharset() method of the message + $message = (new Swift_Message()) + ->setCharset('iso-8859-2'); + + // Approach 3: Specify the charset when setting the body + $message->setBody('My body', 'text/html', 'iso-8859-2'); + + // Approach 4: Specify the charset for each part added + $message->addPart('My part', 'text/plain', 'iso-8859-2'); + +Setting the Encoding +-------------------- + +The body of each MIME part needs to be encoded. Binary attachments are encoded +in base64 using the ``Swift_Mime_ContentEncoder_Base64ContentEncoder``. Text +parts are traditionally encoded in quoted-printable using +``Swift_Mime_ContentEncoder_QpContentEncoder`` or +``Swift_Mime_ContentEncoder_NativeQpContentEncoder``. + +The encoder of the message or MIME part is set with the ``setEncoder()`` method. + +Quoted-printable is the safe choice, because it converts 8-bit text as 7-bit. +Most modern SMTP servers support 8-bit text. This is advertised via the 8BITMIME +SMTP extension. If your outbound SMTP server supports this SMTP extension, and +it supports downgrading the message (e.g converting to quoted-printable on the +fly) when delivering to a downstream server that does not support the extension, +you may wish to use ``Swift_Mime_ContentEncoder_PlainContentEncoder`` in +``8bit`` mode instead. This has the advantage that the source data is slightly +more readable and compact, especially for non-Western languages. + + $eightBitMime = new Swift_Transport_Esmtp_EightBitMimeHandler(); + $transport->setExtensionHandlers([$eightBitMime]); + $plainEncoder = new Swift_Mime_ContentEncoder_PlainContentEncoder('8bit'); + $message->setEncoder($plainEncoder); + +Setting the Line Length +----------------------- + +The length of lines in a message can be changed by using the +``setMaxLineLength()`` method on the message:: + + $message->setMaxLineLength(1000); + +Swift Mailer defaults to using 78 characters per line in a message. This is +done for historical reasons and so that the message can be easily viewed in +plain-text terminals + +Lines that are longer than the line length specified will be wrapped between +words. + +.. note:: + + You should never set a maximum length longer than 1000 characters + according to RFC 2822. Doing so could have unspecified side-effects such + as truncating parts of your message when it is transported between SMTP + servers. + +Setting the Message Priority +---------------------------- + +You can change the priority of the message with ``setPriority()``. Setting the +priority will not change the way your email is sent -- it is purely an +indicative setting for the recipient:: + + // Indicate "High" priority + $message->setPriority(2); + +The priority of a message is an indication to the recipient what significance +it has. Swift Mailer allows you to set the priority by calling the +``setPriority`` method. This method takes an integer value between 1 and 5: + +* ``Swift_Mime_SimpleMessage::PRIORITY_HIGHEST``: 1 +* ``Swift_Mime_SimpleMessage::PRIORITY_HIGH``: 2 +* ``Swift_Mime_SimpleMessage::PRIORITY_NORMAL``: 3 +* ``Swift_Mime_SimpleMessage::PRIORITY_LOW``: 4 +* ``Swift_Mime_SimpleMessage::PRIORITY_LOWEST``: 5 + +:: + + // Or use the constant to be more explicit + $message->setPriority(Swift_Mime_SimpleMessage::PRIORITY_HIGH); diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/plugins.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/plugins.rst new file mode 100644 index 00000000..548b07ff --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/plugins.rst @@ -0,0 +1,337 @@ +Plugins +======= + +Plugins exist to extend, or modify the behaviour of Swift Mailer. They respond +to Events that are fired within the Transports during sending. + +There are a number of Plugins provided as part of the base Swift Mailer package +and they all follow a common interface to respond to Events fired within the +library. Interfaces are provided to "listen" to each type of Event fired and to +act as desired when a listened-to Event occurs. + +Although several plugins are provided with Swift Mailer out-of-the-box, the +Events system has been specifically designed to make it easy for experienced +object-oriented developers to write their own plugins in order to achieve +goals that may not be possible with the base library. + +AntiFlood Plugin +---------------- + +Many SMTP servers have limits on the number of messages that may be sent during +any single SMTP connection. The AntiFlood plugin provides a way to stay within +this limit while still managing a large number of emails. + +A typical limit for a single connection is 100 emails. If the server you +connect to imposes such a limit, it expects you to disconnect after that number +of emails has been sent. You could manage this manually within a loop, but the +AntiFlood plugin provides the necessary wrapper code so that you don't need to +worry about this logic. + +Regardless of limits imposed by the server, it's usually a good idea to be +conservative with the resources of the SMTP server. Sending will become +sluggish if the server is being over-used so using the AntiFlood plugin will +not be a bad idea even if no limits exist. + +The AntiFlood plugin's logic is basically to disconnect and the immediately +re-connect with the SMTP server every X number of emails sent, where X is a +number you specify to the plugin. + +You can also specify a time period in seconds that Swift Mailer should pause +for between the disconnect/re-connect process. It's a good idea to pause for a +short time (say 30 seconds every 100 emails) simply to give the SMTP server a +chance to process its queue and recover some resources. + +Using the AntiFlood Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The AntiFlood Plugin -- like all plugins -- is added with the Mailer class's +``registerPlugin()`` method. It takes two constructor parameters: the number of +emails to pause after, and optionally the number of seconds to pause for. + +When Swift Mailer sends messages it will count the number of messages that have +been sent since the last re-connect. Once the number hits your specified +threshold it will disconnect and re-connect, optionally pausing for a specified +amount of time:: + + // Create the Mailer using any Transport + $mailer = new Swift_Mailer( + new Swift_SmtpTransport('smtp.example.org', 25) + ); + + // Use AntiFlood to re-connect after 100 emails + $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100)); + + // And specify a time in seconds to pause for (30 secs) + $mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100, 30)); + + // Continue sending as normal + for ($lotsOfRecipients as $recipient) { + ... + + $mailer->send( ... ); + } + +Throttler Plugin +---------------- + +If your SMTP server has restrictions in place to limit the rate at which you +send emails, then your code will need to be aware of this rate-limiting. The +Throttler plugin makes Swift Mailer run at a rate-limited speed. + +Many shared hosts don't open their SMTP servers as a free-for-all. Usually they +have policies in place (probably to discourage spammers) that only allow you to +send a fixed number of emails per-hour/day. + +The Throttler plugin supports two modes of rate-limiting and with each, you +will need to do that math to figure out the values you want. The plugin can +limit based on the number of emails per minute, or the number of +bytes-transferred per-minute. + +Using the Throttler Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Throttler Plugin -- like all plugins -- is added with the Mailer class' +``registerPlugin()`` method. It has two required constructor parameters that +tell it how to do its rate-limiting. + +When Swift Mailer sends messages it will keep track of the rate at which +sending messages is occurring. If it realises that sending is happening too +fast, it will cause your program to ``sleep()`` for enough time to average out +the rate:: + + // Create the Mailer using any Transport + $mailer = new Swift_Mailer( + new Swift_SmtpTransport('smtp.example.org', 25) + ); + + // Rate limit to 100 emails per-minute + $mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin( + 100, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE + )); + + // Rate limit to 10MB per-minute + $mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin( + 1024 * 1024 * 10, Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE + )); + + // Continue sending as normal + for ($lotsOfRecipients as $recipient) { + ... + + $mailer->send( ... ); + } + +Logger Plugin +------------- + +The Logger plugins helps with debugging during the process of sending. It can +help to identify why an SMTP server is rejecting addresses, or any other +hard-to-find problems that may arise. + +The Logger plugin comes in two parts. There's the plugin itself, along with one +of a number of possible Loggers that you may choose to use. For example, the +logger may output messages directly in realtime, or it may capture messages in +an array. + +One other notable feature is the way in which the Logger plugin changes +Exception messages. If Exceptions are being thrown but the error message does +not provide conclusive information as to the source of the problem (such as an +ambiguous SMTP error) the Logger plugin includes the entire SMTP transcript in +the error message so that debugging becomes a simpler task. + +There are a few available Loggers included with Swift Mailer, but writing your +own implementation is incredibly simple and is achieved by creating a short +class that implements the ``Swift_Plugins_Logger`` interface. + +* ``Swift_Plugins_Loggers_ArrayLogger``: Keeps a collection of log messages + inside an array. The array content can be cleared or dumped out to the screen. + +* ``Swift_Plugins_Loggers_EchoLogger``: Prints output to the screen in + realtime. Handy for very rudimentary debug output. + +Using the Logger Plugin +~~~~~~~~~~~~~~~~~~~~~~~ + +The Logger Plugin -- like all plugins -- is added with the Mailer class' +``registerPlugin()`` method. It accepts an instance of ``Swift_Plugins_Logger`` +in its constructor. + +When Swift Mailer sends messages it will keep a log of all the interactions +with the underlying Transport being used. Depending upon the Logger that has +been used the behaviour will differ, but all implementations offer a way to get +the contents of the log:: + + // Create the Mailer using any Transport + $mailer = new Swift_Mailer( + new Swift_SmtpTransport('smtp.example.org', 25) + ); + + // To use the ArrayLogger + $logger = new Swift_Plugins_Loggers_ArrayLogger(); + $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); + + // Or to use the Echo Logger + $logger = new Swift_Plugins_Loggers_EchoLogger(); + $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); + + // Continue sending as normal + for ($lotsOfRecipients as $recipient) { + ... + + $mailer->send( ... ); + } + + // Dump the log contents + // NOTE: The EchoLogger dumps in realtime so dump() does nothing for it + echo $logger->dump(); + +Decorator Plugin +---------------- + +Often there's a need to send the same message to multiple recipients, but with +tiny variations such as the recipient's name being used inside the message +body. The Decorator plugin aims to provide a solution for allowing these small +differences. + +The decorator plugin works by intercepting the sending process of Swift Mailer, +reading the email address in the To: field and then looking up a set of +replacements for a template. + +While the use of this plugin is simple, it is probably the most commonly +misunderstood plugin due to the way in which it works. The typical mistake +users make is to try registering the plugin multiple times (once for each +recipient) -- inside a loop for example. This is incorrect. + +The Decorator plugin should be registered just once, but containing the list of +all recipients prior to sending. It will use this list of recipients to find +the required replacements during sending. + +Using the Decorator Plugin +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To use the Decorator plugin, simply create an associative array of replacements +based on email addresses and then use the mailer's ``registerPlugin()`` method +to add the plugin. + +First create an associative array of replacements based on the email addresses +you'll be sending the message to. + +.. note:: + + The replacements array becomes a 2-dimensional array whose keys are the + email addresses and whose values are an associative array of replacements + for that email address. The curly braces used in this example can be any + type of syntax you choose, provided they match the placeholders in your + email template:: + + $replacements = []; + foreach ($users as $user) { + $replacements[$user['email']] = [ + '{username}'=>$user['username'], + '{resetcode}'=>$user['resetcode'] + ]; + } + +Now create an instance of the Decorator plugin using this array of replacements +and then register it with the Mailer. Do this only once! + +:: + + $decorator = new Swift_Plugins_DecoratorPlugin($replacements); + + $mailer->registerPlugin($decorator); + +When you create your message, replace elements in the body (and/or the subject +line) with your placeholders:: + + $message = (new Swift_Message()) + ->setSubject('Important notice for {username}') + ->setBody( + "Hello {username}, you requested to reset your password.\n" . + "Please visit https://example.com/pwreset and use the reset code {resetcode} to set a new password." + ) + ; + + foreach ($users as $user) { + $message->addTo($user['email']); + } + +When you send this message to each of your recipients listed in your +``$replacements`` array they will receive a message customized for just +themselves. For example, the message used above when received may appear like +this to one user: + +.. code-block:: text + + Subject: Important notice for smilingsunshine2009 + + Hello smilingsunshine2009, you requested to reset your password. + Please visit https://example.com/pwreset and use the reset code 183457 to set a new password. + +While another use may receive the message as: + +.. code-block:: text + + Subject: Important notice for billy-bo-bob + + Hello billy-bo-bob, you requested to reset your password. + Please visit https://example.com/pwreset and use the reset code 539127 to set a new password. + +While the decorator plugin provides a means to solve this problem, there are +various ways you could tackle this problem without the need for a plugin. We're +trying to come up with a better way ourselves and while we have several +(obvious) ideas we don't quite have the perfect solution to go ahead and +implement it. Watch this space. + +Providing Your Own Replacements Lookup for the Decorator +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Filling an array with replacements may not be the best solution for providing +replacement information to the decorator. If you have a more elegant algorithm +that performs replacement lookups on-the-fly you may provide your own +implementation. + +Providing your own replacements lookup implementation for the Decorator is +simply a matter of passing an instance of +``Swift_Plugins_Decorator_Replacements`` to the decorator plugin's constructor, +rather than passing in an array. + +The Replacements interface is very simple to implement since it has just one +method: ``getReplacementsFor($address)``. + +Imagine you want to look up replacements from a database on-the-fly, you might +provide an implementation that does this. You need to create a small class:: + + class DbReplacements implements Swift_Plugins_Decorator_Replacements { + public function getReplacementsFor($address) { + global $db; // Your PDO instance with a connection to your database + $query = $db->prepare( + "SELECT * FROM `users` WHERE `email` = ?" + ); + + $query->execute([$address]); + + if ($row = $query->fetch(PDO::FETCH_ASSOC)) { + return [ + '{username}'=>$row['username'], + '{resetcode}'=>$row['resetcode'] + ]; + } + } + } + +Now all you need to do is pass an instance of your class into the Decorator +plugin's constructor instead of passing an array:: + + $decorator = new Swift_Plugins_DecoratorPlugin(new DbReplacements()); + + $mailer->registerPlugin($decorator); + +For each message sent, the plugin will call your class' +``getReplacementsFor()`` method to find the array of replacements it needs. + +.. note:: + + If your lookup algorithm is case sensitive, you should transform the + ``$address`` argument as appropriate -- for example by passing it through + ``strtolower()``. diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/sending.rst b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/sending.rst new file mode 100644 index 00000000..d3a10ad2 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/doc/sending.rst @@ -0,0 +1,464 @@ +Sending Messages +================ + +Quick Reference for Sending a Message +------------------------------------- + +Sending a message is very straightforward. You create a Transport, use it to +create the Mailer, then you use the Mailer to send the message. + +When using ``send()`` the message will be sent just like it would be sent if +you used your mail client. An integer is returned which includes the number of +successful recipients. If none of the recipients could be sent to then zero +will be returned, which equates to a boolean ``false``. If you set two ``To:`` +recipients and three ``Bcc:`` recipients in the message and all of the +recipients are delivered to successfully then the value 5 will be returned:: + + // Create the Transport + $transport = (new Swift_SmtpTransport('smtp.example.org', 25)) + ->setUsername('your username') + ->setPassword('your password') + ; + + /* + You could alternatively use a different transport such as Sendmail: + + // Sendmail + $transport = new Swift_SendmailTransport('/usr/sbin/sendmail -bs'); + */ + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + + // Create a message + $message = (new Swift_Message('Wonderful Subject')) + ->setFrom(['john@doe.com' => 'John Doe']) + ->setTo(['receiver@domain.org', 'other@domain.org' => 'A name']) + ->setBody('Here is the message itself') + ; + + // Send the message + $result = $mailer->send($message); + +Transport Types +~~~~~~~~~~~~~~~ + +Transports are the classes in Swift Mailer that are responsible for +communicating with a service in order to deliver a Message. There are several +types of Transport in Swift Mailer, all of which implement the +``Swift_Transport`` interface:: + +* ``Swift_SmtpTransport``: Sends messages over SMTP; Supports Authentication; + Supports Encryption. Very portable; Pleasingly predictable results; Provides + good feedback; + +* ``Swift_SendmailTransport``: Communicates with a locally installed + ``sendmail`` executable (Linux/UNIX). Quick time-to-run; Provides + less-accurate feedback than SMTP; Requires ``sendmail`` installation; + +* ``Swift_LoadBalancedTransport``: Cycles through a collection of the other + Transports to manage load-reduction. Provides graceful fallback if one + Transport fails (e.g. an SMTP server is down); Keeps the load on remote + services down by spreading the work; + +* ``Swift_FailoverTransport``: Works in conjunction with a collection of the + other Transports to provide high-availability. Provides graceful fallback if + one Transport fails (e.g. an SMTP server is down). + +The SMTP Transport +.................. + +The SMTP Transport sends messages over the (standardized) Simple Message +Transfer Protocol. It can deal with encryption and authentication. + +The SMTP Transport, ``Swift_SmtpTransport`` is without doubt the most commonly +used Transport because it will work on 99% of web servers (I just made that +number up, but you get the idea). All the server needs is the ability to +connect to a remote (or even local) SMTP server on the correct port number +(usually 25). + +SMTP servers often require users to authenticate with a username and password +before any mail can be sent to other domains. This is easily achieved using +Swift Mailer with the SMTP Transport. + +SMTP is a protocol -- in other words it's a "way" of communicating a job to be +done (i.e. sending a message). The SMTP protocol is the fundamental basis on +which messages are delivered all over the internet 7 days a week, 365 days a +year. For this reason it's the most "direct" method of sending messages you can +use and it's the one that will give you the most power and feedback (such as +delivery failures) when using Swift Mailer. + +Because SMTP is generally run as a remote service (i.e. you connect to it over +the network/internet) it's extremely portable from server-to-server. You can +easily store the SMTP server address and port number in a configuration file +within your application and adjust the settings accordingly if the code is +moved or if the SMTP server is changed. + +Some SMTP servers -- Google for example -- use encryption for security reasons. +Swift Mailer supports using both ``ssl`` (SMTPS = SMTP over TLS) and ``tls`` +(SMTP with STARTTLS) encryption settings. + +Using the SMTP Transport +^^^^^^^^^^^^^^^^^^^^^^^^ + +The SMTP Transport is easy to use. Most configuration options can be set with +the constructor. + +To use the SMTP Transport you need to know which SMTP server your code needs to +connect to. Ask your web host if you're not sure. Lots of people ask me who to +connect to -- I really can't answer that since it's a setting that's extremely +specific to your hosting environment. + +A connection to the SMTP server will be established upon the first call to +``send()``:: + + // Create the Transport + $transport = new Swift_SmtpTransport('smtp.example.org', 25); + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + + /* + It's also possible to use multiple method calls + + $transport = (new Swift_SmtpTransport()) + ->setHost('smtp.example.org') + ->setPort(25) + ; + */ + +Encrypted SMTP +^^^^^^^^^^^^^^ + +You can use ``ssl`` (SMTPS) or ``tls`` (STARTTLS) encryption with the SMTP Transport +by specifying it as a parameter or with a method call:: + + // Create the Transport + // Option #1: SMTPS = SMTP over TLS (always encrypted): + $transport = new Swift_SmtpTransport('smtp.example.org', 587, 'ssl'); + // Option #2: SMTP with STARTTLS (best effort encryption): + $transport = new Swift_SmtpTransport('smtp.example.org', 587, 'tls'); + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + +A connection to the SMTP server will be established upon the first call to +``send()``. The connection will be initiated with the correct encryption +settings. + +.. note:: + For SMTPS or STARTTLS encryption to work your PHP installation must have + appropriate OpenSSL transports wrappers. You can check if "tls" and/or + "ssl" are present in your PHP installation by using the PHP function + ``stream_get_transports()``. + +.. note:: + If you are using Mailcatcher_, make sure you do not set the encryption + for the ``Swift_SmtpTransport``, since Mailcatcher does not support encryption. + +.. note:: + When in doubt, try ``ssl`` first for higher security, since the communication + is always encrypted. + +.. note:: + Usually, port 587 or 465 is used for encrypted SMTP. Check the documentation + of your mail provider. + +SMTP with a Username and Password +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some servers require authentication. You can provide a username and password +with ``setUsername()`` and ``setPassword()`` methods:: + + // Create the Transport the call setUsername() and setPassword() + $transport = (new Swift_SmtpTransport('smtp.example.org', 25)) + ->setUsername('username') + ->setPassword('password') + ; + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + +Your username and password will be used to authenticate upon first connect when +``send()`` are first used on the Mailer. + +If authentication fails, an Exception of type ``Swift_TransportException`` will +be thrown. + +.. note:: + + If you need to know early whether or not authentication has failed and an + Exception is going to be thrown, call the ``start()`` method on the + created Transport. + +The Sendmail Transport +...................... + +The Sendmail Transport sends messages by communicating with a locally installed +MTA -- such as ``sendmail``. + +The Sendmail Transport, ``Swift_SendmailTransport`` does not directly connect +to any remote services. It is designed for Linux servers that have ``sendmail`` +installed. The Transport starts a local ``sendmail`` process and sends messages +to it. Usually the ``sendmail`` process will respond quickly as it spools your +messages to disk before sending them. + +The Transport is named the Sendmail Transport for historical reasons +(``sendmail`` was the "standard" UNIX tool for sending e-mail for years). It +will send messages using other transfer agents such as Exim or Postfix despite +its name, provided they have the relevant sendmail wrappers so that they can be +started with the correct command-line flags. + +It's a common misconception that because the Sendmail Transport returns a +result very quickly it must therefore deliver messages to recipients quickly -- +this is not true. It's not slow by any means, but it's certainly not faster +than SMTP when it comes to getting messages to the intended recipients. This is +because sendmail itself sends the messages over SMTP once they have been +quickly spooled to disk. + +The Sendmail Transport has the potential to be just as smart of the SMTP +Transport when it comes to notifying Swift Mailer about which recipients were +rejected, but in reality the majority of locally installed ``sendmail`` +instances are not configured well enough to provide any useful feedback. As +such Swift Mailer may report successful deliveries where they did in fact fail +before they even left your server. + +You can run the Sendmail Transport in two different modes specified by command +line flags: + +* "``-bs``" runs in SMTP mode so theoretically it will act like the SMTP + Transport + +* "``-t``" runs in piped mode with no feedback, but theoretically faster, + though not advised + +You can think of the Sendmail Transport as a sort of asynchronous SMTP +Transport -- though if you have problems with delivery failures you should try +using the SMTP Transport instead. Swift Mailer isn't doing the work here, it's +simply passing the work to somebody else (i.e. ``sendmail``). + +Using the Sendmail Transport +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To use the Sendmail Transport you simply need to call ``new +Swift_SendmailTransport()`` with the command as a parameter. + +To use the Sendmail Transport you need to know where ``sendmail`` or another +MTA exists on the server. Swift Mailer uses a default value of +``/usr/sbin/sendmail``, which should work on most systems. + +You specify the entire command as a parameter (i.e. including the command line +flags). Swift Mailer supports operational modes of "``-bs``" (default) and +"``-t``". + +.. note:: + + If you run sendmail in "``-t``" mode you will get no feedback as to whether + or not sending has succeeded. Use "``-bs``" unless you have a reason not to. + +A sendmail process will be started upon the first call to ``send()``. If the +process cannot be started successfully an Exception of type +``Swift_TransportException`` will be thrown:: + + // Create the Transport + $transport = new Swift_SendmailTransport('/usr/sbin/exim -bs'); + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + +Available Methods for Sending Messages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Mailer class offers one method for sending Messages -- ``send()``. + +When a message is sent in Swift Mailer, the Mailer class communicates with +whichever Transport class you have chosen to use. + +Each recipient in the message should either be accepted or rejected by the +Transport. For example, if the domain name on the email address is not +reachable the SMTP Transport may reject the address because it cannot process +it. ``send()`` will return an integer indicating the number of accepted +recipients. + +.. note:: + + It's possible to find out which recipients were rejected -- we'll cover that + later in this chapter. + +Using the ``send()`` Method +........................... + +The ``send()`` method of the ``Swift_Mailer`` class sends a message using +exactly the same logic as your Desktop mail client would use. Just pass it a +Message and get a result. + +The message will be sent just like it would be sent if you used your mail +client. An integer is returned which includes the number of successful +recipients. If none of the recipients could be sent to then zero will be +returned, which equates to a boolean ``false``. If you set two +``To:`` recipients and three ``Bcc:`` recipients in the message and all of the +recipients are delivered to successfully then the value 5 will be returned:: + + // Create the Transport + $transport = new Swift_SmtpTransport('localhost', 25); + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + + // Create a message + $message = (new Swift_Message('Wonderful Subject')) + ->setFrom(['john@doe.com' => 'John Doe']) + ->setTo(['receiver@domain.org', 'other@domain.org' => 'A name']) + ->setBody('Here is the message itself') + ; + + // Send the message + $numSent = $mailer->send($message); + + printf("Sent %d messages\n", $numSent); + + /* Note that often that only the boolean equivalent of the + return value is of concern (zero indicates FALSE) + + if ($mailer->send($message)) + { + echo "Sent\n"; + } + else + { + echo "Failed\n"; + } + + */ + +Sending Emails in Batch +....................... + +If you want to send a separate message to each recipient so that only their own +address shows up in the ``To:`` field, follow the following recipe: + +* Create a Transport from one of the provided Transports -- + ``Swift_SmtpTransport``, ``Swift_SendmailTransport``, + or one of the aggregate Transports. + +* Create an instance of the ``Swift_Mailer`` class, using the Transport as + it's constructor parameter. + +* Create a Message. + +* Iterate over the recipients and send message via the ``send()`` method on + the Mailer object. + +Each recipient of the messages receives a different copy with only their own +email address on the ``To:`` field. + +Make sure to add only valid email addresses as recipients. If you try to add an +invalid email address with ``setTo()``, ``setCc()`` or ``setBcc()``, Swift +Mailer will throw a ``Swift_RfcComplianceException``. + +If you add recipients automatically based on a data source that may contain +invalid email addresses, you can prevent possible exceptions by validating the +addresses using ``Egulias\EmailValidator\EmailValidator`` (a dependency that is +installed with Swift Mailer) and only adding addresses that validate. Another +way would be to wrap your ``setTo()``, ``setCc()`` and ``setBcc()`` calls in a +try-catch block and handle the ``Swift_RfcComplianceException`` in the catch +block. + +Handling invalid addresses properly is especially important when sending emails +in large batches since a single invalid address might cause an unhandled +exception and stop the execution or your script early. + +.. note:: + + In the following example, two emails are sent. One to each of + ``receiver@domain.org`` and ``other@domain.org``. These recipients will + not be aware of each other:: + + // Create the Transport + $transport = new Swift_SmtpTransport('localhost', 25); + + // Create the Mailer using your created Transport + $mailer = new Swift_Mailer($transport); + + // Create a message + $message = (new Swift_Message('Wonderful Subject')) + ->setFrom(['john@doe.com' => 'John Doe']) + ->setBody('Here is the message itself') + ; + + // Send the message + $failedRecipients = []; + $numSent = 0; + $to = ['receiver@domain.org', 'other@domain.org' => 'A name']; + + foreach ($to as $address => $name) + { + if (is_int($address)) { + $message->setTo($name); + } else { + $message->setTo([$address => $name]); + } + + $numSent += $mailer->send($message, $failedRecipients); + } + + printf("Sent %d messages\n", $numSent); + +Finding out Rejected Addresses +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It's possible to get a list of addresses that were rejected by the Transport by +using a by-reference parameter to ``send()``. + +As Swift Mailer attempts to send the message to each address given to it, if a +recipient is rejected it will be added to the array. You can pass an existing +array, otherwise one will be created by-reference. + +Collecting the list of recipients that were rejected can be useful in +circumstances where you need to "prune" a mailing list for example when some +addresses cannot be delivered to. + +Getting Failures By-reference +............................. + +Collecting delivery failures by-reference with the ``send()`` method is as +simple as passing a variable name to the method call:: + + $mailer = new Swift_Mailer( ... ); + + $message = (new Swift_Message( ... )) + ->setFrom( ... ) + ->setTo([ + 'receiver@bad-domain.org' => 'Receiver Name', + 'other@domain.org' => 'A name', + 'other-receiver@bad-domain.org' => 'Other Name' + )) + ->setBody( ... ) + ; + + // Pass a variable name to the send() method + if (!$mailer->send($message, $failures)) + { + echo "Failures:"; + print_r($failures); + } + + /* + Failures: + Array ( + 0 => receiver@bad-domain.org, + 1 => other-receiver@bad-domain.org + ) + */ + +If the Transport rejects any of the recipients, the culprit addresses will be +added to the array provided by-reference. + +.. note:: + + If the variable name does not yet exist, it will be initialized as an + empty array and then failures will be added to that array. If the variable + already exists it will be type-cast to an array and failures will be added + to it. + +.. _Mailcatcher: https://mailcatcher.me/ diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php new file mode 100644 index 00000000..51b19c9c --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php @@ -0,0 +1,78 @@ +address = $address; + } + + public function getAddress(): string + { + return $this->address; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php new file mode 100644 index 00000000..7a1420f7 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php @@ -0,0 +1,54 @@ +createDependenciesFor('mime.attachment') + ); + + $this->setBody($data, $contentType); + $this->setFilename($filename); + } + + /** + * Create a new Attachment from a filesystem path. + * + * @param string $path + * @param string $contentType optional + * + * @return self + */ + public static function fromPath($path, $contentType = null) + { + return (new self())->setFile( + new Swift_ByteStream_FileByteStream($path), + $contentType + ); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php new file mode 100644 index 00000000..3a69c15f --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php @@ -0,0 +1,176 @@ +filters[$key] = $filter; + } + + /** + * Remove an already present StreamFilter based on its $key. + * + * @param string $key + */ + public function removeFilter($key) + { + unset($this->filters[$key]); + } + + /** + * Writes $bytes to the end of the stream. + * + * @param string $bytes + * + * @throws Swift_IoException + * + * @return int + */ + public function write($bytes) + { + $this->writeBuffer .= $bytes; + foreach ($this->filters as $filter) { + if ($filter->shouldBuffer($this->writeBuffer)) { + return; + } + } + $this->doWrite($this->writeBuffer); + + return ++$this->sequence; + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + * + * @throws Swift_IoException + */ + public function commit() + { + $this->doWrite($this->writeBuffer); + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + */ + public function bind(Swift_InputByteStream $is) + { + $this->mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->mirrors as $k => $stream) { + if ($is === $stream) { + if ('' !== $this->writeBuffer) { + $stream->write($this->writeBuffer); + } + unset($this->mirrors[$k]); + } + } + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * + * @throws Swift_IoException + */ + public function flushBuffers() + { + if ('' !== $this->writeBuffer) { + $this->doWrite($this->writeBuffer); + } + $this->flush(); + + foreach ($this->mirrors as $stream) { + $stream->flushBuffers(); + } + } + + /** Run $bytes through all filters */ + private function filter($bytes) + { + foreach ($this->filters as $filter) { + $bytes = $filter->filter($bytes); + } + + return $bytes; + } + + /** Just write the bytes to the stream */ + private function doWrite($bytes) + { + $this->doCommit($this->filter($bytes)); + + foreach ($this->mirrors as $stream) { + $stream->write($bytes); + } + + $this->writeBuffer = ''; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php new file mode 100644 index 00000000..4f3dcc37 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php @@ -0,0 +1,178 @@ +array = $stack; + $this->arraySize = \count($stack); + } elseif (\is_string($stack)) { + $this->write($stack); + } else { + $this->array = []; + } + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. + * + * If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * + * @param int $length + * + * @return string + */ + public function read($length) + { + if ($this->offset == $this->arraySize) { + return false; + } + + // Don't use array slice + $end = $length + $this->offset; + $end = $this->arraySize < $end ? $this->arraySize : $end; + $ret = ''; + for (; $this->offset < $end; ++$this->offset) { + $ret .= $this->array[$this->offset]; + } + + return $ret; + } + + /** + * Writes $bytes to the end of the stream. + * + * @param string $bytes + */ + public function write($bytes) + { + $to_add = str_split($bytes); + foreach ($to_add as $value) { + $this->array[] = $value; + } + $this->arraySize = \count($this->array); + + foreach ($this->mirrors as $stream) { + $stream->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + */ + public function bind(Swift_InputByteStream $is) + { + $this->mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->mirrors as $k => $stream) { + if ($is === $stream) { + unset($this->mirrors[$k]); + } + } + } + + /** + * Move the internal read pointer to $byteOffset in the stream. + * + * @param int $byteOffset + * + * @return bool + */ + public function setReadPointer($byteOffset) + { + if ($byteOffset > $this->arraySize) { + $byteOffset = $this->arraySize; + } elseif ($byteOffset < 0) { + $byteOffset = 0; + } + + $this->offset = $byteOffset; + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + */ + public function flushBuffers() + { + $this->offset = 0; + $this->array = []; + $this->arraySize = 0; + + foreach ($this->mirrors as $stream) { + $stream->flushBuffers(); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php new file mode 100644 index 00000000..f6391219 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php @@ -0,0 +1,214 @@ +path = $path; + $this->mode = $writable ? 'w+b' : 'rb'; + } + + /** + * Get the complete path to the file. + * + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. + * + * If less bytes exist than are requested the + * remaining bytes are given instead. If no bytes are remaining at all, boolean + * false is returned. + * + * @param int $length + * + * @return string|bool + * + * @throws Swift_IoException + */ + public function read($length) + { + $fp = $this->getReadHandle(); + if (!feof($fp)) { + $bytes = fread($fp, $length); + $this->offset = ftell($fp); + + // If we read one byte after reaching the end of the file + // feof() will return false and an empty string is returned + if ((false === $bytes || '' === $bytes) && feof($fp)) { + $this->resetReadHandle(); + + return false; + } + + return $bytes; + } + + $this->resetReadHandle(); + + return false; + } + + /** + * Move the internal read pointer to $byteOffset in the stream. + * + * @param int $byteOffset + * + * @return bool + */ + public function setReadPointer($byteOffset) + { + if (isset($this->reader)) { + $this->seekReadStreamToPosition($byteOffset); + } + $this->offset = $byteOffset; + } + + /** Just write the bytes to the file */ + protected function doCommit($bytes) + { + fwrite($this->getWriteHandle(), $bytes); + $this->resetReadHandle(); + } + + /** Not used */ + protected function flush() + { + } + + /** Get the resource for reading */ + private function getReadHandle() + { + if (!isset($this->reader)) { + $pointer = @fopen($this->path, 'rb'); + if (!$pointer) { + throw new Swift_IoException('Unable to open file for reading ['.$this->path.']'); + } + $this->reader = $pointer; + if (0 != $this->offset) { + $this->getReadStreamSeekableStatus(); + $this->seekReadStreamToPosition($this->offset); + } + } + + return $this->reader; + } + + /** Get the resource for writing */ + private function getWriteHandle() + { + if (!isset($this->writer)) { + if (!$this->writer = fopen($this->path, $this->mode)) { + throw new Swift_IoException('Unable to open file for writing ['.$this->path.']'); + } + } + + return $this->writer; + } + + /** Force a reload of the resource for reading */ + private function resetReadHandle() + { + if (isset($this->reader)) { + fclose($this->reader); + $this->reader = null; + } + } + + /** Check if ReadOnly Stream is seekable */ + private function getReadStreamSeekableStatus() + { + $metas = stream_get_meta_data($this->reader); + $this->seekable = $metas['seekable']; + } + + /** Streams in a readOnly stream ensuring copy if needed */ + private function seekReadStreamToPosition($offset) + { + if (null === $this->seekable) { + $this->getReadStreamSeekableStatus(); + } + if (false === $this->seekable) { + $currentPos = ftell($this->reader); + if ($currentPos < $offset) { + $toDiscard = $offset - $currentPos; + fread($this->reader, $toDiscard); + + return; + } + $this->copyReadStream(); + } + fseek($this->reader, $offset, SEEK_SET); + } + + /** Copy a readOnly Stream to ensure seekability */ + private function copyReadStream() + { + if ($tmpFile = fopen('php://temp/maxmemory:4096', 'w+b')) { + /* We have opened a php:// Stream Should work without problem */ + } elseif (\function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir()) && ($tmpFile = tmpfile())) { + /* We have opened a tmpfile */ + } else { + throw new Swift_IoException('Unable to copy the file to make it seekable, sys_temp_dir is not writable, php://memory not available'); + } + $currentPos = ftell($this->reader); + fclose($this->reader); + $source = fopen($this->path, 'rb'); + if (!$source) { + throw new Swift_IoException('Unable to open file for copying ['.$this->path.']'); + } + fseek($tmpFile, 0, SEEK_SET); + while (!feof($source)) { + fwrite($tmpFile, fread($source, 4096)); + } + fseek($tmpFile, $currentPos, SEEK_SET); + fclose($source); + $this->reader = $tmpFile; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php new file mode 100644 index 00000000..0dc61909 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php @@ -0,0 +1,52 @@ +getPath()))) { + throw new Swift_IoException('Failed to get temporary file content.'); + } + + return $content; + } + + public function __destruct() + { + if (file_exists($this->getPath())) { + @unlink($this->getPath()); + } + } + + public function __sleep() + { + throw new \BadMethodCallException('Cannot serialize '.__CLASS__); + } + + public function __wakeup() + { + throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php new file mode 100644 index 00000000..4267adbc --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php @@ -0,0 +1,67 @@ + + */ +interface Swift_CharacterReader +{ + const MAP_TYPE_INVALID = 0x01; + const MAP_TYPE_FIXED_LEN = 0x02; + const MAP_TYPE_POSITIONS = 0x03; + + /** + * Returns the complete character map. + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars); + + /** + * Returns the mapType, see constants. + * + * @return int + */ + public function getMapType(); + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param int[] $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size); + + /** + * Returns the number of bytes which should be read to start each character. + * + * For fixed width character sets this should be the number of octets-per-character. + * For multibyte character sets this will probably be 1. + * + * @return int + */ + public function getInitialByteSize(); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php new file mode 100644 index 00000000..3e055afd --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php @@ -0,0 +1,97 @@ + + */ +class Swift_CharacterReader_GenericFixedWidthReader implements Swift_CharacterReader +{ + /** + * The number of bytes in a single character. + * + * @var int + */ + private $width; + + /** + * Creates a new GenericFixedWidthReader using $width bytes per character. + * + * @param int $width + */ + public function __construct($width) + { + $this->width = $width; + } + + /** + * Returns the complete character map. + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + $strlen = \strlen($string); + // % and / are CPU intensive, so, maybe find a better way + $ignored = $strlen % $this->width; + $ignoredChars = $ignored ? substr($string, -$ignored) : ''; + $currentMap = $this->width; + + return ($strlen - $ignored) / $this->width; + } + + /** + * Returns the mapType. + * + * @return int + */ + public function getMapType() + { + return self::MAP_TYPE_FIXED_LEN; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param string $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size) + { + $needed = $this->width - $size; + + return $needed > -1 ? $needed : -1; + } + + /** + * Returns the number of bytes which should be read to start each character. + * + * @return int + */ + public function getInitialByteSize() + { + return $this->width; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php new file mode 100644 index 00000000..ffc05f71 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php @@ -0,0 +1,84 @@ + "\x07F") { + // Invalid char + $currentMap[$i + $startOffset] = $string[$i]; + } + } + + return $strlen; + } + + /** + * Returns mapType. + * + * @return int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_INVALID; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param string $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size) + { + $byte = reset($bytes); + if (1 == \count($bytes) && $byte >= 0x00 && $byte <= 0x7F) { + return 0; + } + + return -1; + } + + /** + * Returns the number of bytes which should be read to start each character. + * + * @return int + */ + public function getInitialByteSize() + { + return 1; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php new file mode 100644 index 00000000..da37e0da --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php @@ -0,0 +1,176 @@ + + */ +class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader +{ + /** Pre-computed for optimization */ + private static $length_map = [ + // N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x0N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x1N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x2N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x3N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x4N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x5N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x6N + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x7N + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x8N + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x9N + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xAN + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xBN + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xCN + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xDN + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xEN + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 0, 0, // 0xFN + ]; + + private static $s_length_map = [ + "\x00" => 1, "\x01" => 1, "\x02" => 1, "\x03" => 1, "\x04" => 1, "\x05" => 1, "\x06" => 1, "\x07" => 1, + "\x08" => 1, "\x09" => 1, "\x0a" => 1, "\x0b" => 1, "\x0c" => 1, "\x0d" => 1, "\x0e" => 1, "\x0f" => 1, + "\x10" => 1, "\x11" => 1, "\x12" => 1, "\x13" => 1, "\x14" => 1, "\x15" => 1, "\x16" => 1, "\x17" => 1, + "\x18" => 1, "\x19" => 1, "\x1a" => 1, "\x1b" => 1, "\x1c" => 1, "\x1d" => 1, "\x1e" => 1, "\x1f" => 1, + "\x20" => 1, "\x21" => 1, "\x22" => 1, "\x23" => 1, "\x24" => 1, "\x25" => 1, "\x26" => 1, "\x27" => 1, + "\x28" => 1, "\x29" => 1, "\x2a" => 1, "\x2b" => 1, "\x2c" => 1, "\x2d" => 1, "\x2e" => 1, "\x2f" => 1, + "\x30" => 1, "\x31" => 1, "\x32" => 1, "\x33" => 1, "\x34" => 1, "\x35" => 1, "\x36" => 1, "\x37" => 1, + "\x38" => 1, "\x39" => 1, "\x3a" => 1, "\x3b" => 1, "\x3c" => 1, "\x3d" => 1, "\x3e" => 1, "\x3f" => 1, + "\x40" => 1, "\x41" => 1, "\x42" => 1, "\x43" => 1, "\x44" => 1, "\x45" => 1, "\x46" => 1, "\x47" => 1, + "\x48" => 1, "\x49" => 1, "\x4a" => 1, "\x4b" => 1, "\x4c" => 1, "\x4d" => 1, "\x4e" => 1, "\x4f" => 1, + "\x50" => 1, "\x51" => 1, "\x52" => 1, "\x53" => 1, "\x54" => 1, "\x55" => 1, "\x56" => 1, "\x57" => 1, + "\x58" => 1, "\x59" => 1, "\x5a" => 1, "\x5b" => 1, "\x5c" => 1, "\x5d" => 1, "\x5e" => 1, "\x5f" => 1, + "\x60" => 1, "\x61" => 1, "\x62" => 1, "\x63" => 1, "\x64" => 1, "\x65" => 1, "\x66" => 1, "\x67" => 1, + "\x68" => 1, "\x69" => 1, "\x6a" => 1, "\x6b" => 1, "\x6c" => 1, "\x6d" => 1, "\x6e" => 1, "\x6f" => 1, + "\x70" => 1, "\x71" => 1, "\x72" => 1, "\x73" => 1, "\x74" => 1, "\x75" => 1, "\x76" => 1, "\x77" => 1, + "\x78" => 1, "\x79" => 1, "\x7a" => 1, "\x7b" => 1, "\x7c" => 1, "\x7d" => 1, "\x7e" => 1, "\x7f" => 1, + "\x80" => 0, "\x81" => 0, "\x82" => 0, "\x83" => 0, "\x84" => 0, "\x85" => 0, "\x86" => 0, "\x87" => 0, + "\x88" => 0, "\x89" => 0, "\x8a" => 0, "\x8b" => 0, "\x8c" => 0, "\x8d" => 0, "\x8e" => 0, "\x8f" => 0, + "\x90" => 0, "\x91" => 0, "\x92" => 0, "\x93" => 0, "\x94" => 0, "\x95" => 0, "\x96" => 0, "\x97" => 0, + "\x98" => 0, "\x99" => 0, "\x9a" => 0, "\x9b" => 0, "\x9c" => 0, "\x9d" => 0, "\x9e" => 0, "\x9f" => 0, + "\xa0" => 0, "\xa1" => 0, "\xa2" => 0, "\xa3" => 0, "\xa4" => 0, "\xa5" => 0, "\xa6" => 0, "\xa7" => 0, + "\xa8" => 0, "\xa9" => 0, "\xaa" => 0, "\xab" => 0, "\xac" => 0, "\xad" => 0, "\xae" => 0, "\xaf" => 0, + "\xb0" => 0, "\xb1" => 0, "\xb2" => 0, "\xb3" => 0, "\xb4" => 0, "\xb5" => 0, "\xb6" => 0, "\xb7" => 0, + "\xb8" => 0, "\xb9" => 0, "\xba" => 0, "\xbb" => 0, "\xbc" => 0, "\xbd" => 0, "\xbe" => 0, "\xbf" => 0, + "\xc0" => 2, "\xc1" => 2, "\xc2" => 2, "\xc3" => 2, "\xc4" => 2, "\xc5" => 2, "\xc6" => 2, "\xc7" => 2, + "\xc8" => 2, "\xc9" => 2, "\xca" => 2, "\xcb" => 2, "\xcc" => 2, "\xcd" => 2, "\xce" => 2, "\xcf" => 2, + "\xd0" => 2, "\xd1" => 2, "\xd2" => 2, "\xd3" => 2, "\xd4" => 2, "\xd5" => 2, "\xd6" => 2, "\xd7" => 2, + "\xd8" => 2, "\xd9" => 2, "\xda" => 2, "\xdb" => 2, "\xdc" => 2, "\xdd" => 2, "\xde" => 2, "\xdf" => 2, + "\xe0" => 3, "\xe1" => 3, "\xe2" => 3, "\xe3" => 3, "\xe4" => 3, "\xe5" => 3, "\xe6" => 3, "\xe7" => 3, + "\xe8" => 3, "\xe9" => 3, "\xea" => 3, "\xeb" => 3, "\xec" => 3, "\xed" => 3, "\xee" => 3, "\xef" => 3, + "\xf0" => 4, "\xf1" => 4, "\xf2" => 4, "\xf3" => 4, "\xf4" => 4, "\xf5" => 4, "\xf6" => 4, "\xf7" => 4, + "\xf8" => 5, "\xf9" => 5, "\xfa" => 5, "\xfb" => 5, "\xfc" => 6, "\xfd" => 6, "\xfe" => 0, "\xff" => 0, + ]; + + /** + * Returns the complete character map. + * + * @param string $string + * @param int $startOffset + * @param array $currentMap + * @param mixed $ignoredChars + * + * @return int + */ + public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) + { + if (!isset($currentMap['i']) || !isset($currentMap['p'])) { + $currentMap['p'] = $currentMap['i'] = []; + } + + $strlen = \strlen($string); + $charPos = \count($currentMap['p']); + $foundChars = 0; + $invalid = false; + for ($i = 0; $i < $strlen; ++$i) { + $char = $string[$i]; + $size = self::$s_length_map[$char]; + if (0 == $size) { + /* char is invalid, we must wait for a resync */ + $invalid = true; + continue; + } else { + if (true === $invalid) { + /* We mark the chars as invalid and start a new char */ + $currentMap['p'][$charPos + $foundChars] = $startOffset + $i; + $currentMap['i'][$charPos + $foundChars] = true; + ++$foundChars; + $invalid = false; + } + if (($i + $size) > $strlen) { + $ignoredChars = substr($string, $i); + break; + } + for ($j = 1; $j < $size; ++$j) { + $char = $string[$i + $j]; + if ($char > "\x7F" && $char < "\xC0") { + // Valid - continue parsing + } else { + /* char is invalid, we must wait for a resync */ + $invalid = true; + continue 2; + } + } + /* Ok we got a complete char here */ + $currentMap['p'][$charPos + $foundChars] = $startOffset + $i + $size; + $i += $j - 1; + ++$foundChars; + } + } + + return $foundChars; + } + + /** + * Returns mapType. + * + * @return int mapType + */ + public function getMapType() + { + return self::MAP_TYPE_POSITIONS; + } + + /** + * Returns an integer which specifies how many more bytes to read. + * + * A positive integer indicates the number of more bytes to fetch before invoking + * this method again. + * A value of zero means this is already a valid character. + * A value of -1 means this cannot possibly be a valid character. + * + * @param string $bytes + * @param int $size + * + * @return int + */ + public function validateByteSequence($bytes, $size) + { + if ($size < 1) { + return -1; + } + $needed = self::$length_map[$bytes[0]] - $size; + + return $needed > -1 ? $needed : -1; + } + + /** + * Returns the number of bytes which should be read to start each character. + * + * @return int + */ + public function getInitialByteSize() + { + return 1; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php new file mode 100644 index 00000000..15b6c692 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php @@ -0,0 +1,26 @@ +init(); + } + + public function __wakeup() + { + $this->init(); + } + + public function init() + { + if (\count(self::$map) > 0) { + return; + } + + $prefix = 'Swift_CharacterReader_'; + + $singleByte = [ + 'class' => $prefix.'GenericFixedWidthReader', + 'constructor' => [1], + ]; + + $doubleByte = [ + 'class' => $prefix.'GenericFixedWidthReader', + 'constructor' => [2], + ]; + + $fourBytes = [ + 'class' => $prefix.'GenericFixedWidthReader', + 'constructor' => [4], + ]; + + // Utf-8 + self::$map['utf-?8'] = [ + 'class' => $prefix.'Utf8Reader', + 'constructor' => [], + ]; + + //7-8 bit charsets + self::$map['(us-)?ascii'] = $singleByte; + self::$map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; + self::$map['windows-?125[0-9]'] = $singleByte; + self::$map['cp-?[0-9]+'] = $singleByte; + self::$map['ansi'] = $singleByte; + self::$map['macintosh'] = $singleByte; + self::$map['koi-?7'] = $singleByte; + self::$map['koi-?8-?.+'] = $singleByte; + self::$map['mik'] = $singleByte; + self::$map['(cork|t1)'] = $singleByte; + self::$map['v?iscii'] = $singleByte; + + //16 bits + self::$map['(ucs-?2|utf-?16)'] = $doubleByte; + + //32 bits + self::$map['(ucs-?4|utf-?32)'] = $fourBytes; + + // Fallback + self::$map['.*'] = $singleByte; + } + + /** + * Returns a CharacterReader suitable for the charset applied. + * + * @param string $charset + * + * @return Swift_CharacterReader + */ + public function getReaderFor($charset) + { + $charset = strtolower(trim($charset ?? '')); + foreach (self::$map as $pattern => $spec) { + $re = '/^'.$pattern.'$/D'; + if (preg_match($re, $charset)) { + if (!\array_key_exists($pattern, self::$loaded)) { + $reflector = new ReflectionClass($spec['class']); + if ($reflector->getConstructor()) { + $reader = $reflector->newInstanceArgs($spec['constructor']); + } else { + $reader = $reflector->newInstance(); + } + self::$loaded[$pattern] = $reader; + } + + return self::$loaded[$pattern]; + } + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php new file mode 100644 index 00000000..c9d8a078 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php @@ -0,0 +1,87 @@ +setCharacterReaderFactory($factory); + $this->setCharacterSet($charset); + } + + /** + * Set the character set used in this CharacterStream. + * + * @param string $charset + */ + public function setCharacterSet($charset) + { + $this->charset = $charset; + $this->charReader = null; + } + + /** + * Set the CharacterReaderFactory for multi charset support. + */ + public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) + { + $this->charReaderFactory = $factory; + } + + /** + * Overwrite this character stream using the byte sequence in the byte stream. + * + * @param Swift_OutputByteStream $os output stream to read from + */ + public function importByteStream(Swift_OutputByteStream $os) + { + if (!isset($this->charReader)) { + $this->charReader = $this->charReaderFactory + ->getReaderFor($this->charset); + } + + $startLength = $this->charReader->getInitialByteSize(); + while (false !== $bytes = $os->read($startLength)) { + $c = []; + for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) { + $c[] = self::$byteMap[$bytes[$i]]; + } + $size = \count($c); + $need = $this->charReader + ->validateByteSequence($c, $size); + if ($need > 0 && + false !== $bytes = $os->read($need)) { + for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) { + $c[] = self::$byteMap[$bytes[$i]]; + } + } + $this->array[] = $c; + ++$this->array_size; + } + } + + /** + * Import a string a bytes into this CharacterStream, overwriting any existing + * data in the stream. + * + * @param string $string + */ + public function importString($string) + { + $this->flushContents(); + $this->write($string); + } + + /** + * Read $length characters from the stream and move the internal pointer + * $length further into the stream. + * + * @param int $length + * + * @return string + */ + public function read($length) + { + if ($this->offset == $this->array_size) { + return false; + } + + // Don't use array slice + $arrays = []; + $end = $length + $this->offset; + for ($i = $this->offset; $i < $end; ++$i) { + if (!isset($this->array[$i])) { + break; + } + $arrays[] = $this->array[$i]; + } + $this->offset += $i - $this->offset; // Limit function calls + $chars = false; + foreach ($arrays as $array) { + $chars .= implode('', array_map('chr', $array)); + } + + return $chars; + } + + /** + * Read $length characters from the stream and return a 1-dimensional array + * containing there octet values. + * + * @param int $length + * + * @return int[] + */ + public function readBytes($length) + { + if ($this->offset == $this->array_size) { + return false; + } + $arrays = []; + $end = $length + $this->offset; + for ($i = $this->offset; $i < $end; ++$i) { + if (!isset($this->array[$i])) { + break; + } + $arrays[] = $this->array[$i]; + } + $this->offset += ($i - $this->offset); // Limit function calls + + return array_merge(...$arrays); + } + + /** + * Write $chars to the end of the stream. + * + * @param string $chars + */ + public function write($chars) + { + if (!isset($this->charReader)) { + $this->charReader = $this->charReaderFactory->getReaderFor( + $this->charset); + } + + $startLength = $this->charReader->getInitialByteSize(); + + $fp = fopen('php://memory', 'w+b'); + fwrite($fp, $chars); + unset($chars); + fseek($fp, 0, SEEK_SET); + + $buffer = [0]; + $buf_pos = 1; + $buf_len = 1; + $has_datas = true; + do { + $bytes = []; + // Buffer Filing + if ($buf_len - $buf_pos < $startLength) { + $buf = array_splice($buffer, $buf_pos); + $new = $this->reloadBuffer($fp, 100); + if ($new) { + $buffer = array_merge($buf, $new); + $buf_len = \count($buffer); + $buf_pos = 0; + } else { + $has_datas = false; + } + } + if ($buf_len - $buf_pos > 0) { + $size = 0; + for ($i = 0; $i < $startLength && isset($buffer[$buf_pos]); ++$i) { + ++$size; + $bytes[] = $buffer[$buf_pos++]; + } + $need = $this->charReader->validateByteSequence( + $bytes, $size); + if ($need > 0) { + if ($buf_len - $buf_pos < $need) { + $new = $this->reloadBuffer($fp, $need); + + if ($new) { + $buffer = array_merge($buffer, $new); + $buf_len = \count($buffer); + } + } + for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) { + $bytes[] = $buffer[$buf_pos++]; + } + } + $this->array[] = $bytes; + ++$this->array_size; + } + } while ($has_datas); + + fclose($fp); + } + + /** + * Move the internal pointer to $charOffset in the stream. + * + * @param int $charOffset + */ + public function setPointer($charOffset) + { + if ($charOffset > $this->array_size) { + $charOffset = $this->array_size; + } elseif ($charOffset < 0) { + $charOffset = 0; + } + $this->offset = $charOffset; + } + + /** + * Empty the stream and reset the internal pointer. + */ + public function flushContents() + { + $this->offset = 0; + $this->array = []; + $this->array_size = 0; + } + + private function reloadBuffer($fp, $len) + { + if (!feof($fp) && false !== ($bytes = fread($fp, $len))) { + $buf = []; + for ($i = 0, $len = \strlen($bytes); $i < $len; ++$i) { + $buf[] = self::$byteMap[$bytes[$i]]; + } + + return $buf; + } + + return false; + } + + private static function initializeMaps() + { + if (!isset(self::$charMap)) { + self::$charMap = []; + for ($byte = 0; $byte < 256; ++$byte) { + self::$charMap[$byte] = \chr($byte); + } + self::$byteMap = array_flip(self::$charMap); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php new file mode 100644 index 00000000..7578dda9 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php @@ -0,0 +1,262 @@ + + */ +class Swift_CharacterStream_NgCharacterStream implements Swift_CharacterStream +{ + /** + * The char reader (lazy-loaded) for the current charset. + * + * @var Swift_CharacterReader + */ + private $charReader; + + /** + * A factory for creating CharacterReader instances. + * + * @var Swift_CharacterReaderFactory + */ + private $charReaderFactory; + + /** + * The character set this stream is using. + * + * @var string + */ + private $charset; + + /** + * The data's stored as-is. + * + * @var string + */ + private $datas = ''; + + /** + * Number of bytes in the stream. + * + * @var int + */ + private $datasSize = 0; + + /** + * Map. + * + * @var mixed + */ + private $map; + + /** + * Map Type. + * + * @var int + */ + private $mapType = 0; + + /** + * Number of characters in the stream. + * + * @var int + */ + private $charCount = 0; + + /** + * Position in the stream. + * + * @var int + */ + private $currentPos = 0; + + /** + * Constructor. + * + * @param string $charset + */ + public function __construct(Swift_CharacterReaderFactory $factory, $charset) + { + $this->setCharacterReaderFactory($factory); + $this->setCharacterSet($charset); + } + + /* -- Changing parameters of the stream -- */ + + /** + * Set the character set used in this CharacterStream. + * + * @param string $charset + */ + public function setCharacterSet($charset) + { + $this->charset = $charset; + $this->charReader = null; + $this->mapType = 0; + } + + /** + * Set the CharacterReaderFactory for multi charset support. + */ + public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) + { + $this->charReaderFactory = $factory; + } + + /** + * @see Swift_CharacterStream::flushContents() + */ + public function flushContents() + { + $this->datas = null; + $this->map = null; + $this->charCount = 0; + $this->currentPos = 0; + $this->datasSize = 0; + } + + /** + * @see Swift_CharacterStream::importByteStream() + */ + public function importByteStream(Swift_OutputByteStream $os) + { + $this->flushContents(); + $blocks = 512; + $os->setReadPointer(0); + while (false !== ($read = $os->read($blocks))) { + $this->write($read); + } + } + + /** + * @see Swift_CharacterStream::importString() + * + * @param string $string + */ + public function importString($string) + { + $this->flushContents(); + $this->write($string); + } + + /** + * @see Swift_CharacterStream::read() + * + * @param int $length + * + * @return string + */ + public function read($length) + { + if ($this->currentPos >= $this->charCount) { + return false; + } + $ret = false; + $length = ($this->currentPos + $length > $this->charCount) ? $this->charCount - $this->currentPos : $length; + switch ($this->mapType) { + case Swift_CharacterReader::MAP_TYPE_FIXED_LEN: + $len = $length * $this->map; + $ret = substr($this->datas, + $this->currentPos * $this->map, + $len); + $this->currentPos += $length; + break; + + case Swift_CharacterReader::MAP_TYPE_INVALID: + $ret = ''; + for (; $this->currentPos < $length; ++$this->currentPos) { + if (isset($this->map[$this->currentPos])) { + $ret .= '?'; + } else { + $ret .= $this->datas[$this->currentPos]; + } + } + break; + + case Swift_CharacterReader::MAP_TYPE_POSITIONS: + $end = $this->currentPos + $length; + $end = $end > $this->charCount ? $this->charCount : $end; + $ret = ''; + $start = 0; + if ($this->currentPos > 0) { + $start = $this->map['p'][$this->currentPos - 1]; + } + $to = $start; + for (; $this->currentPos < $end; ++$this->currentPos) { + if (isset($this->map['i'][$this->currentPos])) { + $ret .= substr($this->datas, $start, $to - $start).'?'; + $start = $this->map['p'][$this->currentPos]; + } else { + $to = $this->map['p'][$this->currentPos]; + } + } + $ret .= substr($this->datas, $start, $to - $start); + break; + } + + return $ret; + } + + /** + * @see Swift_CharacterStream::readBytes() + * + * @param int $length + * + * @return int[] + */ + public function readBytes($length) + { + $read = $this->read($length); + if (false !== $read) { + $ret = array_map('ord', str_split($read, 1)); + + return $ret; + } + + return false; + } + + /** + * @see Swift_CharacterStream::setPointer() + * + * @param int $charOffset + */ + public function setPointer($charOffset) + { + if ($this->charCount < $charOffset) { + $charOffset = $this->charCount; + } + $this->currentPos = $charOffset; + } + + /** + * @see Swift_CharacterStream::write() + * + * @param string $chars + */ + public function write($chars) + { + if (!isset($this->charReader)) { + $this->charReader = $this->charReaderFactory->getReaderFor( + $this->charset); + $this->map = []; + $this->mapType = $this->charReader->getMapType(); + } + $ignored = ''; + $this->datas .= $chars; + $this->charCount += $this->charReader->getCharPositions(substr($this->datas, $this->datasSize), $this->datasSize, $this->map, $ignored); + if (false !== $ignored) { + $this->datasSize = \strlen($this->datas) - \strlen($ignored); + } else { + $this->datasSize = \strlen($this->datas); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php new file mode 100644 index 00000000..a711bac4 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Base class for Spools (implements time and message limits). + * + * @author Fabien Potencier + */ +abstract class Swift_ConfigurableSpool implements Swift_Spool +{ + /** The maximum number of messages to send per flush */ + private $message_limit; + + /** The time limit per flush */ + private $time_limit; + + /** + * Sets the maximum number of messages to send per flush. + * + * @param int $limit + */ + public function setMessageLimit($limit) + { + $this->message_limit = (int) $limit; + } + + /** + * Gets the maximum number of messages to send per flush. + * + * @return int The limit + */ + public function getMessageLimit() + { + return $this->message_limit; + } + + /** + * Sets the time limit (in seconds) per flush. + * + * @param int $limit The limit + */ + public function setTimeLimit($limit) + { + $this->time_limit = (int) $limit; + } + + /** + * Gets the time limit (in seconds) per flush. + * + * @return int The limit + */ + public function getTimeLimit() + { + return $this->time_limit; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php new file mode 100644 index 00000000..3cc885ec --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php @@ -0,0 +1,387 @@ +store); + } + + /** + * Test if an item is registered in this container with the given name. + * + * @see register() + * + * @param string $itemName + * + * @return bool + */ + public function has($itemName) + { + return \array_key_exists($itemName, $this->store) + && isset($this->store[$itemName]['lookupType']); + } + + /** + * Lookup the item with the given $itemName. + * + * @see register() + * + * @param string $itemName + * + * @return mixed + * + * @throws Swift_DependencyException If the dependency is not found + */ + public function lookup($itemName) + { + if (!$this->has($itemName)) { + throw new Swift_DependencyException('Cannot lookup dependency "'.$itemName.'" since it is not registered.'); + } + + switch ($this->store[$itemName]['lookupType']) { + case self::TYPE_ALIAS: + return $this->createAlias($itemName); + case self::TYPE_VALUE: + return $this->getValue($itemName); + case self::TYPE_INSTANCE: + return $this->createNewInstance($itemName); + case self::TYPE_SHARED: + return $this->createSharedInstance($itemName); + case self::TYPE_ARRAY: + return $this->createDependenciesFor($itemName); + } + } + + /** + * Create an array of arguments passed to the constructor of $itemName. + * + * @param string $itemName + * + * @return array + */ + public function createDependenciesFor($itemName) + { + $args = []; + if (isset($this->store[$itemName]['args'])) { + $args = $this->resolveArgs($this->store[$itemName]['args']); + } + + return $args; + } + + /** + * Register a new dependency with $itemName. + * + * This method returns the current DependencyContainer instance because it + * requires the use of the fluid interface to set the specific details for the + * dependency. + * + * @see asNewInstanceOf(), asSharedInstanceOf(), asValue() + * + * @param string $itemName + * + * @return $this + */ + public function register($itemName) + { + $this->store[$itemName] = []; + $this->endPoint = &$this->store[$itemName]; + + return $this; + } + + /** + * Specify the previously registered item as a literal value. + * + * {@link register()} must be called before this will work. + * + * @param mixed $value + * + * @return $this + */ + public function asValue($value) + { + $endPoint = &$this->getEndPoint(); + $endPoint['lookupType'] = self::TYPE_VALUE; + $endPoint['value'] = $value; + + return $this; + } + + /** + * Specify the previously registered item as an alias of another item. + * + * @param string $lookup + * + * @return $this + */ + public function asAliasOf($lookup) + { + $endPoint = &$this->getEndPoint(); + $endPoint['lookupType'] = self::TYPE_ALIAS; + $endPoint['ref'] = $lookup; + + return $this; + } + + /** + * Specify the previously registered item as a new instance of $className. + * + * {@link register()} must be called before this will work. + * Any arguments can be set with {@link withDependencies()}, + * {@link addConstructorValue()} or {@link addConstructorLookup()}. + * + * @see withDependencies(), addConstructorValue(), addConstructorLookup() + * + * @param string $className + * + * @return $this + */ + public function asNewInstanceOf($className) + { + $endPoint = &$this->getEndPoint(); + $endPoint['lookupType'] = self::TYPE_INSTANCE; + $endPoint['className'] = $className; + + return $this; + } + + /** + * Specify the previously registered item as a shared instance of $className. + * + * {@link register()} must be called before this will work. + * + * @param string $className + * + * @return $this + */ + public function asSharedInstanceOf($className) + { + $endPoint = &$this->getEndPoint(); + $endPoint['lookupType'] = self::TYPE_SHARED; + $endPoint['className'] = $className; + + return $this; + } + + /** + * Specify the previously registered item as array of dependencies. + * + * {@link register()} must be called before this will work. + * + * @return $this + */ + public function asArray() + { + $endPoint = &$this->getEndPoint(); + $endPoint['lookupType'] = self::TYPE_ARRAY; + + return $this; + } + + /** + * Specify a list of injected dependencies for the previously registered item. + * + * This method takes an array of lookup names. + * + * @see addConstructorValue(), addConstructorLookup() + * + * @return $this + */ + public function withDependencies(array $lookups) + { + $endPoint = &$this->getEndPoint(); + $endPoint['args'] = []; + foreach ($lookups as $lookup) { + $this->addConstructorLookup($lookup); + } + + return $this; + } + + /** + * Specify a literal (non looked up) value for the constructor of the + * previously registered item. + * + * @see withDependencies(), addConstructorLookup() + * + * @param mixed $value + * + * @return $this + */ + public function addConstructorValue($value) + { + $endPoint = &$this->getEndPoint(); + if (!isset($endPoint['args'])) { + $endPoint['args'] = []; + } + $endPoint['args'][] = ['type' => 'value', 'item' => $value]; + + return $this; + } + + /** + * Specify a dependency lookup for the constructor of the previously + * registered item. + * + * @see withDependencies(), addConstructorValue() + * + * @param string $lookup + * + * @return $this + */ + public function addConstructorLookup($lookup) + { + $endPoint = &$this->getEndPoint(); + if (!isset($this->endPoint['args'])) { + $endPoint['args'] = []; + } + $endPoint['args'][] = ['type' => 'lookup', 'item' => $lookup]; + + return $this; + } + + /** Get the literal value with $itemName */ + private function getValue($itemName) + { + return $this->store[$itemName]['value']; + } + + /** Resolve an alias to another item */ + private function createAlias($itemName) + { + return $this->lookup($this->store[$itemName]['ref']); + } + + /** Create a fresh instance of $itemName */ + private function createNewInstance($itemName) + { + $reflector = new ReflectionClass($this->store[$itemName]['className']); + if ($reflector->getConstructor()) { + return $reflector->newInstanceArgs( + $this->createDependenciesFor($itemName) + ); + } + + return $reflector->newInstance(); + } + + /** Create and register a shared instance of $itemName */ + private function createSharedInstance($itemName) + { + if (!isset($this->store[$itemName]['instance'])) { + $this->store[$itemName]['instance'] = $this->createNewInstance($itemName); + } + + return $this->store[$itemName]['instance']; + } + + /** Get the current endpoint in the store */ + private function &getEndPoint() + { + if (!isset($this->endPoint)) { + throw new BadMethodCallException('Component must first be registered by calling register()'); + } + + return $this->endPoint; + } + + /** Get an argument list with dependencies resolved */ + private function resolveArgs(array $args) + { + $resolved = []; + foreach ($args as $argDefinition) { + switch ($argDefinition['type']) { + case 'lookup': + $resolved[] = $this->lookupRecursive($argDefinition['item']); + break; + case 'value': + $resolved[] = $argDefinition['item']; + break; + } + } + + return $resolved; + } + + /** Resolve a single dependency with an collections */ + private function lookupRecursive($item) + { + if (\is_array($item)) { + $collection = []; + foreach ($item as $k => $v) { + $collection[$k] = $this->lookupRecursive($v); + } + + return $collection; + } + + return $this->lookup($item); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php new file mode 100644 index 00000000..799d38d8 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php @@ -0,0 +1,27 @@ +createDependenciesFor('mime.embeddedfile') + ); + + $this->setBody($data); + $this->setFilename($filename); + if ($contentType) { + $this->setContentType($contentType); + } + } + + /** + * Create a new EmbeddedFile from a filesystem path. + * + * @param string $path + * + * @return Swift_Mime_EmbeddedFile + */ + public static function fromPath($path) + { + return (new self())->setFile(new Swift_ByteStream_FileByteStream($path)); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php new file mode 100644 index 00000000..2073abca --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php @@ -0,0 +1,28 @@ += $maxLineLength || 76 < $maxLineLength) { + $maxLineLength = 76; + } + + $encodedString = base64_encode($string ?? ''); + $firstLine = ''; + + if (0 != $firstLineOffset) { + $firstLine = substr( + $encodedString, 0, $maxLineLength - $firstLineOffset + )."\r\n"; + $encodedString = substr( + $encodedString, $maxLineLength - $firstLineOffset + ); + } + + return $firstLine.trim(chunk_split($encodedString, $maxLineLength, "\r\n")); + } + + /** + * Does nothing. + */ + public function charsetChanged($charset) + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php new file mode 100644 index 00000000..f078d6d7 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php @@ -0,0 +1,300 @@ + '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04', + 5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09', + 10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E', + 15 => '=0F', 16 => '=10', 17 => '=11', 18 => '=12', 19 => '=13', + 20 => '=14', 21 => '=15', 22 => '=16', 23 => '=17', 24 => '=18', + 25 => '=19', 26 => '=1A', 27 => '=1B', 28 => '=1C', 29 => '=1D', + 30 => '=1E', 31 => '=1F', 32 => '=20', 33 => '=21', 34 => '=22', + 35 => '=23', 36 => '=24', 37 => '=25', 38 => '=26', 39 => '=27', + 40 => '=28', 41 => '=29', 42 => '=2A', 43 => '=2B', 44 => '=2C', + 45 => '=2D', 46 => '=2E', 47 => '=2F', 48 => '=30', 49 => '=31', + 50 => '=32', 51 => '=33', 52 => '=34', 53 => '=35', 54 => '=36', + 55 => '=37', 56 => '=38', 57 => '=39', 58 => '=3A', 59 => '=3B', + 60 => '=3C', 61 => '=3D', 62 => '=3E', 63 => '=3F', 64 => '=40', + 65 => '=41', 66 => '=42', 67 => '=43', 68 => '=44', 69 => '=45', + 70 => '=46', 71 => '=47', 72 => '=48', 73 => '=49', 74 => '=4A', + 75 => '=4B', 76 => '=4C', 77 => '=4D', 78 => '=4E', 79 => '=4F', + 80 => '=50', 81 => '=51', 82 => '=52', 83 => '=53', 84 => '=54', + 85 => '=55', 86 => '=56', 87 => '=57', 88 => '=58', 89 => '=59', + 90 => '=5A', 91 => '=5B', 92 => '=5C', 93 => '=5D', 94 => '=5E', + 95 => '=5F', 96 => '=60', 97 => '=61', 98 => '=62', 99 => '=63', + 100 => '=64', 101 => '=65', 102 => '=66', 103 => '=67', 104 => '=68', + 105 => '=69', 106 => '=6A', 107 => '=6B', 108 => '=6C', 109 => '=6D', + 110 => '=6E', 111 => '=6F', 112 => '=70', 113 => '=71', 114 => '=72', + 115 => '=73', 116 => '=74', 117 => '=75', 118 => '=76', 119 => '=77', + 120 => '=78', 121 => '=79', 122 => '=7A', 123 => '=7B', 124 => '=7C', + 125 => '=7D', 126 => '=7E', 127 => '=7F', 128 => '=80', 129 => '=81', + 130 => '=82', 131 => '=83', 132 => '=84', 133 => '=85', 134 => '=86', + 135 => '=87', 136 => '=88', 137 => '=89', 138 => '=8A', 139 => '=8B', + 140 => '=8C', 141 => '=8D', 142 => '=8E', 143 => '=8F', 144 => '=90', + 145 => '=91', 146 => '=92', 147 => '=93', 148 => '=94', 149 => '=95', + 150 => '=96', 151 => '=97', 152 => '=98', 153 => '=99', 154 => '=9A', + 155 => '=9B', 156 => '=9C', 157 => '=9D', 158 => '=9E', 159 => '=9F', + 160 => '=A0', 161 => '=A1', 162 => '=A2', 163 => '=A3', 164 => '=A4', + 165 => '=A5', 166 => '=A6', 167 => '=A7', 168 => '=A8', 169 => '=A9', + 170 => '=AA', 171 => '=AB', 172 => '=AC', 173 => '=AD', 174 => '=AE', + 175 => '=AF', 176 => '=B0', 177 => '=B1', 178 => '=B2', 179 => '=B3', + 180 => '=B4', 181 => '=B5', 182 => '=B6', 183 => '=B7', 184 => '=B8', + 185 => '=B9', 186 => '=BA', 187 => '=BB', 188 => '=BC', 189 => '=BD', + 190 => '=BE', 191 => '=BF', 192 => '=C0', 193 => '=C1', 194 => '=C2', + 195 => '=C3', 196 => '=C4', 197 => '=C5', 198 => '=C6', 199 => '=C7', + 200 => '=C8', 201 => '=C9', 202 => '=CA', 203 => '=CB', 204 => '=CC', + 205 => '=CD', 206 => '=CE', 207 => '=CF', 208 => '=D0', 209 => '=D1', + 210 => '=D2', 211 => '=D3', 212 => '=D4', 213 => '=D5', 214 => '=D6', + 215 => '=D7', 216 => '=D8', 217 => '=D9', 218 => '=DA', 219 => '=DB', + 220 => '=DC', 221 => '=DD', 222 => '=DE', 223 => '=DF', 224 => '=E0', + 225 => '=E1', 226 => '=E2', 227 => '=E3', 228 => '=E4', 229 => '=E5', + 230 => '=E6', 231 => '=E7', 232 => '=E8', 233 => '=E9', 234 => '=EA', + 235 => '=EB', 236 => '=EC', 237 => '=ED', 238 => '=EE', 239 => '=EF', + 240 => '=F0', 241 => '=F1', 242 => '=F2', 243 => '=F3', 244 => '=F4', + 245 => '=F5', 246 => '=F6', 247 => '=F7', 248 => '=F8', 249 => '=F9', + 250 => '=FA', 251 => '=FB', 252 => '=FC', 253 => '=FD', 254 => '=FE', + 255 => '=FF', + ]; + + protected static $safeMapShare = []; + + /** + * A map of non-encoded ascii characters. + * + * @var string[] + */ + protected $safeMap = []; + + /** + * Creates a new QpEncoder for the given CharacterStream. + * + * @param Swift_CharacterStream $charStream to use for reading characters + * @param Swift_StreamFilter $filter if input should be canonicalized + */ + public function __construct(Swift_CharacterStream $charStream, Swift_StreamFilter $filter = null) + { + $this->charStream = $charStream; + if (!isset(self::$safeMapShare[$this->getSafeMapShareId()])) { + $this->initSafeMap(); + self::$safeMapShare[$this->getSafeMapShareId()] = $this->safeMap; + } else { + $this->safeMap = self::$safeMapShare[$this->getSafeMapShareId()]; + } + $this->filter = $filter; + } + + public function __sleep() + { + return ['charStream', 'filter']; + } + + public function __wakeup() + { + if (!isset(self::$safeMapShare[$this->getSafeMapShareId()])) { + $this->initSafeMap(); + self::$safeMapShare[$this->getSafeMapShareId()] = $this->safeMap; + } else { + $this->safeMap = self::$safeMapShare[$this->getSafeMapShareId()]; + } + } + + protected function getSafeMapShareId() + { + return static::class; + } + + protected function initSafeMap() + { + foreach (array_merge( + [0x09, 0x20], range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) { + $this->safeMap[$byte] = \chr($byte); + } + } + + /** + * Takes an unencoded string and produces a QP encoded string from it. + * + * QP encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * + * @param string $string to encode + * @param int $firstLineOffset optional + * @param int $maxLineLength optional 0 indicates the default of 76 chars + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($maxLineLength > 76 || $maxLineLength <= 0) { + $maxLineLength = 76; + } + + $thisLineLength = $maxLineLength - $firstLineOffset; + + $lines = []; + $lNo = 0; + $lines[$lNo] = ''; + $currentLine = &$lines[$lNo++]; + $size = $lineLen = 0; + + $this->charStream->flushContents(); + $this->charStream->importString($string); + + // Fetching more than 4 chars at one is slower, as is fetching fewer bytes + // Conveniently 4 chars is the UTF-8 safe number since UTF-8 has up to 6 + // bytes per char and (6 * 4 * 3 = 72 chars per line) * =NN is 3 bytes + while (false !== $bytes = $this->nextSequence()) { + // If we're filtering the input + if (isset($this->filter)) { + // If we can't filter because we need more bytes + while ($this->filter->shouldBuffer($bytes)) { + // Then collect bytes into the buffer + if (false === $moreBytes = $this->nextSequence(1)) { + break; + } + + foreach ($moreBytes as $b) { + $bytes[] = $b; + } + } + // And filter them + $bytes = $this->filter->filter($bytes); + } + + $enc = $this->encodeByteSequence($bytes, $size); + + $i = strpos($enc, '=0D=0A'); + $newLineLength = $lineLen + (false === $i ? $size : $i); + + if ($currentLine && $newLineLength >= $thisLineLength) { + $lines[$lNo] = ''; + $currentLine = &$lines[$lNo++]; + $thisLineLength = $maxLineLength; + $lineLen = 0; + } + + $currentLine .= $enc; + + if (false === $i) { + $lineLen += $size; + } else { + // 6 is the length of '=0D=0A'. + $lineLen = $size - strrpos($enc, '=0D=0A') - 6; + } + } + + return $this->standardize(implode("=\r\n", $lines)); + } + + /** + * Updates the charset used. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->charStream->setCharacterSet($charset); + } + + /** + * Encode the given byte array into a verbatim QP form. + * + * @param int[] $bytes + * @param int $size + * + * @return string + */ + protected function encodeByteSequence(array $bytes, &$size) + { + $ret = ''; + $size = 0; + foreach ($bytes as $b) { + if (isset($this->safeMap[$b])) { + $ret .= $this->safeMap[$b]; + ++$size; + } else { + $ret .= self::$qpMap[$b]; + $size += 3; + } + } + + return $ret; + } + + /** + * Get the next sequence of bytes to read from the char stream. + * + * @param int $size number of bytes to read + * + * @return int[] + */ + protected function nextSequence($size = 4) + { + return $this->charStream->readBytes($size); + } + + /** + * Make sure CRLF is correct and HT/SPACE are in valid places. + * + * @param string $string + * + * @return string + */ + protected function standardize($string) + { + $string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], + ["=09\r\n", "=20\r\n", "\r\n"], $string + ); + switch ($end = \ord(substr($string, -1))) { + case 0x09: + case 0x20: + $string = substr_replace($string, self::$qpMap[$end], -1); + } + + return $string; + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->charStream = clone $this->charStream; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php new file mode 100644 index 00000000..7eac3681 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php @@ -0,0 +1,90 @@ +charStream = $charStream; + } + + /** + * Takes an unencoded string and produces a string encoded according to + * RFC 2231 from it. + * + * @param string $string + * @param int $firstLineOffset + * @param int $maxLineLength optional, 0 indicates the default of 75 bytes + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + $lines = []; + $lineCount = 0; + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + + if (0 >= $maxLineLength) { + $maxLineLength = 75; + } + + $this->charStream->flushContents(); + $this->charStream->importString($string); + + $thisLineLength = $maxLineLength - $firstLineOffset; + + while (false !== $char = $this->charStream->read(4)) { + $encodedChar = rawurlencode($char); + if (0 != \strlen($currentLine) + && \strlen($currentLine.$encodedChar) > $thisLineLength) { + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + $thisLineLength = $maxLineLength; + } + $currentLine .= $encodedChar; + } + + return implode("\r\n", $lines); + } + + /** + * Updates the charset used. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->charStream->setCharacterSet($charset); + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->charStream = clone $this->charStream; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php new file mode 100644 index 00000000..18994c18 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php @@ -0,0 +1,64 @@ +command = $command; + $this->successCodes = $successCodes; + } + + /** + * Get the command which was sent to the server. + * + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Get the numeric response codes which indicate success for this command. + * + * @return int[] + */ + public function getSuccessCodes() + { + return $this->successCodes; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php new file mode 100644 index 00000000..b158eab4 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php @@ -0,0 +1,22 @@ +source = $source; + } + + /** + * Get the source object of this event. + * + * @return object + */ + public function getSource() + { + return $this->source; + } + + /** + * Prevent this Event from bubbling any further up the stack. + */ + public function cancelBubble($cancel = true) + { + $this->bubbleCancelled = $cancel; + } + + /** + * Returns true if this Event will not bubble any further up the stack. + * + * @return bool + */ + public function bubbleCancelled() + { + return $this->bubbleCancelled; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php new file mode 100644 index 00000000..ff7c3711 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php @@ -0,0 +1,64 @@ +response = $response; + $this->valid = $valid; + } + + /** + * Get the response which was received from the server. + * + * @return string + */ + public function getResponse() + { + return $this->response; + } + + /** + * Get the success status of this Event. + * + * @return bool + */ + public function isValid() + { + return $this->valid; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php new file mode 100644 index 00000000..85115a33 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php @@ -0,0 +1,22 @@ +message = $message; + $this->result = self::RESULT_PENDING; + } + + /** + * Get the Transport used to send the Message. + * + * @return Swift_Transport + */ + public function getTransport() + { + return $this->getSource(); + } + + /** + * Get the Message being sent. + * + * @return Swift_Mime_SimpleMessage + */ + public function getMessage() + { + return $this->message; + } + + /** + * Set the array of addresses that failed in sending. + * + * @param array $recipients + */ + public function setFailedRecipients($recipients) + { + $this->failedRecipients = $recipients; + } + + /** + * Get an recipient addresses which were not accepted for delivery. + * + * @return string[] + */ + public function getFailedRecipients() + { + return $this->failedRecipients; + } + + /** + * Set the result of sending. + * + * @param int $result + */ + public function setResult($result) + { + $this->result = $result; + } + + /** + * Get the result of this Event. + * + * The return value is a bitmask from + * {@see RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} + * + * @return int + */ + public function getResult() + { + return $this->result; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php new file mode 100644 index 00000000..f7bf55ef --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php @@ -0,0 +1,27 @@ +eventMap = [ + 'Swift_Events_CommandEvent' => 'Swift_Events_CommandListener', + 'Swift_Events_ResponseEvent' => 'Swift_Events_ResponseListener', + 'Swift_Events_SendEvent' => 'Swift_Events_SendListener', + 'Swift_Events_TransportChangeEvent' => 'Swift_Events_TransportChangeListener', + 'Swift_Events_TransportExceptionEvent' => 'Swift_Events_TransportExceptionListener', + ]; + } + + /** + * Create a new SendEvent for $source and $message. + * + * @return Swift_Events_SendEvent + */ + public function createSendEvent(Swift_Transport $source, Swift_Mime_SimpleMessage $message) + { + return new Swift_Events_SendEvent($source, $message); + } + + /** + * Create a new CommandEvent for $source and $command. + * + * @param string $command That will be executed + * @param array $successCodes That are needed + * + * @return Swift_Events_CommandEvent + */ + public function createCommandEvent(Swift_Transport $source, $command, $successCodes = []) + { + return new Swift_Events_CommandEvent($source, $command, $successCodes); + } + + /** + * Create a new ResponseEvent for $source and $response. + * + * @param string $response + * @param bool $valid If the response is valid + * + * @return Swift_Events_ResponseEvent + */ + public function createResponseEvent(Swift_Transport $source, $response, $valid) + { + return new Swift_Events_ResponseEvent($source, $response, $valid); + } + + /** + * Create a new TransportChangeEvent for $source. + * + * @return Swift_Events_TransportChangeEvent + */ + public function createTransportChangeEvent(Swift_Transport $source) + { + return new Swift_Events_TransportChangeEvent($source); + } + + /** + * Create a new TransportExceptionEvent for $source. + * + * @return Swift_Events_TransportExceptionEvent + */ + public function createTransportExceptionEvent(Swift_Transport $source, Swift_TransportException $ex) + { + return new Swift_Events_TransportExceptionEvent($source, $ex); + } + + /** + * Bind an event listener to this dispatcher. + */ + public function bindEventListener(Swift_Events_EventListener $listener) + { + foreach ($this->listeners as $l) { + // Already loaded + if ($l === $listener) { + return; + } + } + $this->listeners[] = $listener; + } + + /** + * Dispatch the given Event to all suitable listeners. + * + * @param string $target method + */ + public function dispatchEvent(Swift_Events_EventObject $evt, $target) + { + $bubbleQueue = $this->prepareBubbleQueue($evt); + $this->bubble($bubbleQueue, $evt, $target); + } + + /** Queue listeners on a stack ready for $evt to be bubbled up it */ + private function prepareBubbleQueue(Swift_Events_EventObject $evt) + { + $bubbleQueue = []; + $evtClass = \get_class($evt); + foreach ($this->listeners as $listener) { + if (\array_key_exists($evtClass, $this->eventMap) + && ($listener instanceof $this->eventMap[$evtClass])) { + $bubbleQueue[] = $listener; + } + } + + return $bubbleQueue; + } + + /** Bubble $evt up the stack calling $target() on each listener */ + private function bubble(array &$bubbleQueue, Swift_Events_EventObject $evt, $target) + { + if (!$evt->bubbleCancelled() && $listener = array_shift($bubbleQueue)) { + $listener->$target($evt); + $this->bubble($bubbleQueue, $evt, $target); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php new file mode 100644 index 00000000..a8972fda --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php @@ -0,0 +1,27 @@ +getSource(); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php new file mode 100644 index 00000000..4a7492bc --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php @@ -0,0 +1,37 @@ +exception = $ex; + } + + /** + * Get the TransportException thrown. + * + * @return Swift_TransportException + */ + public function getException() + { + return $this->exception; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php new file mode 100644 index 00000000..ad80eb01 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php @@ -0,0 +1,22 @@ +createDependenciesFor('transport.failover') + ); + + $this->setTransports($transports); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php new file mode 100644 index 00000000..7af8471c --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php @@ -0,0 +1,208 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages on the filesystem. + * + * @author Fabien Potencier + * @author Xavier De Cock + */ +class Swift_FileSpool extends Swift_ConfigurableSpool +{ + /** The spool directory */ + private $path; + + /** + * File WriteRetry Limit. + * + * @var int + */ + private $retryLimit = 10; + + /** + * Create a new FileSpool. + * + * @param string $path + * + * @throws Swift_IoException + */ + public function __construct($path) + { + $this->path = $path; + + if (!file_exists($this->path)) { + if (!mkdir($this->path, 0777, true)) { + throw new Swift_IoException(sprintf('Unable to create path "%s".', $this->path)); + } + } + } + + /** + * Tests if this Spool mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Spool mechanism. + */ + public function start() + { + } + + /** + * Stops this Spool mechanism. + */ + public function stop() + { + } + + /** + * Allow to manage the enqueuing retry limit. + * + * Default, is ten and allows over 64^20 different fileNames + * + * @param int $limit + */ + public function setRetryLimit($limit) + { + $this->retryLimit = $limit; + } + + /** + * Queues a message. + * + * @param Swift_Mime_SimpleMessage $message The message to store + * + * @throws Swift_IoException + * + * @return bool + */ + public function queueMessage(Swift_Mime_SimpleMessage $message) + { + $ser = serialize($message); + $fileName = $this->path.'/'.$this->getRandomString(10); + for ($i = 0; $i < $this->retryLimit; ++$i) { + /* We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism */ + $fp = @fopen($fileName.'.message', 'xb'); + if (false !== $fp) { + if (false === fwrite($fp, $ser)) { + return false; + } + + return fclose($fp); + } else { + /* The file already exists, we try a longer fileName */ + $fileName .= $this->getRandomString(1); + } + } + + throw new Swift_IoException(sprintf('Unable to create a file for enqueuing Message in "%s".', $this->path)); + } + + /** + * Execute a recovery if for any reason a process is sending for too long. + * + * @param int $timeout in second Defaults is for very slow smtp responses + */ + public function recover($timeout = 900) + { + foreach (new DirectoryIterator($this->path) as $file) { + $file = $file->getRealPath(); + + if ('.message.sending' == substr($file, -16)) { + $lockedtime = filectime($file); + if ((time() - $lockedtime) > $timeout) { + rename($file, substr($file, 0, -8)); + } + } + } + } + + /** + * Sends messages using the given transport instance. + * + * @param Swift_Transport $transport A transport instance + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent e-mail's + */ + public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) + { + $directoryIterator = new DirectoryIterator($this->path); + + /* Start the transport only if there are queued files to send */ + if (!$transport->isStarted()) { + foreach ($directoryIterator as $file) { + if ('.message' == substr($file->getRealPath(), -8)) { + $transport->start(); + break; + } + } + } + + $failedRecipients = (array) $failedRecipients; + $count = 0; + $time = time(); + foreach ($directoryIterator as $file) { + $file = $file->getRealPath(); + + if ('.message' != substr($file, -8)) { + continue; + } + + /* We try a rename, it's an atomic operation, and avoid locking the file */ + if (rename($file, $file.'.sending')) { + $message = unserialize(file_get_contents($file.'.sending')); + + $count += $transport->send($message, $failedRecipients); + + unlink($file.'.sending'); + } else { + /* This message has just been catched by another process */ + continue; + } + + if ($this->getMessageLimit() && $count >= $this->getMessageLimit()) { + break; + } + + if ($this->getTimeLimit() && (time() - $time) >= $this->getTimeLimit()) { + break; + } + } + + return $count; + } + + /** + * Returns a random string needed to generate a fileName for the queue. + * + * @param int $count + * + * @return string + */ + protected function getRandomString($count) + { + // This string MUST stay FS safe, avoid special chars + $base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-'; + $ret = ''; + $strlen = \strlen($base); + for ($i = 0; $i < $count; ++$i) { + $ret .= $base[random_int(0, $strlen - 1)]; + } + + return $ret; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php new file mode 100644 index 00000000..0b24db1c --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php @@ -0,0 +1,24 @@ +setFile(new Swift_ByteStream_FileByteStream($path)); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php new file mode 100644 index 00000000..379a5a17 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php @@ -0,0 +1,75 @@ +stream = $stream; + } + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + $this->prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $this->contents[$nsKey][$itemKey] = $string; + break; + case self::MODE_APPEND: + if (!$this->hasKey($nsKey, $itemKey)) { + $this->contents[$nsKey][$itemKey] = ''; + } + $this->contents[$nsKey][$itemKey] .= $string; + break; + default: + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); + } + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param int $mode + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) + { + $this->prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $this->clearKey($nsKey, $itemKey); + // no break + case self::MODE_APPEND: + if (!$this->hasKey($nsKey, $itemKey)) { + $this->contents[$nsKey][$itemKey] = ''; + } + while (false !== $bytes = $os->read(8192)) { + $this->contents[$nsKey][$itemKey] .= $bytes; + } + break; + default: + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); + } + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * + * NOTE: The stream will always write in append mode. + * + * @param string $nsKey + * @param string $itemKey + * + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) + { + $is = clone $this->stream; + $is->setKeyCache($this); + $is->setNsKey($nsKey); + $is->setItemKey($itemKey); + if (isset($writeThrough)) { + $is->setWriteThroughStream($writeThrough); + } + + return $is; + } + + /** + * Get data back out of the cache as a string. + * + * @param string $nsKey + * @param string $itemKey + * + * @return string + */ + public function getString($nsKey, $itemKey) + { + $this->prepareCache($nsKey); + if ($this->hasKey($nsKey, $itemKey)) { + return $this->contents[$nsKey][$itemKey]; + } + } + + /** + * Get data back out of the cache as a ByteStream. + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + $this->prepareCache($nsKey); + $is->write($this->getString($nsKey, $itemKey)); + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * + * @param string $nsKey + * @param string $itemKey + * + * @return bool + */ + public function hasKey($nsKey, $itemKey) + { + $this->prepareCache($nsKey); + + return \array_key_exists($itemKey, $this->contents[$nsKey]); + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + unset($this->contents[$nsKey][$itemKey]); + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * + * @param string $nsKey + */ + public function clearAll($nsKey) + { + unset($this->contents[$nsKey]); + } + + /** + * Initialize the namespace of $nsKey if needed. + * + * @param string $nsKey + */ + private function prepareCache($nsKey) + { + if (!\array_key_exists($nsKey, $this->contents)) { + $this->contents[$nsKey] = []; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php new file mode 100644 index 00000000..33b6367c --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php @@ -0,0 +1,294 @@ +stream = $stream; + $this->path = $path; + } + + /** + * Set a string into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param string $string + * @param int $mode + * + * @throws Swift_IoException + */ + public function setString($nsKey, $itemKey, $string, $mode) + { + $this->prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); + break; + case self::MODE_APPEND: + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); + break; + default: + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); + break; + } + fwrite($fp, $string); + $this->freeHandle($nsKey, $itemKey); + } + + /** + * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. + * + * @see MODE_WRITE, MODE_APPEND + * + * @param string $nsKey + * @param string $itemKey + * @param int $mode + * + * @throws Swift_IoException + */ + public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) + { + $this->prepareCache($nsKey); + switch ($mode) { + case self::MODE_WRITE: + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); + break; + case self::MODE_APPEND: + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); + break; + default: + throw new Swift_SwiftException('Invalid mode ['.$mode.'] used to set nsKey='.$nsKey.', itemKey='.$itemKey); + break; + } + while (false !== $bytes = $os->read(8192)) { + fwrite($fp, $bytes); + } + $this->freeHandle($nsKey, $itemKey); + } + + /** + * Provides a ByteStream which when written to, writes data to $itemKey. + * + * NOTE: The stream will always write in append mode. + * + * @param string $nsKey + * @param string $itemKey + * + * @return Swift_InputByteStream + */ + public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) + { + $is = clone $this->stream; + $is->setKeyCache($this); + $is->setNsKey($nsKey); + $is->setItemKey($itemKey); + if (isset($writeThrough)) { + $is->setWriteThroughStream($writeThrough); + } + + return $is; + } + + /** + * Get data back out of the cache as a string. + * + * @param string $nsKey + * @param string $itemKey + * + * @throws Swift_IoException + * + * @return string + */ + public function getString($nsKey, $itemKey) + { + $this->prepareCache($nsKey); + if ($this->hasKey($nsKey, $itemKey)) { + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); + $str = ''; + while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { + $str .= $bytes; + } + $this->freeHandle($nsKey, $itemKey); + + return $str; + } + } + + /** + * Get data back out of the cache as a ByteStream. + * + * @param string $nsKey + * @param string $itemKey + * @param Swift_InputByteStream $is to write the data to + */ + public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) + { + if ($this->hasKey($nsKey, $itemKey)) { + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); + while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { + $is->write($bytes); + } + $this->freeHandle($nsKey, $itemKey); + } + } + + /** + * Check if the given $itemKey exists in the namespace $nsKey. + * + * @param string $nsKey + * @param string $itemKey + * + * @return bool + */ + public function hasKey($nsKey, $itemKey) + { + return is_file($this->path.'/'.$nsKey.'/'.$itemKey); + } + + /** + * Clear data for $itemKey in the namespace $nsKey if it exists. + * + * @param string $nsKey + * @param string $itemKey + */ + public function clearKey($nsKey, $itemKey) + { + if ($this->hasKey($nsKey, $itemKey)) { + $this->freeHandle($nsKey, $itemKey); + unlink($this->path.'/'.$nsKey.'/'.$itemKey); + } + } + + /** + * Clear all data in the namespace $nsKey if it exists. + * + * @param string $nsKey + */ + public function clearAll($nsKey) + { + if (\array_key_exists($nsKey, $this->keys)) { + foreach ($this->keys[$nsKey] as $itemKey => $null) { + $this->clearKey($nsKey, $itemKey); + } + if (is_dir($this->path.'/'.$nsKey)) { + rmdir($this->path.'/'.$nsKey); + } + unset($this->keys[$nsKey]); + } + } + + /** + * Initialize the namespace of $nsKey if needed. + * + * @param string $nsKey + */ + private function prepareCache($nsKey) + { + $cacheDir = $this->path.'/'.$nsKey; + if (!is_dir($cacheDir)) { + if (!mkdir($cacheDir)) { + throw new Swift_IoException('Failed to create cache directory '.$cacheDir); + } + $this->keys[$nsKey] = []; + } + } + + /** + * Get a file handle on the cache item. + * + * @param string $nsKey + * @param string $itemKey + * @param int $position + * + * @return resource + */ + private function getHandle($nsKey, $itemKey, $position) + { + if (!isset($this->keys[$nsKey][$itemKey])) { + $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b'; + $fp = fopen($this->path.'/'.$nsKey.'/'.$itemKey, $openMode); + $this->keys[$nsKey][$itemKey] = $fp; + } + if (self::POSITION_START == $position) { + fseek($this->keys[$nsKey][$itemKey], 0, SEEK_SET); + } elseif (self::POSITION_END == $position) { + fseek($this->keys[$nsKey][$itemKey], 0, SEEK_END); + } + + return $this->keys[$nsKey][$itemKey]; + } + + private function freeHandle($nsKey, $itemKey) + { + $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_CURRENT); + fclose($fp); + $this->keys[$nsKey][$itemKey] = null; + } + + /** + * Destructor. + */ + public function __destruct() + { + foreach ($this->keys as $nsKey => $null) { + $this->clearAll($nsKey); + } + } + + public function __wakeup() + { + $this->keys = []; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php new file mode 100644 index 00000000..be2dbba0 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php @@ -0,0 +1,47 @@ +keyCache = $keyCache; + } + + /** + * Specify a stream to write through for each write(). + */ + public function setWriteThroughStream(Swift_InputByteStream $is) + { + $this->writeThrough = $is; + } + + /** + * Writes $bytes to the end of the stream. + * + * @param string $bytes + * @param Swift_InputByteStream $is optional + */ + public function write($bytes, Swift_InputByteStream $is = null) + { + $this->keyCache->setString( + $this->nsKey, $this->itemKey, $bytes, Swift_KeyCache::MODE_APPEND + ); + if (isset($is)) { + $is->write($bytes); + } + if (isset($this->writeThrough)) { + $this->writeThrough->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Not used. + */ + public function bind(Swift_InputByteStream $is) + { + } + + /** + * Not used. + */ + public function unbind(Swift_InputByteStream $is) + { + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + */ + public function flushBuffers() + { + $this->keyCache->clearKey($this->nsKey, $this->itemKey); + } + + /** + * Set the nsKey which will be written to. + * + * @param string $nsKey + */ + public function setNsKey($nsKey) + { + $this->nsKey = $nsKey; + } + + /** + * Set the itemKey which will be written to. + * + * @param string $itemKey + */ + public function setItemKey($itemKey) + { + $this->itemKey = $itemKey; + } + + /** + * Any implementation should be cloneable, allowing the clone to access a + * separate $nsKey and $itemKey. + */ + public function __clone() + { + $this->writeThrough = null; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php new file mode 100644 index 00000000..244b5f60 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php @@ -0,0 +1,33 @@ +createDependenciesFor('transport.loadbalanced') + ); + + $this->setTransports($transports); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php new file mode 100644 index 00000000..57630074 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php @@ -0,0 +1,98 @@ +transport = $transport; + } + + /** + * Create a new class instance of one of the message services. + * + * For example 'mimepart' would create a 'message.mimepart' instance + * + * @param string $service + * + * @return object + */ + public function createMessage($service = 'message') + { + return Swift_DependencyContainer::getInstance() + ->lookup('message.'.$service); + } + + /** + * Send the given Message like it would be sent in a mail client. + * + * All recipients (with the exception of Bcc) will be able to see the other + * recipients this message was sent to. + * + * Recipient/sender data will be retrieved from the Message object. + * + * The return value is the number of recipients who were accepted for + * delivery. + * + * @param array $failedRecipients An array of failures by-reference + * + * @return int The number of successful recipients. Can be 0 which indicates failure + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + + // FIXME: to be removed in 7.0 (as transport must now start itself on send) + if (!$this->transport->isStarted()) { + $this->transport->start(); + } + + $sent = 0; + + try { + $sent = $this->transport->send($message, $failedRecipients); + } catch (Swift_RfcComplianceException $e) { + foreach ($message->getTo() as $address => $name) { + $failedRecipients[] = $address; + } + } + + return $sent; + } + + /** + * Register a plugin using a known unique key (e.g. myPlugin). + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->transport->registerPlugin($plugin); + } + + /** + * The Transport used to send messages. + * + * @return Swift_Transport + */ + public function getTransport() + { + return $this->transport; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php new file mode 100644 index 00000000..19aa82a9 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php @@ -0,0 +1,53 @@ +recipients = $recipients; + } + + /** + * Returns true only if there are more recipients to send to. + * + * @return bool + */ + public function hasNext() + { + return !empty($this->recipients); + } + + /** + * Returns an array where the keys are the addresses of recipients and the + * values are the names. e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL). + * + * @return array + */ + public function nextRecipient() + { + return array_splice($this->recipients, 0, 1); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php new file mode 100644 index 00000000..650f3ec3 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php @@ -0,0 +1,32 @@ + 'Foo') or ('foo@bar' => NULL). + * + * @return array + */ + public function nextRecipient(); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php new file mode 100644 index 00000000..e3b0894d --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages in memory. + * + * @author Fabien Potencier + */ +class Swift_MemorySpool implements Swift_Spool +{ + protected $messages = []; + private $flushRetries = 3; + + /** + * Tests if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Transport mechanism. + */ + public function start() + { + } + + /** + * Stops this Transport mechanism. + */ + public function stop() + { + } + + /** + * @param int $retries + */ + public function setFlushRetries($retries) + { + $this->flushRetries = $retries; + } + + /** + * Stores a message in the queue. + * + * @param Swift_Mime_SimpleMessage $message The message to store + * + * @return bool Whether the operation has succeeded + */ + public function queueMessage(Swift_Mime_SimpleMessage $message) + { + //clone the message to make sure it is not changed while in the queue + $this->messages[] = clone $message; + + return true; + } + + /** + * Sends messages using the given transport instance. + * + * @param Swift_Transport $transport A transport instance + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent emails + */ + public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) + { + if (!$this->messages) { + return 0; + } + + if (!$transport->isStarted()) { + $transport->start(); + } + + $count = 0; + $retries = $this->flushRetries; + while ($retries--) { + try { + while ($message = array_pop($this->messages)) { + $count += $transport->send($message, $failedRecipients); + } + } catch (Swift_TransportException $exception) { + if ($retries) { + // re-queue the message at the end of the queue to give a chance + // to the other messages to be sent, in case the failure was due to + // this message and not just the transport failing + array_unshift($this->messages, $message); + + // wait half a second before we try again + usleep(500000); + } else { + throw $exception; + } + } + } + + return $count; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php new file mode 100644 index 00000000..5c5834e2 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php @@ -0,0 +1,279 @@ +createDependenciesFor('mime.message') + ); + + if (!isset($charset)) { + $charset = Swift_DependencyContainer::getInstance() + ->lookup('properties.charset'); + } + $this->setSubject($subject); + $this->setBody($body); + $this->setCharset($charset); + if ($contentType) { + $this->setContentType($contentType); + } + } + + /** + * Add a MimePart to this Message. + * + * @param string|Swift_OutputByteStream $body + * @param string $contentType + * @param string $charset + * + * @return $this + */ + public function addPart($body, $contentType = null, $charset = null) + { + return $this->attach((new Swift_MimePart($body, $contentType, $charset))->setEncoder($this->getEncoder())); + } + + /** + * Attach a new signature handler to the message. + * + * @return $this + */ + public function attachSigner(Swift_Signer $signer) + { + if ($signer instanceof Swift_Signers_HeaderSigner) { + $this->headerSigners[] = $signer; + } elseif ($signer instanceof Swift_Signers_BodySigner) { + $this->bodySigners[] = $signer; + } + + return $this; + } + + /** + * Detach a signature handler from a message. + * + * @return $this + */ + public function detachSigner(Swift_Signer $signer) + { + if ($signer instanceof Swift_Signers_HeaderSigner) { + foreach ($this->headerSigners as $k => $headerSigner) { + if ($headerSigner === $signer) { + unset($this->headerSigners[$k]); + + return $this; + } + } + } elseif ($signer instanceof Swift_Signers_BodySigner) { + foreach ($this->bodySigners as $k => $bodySigner) { + if ($bodySigner === $signer) { + unset($this->bodySigners[$k]); + + return $this; + } + } + } + + return $this; + } + + /** + * Clear all signature handlers attached to the message. + * + * @return $this + */ + public function clearSigners() + { + $this->headerSigners = []; + $this->bodySigners = []; + + return $this; + } + + /** + * Get this message as a complete string. + * + * @return string + */ + public function toString() + { + if (empty($this->headerSigners) && empty($this->bodySigners)) { + return parent::toString(); + } + + $this->saveMessage(); + + $this->doSign(); + + $string = parent::toString(); + + $this->restoreMessage(); + + return $string; + } + + /** + * Write this message to a {@link Swift_InputByteStream}. + */ + public function toByteStream(Swift_InputByteStream $is) + { + if (empty($this->headerSigners) && empty($this->bodySigners)) { + parent::toByteStream($is); + + return; + } + + $this->saveMessage(); + + $this->doSign(); + + parent::toByteStream($is); + + $this->restoreMessage(); + } + + public function __wakeup() + { + Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.message'); + } + + /** + * loops through signers and apply the signatures. + */ + protected function doSign() + { + foreach ($this->bodySigners as $signer) { + $altered = $signer->getAlteredHeaders(); + $this->saveHeaders($altered); + $signer->signMessage($this); + } + + foreach ($this->headerSigners as $signer) { + $altered = $signer->getAlteredHeaders(); + $this->saveHeaders($altered); + $signer->reset(); + + $signer->setHeaders($this->getHeaders()); + + $signer->startBody(); + $this->bodyToByteStream($signer); + $signer->endBody(); + + $signer->addSignature($this->getHeaders()); + } + } + + /** + * save the message before any signature is applied. + */ + protected function saveMessage() + { + $this->savedMessage = ['headers' => []]; + $this->savedMessage['body'] = $this->getBody(); + $this->savedMessage['children'] = $this->getChildren(); + if (\count($this->savedMessage['children']) > 0 && '' != $this->getBody()) { + $this->setChildren(array_merge([$this->becomeMimePart()], $this->savedMessage['children'])); + $this->setBody(''); + } + } + + /** + * save the original headers. + */ + protected function saveHeaders(array $altered) + { + foreach ($altered as $head) { + $lc = strtolower($head ?? ''); + + if (!isset($this->savedMessage['headers'][$lc])) { + $this->savedMessage['headers'][$lc] = $this->getHeaders()->getAll($head); + } + } + } + + /** + * Remove or restore altered headers. + */ + protected function restoreHeaders() + { + foreach ($this->savedMessage['headers'] as $name => $savedValue) { + $headers = $this->getHeaders()->getAll($name); + + foreach ($headers as $key => $value) { + if (!isset($savedValue[$key])) { + $this->getHeaders()->remove($name, $key); + } + } + } + } + + /** + * Restore message body. + */ + protected function restoreMessage() + { + $this->setBody($this->savedMessage['body']); + $this->setChildren($this->savedMessage['children']); + + $this->restoreHeaders(); + $this->savedMessage = []; + } + + /** + * Clone Message Signers. + * + * @see Swift_Mime_SimpleMimeEntity::__clone() + */ + public function __clone() + { + parent::__clone(); + foreach ($this->bodySigners as $key => $bodySigner) { + $this->bodySigners[$key] = clone $bodySigner; + } + + foreach ($this->headerSigners as $key => $headerSigner) { + $this->headerSigners[$key] = clone $headerSigner; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php new file mode 100644 index 00000000..d994373b --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php @@ -0,0 +1,144 @@ +setDisposition('attachment'); + $this->setContentType('application/octet-stream'); + $this->mimeTypes = $mimeTypes; + } + + /** + * Get the nesting level used for this attachment. + * + * Always returns {@link LEVEL_MIXED}. + * + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_MIXED; + } + + /** + * Get the Content-Disposition of this attachment. + * + * By default attachments have a disposition of "attachment". + * + * @return string + */ + public function getDisposition() + { + return $this->getHeaderFieldModel('Content-Disposition'); + } + + /** + * Set the Content-Disposition of this attachment. + * + * @param string $disposition + * + * @return $this + */ + public function setDisposition($disposition) + { + if (!$this->setHeaderFieldModel('Content-Disposition', $disposition)) { + $this->getHeaders()->addParameterizedHeader('Content-Disposition', $disposition); + } + + return $this; + } + + /** + * Get the filename of this attachment when downloaded. + * + * @return string + */ + public function getFilename() + { + return $this->getHeaderParameter('Content-Disposition', 'filename'); + } + + /** + * Set the filename of this attachment. + * + * @param string $filename + * + * @return $this + */ + public function setFilename($filename) + { + $this->setHeaderParameter('Content-Disposition', 'filename', $filename); + $this->setHeaderParameter('Content-Type', 'name', $filename); + + return $this; + } + + /** + * Get the file size of this attachment. + * + * @return int + */ + public function getSize() + { + return $this->getHeaderParameter('Content-Disposition', 'size'); + } + + /** + * Set the file size of this attachment. + * + * @param int $size + * + * @return $this + */ + public function setSize($size) + { + $this->setHeaderParameter('Content-Disposition', 'size', $size); + + return $this; + } + + /** + * Set the file that this attachment is for. + * + * @param string $contentType optional + * + * @return $this + */ + public function setFile(Swift_FileStream $file, $contentType = null) + { + $this->setFilename(basename($file->getPath())); + $this->setBody($file, $contentType); + if (!isset($contentType)) { + $extension = strtolower(substr($file->getPath(), strrpos($file->getPath(), '.') + 1)); + + if (\array_key_exists($extension, $this->mimeTypes)) { + $this->setContentType($this->mimeTypes[$extension]); + } + } + + return $this; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php new file mode 100644 index 00000000..b49c3a87 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php @@ -0,0 +1,24 @@ += $maxLineLength || 76 < $maxLineLength) { + $maxLineLength = 76; + } + + $remainder = 0; + $base64ReadBufferRemainderBytes = ''; + + // To reduce memory usage, the output buffer is streamed to the input buffer like so: + // Output Stream => base64encode => wrap line length => Input Stream + // HOWEVER it's important to note that base64_encode() should only be passed whole triplets of data (except for the final chunk of data) + // otherwise it will assume the input data has *ended* and it will incorrectly pad/terminate the base64 data mid-stream. + // We use $base64ReadBufferRemainderBytes to carry over 1-2 "remainder" bytes from the each chunk from OutputStream and pre-pend those onto the + // chunk of bytes read in the next iteration. + // When the OutputStream is empty, we must flush any remainder bytes. + while (true) { + $readBytes = $os->read(8192); + $atEOF = (false === $readBytes); + + if ($atEOF) { + $streamTheseBytes = $base64ReadBufferRemainderBytes; + } else { + $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; + } + $base64ReadBufferRemainderBytes = ''; + $bytesLength = \strlen($streamTheseBytes); + + if (0 === $bytesLength) { // no data left to encode + break; + } + + // if we're not on the last block of the ouput stream, make sure $streamTheseBytes ends with a complete triplet of data + // and carry over remainder 1-2 bytes to the next loop iteration + if (!$atEOF) { + $excessBytes = $bytesLength % 3; + if (0 !== $excessBytes) { + $base64ReadBufferRemainderBytes = substr($streamTheseBytes, -$excessBytes); + $streamTheseBytes = substr($streamTheseBytes, 0, $bytesLength - $excessBytes); + } + } + + $encoded = base64_encode($streamTheseBytes); + $encodedTransformed = ''; + $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; + + while ($thisMaxLineLength < \strlen($encoded)) { + $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; + $firstLineOffset = 0; + $encoded = substr($encoded, $thisMaxLineLength); + $thisMaxLineLength = $maxLineLength; + $remainder = 0; + } + + if (0 < $remainingLength = \strlen($encoded)) { + $remainder += $remainingLength; + $encodedTransformed .= $encoded; + $encoded = null; + } + + $is->write($encodedTransformed); + + if ($atEOF) { + break; + } + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'base64'. + * + * @return string + */ + public function getName() + { + return 'base64'; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php new file mode 100644 index 00000000..8dfea605 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php @@ -0,0 +1,121 @@ +charset = $charset ?: 'utf-8'; + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->charset = $charset; + } + + /** + * Encode $in to $out. + * + * @param Swift_OutputByteStream $os to read from + * @param Swift_InputByteStream $is to write to + * @param int $firstLineOffset + * @param int $maxLineLength 0 indicates the default length for this encoding + * + * @throws RuntimeException + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + if ('utf-8' !== $this->charset) { + throw new RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); + } + + $string = ''; + + while (false !== $bytes = $os->read(8192)) { + $string .= $bytes; + } + + $is->write($this->encodeString($string)); + } + + /** + * Get the MIME name of this content encoding scheme. + * + * @return string + */ + public function getName() + { + return 'quoted-printable'; + } + + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset if first line needs to be shorter + * @param int $maxLineLength 0 indicates the default length for this encoding + * + * @throws RuntimeException + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + if ('utf-8' !== $this->charset) { + throw new RuntimeException(sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset)); + } + + return $this->standardize(quoted_printable_encode($string)); + } + + /** + * Make sure CRLF is correct and HT/SPACE are in valid places. + * + * @param string $string + * + * @return string + */ + protected function standardize($string) + { + // transform CR or LF to CRLF + $string = preg_replace('~=0D(?!=0A)|(? + */ +class Swift_Mime_ContentEncoder_NullContentEncoder implements Swift_Mime_ContentEncoder +{ + /** + * The name of this encoding scheme (probably 7bit or 8bit). + * + * @var string + */ + private $name; + + /** + * Creates a new NullContentEncoder with $name (probably 7bit or 8bit). + * + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } + + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset ignored + * @param int $maxLineLength ignored + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return $string; + } + + /** + * Encode stream $in to stream $out. + * + * @param int $firstLineOffset ignored + * @param int $maxLineLength ignored + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + while (false !== ($bytes = $os->read(8192))) { + $is->write($bytes); + } + } + + /** + * Get the name of this encoding scheme. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Not used. + */ + public function charsetChanged($charset) + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php new file mode 100644 index 00000000..72592fc5 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php @@ -0,0 +1,164 @@ +name = $name; + $this->canonical = $canonical; + } + + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset ignored + * @param int $maxLineLength - 0 means no wrapping will occur + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($this->canonical) { + $string = $this->canonicalize($string); + } + + return $this->safeWordwrap($string, $maxLineLength, "\r\n"); + } + + /** + * Encode stream $in to stream $out. + * + * @param int $firstLineOffset ignored + * @param int $maxLineLength optional, 0 means no wrapping will occur + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + $leftOver = ''; + while (false !== $bytes = $os->read(8192)) { + $toencode = $leftOver.$bytes; + if ($this->canonical) { + $toencode = $this->canonicalize($toencode); + } + $wrapped = $this->safeWordwrap($toencode, $maxLineLength, "\r\n"); + $lastLinePos = strrpos($wrapped, "\r\n"); + $leftOver = substr($wrapped, $lastLinePos); + $wrapped = substr($wrapped, 0, $lastLinePos); + + $is->write($wrapped); + } + if (\strlen($leftOver)) { + $is->write($leftOver); + } + } + + /** + * Get the name of this encoding scheme. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Not used. + */ + public function charsetChanged($charset) + { + } + + /** + * A safer (but weaker) wordwrap for unicode. + * + * @param string $string + * @param int $length + * @param string $le + * + * @return string + */ + private function safeWordwrap($string, $length = 75, $le = "\r\n") + { + if (0 >= $length) { + return $string; + } + + $originalLines = explode($le, $string); + + $lines = []; + $lineCount = 0; + + foreach ($originalLines as $originalLine) { + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + + //$chunks = preg_split('/(?<=[\ \t,\.!\?\-&\+\/])/', $originalLine); + $chunks = preg_split('/(?<=\s)/', $originalLine); + + foreach ($chunks as $chunk) { + if (0 != \strlen($currentLine) + && \strlen($currentLine.$chunk) > $length) { + $lines[] = ''; + $currentLine = &$lines[$lineCount++]; + } + $currentLine .= $chunk; + } + } + + return implode("\r\n", $lines); + } + + /** + * Canonicalize string input (fix CRLF). + * + * @param string $string + * + * @return string + */ + private function canonicalize($string) + { + return str_replace( + ["\r\n", "\r", "\n"], + ["\n", "\n", "\r\n"], + $string + ); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php new file mode 100644 index 00000000..465ffd87 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php @@ -0,0 +1,134 @@ +dotEscape = $dotEscape; + parent::__construct($charStream, $filter); + } + + public function __sleep() + { + return ['charStream', 'filter', 'dotEscape']; + } + + protected function getSafeMapShareId() + { + return static::class.($this->dotEscape ? '.dotEscape' : ''); + } + + protected function initSafeMap() + { + parent::initSafeMap(); + if ($this->dotEscape) { + /* Encode . as =2e for buggy remote servers */ + unset($this->safeMap[0x2e]); + } + } + + /** + * Encode stream $in to stream $out. + * + * QP encoded strings have a maximum line length of 76 characters. + * If the first line needs to be shorter, indicate the difference with + * $firstLineOffset. + * + * @param Swift_OutputByteStream $os output stream + * @param Swift_InputByteStream $is input stream + * @param int $firstLineOffset + * @param int $maxLineLength + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + if ($maxLineLength > 76 || $maxLineLength <= 0) { + $maxLineLength = 76; + } + + $thisLineLength = $maxLineLength - $firstLineOffset; + + $this->charStream->flushContents(); + $this->charStream->importByteStream($os); + + $currentLine = ''; + $prepend = ''; + $size = $lineLen = 0; + + while (false !== $bytes = $this->nextSequence()) { + // If we're filtering the input + if (isset($this->filter)) { + // If we can't filter because we need more bytes + while ($this->filter->shouldBuffer($bytes)) { + // Then collect bytes into the buffer + if (false === $moreBytes = $this->nextSequence(1)) { + break; + } + + foreach ($moreBytes as $b) { + $bytes[] = $b; + } + } + // And filter them + $bytes = $this->filter->filter($bytes); + } + + $enc = $this->encodeByteSequence($bytes, $size); + + $i = strpos($enc, '=0D=0A'); + $newLineLength = $lineLen + (false === $i ? $size : $i); + + if ($currentLine && $newLineLength >= $thisLineLength) { + $is->write($prepend.$this->standardize($currentLine)); + $currentLine = ''; + $prepend = "=\r\n"; + $thisLineLength = $maxLineLength; + $lineLen = 0; + } + + $currentLine .= $enc; + + if (false === $i) { + $lineLen += $size; + } else { + // 6 is the length of '=0D=0A'. + $lineLen = $size - strrpos($enc, '=0D=0A') - 6; + } + } + if (\strlen($currentLine)) { + $is->write($prepend.$this->standardize($currentLine)); + } + } + + /** + * Get the name of this encoding scheme. + * Returns the string 'quoted-printable'. + * + * @return string + */ + public function getName() + { + return 'quoted-printable'; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php new file mode 100644 index 00000000..f3ece43a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php @@ -0,0 +1,96 @@ + + */ +class Swift_Mime_ContentEncoder_QpContentEncoderProxy implements Swift_Mime_ContentEncoder +{ + /** + * @var Swift_Mime_ContentEncoder_QpContentEncoder + */ + private $safeEncoder; + + /** + * @var Swift_Mime_ContentEncoder_NativeQpContentEncoder + */ + private $nativeEncoder; + + /** + * @var string|null + */ + private $charset; + + /** + * Constructor. + * + * @param string|null $charset + */ + public function __construct(Swift_Mime_ContentEncoder_QpContentEncoder $safeEncoder, Swift_Mime_ContentEncoder_NativeQpContentEncoder $nativeEncoder, $charset) + { + $this->safeEncoder = $safeEncoder; + $this->nativeEncoder = $nativeEncoder; + $this->charset = $charset; + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->safeEncoder = clone $this->safeEncoder; + $this->nativeEncoder = clone $this->nativeEncoder; + } + + /** + * {@inheritdoc} + */ + public function charsetChanged($charset) + { + $this->charset = $charset; + $this->safeEncoder->charsetChanged($charset); + } + + /** + * {@inheritdoc} + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + $this->getEncoder()->encodeByteStream($os, $is, $firstLineOffset, $maxLineLength); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'quoted-printable'; + } + + /** + * {@inheritdoc} + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return $this->getEncoder()->encodeString($string, $firstLineOffset, $maxLineLength); + } + + /** + * @return Swift_Mime_ContentEncoder + */ + private function getEncoder() + { + return 'utf-8' === $this->charset ? $this->nativeEncoder : $this->safeEncoder; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php new file mode 100644 index 00000000..870e7f41 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php @@ -0,0 +1,65 @@ + + */ +class Swift_Mime_ContentEncoder_RawContentEncoder implements Swift_Mime_ContentEncoder +{ + /** + * Encode a given string to produce an encoded string. + * + * @param string $string + * @param int $firstLineOffset ignored + * @param int $maxLineLength ignored + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return $string; + } + + /** + * Encode stream $in to stream $out. + * + * @param int $firstLineOffset ignored + * @param int $maxLineLength ignored + */ + public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) + { + while (false !== ($bytes = $os->read(8192))) { + $is->write($bytes); + } + } + + /** + * Get the name of this encoding scheme. + * + * @return string + */ + public function getName() + { + return 'raw'; + } + + /** + * Not used. + */ + public function charsetChanged($charset) + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php new file mode 100644 index 00000000..42a51770 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php @@ -0,0 +1,41 @@ +setDisposition('inline'); + $this->setId($this->getId()); + } + + /** + * Get the nesting level of this EmbeddedFile. + * + * Returns {@see LEVEL_RELATED}. + * + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_RELATED; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php new file mode 100644 index 00000000..1a952ece --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php @@ -0,0 +1,22 @@ +getName(), "\r\n"); + mb_internal_encoding($old); + + return $newstring; + } + + return parent::encodeString($string, $firstLineOffset, $maxLineLength); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php new file mode 100644 index 00000000..378c4805 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php @@ -0,0 +1,65 @@ +safeMap[$byte] = \chr($byte); + } + } + + /** + * Get the name of this encoding scheme. + * + * Returns the string 'Q'. + * + * @return string + */ + public function getName() + { + return 'Q'; + } + + /** + * Takes an unencoded string and produces a QP encoded string from it. + * + * @param string $string string to encode + * @param int $firstLineOffset optional + * @param int $maxLineLength optional, 0 indicates the default of 76 chars + * + * @return string + */ + public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) + { + return str_replace([' ', '=20', "=\r\n"], ['_', '_', "\r\n"], + parent::encodeString($string, $firstLineOffset, $maxLineLength) + ); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php new file mode 100644 index 00000000..25740d11 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php @@ -0,0 +1,486 @@ +clearCachedValueIf($charset != $this->charset); + $this->charset = $charset; + if (isset($this->encoder)) { + $this->encoder->charsetChanged($charset); + } + } + + /** + * Get the character set used in this Header. + * + * @return string + */ + public function getCharset() + { + return $this->charset; + } + + /** + * Set the language used in this Header. + * + * For example, for US English, 'en-us'. + * This can be unspecified. + * + * @param string $lang + */ + public function setLanguage($lang) + { + $this->clearCachedValueIf($this->lang != $lang); + $this->lang = $lang; + } + + /** + * Get the language used in this Header. + * + * @return string + */ + public function getLanguage() + { + return $this->lang; + } + + /** + * Set the encoder used for encoding the header. + */ + public function setEncoder(Swift_Mime_HeaderEncoder $encoder) + { + $this->encoder = $encoder; + $this->setCachedValue(null); + } + + /** + * Get the encoder used for encoding this Header. + * + * @return Swift_Mime_HeaderEncoder + */ + public function getEncoder() + { + return $this->encoder; + } + + /** + * Get the name of this header (e.g. charset). + * + * @return string + */ + public function getFieldName() + { + return $this->name; + } + + /** + * Set the maximum length of lines in the header (excluding EOL). + * + * @param int $lineLength + */ + public function setMaxLineLength($lineLength) + { + $this->clearCachedValueIf($this->lineLength != $lineLength); + $this->lineLength = $lineLength; + } + + /** + * Get the maximum permitted length of lines in this Header. + * + * @return int + */ + public function getMaxLineLength() + { + return $this->lineLength; + } + + /** + * Get this Header rendered as a RFC 2822 compliant string. + * + * @return string + * + * @throws Swift_RfcComplianceException + */ + public function toString() + { + return $this->tokensToString($this->toTokens()); + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Set the name of this Header field. + * + * @param string $name + */ + protected function setFieldName($name) + { + $this->name = $name; + } + + /** + * Produces a compliant, formatted RFC 2822 'phrase' based on the string given. + * + * @param string $string as displayed + * @param string $charset of the text + * @param bool $shorten the first line to make remove for header name + * + * @return string + */ + protected function createPhrase(Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder = null, $shorten = false) + { + // Treat token as exactly what was given + $phraseStr = $string; + // If it's not valid + + if (!preg_match('/^'.self::PHRASE_PATTERN.'$/D', $phraseStr)) { + // .. but it is just ascii text, try escaping some characters + // and make it a quoted-string + if (preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $phraseStr)) { + $phraseStr = $this->escapeSpecials($phraseStr, ['"']); + $phraseStr = '"'.$phraseStr.'"'; + } else { + // ... otherwise it needs encoding + // Determine space remaining on line if first line + if ($shorten) { + $usedLength = \strlen($header->getFieldName().': '); + } else { + $usedLength = 0; + } + $phraseStr = $this->encodeWords($header, $string, $usedLength); + } + } + + return $phraseStr; + } + + /** + * Escape special characters in a string (convert to quoted-pairs). + * + * @param string $token + * @param string[] $include additional chars to escape + * + * @return string + */ + private function escapeSpecials($token, $include = []) + { + foreach (array_merge(['\\'], $include) as $char) { + $token = str_replace($char, '\\'.$char, $token); + } + + return $token; + } + + /** + * Encode needed word tokens within a string of input. + * + * @param string $input + * @param string $usedLength optional + * + * @return string + */ + protected function encodeWords(Swift_Mime_Header $header, $input, $usedLength = -1) + { + $value = ''; + + $tokens = $this->getEncodableWordTokens($input); + + foreach ($tokens as $token) { + // See RFC 2822, Sect 2.2 (really 2.2 ??) + if ($this->tokenNeedsEncoding($token)) { + // Don't encode starting WSP + $firstChar = substr($token, 0, 1); + switch ($firstChar) { + case ' ': + case "\t": + $value .= $firstChar; + $token = substr($token, 1); + } + + if (-1 == $usedLength) { + $usedLength = \strlen($header->getFieldName().': ') + \strlen($value); + } + $value .= $this->getTokenAsEncodedWord($token, $usedLength); + + $header->setMaxLineLength(76); // Forcefully override + } else { + $value .= $token; + } + } + + return $value; + } + + /** + * Test if a token needs to be encoded or not. + * + * @param string $token + * + * @return bool + */ + protected function tokenNeedsEncoding($token) + { + return preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $token); + } + + /** + * Splits a string into tokens in blocks of words which can be encoded quickly. + * + * @param string $string + * + * @return string[] + */ + protected function getEncodableWordTokens($string) + { + $tokens = []; + + $encodedToken = ''; + // Split at all whitespace boundaries + foreach (preg_split('~(?=[\t ])~', $string ?? '') as $token) { + if ($this->tokenNeedsEncoding($token)) { + $encodedToken .= $token; + } else { + if (\strlen($encodedToken) > 0) { + $tokens[] = $encodedToken; + $encodedToken = ''; + } + $tokens[] = $token; + } + } + if (\strlen($encodedToken)) { + $tokens[] = $encodedToken; + } + + return $tokens; + } + + /** + * Get a token as an encoded word for safe insertion into headers. + * + * @param string $token token to encode + * @param int $firstLineOffset optional + * + * @return string + */ + protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) + { + // Adjust $firstLineOffset to account for space needed for syntax + $charsetDecl = $this->charset; + if (isset($this->lang)) { + $charsetDecl .= '*'.$this->lang; + } + $encodingWrapperLength = \strlen( + '=?'.$charsetDecl.'?'.$this->encoder->getName().'??=' + ); + + if ($firstLineOffset >= 75) { + //Does this logic need to be here? + $firstLineOffset = 0; + } + + $encodedTextLines = explode("\r\n", + $this->encoder->encodeString( + $token, $firstLineOffset, 75 - $encodingWrapperLength, $this->charset + ) ?? '' + ); + + if ('iso-2022-jp' !== strtolower($this->charset ?? '')) { + // special encoding for iso-2022-jp using mb_encode_mimeheader + foreach ($encodedTextLines as $lineNum => $line) { + $encodedTextLines[$lineNum] = '=?'.$charsetDecl. + '?'.$this->encoder->getName(). + '?'.$line.'?='; + } + } + + return implode("\r\n ", $encodedTextLines); + } + + /** + * Generates tokens from the given string which include CRLF as individual tokens. + * + * @param string $token + * + * @return string[] + */ + protected function generateTokenLines($token) + { + return preg_split('~(\r\n)~', $token ?? '', -1, PREG_SPLIT_DELIM_CAPTURE); + } + + /** + * Set a value into the cache. + * + * @param string $value + */ + protected function setCachedValue($value) + { + $this->cachedValue = $value; + } + + /** + * Get the value in the cache. + * + * @return string + */ + protected function getCachedValue() + { + return $this->cachedValue; + } + + /** + * Clear the cached value if $condition is met. + * + * @param bool $condition + */ + protected function clearCachedValueIf($condition) + { + if ($condition) { + $this->setCachedValue(null); + } + } + + /** + * Generate a list of all tokens in the final header. + * + * @param string $string The string to tokenize + * + * @return array An array of tokens as strings + */ + protected function toTokens($string = null) + { + if (null === $string) { + $string = $this->getFieldBody(); + } + + $tokens = []; + + // Generate atoms; split at all invisible boundaries followed by WSP + foreach (preg_split('~(?=[ \t])~', $string ?? '') as $token) { + $newTokens = $this->generateTokenLines($token); + foreach ($newTokens as $newToken) { + $tokens[] = $newToken; + } + } + + return $tokens; + } + + /** + * Takes an array of tokens which appear in the header and turns them into + * an RFC 2822 compliant string, adding FWSP where needed. + * + * @param string[] $tokens + * + * @return string + */ + private function tokensToString(array $tokens) + { + $lineCount = 0; + $headerLines = []; + $headerLines[] = $this->name.': '; + $currentLine = &$headerLines[$lineCount++]; + + // Build all tokens back into compliant header + foreach ($tokens as $i => $token) { + // Line longer than specified maximum or token was just a new line + if (("\r\n" == $token) || + ($i > 0 && \strlen($currentLine.$token) > $this->lineLength) + && 0 < \strlen($currentLine)) { + $headerLines[] = ''; + $currentLine = &$headerLines[$lineCount++]; + } + + // Append token to the line + if ("\r\n" != $token) { + $currentLine .= $token; + } + } + + // Implode with FWS (RFC 2822, 2.2.3) + return implode("\r\n", $headerLines)."\r\n"; + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + if ($this->encoder) { + $this->encoder = clone $this->encoder; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php new file mode 100644 index 00000000..efe1dad6 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php @@ -0,0 +1,113 @@ +setFieldName($name); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_DATE; + } + + /** + * Set the model for the field body. + * + * @param DateTimeInterface $model + */ + public function setFieldBodyModel($model) + { + $this->setDateTime($model); + } + + /** + * Get the model for the field body. + * + * @return DateTimeImmutable + */ + public function getFieldBodyModel() + { + return $this->getDateTime(); + } + + /** + * Get the date-time representing the Date in this Header. + * + * @return DateTimeImmutable + */ + public function getDateTime() + { + return $this->dateTime; + } + + /** + * Set the date-time of the Date in this Header. + * + * If a DateTime instance is provided, it is converted to DateTimeImmutable. + */ + public function setDateTime(DateTimeInterface $dateTime) + { + $this->clearCachedValueIf($this->getCachedValue() != $dateTime->format(DateTime::RFC2822)); + if ($dateTime instanceof DateTime) { + $immutable = new DateTimeImmutable('@'.$dateTime->getTimestamp()); + $dateTime = $immutable->setTimezone($dateTime->getTimezone()); + } + $this->dateTime = $dateTime; + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * + * @see toString() + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + if (isset($this->dateTime)) { + $this->setCachedValue($this->dateTime->format(DateTime::RFC2822)); + } + } + + return $this->getCachedValue(); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php new file mode 100644 index 00000000..4fcdff41 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php @@ -0,0 +1,189 @@ +setFieldName($name); + $this->emailValidator = $emailValidator; + $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_ID; + } + + /** + * Set the model for the field body. + * + * This method takes a string ID, or an array of IDs. + * + * @param mixed $model + * + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setId($model); + } + + /** + * Get the model for the field body. + * + * This method returns an array of IDs + * + * @return array + */ + public function getFieldBodyModel() + { + return $this->getIds(); + } + + /** + * Set the ID used in the value of this header. + * + * @param string|array $id + * + * @throws Swift_RfcComplianceException + */ + public function setId($id) + { + $this->setIds(\is_array($id) ? $id : [$id]); + } + + /** + * Get the ID used in the value of this Header. + * + * If multiple IDs are set only the first is returned. + * + * @return string + */ + public function getId() + { + if (\count($this->ids) > 0) { + return $this->ids[0]; + } + } + + /** + * Set a collection of IDs to use in the value of this Header. + * + * @param string[] $ids + * + * @throws Swift_RfcComplianceException + */ + public function setIds(array $ids) + { + $actualIds = []; + + foreach ($ids as $id) { + $this->assertValidId($id); + $actualIds[] = $id; + } + + $this->clearCachedValueIf($this->ids != $actualIds); + $this->ids = $actualIds; + } + + /** + * Get the list of IDs used in this Header. + * + * @return string[] + */ + public function getIds() + { + return $this->ids; + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@see toString()} for that). + * + * @see toString() + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + $angleAddrs = []; + + foreach ($this->ids as $id) { + $angleAddrs[] = '<'.$this->addressEncoder->encodeString($id).'>'; + } + + $this->setCachedValue(implode(' ', $angleAddrs)); + } + + return $this->getCachedValue(); + } + + /** + * Throws an Exception if the id passed does not comply with RFC 2822. + * + * @param string $id + * + * @throws Swift_RfcComplianceException + */ + private function assertValidId($id) + { + $emailValidation = class_exists(MessageIDValidation::class) ? new MessageIDValidation() : new RFCValidation(); + + if (!$this->emailValidator->isValid($id, $emailValidation)) { + throw new Swift_RfcComplianceException('Invalid ID given <'.$id.'>'); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php new file mode 100644 index 00000000..ddd5e8cf --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php @@ -0,0 +1,358 @@ +setFieldName($name); + $this->setEncoder($encoder); + $this->emailValidator = $emailValidator; + $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_MAILBOX; + } + + /** + * Set the model for the field body. + * + * This method takes a string, or an array of addresses. + * + * @param mixed $model + * + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setNameAddresses($model); + } + + /** + * Get the model for the field body. + * + * This method returns an associative array like {@link getNameAddresses()} + * + * @throws Swift_RfcComplianceException + * + * @return array + */ + public function getFieldBodyModel() + { + return $this->getNameAddresses(); + } + + /** + * Set a list of mailboxes to be shown in this Header. + * + * The mailboxes can be a simple array of addresses, or an array of + * key=>value pairs where (email => personalName). + * Example: + * + * setNameAddresses(array( + * 'chris@swiftmailer.org' => 'Chris Corbyn', + * 'mark@swiftmailer.org' //No associated personal name + * )); + * ?> + * + * + * @see __construct() + * @see setAddresses() + * @see setValue() + * + * @param string|string[] $mailboxes + * + * @throws Swift_RfcComplianceException + */ + public function setNameAddresses($mailboxes) + { + $this->mailboxes = $this->normalizeMailboxes((array) $mailboxes); + $this->setCachedValue(null); //Clear any cached value + } + + /** + * Get the full mailbox list of this Header as an array of valid RFC 2822 strings. + * + * Example: + * + * 'Chris Corbyn', + * 'mark@swiftmailer.org' => 'Mark Corbyn') + * ); + * print_r($header->getNameAddressStrings()); + * // array ( + * // 0 => Chris Corbyn , + * // 1 => Mark Corbyn + * // ) + * ?> + * + * + * @see getNameAddresses() + * @see toString() + * + * @throws Swift_RfcComplianceException + * + * @return string[] + */ + public function getNameAddressStrings() + { + return $this->createNameAddressStrings($this->getNameAddresses()); + } + + /** + * Get all mailboxes in this Header as key=>value pairs. + * + * The key is the address and the value is the name (or null if none set). + * Example: + * + * 'Chris Corbyn', + * 'mark@swiftmailer.org' => 'Mark Corbyn') + * ); + * print_r($header->getNameAddresses()); + * // array ( + * // chris@swiftmailer.org => Chris Corbyn, + * // mark@swiftmailer.org => Mark Corbyn + * // ) + * ?> + * + * + * @see getAddresses() + * @see getNameAddressStrings() + * + * @return string[] + */ + public function getNameAddresses() + { + return $this->mailboxes; + } + + /** + * Makes this Header represent a list of plain email addresses with no names. + * + * Example: + * + * setAddresses( + * array('one@domain.tld', 'two@domain.tld', 'three@domain.tld') + * ); + * ?> + * + * + * @see setNameAddresses() + * @see setValue() + * + * @param string[] $addresses + * + * @throws Swift_RfcComplianceException + */ + public function setAddresses($addresses) + { + $this->setNameAddresses(array_values((array) $addresses)); + } + + /** + * Get all email addresses in this Header. + * + * @see getNameAddresses() + * + * @return string[] + */ + public function getAddresses() + { + return array_keys($this->mailboxes); + } + + /** + * Remove one or more addresses from this Header. + * + * @param string|string[] $addresses + */ + public function removeAddresses($addresses) + { + $this->setCachedValue(null); + foreach ((array) $addresses as $address) { + unset($this->mailboxes[$address]); + } + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * + * @see toString() + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + public function getFieldBody() + { + // Compute the string value of the header only if needed + if (null === $this->getCachedValue()) { + $this->setCachedValue($this->createMailboxListString($this->mailboxes)); + } + + return $this->getCachedValue(); + } + + /** + * Normalizes a user-input list of mailboxes into consistent key=>value pairs. + * + * @param string[] $mailboxes + * + * @return string[] + */ + protected function normalizeMailboxes(array $mailboxes) + { + $actualMailboxes = []; + + foreach ($mailboxes as $key => $value) { + if (\is_string($key)) { + //key is email addr + $address = $key; + $name = $value; + } else { + $address = $value; + $name = null; + } + $this->assertValidAddress($address); + $actualMailboxes[$address] = $name; + } + + return $actualMailboxes; + } + + /** + * Produces a compliant, formatted display-name based on the string given. + * + * @param string $displayName as displayed + * @param bool $shorten the first line to make remove for header name + * + * @return string + */ + protected function createDisplayNameString($displayName, $shorten = false) + { + return $this->createPhrase($this, $displayName, $this->getCharset(), $this->getEncoder(), $shorten); + } + + /** + * Creates a string form of all the mailboxes in the passed array. + * + * @param string[] $mailboxes + * + * @throws Swift_RfcComplianceException + * + * @return string + */ + protected function createMailboxListString(array $mailboxes) + { + return implode(', ', $this->createNameAddressStrings($mailboxes)); + } + + /** + * Redefine the encoding requirements for mailboxes. + * + * All "specials" must be encoded as the full header value will not be quoted + * + * @see RFC 2822 3.2.1 + * + * @param string $token + * + * @return bool + */ + protected function tokenNeedsEncoding($token) + { + return preg_match('/[()<>\[\]:;@\,."]/', $token) || parent::tokenNeedsEncoding($token); + } + + /** + * Return an array of strings conforming the the name-addr spec of RFC 2822. + * + * @param string[] $mailboxes + * + * @return string[] + */ + private function createNameAddressStrings(array $mailboxes) + { + $strings = []; + + foreach ($mailboxes as $email => $name) { + $mailboxStr = $this->addressEncoder->encodeString($email); + if (null !== $name) { + $nameStr = $this->createDisplayNameString($name, empty($strings)); + $mailboxStr = $nameStr.' <'.$mailboxStr.'>'; + } + $strings[] = $mailboxStr; + } + + return $strings; + } + + /** + * Throws an Exception if the address passed does not comply with RFC 2822. + * + * @param string $address + * + * @throws Swift_RfcComplianceException if invalid + */ + private function assertValidAddress($address) + { + if (!$this->emailValidator->isValid($address, new RFCValidation())) { + throw new Swift_RfcComplianceException('Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.'); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php new file mode 100644 index 00000000..fafb5bae --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php @@ -0,0 +1,135 @@ + + * + * @deprecated since SwiftMailer 6.1.0; use Swift_Signers_DKIMSigner instead. + */ +class Swift_Mime_Headers_OpenDKIMHeader implements Swift_Mime_Header +{ + /** + * The value of this Header. + * + * @var string + */ + private $value; + + /** + * The name of this Header. + * + * @var string + */ + private $fieldName; + + /** + * @param string $name + */ + public function __construct($name) + { + $this->fieldName = $name; + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_TEXT; + } + + /** + * Set the model for the field body. + * + * This method takes a string for the field value. + * + * @param string $model + */ + public function setFieldBodyModel($model) + { + $this->setValue($model); + } + + /** + * Get the model for the field body. + * + * This method returns a string. + * + * @return string + */ + public function getFieldBodyModel() + { + return $this->getValue(); + } + + /** + * Get the (unencoded) value of this header. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set the (unencoded) value of this header. + * + * @param string $value + */ + public function setValue($value) + { + $this->value = $value; + } + + /** + * Get the value of this header prepared for rendering. + * + * @return string + */ + public function getFieldBody() + { + return $this->value; + } + + /** + * Get this Header rendered as a RFC 2822 compliant string. + * + * @return string + */ + public function toString() + { + return $this->fieldName.': '.$this->value."\r\n"; + } + + /** + * Set the Header FieldName. + * + * @see Swift_Mime_Header::getFieldName() + */ + public function getFieldName() + { + return $this->fieldName; + } + + /** + * Ignored. + */ + public function setCharset($charset) + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php new file mode 100644 index 00000000..47c15e6c --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php @@ -0,0 +1,255 @@ +paramEncoder = $paramEncoder; + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_PARAMETERIZED; + } + + /** + * Set the character set used in this Header. + * + * @param string $charset + */ + public function setCharset($charset) + { + parent::setCharset($charset); + if (isset($this->paramEncoder)) { + $this->paramEncoder->charsetChanged($charset); + } + } + + /** + * Set the value of $parameter. + * + * @param string $parameter + * @param string $value + */ + public function setParameter($parameter, $value) + { + $this->setParameters(array_merge($this->getParameters(), [$parameter => $value])); + } + + /** + * Get the value of $parameter. + * + * @param string $parameter + * + * @return string + */ + public function getParameter($parameter) + { + $params = $this->getParameters(); + + return $params[$parameter] ?? null; + } + + /** + * Set an associative array of parameter names mapped to values. + * + * @param string[] $parameters + */ + public function setParameters(array $parameters) + { + $this->clearCachedValueIf($this->params != $parameters); + $this->params = $parameters; + } + + /** + * Returns an associative array of parameter names mapped to values. + * + * @return string[] + */ + public function getParameters() + { + return $this->params; + } + + /** + * Get the value of this header prepared for rendering. + * + * @return string + */ + public function getFieldBody() //TODO: Check caching here + { + $body = parent::getFieldBody(); + foreach ($this->params as $name => $value) { + if (null !== $value) { + // Add the parameter + $body .= '; '.$this->createParameter($name, $value); + } + } + + return $body; + } + + /** + * Generate a list of all tokens in the final header. + * + * This doesn't need to be overridden in theory, but it is for implementation + * reasons to prevent potential breakage of attributes. + * + * @param string $string The string to tokenize + * + * @return array An array of tokens as strings + */ + protected function toTokens($string = null) + { + $tokens = parent::toTokens(parent::getFieldBody()); + + // Try creating any parameters + foreach ($this->params as $name => $value) { + if (null !== $value) { + // Add the semi-colon separator + $tokens[\count($tokens) - 1] .= ';'; + $tokens = array_merge($tokens, $this->generateTokenLines( + ' '.$this->createParameter($name, $value) + )); + } + } + + return $tokens; + } + + /** + * Render a RFC 2047 compliant header parameter from the $name and $value. + * + * @param string $name + * @param string $value + * + * @return string + */ + private function createParameter($name, $value) + { + $origValue = $value; + + $encoded = false; + // Allow room for parameter name, indices, "=" and DQUOTEs + $maxValueLength = $this->getMaxLineLength() - \strlen($name.'=*N"";') - 1; + $firstLineOffset = 0; + + // If it's not already a valid parameter value... + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { + // TODO: text, or something else?? + // ... and it's not ascii + if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) { + $encoded = true; + // Allow space for the indices, charset and language + $maxValueLength = $this->getMaxLineLength() - \strlen($name.'*N*="";') - 1; + $firstLineOffset = \strlen( + $this->getCharset()."'".$this->getLanguage()."'" + ); + } + } + + // Encode if we need to + if ($encoded || \strlen($value) > $maxValueLength) { + if (isset($this->paramEncoder)) { + $value = $this->paramEncoder->encodeString( + $origValue, $firstLineOffset, $maxValueLength, $this->getCharset() + ); + } else { + // We have to go against RFC 2183/2231 in some areas for interoperability + $value = $this->getTokenAsEncodedWord($origValue); + $encoded = false; + } + } + + $valueLines = isset($this->paramEncoder) ? explode("\r\n", $value) : [$value]; + + // Need to add indices + if (\count($valueLines) > 1) { + $paramLines = []; + foreach ($valueLines as $i => $line) { + $paramLines[] = $name.'*'.$i. + $this->getEndOfParameterValue($line, true, 0 == $i); + } + + return implode(";\r\n ", $paramLines); + } else { + return $name.$this->getEndOfParameterValue( + $valueLines[0], $encoded, true + ); + } + } + + /** + * Returns the parameter value from the "=" and beyond. + * + * @param string $value to append + * @param bool $encoded + * @param bool $firstLine + * + * @return string + */ + private function getEndOfParameterValue($value, $encoded = false, $firstLine = false) + { + if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { + $value = '"'.$value.'"'; + } + $prepend = '='; + if ($encoded) { + $prepend = '*='; + if ($firstLine) { + $prepend = '*='.$this->getCharset()."'".$this->getLanguage(). + "'"; + } + } + + return $prepend.$value; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php new file mode 100644 index 00000000..81b421ee --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php @@ -0,0 +1,153 @@ +setFieldName($name); + $this->emailValidator = $emailValidator; + $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_PATH; + } + + /** + * Set the model for the field body. + * This method takes a string for an address. + * + * @param string $model + * + * @throws Swift_RfcComplianceException + */ + public function setFieldBodyModel($model) + { + $this->setAddress($model); + } + + /** + * Get the model for the field body. + * This method returns a string email address. + * + * @return mixed + */ + public function getFieldBodyModel() + { + return $this->getAddress(); + } + + /** + * Set the Address which should appear in this Header. + * + * @param string $address + * + * @throws Swift_RfcComplianceException + */ + public function setAddress($address) + { + if (null === $address) { + $this->address = null; + } elseif ('' == $address) { + $this->address = ''; + } else { + $this->assertValidAddress($address); + $this->address = $address; + } + $this->setCachedValue(null); + } + + /** + * Get the address which is used in this Header (if any). + * + * Null is returned if no address is set. + * + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Get the string value of the body in this Header. + * + * This is not necessarily RFC 2822 compliant since folding white space will + * not be added at this stage (see {@link toString()} for that). + * + * @see toString() + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + if (isset($this->address)) { + $address = $this->addressEncoder->encodeString($this->address); + $this->setCachedValue('<'.$address.'>'); + } + } + + return $this->getCachedValue(); + } + + /** + * Throws an Exception if the address passed does not comply with RFC 2822. + * + * @param string $address + * + * @throws Swift_RfcComplianceException If address is invalid + */ + private function assertValidAddress($address) + { + if (!$this->emailValidator->isValid($address, new RFCValidation())) { + throw new Swift_RfcComplianceException('Address set in PathHeader does not comply with addr-spec of RFC 2822.'); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php new file mode 100644 index 00000000..64f160de --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php @@ -0,0 +1,109 @@ +setFieldName($name); + $this->setEncoder($encoder); + } + + /** + * Get the type of Header that this instance represents. + * + * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX + * @see TYPE_DATE, TYPE_ID, TYPE_PATH + * + * @return int + */ + public function getFieldType() + { + return self::TYPE_TEXT; + } + + /** + * Set the model for the field body. + * + * This method takes a string for the field value. + * + * @param string $model + */ + public function setFieldBodyModel($model) + { + $this->setValue($model); + } + + /** + * Get the model for the field body. + * + * This method returns a string. + * + * @return string + */ + public function getFieldBodyModel() + { + return $this->getValue(); + } + + /** + * Get the (unencoded) value of this header. + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Set the (unencoded) value of this header. + * + * @param string $value + */ + public function setValue($value) + { + $this->clearCachedValueIf($this->value != $value); + $this->value = $value; + } + + /** + * Get the value of this header prepared for rendering. + * + * @return string + */ + public function getFieldBody() + { + if (!$this->getCachedValue()) { + $this->setCachedValue( + $this->encodeWords($this, $this->value) + ); + } + + return $this->getCachedValue(); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/IdGenerator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/IdGenerator.php new file mode 100644 index 00000000..3ce35f27 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/IdGenerator.php @@ -0,0 +1,54 @@ +idRight = $idRight; + } + + /** + * Returns the right-hand side of the "@" used in all generated IDs. + * + * @return string + */ + public function getIdRight() + { + return $this->idRight; + } + + /** + * Sets the right-hand side of the "@" to use in all generated IDs. + * + * @param string $idRight + */ + public function setIdRight($idRight) + { + $this->idRight = $idRight; + } + + /** + * @return string + */ + public function generateId() + { + // 32 hex values for the left part + return bin2hex(random_bytes(16)).'@'.$this->idRight; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php new file mode 100644 index 00000000..d0b2e658 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php @@ -0,0 +1,199 @@ +setContentType('text/plain'); + if (null !== $charset) { + $this->setCharset($charset); + } + } + + /** + * Set the body of this entity, either as a string, or as an instance of + * {@link Swift_OutputByteStream}. + * + * @param mixed $body + * @param string $contentType optional + * @param string $charset optional + * + * @return $this + */ + public function setBody($body, $contentType = null, $charset = null) + { + if (isset($charset)) { + $this->setCharset($charset); + } + $body = $this->convertString($body); + + parent::setBody($body, $contentType); + + return $this; + } + + /** + * Get the character set of this entity. + * + * @return string + */ + public function getCharset() + { + return $this->getHeaderParameter('Content-Type', 'charset'); + } + + /** + * Set the character set of this entity. + * + * @param string $charset + * + * @return $this + */ + public function setCharset($charset) + { + $this->setHeaderParameter('Content-Type', 'charset', $charset); + if ($charset !== $this->userCharset) { + $this->clearCache(); + } + $this->userCharset = $charset; + parent::charsetChanged($charset); + + return $this; + } + + /** + * Get the format of this entity (i.e. flowed or fixed). + * + * @return string + */ + public function getFormat() + { + return $this->getHeaderParameter('Content-Type', 'format'); + } + + /** + * Set the format of this entity (flowed or fixed). + * + * @param string $format + * + * @return $this + */ + public function setFormat($format) + { + $this->setHeaderParameter('Content-Type', 'format', $format); + $this->userFormat = $format; + + return $this; + } + + /** + * Test if delsp is being used for this entity. + * + * @return bool + */ + public function getDelSp() + { + return 'yes' === $this->getHeaderParameter('Content-Type', 'delsp'); + } + + /** + * Turn delsp on or off for this entity. + * + * @param bool $delsp + * + * @return $this + */ + public function setDelSp($delsp = true) + { + $this->setHeaderParameter('Content-Type', 'delsp', $delsp ? 'yes' : null); + $this->userDelSp = $delsp; + + return $this; + } + + /** + * Get the nesting level of this entity. + * + * @see LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED + * + * @return int + */ + public function getNestingLevel() + { + return $this->nestingLevel; + } + + /** + * Receive notification that the charset has changed on this document, or a + * parent document. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->setCharset($charset); + } + + /** Fix the content-type and encoding of this entity */ + protected function fixHeaders() + { + parent::fixHeaders(); + if (\count($this->getChildren())) { + $this->setHeaderParameter('Content-Type', 'charset', null); + $this->setHeaderParameter('Content-Type', 'format', null); + $this->setHeaderParameter('Content-Type', 'delsp', null); + } else { + $this->setCharset($this->userCharset); + $this->setFormat($this->userFormat); + $this->setDelSp($this->userDelSp); + } + } + + /** Set the nesting level of this entity */ + protected function setNestingLevel($level) + { + $this->nestingLevel = $level; + } + + /** Encode charset when charset is not utf-8 */ + protected function convertString($string) + { + $charset = strtolower($this->getCharset() ?? ''); + if (!\in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) { + return mb_convert_encoding($string, $charset, 'utf-8'); + } + + return $string; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php new file mode 100644 index 00000000..ab3ce6b1 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php @@ -0,0 +1,195 @@ +encoder = $encoder; + $this->paramEncoder = $paramEncoder; + $this->emailValidator = $emailValidator; + $this->charset = $charset; + $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); + } + + /** + * Create a new Mailbox Header with a list of $addresses. + * + * @param string $name + * @param array|string|null $addresses + * + * @return Swift_Mime_Header + */ + public function createMailboxHeader($name, $addresses = null) + { + $header = new Swift_Mime_Headers_MailboxHeader($name, $this->encoder, $this->emailValidator, $this->addressEncoder); + if (isset($addresses)) { + $header->setFieldBodyModel($addresses); + } + $this->setHeaderCharset($header); + + return $header; + } + + /** + * Create a new Date header using $dateTime. + * + * @param string $name + * + * @return Swift_Mime_Header + */ + public function createDateHeader($name, DateTimeInterface $dateTime = null) + { + $header = new Swift_Mime_Headers_DateHeader($name); + if (isset($dateTime)) { + $header->setFieldBodyModel($dateTime); + } + $this->setHeaderCharset($header); + + return $header; + } + + /** + * Create a new basic text header with $name and $value. + * + * @param string $name + * @param string $value + * + * @return Swift_Mime_Header + */ + public function createTextHeader($name, $value = null) + { + $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->encoder); + if (isset($value)) { + $header->setFieldBodyModel($value); + } + $this->setHeaderCharset($header); + + return $header; + } + + /** + * Create a new ParameterizedHeader with $name, $value and $params. + * + * @param string $name + * @param string $value + * @param array $params + * + * @return Swift_Mime_Headers_ParameterizedHeader + */ + public function createParameterizedHeader($name, $value = null, $params = []) + { + $header = new Swift_Mime_Headers_ParameterizedHeader($name, $this->encoder, ('content-disposition' == strtolower($name ?? '')) ? $this->paramEncoder : null); + if (isset($value)) { + $header->setFieldBodyModel($value); + } + foreach ($params as $k => $v) { + $header->setParameter($k, $v); + } + $this->setHeaderCharset($header); + + return $header; + } + + /** + * Create a new ID header for Message-ID or Content-ID. + * + * @param string $name + * @param string|array $ids + * + * @return Swift_Mime_Header + */ + public function createIdHeader($name, $ids = null) + { + $header = new Swift_Mime_Headers_IdentificationHeader($name, $this->emailValidator); + if (isset($ids)) { + $header->setFieldBodyModel($ids); + } + $this->setHeaderCharset($header); + + return $header; + } + + /** + * Create a new Path header with an address (path) in it. + * + * @param string $name + * @param string $path + * + * @return Swift_Mime_Header + */ + public function createPathHeader($name, $path = null) + { + $header = new Swift_Mime_Headers_PathHeader($name, $this->emailValidator); + if (isset($path)) { + $header->setFieldBodyModel($path); + } + $this->setHeaderCharset($header); + + return $header; + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->charset = $charset; + $this->encoder->charsetChanged($charset); + $this->paramEncoder->charsetChanged($charset); + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->encoder = clone $this->encoder; + $this->paramEncoder = clone $this->paramEncoder; + $this->addressEncoder = clone $this->addressEncoder; + } + + /** Apply the charset to the Header */ + private function setHeaderCharset(Swift_Mime_Header $header) + { + if (isset($this->charset)) { + $header->setCharset($this->charset); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php new file mode 100644 index 00000000..5195bcf4 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php @@ -0,0 +1,399 @@ +factory = $factory; + if (isset($charset)) { + $this->setCharset($charset); + } + } + + public function newInstance() + { + return new self($this->factory); + } + + /** + * Set the charset used by these headers. + * + * @param string $charset + */ + public function setCharset($charset) + { + $this->charset = $charset; + $this->factory->charsetChanged($charset); + $this->notifyHeadersOfCharset($charset); + } + + /** + * Add a new Mailbox Header with a list of $addresses. + * + * @param string $name + * @param array|string $addresses + */ + public function addMailboxHeader($name, $addresses = null) + { + $this->storeHeader($name, $this->factory->createMailboxHeader($name, $addresses)); + } + + /** + * Add a new Date header using $dateTime. + * + * @param string $name + */ + public function addDateHeader($name, DateTimeInterface $dateTime = null) + { + $this->storeHeader($name, $this->factory->createDateHeader($name, $dateTime)); + } + + /** + * Add a new basic text header with $name and $value. + * + * @param string $name + * @param string $value + */ + public function addTextHeader($name, $value = null) + { + $this->storeHeader($name, $this->factory->createTextHeader($name, $value)); + } + + /** + * Add a new ParameterizedHeader with $name, $value and $params. + * + * @param string $name + * @param string $value + * @param array $params + */ + public function addParameterizedHeader($name, $value = null, $params = []) + { + $this->storeHeader($name, $this->factory->createParameterizedHeader($name, $value, $params)); + } + + /** + * Add a new ID header for Message-ID or Content-ID. + * + * @param string $name + * @param string|array $ids + */ + public function addIdHeader($name, $ids = null) + { + $this->storeHeader($name, $this->factory->createIdHeader($name, $ids)); + } + + /** + * Add a new Path header with an address (path) in it. + * + * @param string $name + * @param string $path + */ + public function addPathHeader($name, $path = null) + { + $this->storeHeader($name, $this->factory->createPathHeader($name, $path)); + } + + /** + * Returns true if at least one header with the given $name exists. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + * + * @return bool + */ + public function has($name, $index = 0) + { + $lowerName = strtolower($name ?? ''); + + if (!\array_key_exists($lowerName, $this->headers)) { + return false; + } + + if (\func_num_args() < 2) { + // index was not specified, so we only need to check that there is at least one header value set + return (bool) \count($this->headers[$lowerName]); + } + + return \array_key_exists($index, $this->headers[$lowerName]); + } + + /** + * Set a header in the HeaderSet. + * + * The header may be a previously fetched header via {@link get()} or it may + * be one that has been created separately. + * + * If $index is specified, the header will be inserted into the set at this + * offset. + * + * @param int $index + */ + public function set(Swift_Mime_Header $header, $index = 0) + { + $this->storeHeader($header->getFieldName(), $header, $index); + } + + /** + * Get the header with the given $name. + * + * If multiple headers match, the actual one may be specified by $index. + * Returns NULL if none present. + * + * @param string $name + * @param int $index + * + * @return Swift_Mime_Header|null + */ + public function get($name, $index = 0) + { + $name = strtolower($name ?? ''); + + if (\func_num_args() < 2) { + if ($this->has($name)) { + $values = array_values($this->headers[$name]); + + return array_shift($values); + } + } else { + if ($this->has($name, $index)) { + return $this->headers[$name][$index]; + } + } + } + + /** + * Get all headers with the given $name. + * + * @param string $name + * + * @return array + */ + public function getAll($name = null) + { + if (!isset($name)) { + $headers = []; + foreach ($this->headers as $collection) { + $headers = array_merge($headers, $collection); + } + + return $headers; + } + + $lowerName = strtolower($name ?? ''); + if (!\array_key_exists($lowerName, $this->headers)) { + return []; + } + + return $this->headers[$lowerName]; + } + + /** + * Return the name of all Headers. + * + * @return array + */ + public function listAll() + { + $headers = $this->headers; + if ($this->canSort()) { + uksort($headers, [$this, 'sortHeaders']); + } + + return array_keys($headers); + } + + /** + * Remove the header with the given $name if it's set. + * + * If multiple headers match, the actual one may be specified by $index. + * + * @param string $name + * @param int $index + */ + public function remove($name, $index = 0) + { + $lowerName = strtolower($name ?? ''); + unset($this->headers[$lowerName][$index]); + } + + /** + * Remove all headers with the given $name. + * + * @param string $name + */ + public function removeAll($name) + { + $lowerName = strtolower($name ?? ''); + unset($this->headers[$lowerName]); + } + + /** + * Define a list of Header names as an array in the correct order. + * + * These Headers will be output in the given order where present. + */ + public function defineOrdering(array $sequence) + { + $this->order = array_flip(array_map('strtolower', $sequence)); + } + + /** + * Set a list of header names which must always be displayed when set. + * + * Usually headers without a field value won't be output unless set here. + */ + public function setAlwaysDisplayed(array $names) + { + $this->required = array_flip(array_map('strtolower', $names)); + } + + /** + * Notify this observer that the entity's charset has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->setCharset($charset); + } + + /** + * Returns a string with a representation of all headers. + * + * @return string + */ + public function toString() + { + $string = ''; + $headers = $this->headers; + if ($this->canSort()) { + uksort($headers, [$this, 'sortHeaders']); + } + foreach ($headers as $collection) { + foreach ($collection as $header) { + if ($this->isDisplayed($header) || '' != $header->getFieldBody()) { + $string .= $header->toString(); + } + } + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @return string + * + * @see toString() + */ + public function __toString() + { + return $this->toString(); + } + + /** Save a Header to the internal collection */ + private function storeHeader($name, Swift_Mime_Header $header, $offset = null) + { + if (!isset($this->headers[strtolower($name ?? '')])) { + $this->headers[strtolower($name ?? '')] = []; + } + if (!isset($offset)) { + $this->headers[strtolower($name ?? '')][] = $header; + } else { + $this->headers[strtolower($name ?? '')][$offset] = $header; + } + } + + /** Test if the headers can be sorted */ + private function canSort() + { + return \count($this->order) > 0; + } + + /** uksort() algorithm for Header ordering */ + private function sortHeaders($a, $b) + { + $lowerA = strtolower($a ?? ''); + $lowerB = strtolower($b ?? ''); + $aPos = \array_key_exists($lowerA, $this->order) ? $this->order[$lowerA] : -1; + $bPos = \array_key_exists($lowerB, $this->order) ? $this->order[$lowerB] : -1; + + if (-1 === $aPos && -1 === $bPos) { + // just be sure to be determinist here + return $a > $b ? -1 : 1; + } + + if (-1 == $aPos) { + return 1; + } elseif (-1 == $bPos) { + return -1; + } + + return $aPos < $bPos ? -1 : 1; + } + + /** Test if the given Header is always displayed */ + private function isDisplayed(Swift_Mime_Header $header) + { + return \array_key_exists(strtolower($header->getFieldName() ?? ''), $this->required); + } + + /** Notify all Headers of the new charset */ + private function notifyHeadersOfCharset($charset) + { + foreach ($this->headers as $headerGroup) { + foreach ($headerGroup as $header) { + $header->setCharset($charset); + } + } + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->factory = clone $this->factory; + foreach ($this->headers as $groupKey => $headerGroup) { + foreach ($headerGroup as $key => $header) { + $this->headers[$groupKey][$key] = clone $header; + } + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php new file mode 100644 index 00000000..62da1650 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php @@ -0,0 +1,642 @@ +getHeaders()->defineOrdering([ + 'Return-Path', + 'Received', + 'DKIM-Signature', + 'DomainKey-Signature', + 'Sender', + 'Message-ID', + 'Date', + 'Subject', + 'From', + 'Reply-To', + 'To', + 'Cc', + 'Bcc', + 'MIME-Version', + 'Content-Type', + 'Content-Transfer-Encoding', + ]); + $this->getHeaders()->setAlwaysDisplayed(['Date', 'Message-ID', 'From']); + $this->getHeaders()->addTextHeader('MIME-Version', '1.0'); + $this->setDate(new DateTimeImmutable()); + $this->setId($this->getId()); + $this->getHeaders()->addMailboxHeader('From'); + } + + /** + * Always returns {@link LEVEL_TOP} for a message instance. + * + * @return int + */ + public function getNestingLevel() + { + return self::LEVEL_TOP; + } + + /** + * Set the subject of this message. + * + * @param string $subject + * + * @return $this + */ + public function setSubject($subject) + { + if (!$this->setHeaderFieldModel('Subject', $subject)) { + $this->getHeaders()->addTextHeader('Subject', $subject); + } + + return $this; + } + + /** + * Get the subject of this message. + * + * @return string + */ + public function getSubject() + { + return $this->getHeaderFieldModel('Subject'); + } + + /** + * Set the date at which this message was created. + * + * @return $this + */ + public function setDate(DateTimeInterface $dateTime) + { + if (!$this->setHeaderFieldModel('Date', $dateTime)) { + $this->getHeaders()->addDateHeader('Date', $dateTime); + } + + return $this; + } + + /** + * Get the date at which this message was created. + * + * @return DateTimeInterface + */ + public function getDate() + { + return $this->getHeaderFieldModel('Date'); + } + + /** + * Set the return-path (the bounce address) of this message. + * + * @param string $address + * + * @return $this + */ + public function setReturnPath($address) + { + if (!$this->setHeaderFieldModel('Return-Path', $address)) { + $this->getHeaders()->addPathHeader('Return-Path', $address); + } + + return $this; + } + + /** + * Get the return-path (bounce address) of this message. + * + * @return string + */ + public function getReturnPath() + { + return $this->getHeaderFieldModel('Return-Path'); + } + + /** + * Set the sender of this message. + * + * This does not override the From field, but it has a higher significance. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function setSender($address, $name = null) + { + if (!\is_array($address) && isset($name)) { + $address = [$address => $name]; + } + + if (!$this->setHeaderFieldModel('Sender', (array) $address)) { + $this->getHeaders()->addMailboxHeader('Sender', (array) $address); + } + + return $this; + } + + /** + * Get the sender of this message. + * + * @return string + */ + public function getSender() + { + return $this->getHeaderFieldModel('Sender'); + } + + /** + * Add a From: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addFrom($address, $name = null) + { + $current = $this->getFrom(); + $current[$address] = $name; + + return $this->setFrom($current); + } + + /** + * Set the from address of this message. + * + * You may pass an array of addresses if this message is from multiple people. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param string|array $addresses + * @param string $name optional + * + * @return $this + */ + public function setFrom($addresses, $name = null) + { + if (!\is_array($addresses) && isset($name)) { + $addresses = [$addresses => $name]; + } + + if (!$this->setHeaderFieldModel('From', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('From', (array) $addresses); + } + + return $this; + } + + /** + * Get the from address of this message. + * + * @return mixed + */ + public function getFrom() + { + return $this->getHeaderFieldModel('From'); + } + + /** + * Add a Reply-To: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addReplyTo($address, $name = null) + { + $current = $this->getReplyTo(); + $current[$address] = $name; + + return $this->setReplyTo($current); + } + + /** + * Set the reply-to address of this message. + * + * You may pass an array of addresses if replies will go to multiple people. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setReplyTo($addresses, $name = null) + { + if (!\is_array($addresses) && isset($name)) { + $addresses = [$addresses => $name]; + } + + if (!$this->setHeaderFieldModel('Reply-To', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('Reply-To', (array) $addresses); + } + + return $this; + } + + /** + * Get the reply-to address of this message. + * + * @return string + */ + public function getReplyTo() + { + return $this->getHeaderFieldModel('Reply-To'); + } + + /** + * Add a To: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addTo($address, $name = null) + { + $current = $this->getTo(); + $current[$address] = $name; + + return $this->setTo($current); + } + + /** + * Set the to addresses of this message. + * + * If multiple recipients will receive the message an array should be used. + * Example: array('receiver@domain.org', 'other@domain.org' => 'A name') + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setTo($addresses, $name = null) + { + if (!\is_array($addresses) && isset($name)) { + $addresses = [$addresses => $name]; + } + + if (!$this->setHeaderFieldModel('To', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('To', (array) $addresses); + } + + return $this; + } + + /** + * Get the To addresses of this message. + * + * @return array + */ + public function getTo() + { + return $this->getHeaderFieldModel('To'); + } + + /** + * Add a Cc: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addCc($address, $name = null) + { + $current = $this->getCc(); + $current[$address] = $name; + + return $this->setCc($current); + } + + /** + * Set the Cc addresses of this message. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setCc($addresses, $name = null) + { + if (!\is_array($addresses) && isset($name)) { + $addresses = [$addresses => $name]; + } + + if (!$this->setHeaderFieldModel('Cc', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses); + } + + return $this; + } + + /** + * Get the Cc address of this message. + * + * @return array + */ + public function getCc() + { + return $this->getHeaderFieldModel('Cc'); + } + + /** + * Add a Bcc: address to this message. + * + * If $name is passed this name will be associated with the address. + * + * @param string $address + * @param string $name optional + * + * @return $this + */ + public function addBcc($address, $name = null) + { + $current = $this->getBcc(); + $current[$address] = $name; + + return $this->setBcc($current); + } + + /** + * Set the Bcc addresses of this message. + * + * If $name is passed and the first parameter is a string, this name will be + * associated with the address. + * + * @param mixed $addresses + * @param string $name optional + * + * @return $this + */ + public function setBcc($addresses, $name = null) + { + if (!\is_array($addresses) && isset($name)) { + $addresses = [$addresses => $name]; + } + + if (!$this->setHeaderFieldModel('Bcc', (array) $addresses)) { + $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses); + } + + return $this; + } + + /** + * Get the Bcc addresses of this message. + * + * @return array + */ + public function getBcc() + { + return $this->getHeaderFieldModel('Bcc'); + } + + /** + * Set the priority of this message. + * + * The value is an integer where 1 is the highest priority and 5 is the lowest. + * + * @param int $priority + * + * @return $this + */ + public function setPriority($priority) + { + $priorityMap = [ + self::PRIORITY_HIGHEST => 'Highest', + self::PRIORITY_HIGH => 'High', + self::PRIORITY_NORMAL => 'Normal', + self::PRIORITY_LOW => 'Low', + self::PRIORITY_LOWEST => 'Lowest', + ]; + $pMapKeys = array_keys($priorityMap); + if ($priority > max($pMapKeys)) { + $priority = max($pMapKeys); + } elseif ($priority < min($pMapKeys)) { + $priority = min($pMapKeys); + } + if (!$this->setHeaderFieldModel('X-Priority', + sprintf('%d (%s)', $priority, $priorityMap[$priority]))) { + $this->getHeaders()->addTextHeader('X-Priority', + sprintf('%d (%s)', $priority, $priorityMap[$priority])); + } + + return $this; + } + + /** + * Get the priority of this message. + * + * The returned value is an integer where 1 is the highest priority and 5 + * is the lowest. + * + * @return int + */ + public function getPriority() + { + list($priority) = sscanf($this->getHeaderFieldModel('X-Priority'), + '%[1-5]' + ); + + return $priority ?? 3; + } + + /** + * Ask for a delivery receipt from the recipient to be sent to $addresses. + * + * @param array $addresses + * + * @return $this + */ + public function setReadReceiptTo($addresses) + { + if (!$this->setHeaderFieldModel('Disposition-Notification-To', $addresses)) { + $this->getHeaders() + ->addMailboxHeader('Disposition-Notification-To', $addresses); + } + + return $this; + } + + /** + * Get the addresses to which a read-receipt will be sent. + * + * @return string + */ + public function getReadReceiptTo() + { + return $this->getHeaderFieldModel('Disposition-Notification-To'); + } + + /** + * Attach a {@link Swift_Mime_SimpleMimeEntity} such as an Attachment or MimePart. + * + * @return $this + */ + public function attach(Swift_Mime_SimpleMimeEntity $entity) + { + $this->setChildren(array_merge($this->getChildren(), [$entity])); + + return $this; + } + + /** + * Remove an already attached entity. + * + * @return $this + */ + public function detach(Swift_Mime_SimpleMimeEntity $entity) + { + $newChildren = []; + foreach ($this->getChildren() as $child) { + if ($entity !== $child) { + $newChildren[] = $child; + } + } + $this->setChildren($newChildren); + + return $this; + } + + /** + * Attach a {@link Swift_Mime_SimpleMimeEntity} and return it's CID source. + * + * This method should be used when embedding images or other data in a message. + * + * @return string + */ + public function embed(Swift_Mime_SimpleMimeEntity $entity) + { + $this->attach($entity); + + return 'cid:'.$entity->getId(); + } + + /** + * Get this message as a complete string. + * + * @return string + */ + public function toString() + { + if (\count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { + $this->setChildren(array_merge([$this->becomeMimePart()], $children)); + $string = parent::toString(); + $this->setChildren($children); + } else { + $string = parent::toString(); + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @see toString() + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Write this message to a {@link Swift_InputByteStream}. + */ + public function toByteStream(Swift_InputByteStream $is) + { + if (\count($children = $this->getChildren()) > 0 && '' != $this->getBody()) { + $this->setChildren(array_merge([$this->becomeMimePart()], $children)); + parent::toByteStream($is); + $this->setChildren($children); + } else { + parent::toByteStream($is); + } + } + + /** @see Swift_Mime_SimpleMimeEntity::getIdField() */ + protected function getIdField() + { + return 'Message-ID'; + } + + /** Turn the body of this message into a child of itself if needed */ + protected function becomeMimePart() + { + $part = new parent($this->getHeaders()->newInstance(), $this->getEncoder(), + $this->getCache(), $this->getIdGenerator(), $this->userCharset + ); + $part->setContentType($this->userContentType); + $part->setBody($this->getBody()); + $part->setFormat($this->userFormat); + $part->setDelSp($this->userDelSp); + $part->setNestingLevel($this->getTopNestingLevel()); + + return $part; + } + + /** Get the highest nesting level nested inside this message */ + private function getTopNestingLevel() + { + $highestLevel = $this->getNestingLevel(); + foreach ($this->getChildren() as $child) { + $childLevel = $child->getNestingLevel(); + if ($highestLevel < $childLevel) { + $highestLevel = $childLevel; + } + } + + return $highestLevel; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php new file mode 100644 index 00000000..03eaf472 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php @@ -0,0 +1,826 @@ + [self::LEVEL_TOP, self::LEVEL_MIXED], + 'multipart/alternative' => [self::LEVEL_MIXED, self::LEVEL_ALTERNATIVE], + 'multipart/related' => [self::LEVEL_ALTERNATIVE, self::LEVEL_RELATED], + ]; + + /** A set of filter rules to define what level an entity should be nested at */ + private $compoundLevelFilters = []; + + /** The nesting level of this entity */ + private $nestingLevel = self::LEVEL_ALTERNATIVE; + + /** A KeyCache instance used during encoding and streaming */ + private $cache; + + /** Direct descendants of this entity */ + private $immediateChildren = []; + + /** All descendants of this entity */ + private $children = []; + + /** The maximum line length of the body of this entity */ + private $maxLineLength = 78; + + /** The order in which alternative mime types should appear */ + private $alternativePartOrder = [ + 'text/plain' => 1, + 'text/html' => 2, + 'multipart/related' => 3, + ]; + + /** The CID of this entity */ + private $id; + + /** The key used for accessing the cache */ + private $cacheKey; + + protected $userContentType; + + /** + * Create a new SimpleMimeEntity with $headers, $encoder and $cache. + */ + public function __construct(Swift_Mime_SimpleHeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_IdGenerator $idGenerator) + { + $this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values + $this->cache = $cache; + $this->headers = $headers; + $this->idGenerator = $idGenerator; + $this->setEncoder($encoder); + $this->headers->defineOrdering(['Content-Type', 'Content-Transfer-Encoding']); + + // This array specifies that, when the entire MIME document contains + // $compoundLevel, then for each child within $level, if its Content-Type + // is $contentType then it should be treated as if it's level is + // $neededLevel instead. I tried to write that unambiguously! :-\ + // Data Structure: + // array ( + // $compoundLevel => array( + // $level => array( + // $contentType => $neededLevel + // ) + // ) + // ) + + $this->compoundLevelFilters = [ + (self::LEVEL_ALTERNATIVE + self::LEVEL_RELATED) => [ + self::LEVEL_ALTERNATIVE => [ + 'text/plain' => self::LEVEL_ALTERNATIVE, + 'text/html' => self::LEVEL_RELATED, + ], + ], + ]; + + $this->id = $this->idGenerator->generateId(); + } + + /** + * Generate a new Content-ID or Message-ID for this MIME entity. + * + * @return string + */ + public function generateId() + { + $this->setId($this->idGenerator->generateId()); + + return $this->id; + } + + /** + * Get the {@link Swift_Mime_SimpleHeaderSet} for this entity. + * + * @return Swift_Mime_SimpleHeaderSet + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Get the nesting level of this entity. + * + * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE + * + * @return int + */ + public function getNestingLevel() + { + return $this->nestingLevel; + } + + /** + * Get the Content-type of this entity. + * + * @return string + */ + public function getContentType() + { + return $this->getHeaderFieldModel('Content-Type'); + } + + /** + * Get the Body Content-type of this entity. + * + * @return string + */ + public function getBodyContentType() + { + return $this->userContentType; + } + + /** + * Set the Content-type of this entity. + * + * @param string $type + * + * @return $this + */ + public function setContentType($type) + { + $this->setContentTypeInHeaders($type); + // Keep track of the value so that if the content-type changes automatically + // due to added child entities, it can be restored if they are later removed + $this->userContentType = $type; + + return $this; + } + + /** + * Get the CID of this entity. + * + * The CID will only be present in headers if a Content-ID header is present. + * + * @return string + */ + public function getId() + { + $tmp = (array) $this->getHeaderFieldModel($this->getIdField()); + + return $this->headers->has($this->getIdField()) ? current($tmp) : $this->id; + } + + /** + * Set the CID of this entity. + * + * @param string $id + * + * @return $this + */ + public function setId($id) + { + if (!$this->setHeaderFieldModel($this->getIdField(), $id)) { + $this->headers->addIdHeader($this->getIdField(), $id); + } + $this->id = $id; + + return $this; + } + + /** + * Get the description of this entity. + * + * This value comes from the Content-Description header if set. + * + * @return string + */ + public function getDescription() + { + return $this->getHeaderFieldModel('Content-Description'); + } + + /** + * Set the description of this entity. + * + * This method sets a value in the Content-ID header. + * + * @param string $description + * + * @return $this + */ + public function setDescription($description) + { + if (!$this->setHeaderFieldModel('Content-Description', $description)) { + $this->headers->addTextHeader('Content-Description', $description); + } + + return $this; + } + + /** + * Get the maximum line length of the body of this entity. + * + * @return int + */ + public function getMaxLineLength() + { + return $this->maxLineLength; + } + + /** + * Set the maximum line length of lines in this body. + * + * Though not enforced by the library, lines should not exceed 1000 chars. + * + * @param int $length + * + * @return $this + */ + public function setMaxLineLength($length) + { + $this->maxLineLength = $length; + + return $this; + } + + /** + * Get all children added to this entity. + * + * @return Swift_Mime_SimpleMimeEntity[] + */ + public function getChildren() + { + return $this->children; + } + + /** + * Set all children of this entity. + * + * @param Swift_Mime_SimpleMimeEntity[] $children + * @param int $compoundLevel For internal use only + * + * @return $this + */ + public function setChildren(array $children, $compoundLevel = null) + { + // TODO: Try to refactor this logic + $compoundLevel = $compoundLevel ?? $this->getCompoundLevel($children); + $immediateChildren = []; + $grandchildren = []; + $newContentType = $this->userContentType; + + foreach ($children as $child) { + $level = $this->getNeededChildLevel($child, $compoundLevel); + if (empty($immediateChildren)) { + //first iteration + $immediateChildren = [$child]; + } else { + $nextLevel = $this->getNeededChildLevel($immediateChildren[0], $compoundLevel); + if ($nextLevel == $level) { + $immediateChildren[] = $child; + } elseif ($level < $nextLevel) { + // Re-assign immediateChildren to grandchildren + $grandchildren = array_merge($grandchildren, $immediateChildren); + // Set new children + $immediateChildren = [$child]; + } else { + $grandchildren[] = $child; + } + } + } + + if ($immediateChildren) { + $lowestLevel = $this->getNeededChildLevel($immediateChildren[0], $compoundLevel); + + // Determine which composite media type is needed to accommodate the + // immediate children + foreach ($this->compositeRanges as $mediaType => $range) { + if ($lowestLevel > $range[0] && $lowestLevel <= $range[1]) { + $newContentType = $mediaType; + + break; + } + } + + // Put any grandchildren in a subpart + if (!empty($grandchildren)) { + $subentity = $this->createChild(); + $subentity->setNestingLevel($lowestLevel); + $subentity->setChildren($grandchildren, $compoundLevel); + array_unshift($immediateChildren, $subentity); + } + } + + $this->immediateChildren = $immediateChildren; + $this->children = $children; + $this->setContentTypeInHeaders($newContentType); + $this->fixHeaders(); + $this->sortChildren(); + + return $this; + } + + /** + * Get the body of this entity as a string. + * + * @return string + */ + public function getBody() + { + return $this->body instanceof Swift_OutputByteStream ? $this->readStream($this->body) : $this->body; + } + + /** + * Set the body of this entity, either as a string, or as an instance of + * {@link Swift_OutputByteStream}. + * + * @param mixed $body + * @param string $contentType optional + * + * @return $this + */ + public function setBody($body, $contentType = null) + { + if ($body !== $this->body) { + $this->clearCache(); + } + + $this->body = $body; + if (null !== $contentType) { + $this->setContentType($contentType); + } + + return $this; + } + + /** + * Get the encoder used for the body of this entity. + * + * @return Swift_Mime_ContentEncoder + */ + public function getEncoder() + { + return $this->encoder; + } + + /** + * Set the encoder used for the body of this entity. + * + * @return $this + */ + public function setEncoder(Swift_Mime_ContentEncoder $encoder) + { + if ($encoder !== $this->encoder) { + $this->clearCache(); + } + + $this->encoder = $encoder; + $this->setEncoding($encoder->getName()); + $this->notifyEncoderChanged($encoder); + + return $this; + } + + /** + * Get the boundary used to separate children in this entity. + * + * @return string + */ + public function getBoundary() + { + if (!isset($this->boundary)) { + $this->boundary = '_=_swift_'.time().'_'.bin2hex(random_bytes(16)).'_=_'; + } + + return $this->boundary; + } + + /** + * Set the boundary used to separate children in this entity. + * + * @param string $boundary + * + * @throws Swift_RfcComplianceException + * + * @return $this + */ + public function setBoundary($boundary) + { + $this->assertValidBoundary($boundary); + $this->boundary = $boundary; + + return $this; + } + + /** + * Receive notification that the charset of this entity, or a parent entity + * has changed. + * + * @param string $charset + */ + public function charsetChanged($charset) + { + $this->notifyCharsetChanged($charset); + } + + /** + * Receive notification that the encoder of this entity or a parent entity + * has changed. + */ + public function encoderChanged(Swift_Mime_ContentEncoder $encoder) + { + $this->notifyEncoderChanged($encoder); + } + + /** + * Get this entire entity as a string. + * + * @return string + */ + public function toString() + { + $string = $this->headers->toString(); + $string .= $this->bodyToString(); + + return $string; + } + + /** + * Get this entire entity as a string. + * + * @return string + */ + protected function bodyToString() + { + $string = ''; + + if (isset($this->body) && empty($this->immediateChildren)) { + if ($this->cache->hasKey($this->cacheKey, 'body')) { + $body = $this->cache->getString($this->cacheKey, 'body'); + } else { + $body = "\r\n".$this->encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength()); + $this->cache->setString($this->cacheKey, 'body', $body, Swift_KeyCache::MODE_WRITE); + } + $string .= $body; + } + + if (!empty($this->immediateChildren)) { + foreach ($this->immediateChildren as $child) { + $string .= "\r\n\r\n--".$this->getBoundary()."\r\n"; + $string .= $child->toString(); + } + $string .= "\r\n\r\n--".$this->getBoundary()."--\r\n"; + } + + return $string; + } + + /** + * Returns a string representation of this object. + * + * @see toString() + * + * @return string + */ + public function __toString() + { + return $this->toString(); + } + + /** + * Write this entire entity to a {@see Swift_InputByteStream}. + */ + public function toByteStream(Swift_InputByteStream $is) + { + $is->write($this->headers->toString()); + $is->commit(); + + $this->bodyToByteStream($is); + } + + /** + * Write this entire entity to a {@link Swift_InputByteStream}. + */ + protected function bodyToByteStream(Swift_InputByteStream $is) + { + if (empty($this->immediateChildren)) { + if (isset($this->body)) { + if ($this->cache->hasKey($this->cacheKey, 'body')) { + $this->cache->exportToByteStream($this->cacheKey, 'body', $is); + } else { + $cacheIs = $this->cache->getInputByteStream($this->cacheKey, 'body'); + if ($cacheIs) { + $is->bind($cacheIs); + } + + $is->write("\r\n"); + + if ($this->body instanceof Swift_OutputByteStream) { + $this->body->setReadPointer(0); + + $this->encoder->encodeByteStream($this->body, $is, 0, $this->getMaxLineLength()); + } else { + $is->write($this->encoder->encodeString($this->getBody(), 0, $this->getMaxLineLength())); + } + + if ($cacheIs) { + $is->unbind($cacheIs); + } + } + } + } + + if (!empty($this->immediateChildren)) { + foreach ($this->immediateChildren as $child) { + $is->write("\r\n\r\n--".$this->getBoundary()."\r\n"); + $child->toByteStream($is); + } + $is->write("\r\n\r\n--".$this->getBoundary()."--\r\n"); + } + } + + /** + * Get the name of the header that provides the ID of this entity. + */ + protected function getIdField() + { + return 'Content-ID'; + } + + /** + * Get the model data (usually an array or a string) for $field. + */ + protected function getHeaderFieldModel($field) + { + if ($this->headers->has($field)) { + return $this->headers->get($field)->getFieldBodyModel(); + } + } + + /** + * Set the model data for $field. + */ + protected function setHeaderFieldModel($field, $model) + { + if ($this->headers->has($field)) { + $this->headers->get($field)->setFieldBodyModel($model); + + return true; + } + + return false; + } + + /** + * Get the parameter value of $parameter on $field header. + */ + protected function getHeaderParameter($field, $parameter) + { + if ($this->headers->has($field)) { + return $this->headers->get($field)->getParameter($parameter); + } + } + + /** + * Set the parameter value of $parameter on $field header. + */ + protected function setHeaderParameter($field, $parameter, $value) + { + if ($this->headers->has($field)) { + $this->headers->get($field)->setParameter($parameter, $value); + + return true; + } + + return false; + } + + /** + * Re-evaluate what content type and encoding should be used on this entity. + */ + protected function fixHeaders() + { + if (\count($this->immediateChildren)) { + $this->setHeaderParameter('Content-Type', 'boundary', + $this->getBoundary() + ); + $this->headers->remove('Content-Transfer-Encoding'); + } else { + $this->setHeaderParameter('Content-Type', 'boundary', null); + $this->setEncoding($this->encoder->getName()); + } + } + + /** + * Get the KeyCache used in this entity. + * + * @return Swift_KeyCache + */ + protected function getCache() + { + return $this->cache; + } + + /** + * Get the ID generator. + * + * @return Swift_IdGenerator + */ + protected function getIdGenerator() + { + return $this->idGenerator; + } + + /** + * Empty the KeyCache for this entity. + */ + protected function clearCache() + { + $this->cache->clearKey($this->cacheKey, 'body'); + } + + private function readStream(Swift_OutputByteStream $os) + { + $string = ''; + while (false !== $bytes = $os->read(8192)) { + $string .= $bytes; + } + + $os->setReadPointer(0); + + return $string; + } + + private function setEncoding($encoding) + { + if (!$this->setHeaderFieldModel('Content-Transfer-Encoding', $encoding)) { + $this->headers->addTextHeader('Content-Transfer-Encoding', $encoding); + } + } + + private function assertValidBoundary($boundary) + { + if (!preg_match('/^[a-z0-9\'\(\)\+_\-,\.\/:=\?\ ]{0,69}[a-z0-9\'\(\)\+_\-,\.\/:=\?]$/Di', $boundary)) { + throw new Swift_RfcComplianceException('Mime boundary set is not RFC 2046 compliant.'); + } + } + + private function setContentTypeInHeaders($type) + { + if (!$this->setHeaderFieldModel('Content-Type', $type)) { + $this->headers->addParameterizedHeader('Content-Type', $type); + } + } + + private function setNestingLevel($level) + { + $this->nestingLevel = $level; + } + + private function getCompoundLevel($children) + { + $level = 0; + foreach ($children as $child) { + $level |= $child->getNestingLevel(); + } + + return $level; + } + + private function getNeededChildLevel($child, $compoundLevel) + { + $filter = []; + foreach ($this->compoundLevelFilters as $bitmask => $rules) { + if (($compoundLevel & $bitmask) === $bitmask) { + $filter = $rules + $filter; + } + } + + $realLevel = $child->getNestingLevel(); + $lowercaseType = strtolower($child->getContentType() ?? ''); + + if (isset($filter[$realLevel]) && isset($filter[$realLevel][$lowercaseType])) { + return $filter[$realLevel][$lowercaseType]; + } + + return $realLevel; + } + + private function createChild() + { + return new self($this->headers->newInstance(), $this->encoder, $this->cache, $this->idGenerator); + } + + private function notifyEncoderChanged(Swift_Mime_ContentEncoder $encoder) + { + foreach ($this->immediateChildren as $child) { + $child->encoderChanged($encoder); + } + } + + private function notifyCharsetChanged($charset) + { + $this->encoder->charsetChanged($charset); + $this->headers->charsetChanged($charset); + foreach ($this->immediateChildren as $child) { + $child->charsetChanged($charset); + } + } + + private function sortChildren() + { + $shouldSort = false; + foreach ($this->immediateChildren as $child) { + // NOTE: This include alternative parts moved into a related part + if (self::LEVEL_ALTERNATIVE == $child->getNestingLevel()) { + $shouldSort = true; + break; + } + } + + // Sort in order of preference, if there is one + if ($shouldSort) { + // Group the messages by order of preference + $sorted = []; + foreach ($this->immediateChildren as $child) { + $type = $child->getContentType(); + $level = \array_key_exists($type, $this->alternativePartOrder) ? $this->alternativePartOrder[$type] : max($this->alternativePartOrder) + 1; + + if (empty($sorted[$level])) { + $sorted[$level] = []; + } + + $sorted[$level][] = $child; + } + + ksort($sorted); + + $this->immediateChildren = array_reduce($sorted, 'array_merge', []); + } + } + + /** + * Empties it's own contents from the cache. + */ + public function __destruct() + { + if ($this->cache instanceof Swift_KeyCache) { + $this->cache->clearAll($this->cacheKey); + } + } + + /** + * Make a deep copy of object. + */ + public function __clone() + { + $this->headers = clone $this->headers; + $this->encoder = clone $this->encoder; + $this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values + $children = []; + foreach ($this->children as $pos => $child) { + $children[$pos] = clone $child; + } + $this->setChildren($children); + } + + public function __wakeup() + { + $this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values + $this->cache = new Swift_KeyCache_ArrayKeyCache(new Swift_KeyCache_SimpleKeyCacheInputStream()); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php new file mode 100644 index 00000000..ea97619a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php @@ -0,0 +1,45 @@ +createDependenciesFor('mime.part') + ); + + if (!isset($charset)) { + $charset = Swift_DependencyContainer::getInstance() + ->lookup('properties.charset'); + } + $this->setBody($body); + $this->setCharset($charset); + if ($contentType) { + $this->setContentType($contentType); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php new file mode 100644 index 00000000..e44b7af9 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Pretends messages have been sent, but just ignores them. + * + * @author Fabien Potencier + */ +class Swift_NullTransport extends Swift_Transport_NullTransport +{ + public function __construct() + { + \call_user_func_array( + [$this, 'Swift_Transport_NullTransport::__construct'], + Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.null') + ); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php new file mode 100644 index 00000000..1f26f9be --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php @@ -0,0 +1,46 @@ +setThreshold($threshold); + $this->setSleepTime($sleep); + $this->sleeper = $sleeper; + } + + /** + * Set the number of emails to send before restarting. + * + * @param int $threshold + */ + public function setThreshold($threshold) + { + $this->threshold = $threshold; + } + + /** + * Get the number of emails to send before restarting. + * + * @return int + */ + public function getThreshold() + { + return $this->threshold; + } + + /** + * Set the number of seconds to sleep for during a restart. + * + * @param int $sleep time + */ + public function setSleepTime($sleep) + { + $this->sleep = $sleep; + } + + /** + * Get the number of seconds to sleep for during a restart. + * + * @return int + */ + public function getSleepTime() + { + return $this->sleep; + } + + /** + * Invoked immediately before the Message is sent. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + ++$this->counter; + if ($this->counter >= $this->threshold) { + $transport = $evt->getTransport(); + $transport->stop(); + if ($this->sleep) { + $this->sleep($this->sleep); + } + $transport->start(); + $this->counter = 0; + } + } + + /** + * Sleep for $seconds. + * + * @param int $seconds + */ + public function sleep($seconds) + { + if (isset($this->sleeper)) { + $this->sleeper->sleep($seconds); + } else { + sleep($seconds); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php new file mode 100644 index 00000000..36451f44 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php @@ -0,0 +1,154 @@ +getMessage(); + $message->toByteStream($this); + } + + /** + * Invoked immediately following a command being sent. + */ + public function commandSent(Swift_Events_CommandEvent $evt) + { + $command = $evt->getCommand(); + $this->out += \strlen($command); + } + + /** + * Invoked immediately following a response coming back. + */ + public function responseReceived(Swift_Events_ResponseEvent $evt) + { + $response = $evt->getResponse(); + $this->in += \strlen($response); + } + + /** + * Called when a message is sent so that the outgoing counter can be increased. + * + * @param string $bytes + */ + public function write($bytes) + { + $this->out += \strlen($bytes); + foreach ($this->mirrors as $stream) { + $stream->write($bytes); + } + } + + /** + * Not used. + */ + public function commit() + { + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + */ + public function bind(Swift_InputByteStream $is) + { + $this->mirrors[] = $is; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + */ + public function unbind(Swift_InputByteStream $is) + { + foreach ($this->mirrors as $k => $stream) { + if ($is === $stream) { + unset($this->mirrors[$k]); + } + } + } + + /** + * Not used. + */ + public function flushBuffers() + { + foreach ($this->mirrors as $stream) { + $stream->flushBuffers(); + } + } + + /** + * Get the total number of bytes sent to the server. + * + * @return int + */ + public function getBytesOut() + { + return $this->out; + } + + /** + * Get the total number of bytes received from the server. + * + * @return int + */ + public function getBytesIn() + { + return $this->in; + } + + /** + * Reset the internal counters to zero. + */ + public function reset() + { + $this->out = 0; + $this->in = 0; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php new file mode 100644 index 00000000..9f9f08b5 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php @@ -0,0 +1,31 @@ + + * $replacements = array( + * "address1@domain.tld" => array("{a}" => "b", "{c}" => "d"), + * "address2@domain.tld" => array("{a}" => "x", "{c}" => "y") + * ) + * + * + * When using an instance of {@link Swift_Plugins_Decorator_Replacements}, + * the object should return just the array of replacements for the address + * given to {@link Swift_Plugins_Decorator_Replacements::getReplacementsFor()}. + * + * @param mixed $replacements Array or Swift_Plugins_Decorator_Replacements + */ + public function __construct($replacements) + { + $this->setReplacements($replacements); + } + + /** + * Sets replacements. + * + * @param mixed $replacements Array or Swift_Plugins_Decorator_Replacements + * + * @see __construct() + */ + public function setReplacements($replacements) + { + if (!($replacements instanceof Swift_Plugins_Decorator_Replacements)) { + $this->replacements = (array) $replacements; + } else { + $this->replacements = $replacements; + } + } + + /** + * Invoked immediately before the Message is sent. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $this->restoreMessage($message); + $to = array_keys($message->getTo()); + $address = array_shift($to); + if ($replacements = $this->getReplacementsFor($address)) { + $body = $message->getBody(); + $search = array_keys($replacements); + $replace = array_values($replacements); + $bodyReplaced = str_replace( + $search, $replace, $body + ); + if ($body != $bodyReplaced) { + $this->originalBody = $body; + $message->setBody($bodyReplaced); + } + + foreach ($message->getHeaders()->getAll() as $header) { + $body = $header->getFieldBodyModel(); + $count = 0; + if (\is_array($body)) { + $bodyReplaced = []; + foreach ($body as $key => $value) { + $count1 = 0; + $count2 = 0; + $key = \is_string($key) ? str_replace($search, $replace, $key, $count1) : $key; + $value = \is_string($value) ? str_replace($search, $replace, $value, $count2) : $value; + $bodyReplaced[$key] = $value; + + if (!$count && ($count1 || $count2)) { + $count = 1; + } + } + } elseif (\is_string($body)) { + $bodyReplaced = str_replace($search, $replace, $body, $count); + } + + if ($count) { + $this->originalHeaders[$header->getFieldName()] = $body; + $header->setFieldBodyModel($bodyReplaced); + } + } + + $children = (array) $message->getChildren(); + foreach ($children as $child) { + list($type) = sscanf($child->getContentType(), '%[^/]/%s'); + if ('text' == $type) { + $body = $child->getBody(); + $bodyReplaced = str_replace( + $search, $replace, $body + ); + if ($body != $bodyReplaced) { + $child->setBody($bodyReplaced); + $this->originalChildBodies[$child->getId()] = $body; + } + } + } + $this->lastMessage = $message; + } + } + + /** + * Find a map of replacements for the address. + * + * If this plugin was provided with a delegate instance of + * {@link Swift_Plugins_Decorator_Replacements} then the call will be + * delegated to it. Otherwise, it will attempt to find the replacements + * from the array provided in the constructor. + * + * If no replacements can be found, an empty value (NULL) is returned. + * + * @param string $address + * + * @return array + */ + public function getReplacementsFor($address) + { + if ($this->replacements instanceof Swift_Plugins_Decorator_Replacements) { + return $this->replacements->getReplacementsFor($address); + } + + return $this->replacements[$address] ?? null; + } + + /** + * Invoked immediately after the Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $this->restoreMessage($evt->getMessage()); + } + + /** Restore a changed message back to its original state */ + private function restoreMessage(Swift_Mime_SimpleMessage $message) + { + if ($this->lastMessage === $message) { + if (isset($this->originalBody)) { + $message->setBody($this->originalBody); + $this->originalBody = null; + } + if (!empty($this->originalHeaders)) { + foreach ($message->getHeaders()->getAll() as $header) { + if (\array_key_exists($header->getFieldName(), $this->originalHeaders)) { + $header->setFieldBodyModel($this->originalHeaders[$header->getFieldName()]); + } + } + $this->originalHeaders = []; + } + if (!empty($this->originalChildBodies)) { + $children = (array) $message->getChildren(); + foreach ($children as $child) { + $id = $child->getId(); + if (\array_key_exists($id, $this->originalChildBodies)) { + $child->setBody($this->originalChildBodies[$id]); + } + } + $this->originalChildBodies = []; + } + $this->lastMessage = null; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php new file mode 100644 index 00000000..3f4dbbfa --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php @@ -0,0 +1,65 @@ +sender = $sender; + } + + /** + * Invoked immediately before the Message is sent. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $headers = $message->getHeaders(); + + // save current recipients + $headers->addPathHeader('X-Swift-Return-Path', $message->getReturnPath()); + + // replace them with the one to send to + $message->setReturnPath($this->sender); + } + + /** + * Invoked immediately after the Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + + // restore original headers + $headers = $message->getHeaders(); + + if ($headers->has('X-Swift-Return-Path')) { + $message->setReturnPath($headers->get('X-Swift-Return-Path')->getAddress()); + $headers->removeAll('X-Swift-Return-Path'); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php new file mode 100644 index 00000000..d9bce893 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php @@ -0,0 +1,36 @@ +logger = $logger; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + $this->logger->add($entry); + } + + /** + * Clear the log contents. + */ + public function clear() + { + $this->logger->clear(); + } + + /** + * Get this log as a string. + * + * @return string + */ + public function dump() + { + return $this->logger->dump(); + } + + /** + * Invoked immediately following a command being sent. + */ + public function commandSent(Swift_Events_CommandEvent $evt) + { + $command = $evt->getCommand(); + $this->logger->add(sprintf('>> %s', $command)); + } + + /** + * Invoked immediately following a response coming back. + */ + public function responseReceived(Swift_Events_ResponseEvent $evt) + { + $response = $evt->getResponse(); + $this->logger->add(sprintf('<< %s', $response)); + } + + /** + * Invoked just before a Transport is started. + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) + { + $transportName = \get_class($evt->getSource()); + $this->logger->add(sprintf('++ Starting %s', $transportName)); + } + + /** + * Invoked immediately after the Transport is started. + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt) + { + $transportName = \get_class($evt->getSource()); + $this->logger->add(sprintf('++ %s started', $transportName)); + } + + /** + * Invoked just before a Transport is stopped. + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) + { + $transportName = \get_class($evt->getSource()); + $this->logger->add(sprintf('++ Stopping %s', $transportName)); + } + + /** + * Invoked immediately after the Transport is stopped. + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt) + { + $transportName = \get_class($evt->getSource()); + $this->logger->add(sprintf('++ %s stopped', $transportName)); + } + + /** + * Invoked as a TransportException is thrown in the Transport system. + */ + public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt) + { + $e = $evt->getException(); + $message = $e->getMessage(); + $code = $e->getCode(); + $this->logger->add(sprintf('!! %s (code: %s)', $message, $code)); + $message .= PHP_EOL; + $message .= 'Log data:'.PHP_EOL; + $message .= $this->logger->dump(); + $evt->cancelBubble(); + throw new Swift_TransportException($message, $code, $e->getPrevious()); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php new file mode 100644 index 00000000..6f595ada --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php @@ -0,0 +1,72 @@ +size = $size; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + $this->log[] = $entry; + while (\count($this->log) > $this->size) { + array_shift($this->log); + } + } + + /** + * Clear the log contents. + */ + public function clear() + { + $this->log = []; + } + + /** + * Get this log as a string. + * + * @return string + */ + public function dump() + { + return implode(PHP_EOL, $this->log); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php new file mode 100644 index 00000000..40a53d2b --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php @@ -0,0 +1,58 @@ +isHtml = $isHtml; + } + + /** + * Add a log entry. + * + * @param string $entry + */ + public function add($entry) + { + if ($this->isHtml) { + printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '
    ', PHP_EOL); + } else { + printf('%s%s', $entry, PHP_EOL); + } + } + + /** + * Not implemented. + */ + public function clear() + { + } + + /** + * Not implemented. + */ + public function dump() + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php new file mode 100644 index 00000000..39c48ed1 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php @@ -0,0 +1,70 @@ +messages = []; + } + + /** + * Get the message list. + * + * @return Swift_Mime_SimpleMessage[] + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Get the message count. + * + * @return int count + */ + public function countMessages() + { + return \count($this->messages); + } + + /** + * Empty the message list. + */ + public function clear() + { + $this->messages = []; + } + + /** + * Invoked immediately before the Message is sent. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $this->messages[] = clone $evt->getMessage(); + } + + /** + * Invoked immediately after the Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php new file mode 100644 index 00000000..fb99e4c9 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php @@ -0,0 +1,31 @@ +host = $host; + $this->port = $port; + $this->crypto = $crypto; + } + + /** + * Set a Pop3Connection to delegate to instead of connecting directly. + * + * @return $this + */ + public function setConnection(Swift_Plugins_Pop_Pop3Connection $connection) + { + $this->connection = $connection; + + return $this; + } + + /** + * Bind this plugin to a specific SMTP transport instance. + */ + public function bindSmtp(Swift_Transport $smtp) + { + $this->transport = $smtp; + } + + /** + * Set the connection timeout in seconds (default 10). + * + * @param int $timeout + * + * @return $this + */ + public function setTimeout($timeout) + { + $this->timeout = (int) $timeout; + + return $this; + } + + /** + * Set the username to use when connecting (if needed). + * + * @param string $username + * + * @return $this + */ + public function setUsername($username) + { + $this->username = $username; + + return $this; + } + + /** + * Set the password to use when connecting (if needed). + * + * @param string $password + * + * @return $this + */ + public function setPassword($password) + { + $this->password = $password; + + return $this; + } + + /** + * Connect to the POP3 host and authenticate. + * + * @throws Swift_Plugins_Pop_Pop3Exception if connection fails + */ + public function connect() + { + if (isset($this->connection)) { + $this->connection->connect(); + } else { + if (!isset($this->socket)) { + if (!$socket = fsockopen( + $this->getHostString(), $this->port, $errno, $errstr, $this->timeout)) { + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to connect to POP3 host [%s]: %s', $this->host, $errstr)); + } + $this->socket = $socket; + + if (false === $greeting = fgets($this->socket)) { + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to connect to POP3 host [%s]', trim($greeting ?? ''))); + } + + $this->assertOk($greeting); + + if ($this->username) { + $this->command(sprintf("USER %s\r\n", $this->username)); + $this->command(sprintf("PASS %s\r\n", $this->password)); + } + } + } + } + + /** + * Disconnect from the POP3 host. + */ + public function disconnect() + { + if (isset($this->connection)) { + $this->connection->disconnect(); + } else { + $this->command("QUIT\r\n"); + if (!fclose($this->socket)) { + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('POP3 host [%s] connection could not be stopped', $this->host)); + } + $this->socket = null; + } + } + + /** + * Invoked just before a Transport is started. + */ + public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) + { + if (isset($this->transport)) { + if ($this->transport !== $evt->getTransport()) { + return; + } + } + + $this->connect(); + $this->disconnect(); + } + + /** + * Not used. + */ + public function transportStarted(Swift_Events_TransportChangeEvent $evt) + { + } + + /** + * Not used. + */ + public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) + { + } + + /** + * Not used. + */ + public function transportStopped(Swift_Events_TransportChangeEvent $evt) + { + } + + private function command($command) + { + if (!fwrite($this->socket, $command)) { + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to write command [%s] to POP3 host', trim($command ?? ''))); + } + + if (false === $response = fgets($this->socket)) { + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('Failed to read from POP3 host after command [%s]', trim($command ?? ''))); + } + + $this->assertOk($response); + + return $response; + } + + private function assertOk($response) + { + if ('+OK' != substr($response, 0, 3)) { + throw new Swift_Plugins_Pop_Pop3Exception(sprintf('POP3 command failed [%s]', trim($response ?? ''))); + } + } + + private function getHostString() + { + $host = $this->host; + switch (strtolower($this->crypto ?? '')) { + case 'ssl': + $host = 'ssl://'.$host; + break; + + case 'tls': + $host = 'tls://'.$host; + break; + } + + return $host; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php new file mode 100644 index 00000000..f7373b24 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php @@ -0,0 +1,201 @@ +recipient = $recipient; + $this->whitelist = $whitelist; + } + + /** + * Set the recipient of all messages. + * + * @param mixed $recipient + */ + public function setRecipient($recipient) + { + $this->recipient = $recipient; + } + + /** + * Get the recipient of all messages. + * + * @return mixed + */ + public function getRecipient() + { + return $this->recipient; + } + + /** + * Set a list of regular expressions to whitelist certain recipients. + */ + public function setWhitelist(array $whitelist) + { + $this->whitelist = $whitelist; + } + + /** + * Get the whitelist. + * + * @return array + */ + public function getWhitelist() + { + return $this->whitelist; + } + + /** + * Invoked immediately before the Message is sent. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $headers = $message->getHeaders(); + + // conditionally save current recipients + + if ($headers->has('to')) { + $headers->addMailboxHeader('X-Swift-To', $message->getTo()); + } + + if ($headers->has('cc')) { + $headers->addMailboxHeader('X-Swift-Cc', $message->getCc()); + } + + if ($headers->has('bcc')) { + $headers->addMailboxHeader('X-Swift-Bcc', $message->getBcc()); + } + + // Filter remaining headers against whitelist + $this->filterHeaderSet($headers, 'To'); + $this->filterHeaderSet($headers, 'Cc'); + $this->filterHeaderSet($headers, 'Bcc'); + + // Add each hard coded recipient + $to = $message->getTo(); + if (null === $to) { + $to = []; + } + + foreach ((array) $this->recipient as $recipient) { + if (!\array_key_exists($recipient, $to)) { + $message->addTo($recipient); + } + } + } + + /** + * Filter header set against a whitelist of regular expressions. + * + * @param string $type + */ + private function filterHeaderSet(Swift_Mime_SimpleHeaderSet $headerSet, $type) + { + foreach ($headerSet->getAll($type) as $headers) { + $headers->setNameAddresses($this->filterNameAddresses($headers->getNameAddresses())); + } + } + + /** + * Filtered list of addresses => name pairs. + * + * @return array + */ + private function filterNameAddresses(array $recipients) + { + $filtered = []; + + foreach ($recipients as $address => $name) { + if ($this->isWhitelisted($address)) { + $filtered[$address] = $name; + } + } + + return $filtered; + } + + /** + * Matches address against whitelist of regular expressions. + * + * @return bool + */ + protected function isWhitelisted($recipient) + { + if (\in_array($recipient, (array) $this->recipient)) { + return true; + } + + foreach ($this->whitelist as $pattern) { + if (preg_match($pattern, $recipient)) { + return true; + } + } + + return false; + } + + /** + * Invoked immediately after the Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $this->restoreMessage($evt->getMessage()); + } + + private function restoreMessage(Swift_Mime_SimpleMessage $message) + { + // restore original headers + $headers = $message->getHeaders(); + + if ($headers->has('X-Swift-To')) { + $message->setTo($headers->get('X-Swift-To')->getNameAddresses()); + $headers->removeAll('X-Swift-To'); + } else { + $message->setTo(null); + } + + if ($headers->has('X-Swift-Cc')) { + $message->setCc($headers->get('X-Swift-Cc')->getNameAddresses()); + $headers->removeAll('X-Swift-Cc'); + } + + if ($headers->has('X-Swift-Bcc')) { + $message->setBcc($headers->get('X-Swift-Bcc')->getNameAddresses()); + $headers->removeAll('X-Swift-Bcc'); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php new file mode 100644 index 00000000..b8818339 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php @@ -0,0 +1,31 @@ +reporter = $reporter; + } + + /** + * Not used. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + } + + /** + * Invoked immediately after the Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + $message = $evt->getMessage(); + $failures = array_flip($evt->getFailedRecipients()); + foreach ((array) $message->getTo() as $address => $null) { + $this->reporter->notify($message, $address, (\array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); + } + foreach ((array) $message->getCc() as $address => $null) { + $this->reporter->notify($message, $address, (\array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); + } + foreach ((array) $message->getBcc() as $address => $null) { + $this->reporter->notify($message, $address, (\array_key_exists($address, $failures) ? Swift_Plugins_Reporter::RESULT_FAIL : Swift_Plugins_Reporter::RESULT_PASS)); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php new file mode 100644 index 00000000..249cffbd --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php @@ -0,0 +1,58 @@ +failures_cache[$address])) { + $this->failures[] = $address; + $this->failures_cache[$address] = true; + } + } + + /** + * Get an array of addresses for which delivery failed. + * + * @return array + */ + public function getFailedRecipients() + { + return $this->failures; + } + + /** + * Clear the buffer (empty the list). + */ + public function clear() + { + $this->failures = $this->failures_cache = []; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php new file mode 100644 index 00000000..1cfc3f97 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php @@ -0,0 +1,38 @@ +'.PHP_EOL; + echo 'PASS '.$address.PHP_EOL; + echo ''.PHP_EOL; + flush(); + } else { + echo '
    '.PHP_EOL; + echo 'FAIL '.$address.PHP_EOL; + echo '
    '.PHP_EOL; + flush(); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php new file mode 100644 index 00000000..595c0f60 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php @@ -0,0 +1,24 @@ +rate = $rate; + $this->mode = $mode; + $this->sleeper = $sleeper; + $this->timer = $timer; + } + + /** + * Invoked immediately before the Message is sent. + */ + public function beforeSendPerformed(Swift_Events_SendEvent $evt) + { + $time = $this->getTimestamp(); + if (!isset($this->start)) { + $this->start = $time; + } + $duration = $time - $this->start; + + switch ($this->mode) { + case self::BYTES_PER_MINUTE: + $sleep = $this->throttleBytesPerMinute($duration); + break; + case self::MESSAGES_PER_SECOND: + $sleep = $this->throttleMessagesPerSecond($duration); + break; + case self::MESSAGES_PER_MINUTE: + $sleep = $this->throttleMessagesPerMinute($duration); + break; + default: + $sleep = 0; + break; + } + + if ($sleep > 0) { + $this->sleep($sleep); + } + } + + /** + * Invoked when a Message is sent. + */ + public function sendPerformed(Swift_Events_SendEvent $evt) + { + parent::sendPerformed($evt); + ++$this->messages; + } + + /** + * Sleep for $seconds. + * + * @param int $seconds + */ + public function sleep($seconds) + { + if (isset($this->sleeper)) { + $this->sleeper->sleep($seconds); + } else { + sleep($seconds); + } + } + + /** + * Get the current UNIX timestamp. + * + * @return int + */ + public function getTimestamp() + { + if (isset($this->timer)) { + return $this->timer->getTimestamp(); + } + + return time(); + } + + /** + * Get a number of seconds to sleep for. + * + * @param int $timePassed + * + * @return int + */ + private function throttleBytesPerMinute($timePassed) + { + $expectedDuration = $this->getBytesOut() / ($this->rate / 60); + + return (int) ceil($expectedDuration - $timePassed); + } + + /** + * Get a number of seconds to sleep for. + * + * @param int $timePassed + * + * @return int + */ + private function throttleMessagesPerSecond($timePassed) + { + $expectedDuration = $this->messages / $this->rate; + + return (int) ceil($expectedDuration - $timePassed); + } + + /** + * Get a number of seconds to sleep for. + * + * @param int $timePassed + * + * @return int + */ + private function throttleMessagesPerMinute($timePassed) + { + $expectedDuration = $this->messages / ($this->rate / 60); + + return (int) ceil($expectedDuration - $timePassed); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php new file mode 100644 index 00000000..9c8deb38 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php @@ -0,0 +1,24 @@ +register('properties.charset')->asValue($charset); + + return $this; + } + + /** + * Set the directory where temporary files can be saved. + * + * @param string $dir + * + * @return $this + */ + public function setTempDir($dir) + { + Swift_DependencyContainer::getInstance()->register('tempdir')->asValue($dir); + + return $this; + } + + /** + * Set the type of cache to use (i.e. "disk" or "array"). + * + * @param string $type + * + * @return $this + */ + public function setCacheType($type) + { + Swift_DependencyContainer::getInstance()->register('cache')->asAliasOf(sprintf('cache.%s', $type)); + + return $this; + } + + /** + * Set the QuotedPrintable dot escaper preference. + * + * @param bool $dotEscape + * + * @return $this + */ + public function setQPDotEscape($dotEscape) + { + $dotEscape = !empty($dotEscape); + Swift_DependencyContainer::getInstance() + ->register('mime.qpcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') + ->withDependencies(['mime.charstream', 'mime.bytecanonicalizer']) + ->addConstructorValue($dotEscape); + + return $this; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php new file mode 100644 index 00000000..2897474e --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php @@ -0,0 +1,27 @@ +createDependenciesFor('transport.sendmail') + ); + + $this->setCommand($command); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php new file mode 100644 index 00000000..26c5e285 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php @@ -0,0 +1,19 @@ + + */ +interface Swift_Signer +{ + public function reset(); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php new file mode 100644 index 00000000..b25c427a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php @@ -0,0 +1,31 @@ + + */ +interface Swift_Signers_BodySigner extends Swift_Signer +{ + /** + * Change the Swift_Signed_Message to apply the singing. + * + * @return self + */ + public function signMessage(Swift_Message $message); + + /** + * Return the list of header a signer might tamper. + * + * @return array + */ + public function getAlteredHeaders(); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php new file mode 100644 index 00000000..ec82dc05 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php @@ -0,0 +1,682 @@ + + */ +class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner +{ + /** + * PrivateKey. + * + * @var string + */ + protected $privateKey; + + /** + * DomainName. + * + * @var string + */ + protected $domainName; + + /** + * Selector. + * + * @var string + */ + protected $selector; + + private $passphrase = ''; + + /** + * Hash algorithm used. + * + * @see RFC6376 3.3: Signers MUST implement and SHOULD sign using rsa-sha256. + * + * @var string + */ + protected $hashAlgorithm = 'rsa-sha256'; + + /** + * Body canon method. + * + * @var string + */ + protected $bodyCanon = 'simple'; + + /** + * Header canon method. + * + * @var string + */ + protected $headerCanon = 'simple'; + + /** + * Headers not being signed. + * + * @var array + */ + protected $ignoredHeaders = ['return-path' => true]; + + /** + * Signer identity. + * + * @var string + */ + protected $signerIdentity; + + /** + * BodyLength. + * + * @var int + */ + protected $bodyLen = 0; + + /** + * Maximum signedLen. + * + * @var int + */ + protected $maxLen = PHP_INT_MAX; + + /** + * Embbed bodyLen in signature. + * + * @var bool + */ + protected $showLen = false; + + /** + * When the signature has been applied (true means time()), false means not embedded. + * + * @var mixed + */ + protected $signatureTimestamp = true; + + /** + * When will the signature expires false means not embedded, if sigTimestamp is auto + * Expiration is relative, otherwise it's absolute. + * + * @var int + */ + protected $signatureExpiration = false; + + /** + * Must we embed signed headers? + * + * @var bool + */ + protected $debugHeaders = false; + + // work variables + /** + * Headers used to generate hash. + * + * @var array + */ + protected $signedHeaders = []; + + /** + * If debugHeaders is set store debugData here. + * + * @var string[] + */ + private $debugHeadersData = []; + + /** + * Stores the bodyHash. + * + * @var string + */ + private $bodyHash = ''; + + /** + * Stores the signature header. + * + * @var Swift_Mime_Headers_ParameterizedHeader + */ + protected $dkimHeader; + + private $bodyHashHandler; + + private $headerHash; + + private $headerCanonData = ''; + + private $bodyCanonEmptyCounter = 0; + + private $bodyCanonIgnoreStart = 2; + + private $bodyCanonSpace = false; + + private $bodyCanonLastChar = null; + + private $bodyCanonLine = ''; + + private $bound = []; + + /** + * Constructor. + * + * @param string $privateKey + * @param string $domainName + * @param string $selector + * @param string $passphrase + */ + public function __construct($privateKey, $domainName, $selector, $passphrase = '') + { + $this->privateKey = $privateKey; + $this->domainName = $domainName; + $this->signerIdentity = '@'.$domainName; + $this->selector = $selector; + $this->passphrase = $passphrase; + } + + /** + * Reset the Signer. + * + * @see Swift_Signer::reset() + */ + public function reset() + { + $this->headerHash = null; + $this->signedHeaders = []; + $this->bodyHash = null; + $this->bodyHashHandler = null; + $this->bodyCanonIgnoreStart = 2; + $this->bodyCanonEmptyCounter = 0; + $this->bodyCanonLastChar = null; + $this->bodyCanonSpace = false; + } + + /** + * Writes $bytes to the end of the stream. + * + * Writing may not happen immediately if the stream chooses to buffer. If + * you want to write these bytes with immediate effect, call {@link commit()} + * after calling write(). + * + * This method returns the sequence ID of the write (i.e. 1 for first, 2 for + * second, etc etc). + * + * @param string $bytes + * + * @return int + * + * @throws Swift_IoException + */ + // TODO fix return + public function write($bytes) + { + $this->canonicalizeBody($bytes); + foreach ($this->bound as $is) { + $is->write($bytes); + } + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + */ + public function commit() + { + // Nothing to do + return; + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + */ + public function bind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + $this->bound[] = $is; + + return; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + */ + public function unbind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + foreach ($this->bound as $k => $stream) { + if ($stream === $is) { + unset($this->bound[$k]); + + return; + } + } + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * + * @throws Swift_IoException + */ + public function flushBuffers() + { + $this->reset(); + } + + /** + * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1. + * + * @param string $hash 'rsa-sha1' or 'rsa-sha256' + * + * @throws Swift_SwiftException + * + * @return $this + */ + public function setHashAlgorithm($hash) + { + switch ($hash) { + case 'rsa-sha1': + $this->hashAlgorithm = 'rsa-sha1'; + break; + case 'rsa-sha256': + $this->hashAlgorithm = 'rsa-sha256'; + if (!\defined('OPENSSL_ALGO_SHA256')) { + throw new Swift_SwiftException('Unable to set sha256 as it is not supported by OpenSSL.'); + } + break; + default: + throw new Swift_SwiftException('Unable to set the hash algorithm, must be one of rsa-sha1 or rsa-sha256 (%s given).', $hash); + } + + return $this; + } + + /** + * Set the body canonicalization algorithm. + * + * @param string $canon + * + * @return $this + */ + public function setBodyCanon($canon) + { + if ('relaxed' == $canon) { + $this->bodyCanon = 'relaxed'; + } else { + $this->bodyCanon = 'simple'; + } + + return $this; + } + + /** + * Set the header canonicalization algorithm. + * + * @param string $canon + * + * @return $this + */ + public function setHeaderCanon($canon) + { + if ('relaxed' == $canon) { + $this->headerCanon = 'relaxed'; + } else { + $this->headerCanon = 'simple'; + } + + return $this; + } + + /** + * Set the signer identity. + * + * @param string $identity + * + * @return $this + */ + public function setSignerIdentity($identity) + { + $this->signerIdentity = $identity; + + return $this; + } + + /** + * Set the length of the body to sign. + * + * @param mixed $len (bool or int) + * + * @return $this + */ + public function setBodySignedLen($len) + { + if (true === $len) { + $this->showLen = true; + $this->maxLen = PHP_INT_MAX; + } elseif (false === $len) { + $this->showLen = false; + $this->maxLen = PHP_INT_MAX; + } else { + $this->showLen = true; + $this->maxLen = (int) $len; + } + + return $this; + } + + /** + * Set the signature timestamp. + * + * @param int $time A timestamp + * + * @return $this + */ + public function setSignatureTimestamp($time) + { + $this->signatureTimestamp = $time; + + return $this; + } + + /** + * Set the signature expiration timestamp. + * + * @param int $time A timestamp + * + * @return $this + */ + public function setSignatureExpiration($time) + { + $this->signatureExpiration = $time; + + return $this; + } + + /** + * Enable / disable the DebugHeaders. + * + * @param bool $debug + * + * @return Swift_Signers_DKIMSigner + */ + public function setDebugHeaders($debug) + { + $this->debugHeaders = (bool) $debug; + + return $this; + } + + /** + * Start Body. + */ + public function startBody() + { + // Init + switch ($this->hashAlgorithm) { + case 'rsa-sha256': + $this->bodyHashHandler = hash_init('sha256'); + break; + case 'rsa-sha1': + $this->bodyHashHandler = hash_init('sha1'); + break; + } + $this->bodyCanonLine = ''; + } + + /** + * End Body. + */ + public function endBody() + { + $this->endOfBody(); + } + + /** + * Returns the list of Headers Tampered by this plugin. + * + * @return array + */ + public function getAlteredHeaders() + { + if ($this->debugHeaders) { + return ['DKIM-Signature', 'X-DebugHash']; + } else { + return ['DKIM-Signature']; + } + } + + /** + * Adds an ignored Header. + * + * @param string $header_name + * + * @return Swift_Signers_DKIMSigner + */ + public function ignoreHeader($header_name) + { + $this->ignoredHeaders[strtolower($header_name ?? '')] = true; + + return $this; + } + + /** + * Set the headers to sign. + * + * @return Swift_Signers_DKIMSigner + */ + public function setHeaders(Swift_Mime_SimpleHeaderSet $headers) + { + $this->headerCanonData = ''; + // Loop through Headers + $listHeaders = $headers->listAll(); + foreach ($listHeaders as $hName) { + // Check if we need to ignore Header + if (!isset($this->ignoredHeaders[strtolower($hName ?? '')])) { + if ($headers->has($hName)) { + $tmp = $headers->getAll($hName); + foreach ($tmp as $header) { + if ('' != $header->getFieldBody()) { + $this->addHeader($header->toString()); + $this->signedHeaders[] = $header->getFieldName(); + } + } + } + } + } + + return $this; + } + + /** + * Add the signature to the given Headers. + * + * @return Swift_Signers_DKIMSigner + */ + public function addSignature(Swift_Mime_SimpleHeaderSet $headers) + { + // Prepare the DKIM-Signature + $params = ['v' => '1', 'a' => $this->hashAlgorithm, 'bh' => base64_encode($this->bodyHash ?? ''), 'd' => $this->domainName, 'h' => implode(': ', $this->signedHeaders), 'i' => $this->signerIdentity, 's' => $this->selector]; + if ('simple' != $this->bodyCanon) { + $params['c'] = $this->headerCanon.'/'.$this->bodyCanon; + } elseif ('simple' != $this->headerCanon) { + $params['c'] = $this->headerCanon; + } + if ($this->showLen) { + $params['l'] = $this->bodyLen; + } + if (true === $this->signatureTimestamp) { + $params['t'] = time(); + if (false !== $this->signatureExpiration) { + $params['x'] = $params['t'] + $this->signatureExpiration; + } + } else { + if (false !== $this->signatureTimestamp) { + $params['t'] = $this->signatureTimestamp; + } + if (false !== $this->signatureExpiration) { + $params['x'] = $this->signatureExpiration; + } + } + if ($this->debugHeaders) { + $params['z'] = implode('|', $this->debugHeadersData); + } + $string = ''; + foreach ($params as $k => $v) { + $string .= $k.'='.$v.'; '; + } + $string = trim($string); + $headers->addTextHeader('DKIM-Signature', $string); + // Add the last DKIM-Signature + $tmp = $headers->getAll('DKIM-Signature'); + $this->dkimHeader = end($tmp); + $this->addHeader(trim($this->dkimHeader->toString() ?? '')."\r\n b=", true); + if ($this->debugHeaders) { + $headers->addTextHeader('X-DebugHash', base64_encode($this->headerHash ?? '')); + } + $this->dkimHeader->setValue($string.' b='.trim(chunk_split(base64_encode($this->getEncryptedHash() ?? ''), 73, ' '))); + + return $this; + } + + /* Private helpers */ + + protected function addHeader($header, $is_sig = false) + { + switch ($this->headerCanon) { + case 'relaxed': + // Prepare Header and cascade + $exploded = explode(':', $header, 2); + $name = strtolower(trim($exploded[0])); + $value = str_replace("\r\n", '', $exploded[1]); + $value = preg_replace("/[ \t][ \t]+/", ' ', $value); + $header = $name.':'.trim($value).($is_sig ? '' : "\r\n"); + // no break + case 'simple': + // Nothing to do + } + $this->addToHeaderHash($header); + } + + protected function canonicalizeBody($string) + { + $len = \strlen($string); + $canon = ''; + $method = ('relaxed' == $this->bodyCanon); + for ($i = 0; $i < $len; ++$i) { + if ($this->bodyCanonIgnoreStart > 0) { + --$this->bodyCanonIgnoreStart; + continue; + } + switch ($string[$i]) { + case "\r": + $this->bodyCanonLastChar = "\r"; + break; + case "\n": + if ("\r" == $this->bodyCanonLastChar) { + if ($method) { + $this->bodyCanonSpace = false; + } + if ('' == $this->bodyCanonLine) { + ++$this->bodyCanonEmptyCounter; + } else { + $this->bodyCanonLine = ''; + $canon .= "\r\n"; + } + } else { + // Wooops Error + // todo handle it but should never happen + } + break; + case ' ': + case "\t": + if ($method) { + $this->bodyCanonSpace = true; + break; + } + // no break + default: + if ($this->bodyCanonEmptyCounter > 0) { + $canon .= str_repeat("\r\n", $this->bodyCanonEmptyCounter); + $this->bodyCanonEmptyCounter = 0; + } + if ($this->bodyCanonSpace) { + $this->bodyCanonLine .= ' '; + $canon .= ' '; + $this->bodyCanonSpace = false; + } + $this->bodyCanonLine .= $string[$i]; + $canon .= $string[$i]; + } + } + $this->addToBodyHash($canon); + } + + protected function endOfBody() + { + // Add trailing Line return if last line is non empty + if (\strlen($this->bodyCanonLine) > 0) { + $this->addToBodyHash("\r\n"); + } + $this->bodyHash = hash_final($this->bodyHashHandler, true); + } + + private function addToBodyHash($string) + { + $len = \strlen($string); + if ($len > ($new_len = ($this->maxLen - $this->bodyLen))) { + $string = substr($string, 0, $new_len); + $len = $new_len; + } + hash_update($this->bodyHashHandler, $string); + $this->bodyLen += $len; + } + + private function addToHeaderHash($header) + { + if ($this->debugHeaders) { + $this->debugHeadersData[] = trim($header ?? ''); + } + $this->headerCanonData .= $header; + } + + /** + * @throws Swift_SwiftException + * + * @return string + */ + private function getEncryptedHash() + { + $signature = ''; + switch ($this->hashAlgorithm) { + case 'rsa-sha1': + $algorithm = OPENSSL_ALGO_SHA1; + break; + case 'rsa-sha256': + $algorithm = OPENSSL_ALGO_SHA256; + break; + } + $pkeyId = openssl_get_privatekey($this->privateKey, $this->passphrase); + if (!$pkeyId) { + throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']'); + } + if (openssl_sign($this->headerCanonData, $signature, $pkeyId, $algorithm)) { + return $signature; + } + throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']'); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php new file mode 100644 index 00000000..5e2b67b6 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php @@ -0,0 +1,504 @@ + + */ +class Swift_Signers_DomainKeySigner implements Swift_Signers_HeaderSigner +{ + /** + * PrivateKey. + * + * @var string + */ + protected $privateKey; + + /** + * DomainName. + * + * @var string + */ + protected $domainName; + + /** + * Selector. + * + * @var string + */ + protected $selector; + + /** + * Hash algorithm used. + * + * @var string + */ + protected $hashAlgorithm = 'rsa-sha1'; + + /** + * Canonisation method. + * + * @var string + */ + protected $canon = 'simple'; + + /** + * Headers not being signed. + * + * @var array + */ + protected $ignoredHeaders = []; + + /** + * Signer identity. + * + * @var string + */ + protected $signerIdentity; + + /** + * Must we embed signed headers? + * + * @var bool + */ + protected $debugHeaders = false; + + // work variables + /** + * Headers used to generate hash. + * + * @var array + */ + private $signedHeaders = []; + + /** + * Stores the signature header. + * + * @var Swift_Mime_Headers_ParameterizedHeader + */ + protected $domainKeyHeader; + + /** + * Hash Handler. + * + * @var resource|null + */ + private $hashHandler; + + private $canonData = ''; + + private $bodyCanonEmptyCounter = 0; + + private $bodyCanonIgnoreStart = 2; + + private $bodyCanonSpace = false; + + private $bodyCanonLastChar = null; + + private $bodyCanonLine = ''; + + private $bound = []; + + /** + * Constructor. + * + * @param string $privateKey + * @param string $domainName + * @param string $selector + */ + public function __construct($privateKey, $domainName, $selector) + { + $this->privateKey = $privateKey; + $this->domainName = $domainName; + $this->signerIdentity = '@'.$domainName; + $this->selector = $selector; + } + + /** + * Resets internal states. + * + * @return $this + */ + public function reset() + { + $this->hashHandler = null; + $this->bodyCanonIgnoreStart = 2; + $this->bodyCanonEmptyCounter = 0; + $this->bodyCanonLastChar = null; + $this->bodyCanonSpace = false; + + return $this; + } + + /** + * Writes $bytes to the end of the stream. + * + * Writing may not happen immediately if the stream chooses to buffer. If + * you want to write these bytes with immediate effect, call {@link commit()} + * after calling write(). + * + * This method returns the sequence ID of the write (i.e. 1 for first, 2 for + * second, etc etc). + * + * @param string $bytes + * + * @return int + * + * @throws Swift_IoException + * + * @return $this + */ + public function write($bytes) + { + $this->canonicalizeBody($bytes); + foreach ($this->bound as $is) { + $is->write($bytes); + } + + return $this; + } + + /** + * For any bytes that are currently buffered inside the stream, force them + * off the buffer. + * + * @throws Swift_IoException + * + * @return $this + */ + public function commit() + { + // Nothing to do + return $this; + } + + /** + * Attach $is to this stream. + * + * The stream acts as an observer, receiving all data that is written. + * All {@link write()} and {@link flushBuffers()} operations will be mirrored. + * + * @return $this + */ + public function bind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + $this->bound[] = $is; + + return $this; + } + + /** + * Remove an already bound stream. + * + * If $is is not bound, no errors will be raised. + * If the stream currently has any buffered data it will be written to $is + * before unbinding occurs. + * + * @return $this + */ + public function unbind(Swift_InputByteStream $is) + { + // Don't have to mirror anything + foreach ($this->bound as $k => $stream) { + if ($stream === $is) { + unset($this->bound[$k]); + + break; + } + } + + return $this; + } + + /** + * Flush the contents of the stream (empty it) and set the internal pointer + * to the beginning. + * + * @throws Swift_IoException + * + * @return $this + */ + public function flushBuffers() + { + $this->reset(); + + return $this; + } + + /** + * Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1 defaults to rsa-sha256. + * + * @param string $hash + * + * @return $this + */ + public function setHashAlgorithm($hash) + { + $this->hashAlgorithm = 'rsa-sha1'; + + return $this; + } + + /** + * Set the canonicalization algorithm. + * + * @param string $canon simple | nofws defaults to simple + * + * @return $this + */ + public function setCanon($canon) + { + if ('nofws' == $canon) { + $this->canon = 'nofws'; + } else { + $this->canon = 'simple'; + } + + return $this; + } + + /** + * Set the signer identity. + * + * @param string $identity + * + * @return $this + */ + public function setSignerIdentity($identity) + { + $this->signerIdentity = $identity; + + return $this; + } + + /** + * Enable / disable the DebugHeaders. + * + * @param bool $debug + * + * @return $this + */ + public function setDebugHeaders($debug) + { + $this->debugHeaders = (bool) $debug; + + return $this; + } + + /** + * Start Body. + */ + public function startBody() + { + } + + /** + * End Body. + */ + public function endBody() + { + $this->endOfBody(); + } + + /** + * Returns the list of Headers Tampered by this plugin. + * + * @return array + */ + public function getAlteredHeaders() + { + if ($this->debugHeaders) { + return ['DomainKey-Signature', 'X-DebugHash']; + } + + return ['DomainKey-Signature']; + } + + /** + * Adds an ignored Header. + * + * @param string $header_name + * + * @return $this + */ + public function ignoreHeader($header_name) + { + $this->ignoredHeaders[strtolower($header_name ?? '')] = true; + + return $this; + } + + /** + * Set the headers to sign. + * + * @return $this + */ + public function setHeaders(Swift_Mime_SimpleHeaderSet $headers) + { + $this->startHash(); + $this->canonData = ''; + // Loop through Headers + $listHeaders = $headers->listAll(); + foreach ($listHeaders as $hName) { + // Check if we need to ignore Header + if (!isset($this->ignoredHeaders[strtolower($hName ?? '')])) { + if ($headers->has($hName)) { + $tmp = $headers->getAll($hName); + foreach ($tmp as $header) { + if ('' != $header->getFieldBody()) { + $this->addHeader($header->toString()); + $this->signedHeaders[] = $header->getFieldName(); + } + } + } + } + } + $this->endOfHeaders(); + + return $this; + } + + /** + * Add the signature to the given Headers. + * + * @return $this + */ + public function addSignature(Swift_Mime_SimpleHeaderSet $headers) + { + // Prepare the DomainKey-Signature Header + $params = ['a' => $this->hashAlgorithm, 'b' => chunk_split(base64_encode($this->getEncryptedHash() ?? ''), 73, ' '), 'c' => $this->canon, 'd' => $this->domainName, 'h' => implode(': ', $this->signedHeaders), 'q' => 'dns', 's' => $this->selector]; + $string = ''; + foreach ($params as $k => $v) { + $string .= $k.'='.$v.'; '; + } + $string = trim($string); + $headers->addTextHeader('DomainKey-Signature', $string); + + return $this; + } + + /* Private helpers */ + + protected function addHeader($header) + { + switch ($this->canon) { + case 'nofws': + // Prepare Header and cascade + $exploded = explode(':', $header, 2); + $name = strtolower(trim($exploded[0])); + $value = str_replace("\r\n", '', $exploded[1]); + $value = preg_replace("/[ \t][ \t]+/", ' ', $value); + $header = $name.':'.trim($value)."\r\n"; + // no break + case 'simple': + // Nothing to do + } + $this->addToHash($header); + } + + protected function endOfHeaders() + { + $this->bodyCanonEmptyCounter = 1; + } + + protected function canonicalizeBody($string) + { + $len = \strlen($string); + $canon = ''; + $nofws = ('nofws' == $this->canon); + for ($i = 0; $i < $len; ++$i) { + if ($this->bodyCanonIgnoreStart > 0) { + --$this->bodyCanonIgnoreStart; + continue; + } + switch ($string[$i]) { + case "\r": + $this->bodyCanonLastChar = "\r"; + break; + case "\n": + if ("\r" == $this->bodyCanonLastChar) { + if ($nofws) { + $this->bodyCanonSpace = false; + } + if ('' == $this->bodyCanonLine) { + ++$this->bodyCanonEmptyCounter; + } else { + $this->bodyCanonLine = ''; + $canon .= "\r\n"; + } + } else { + // Wooops Error + throw new Swift_SwiftException('Invalid new line sequence in mail found \n without preceding \r'); + } + break; + case ' ': + case "\t": + case "\x09": //HTAB + if ($nofws) { + $this->bodyCanonSpace = true; + break; + } + // no break + default: + if ($this->bodyCanonEmptyCounter > 0) { + $canon .= str_repeat("\r\n", $this->bodyCanonEmptyCounter); + $this->bodyCanonEmptyCounter = 0; + } + $this->bodyCanonLine .= $string[$i]; + $canon .= $string[$i]; + } + } + $this->addToHash($canon); + } + + protected function endOfBody() + { + if (\strlen($this->bodyCanonLine) > 0) { + $this->addToHash("\r\n"); + } + } + + private function addToHash($string) + { + $this->canonData .= $string; + hash_update($this->hashHandler, $string); + } + + private function startHash() + { + // Init + switch ($this->hashAlgorithm) { + case 'rsa-sha1': + $this->hashHandler = hash_init('sha1'); + break; + } + $this->bodyCanonLine = ''; + } + + /** + * @throws Swift_SwiftException + * + * @return string + */ + private function getEncryptedHash() + { + $signature = ''; + $pkeyId = openssl_get_privatekey($this->privateKey); + if (!$pkeyId) { + throw new Swift_SwiftException('Unable to load DomainKey Private Key ['.openssl_error_string().']'); + } + if (openssl_sign($this->canonData, $signature, $pkeyId, OPENSSL_ALGO_SHA1)) { + return $signature; + } + throw new Swift_SwiftException('Unable to sign DomainKey Hash ['.openssl_error_string().']'); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php new file mode 100644 index 00000000..6f5c2092 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php @@ -0,0 +1,61 @@ + + */ +interface Swift_Signers_HeaderSigner extends Swift_Signer, Swift_InputByteStream +{ + /** + * Exclude an header from the signed headers. + * + * @param string $header_name + * + * @return self + */ + public function ignoreHeader($header_name); + + /** + * Prepare the Signer to get a new Body. + * + * @return self + */ + public function startBody(); + + /** + * Give the signal that the body has finished streaming. + * + * @return self + */ + public function endBody(); + + /** + * Give the headers already given. + * + * @return self + */ + public function setHeaders(Swift_Mime_SimpleHeaderSet $headers); + + /** + * Add the header(s) to the headerSet. + * + * @return self + */ + public function addSignature(Swift_Mime_SimpleHeaderSet $headers); + + /** + * Return the list of header a signer might tamper. + * + * @return array + */ + public function getAlteredHeaders(); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php new file mode 100644 index 00000000..520bcc15 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php @@ -0,0 +1,183 @@ + + * + * @deprecated since SwiftMailer 6.1.0; use Swift_Signers_DKIMSigner instead. + */ +class Swift_Signers_OpenDKIMSigner extends Swift_Signers_DKIMSigner +{ + private $peclLoaded = false; + + private $dkimHandler = null; + + private $dropFirstLF = true; + + const CANON_RELAXED = 1; + const CANON_SIMPLE = 2; + const SIG_RSA_SHA1 = 3; + const SIG_RSA_SHA256 = 4; + + public function __construct($privateKey, $domainName, $selector) + { + if (!\extension_loaded('opendkim')) { + throw new Swift_SwiftException('php-opendkim extension not found'); + } + + $this->peclLoaded = true; + + parent::__construct($privateKey, $domainName, $selector); + } + + public function addSignature(Swift_Mime_SimpleHeaderSet $headers) + { + $header = new Swift_Mime_Headers_OpenDKIMHeader('DKIM-Signature'); + $headerVal = $this->dkimHandler->getSignatureHeader(); + if (false === $headerVal || \is_int($headerVal)) { + throw new Swift_SwiftException('OpenDKIM Error: '.$this->dkimHandler->getError()); + } + $header->setValue($headerVal); + $headers->set($header); + + return $this; + } + + public function setHeaders(Swift_Mime_SimpleHeaderSet $headers) + { + $hash = 'rsa-sha1' == $this->hashAlgorithm ? OpenDKIMSign::ALG_RSASHA1 : OpenDKIMSign::ALG_RSASHA256; + $bodyCanon = 'simple' == $this->bodyCanon ? OpenDKIMSign::CANON_SIMPLE : OpenDKIMSign::CANON_RELAXED; + $headerCanon = 'simple' == $this->headerCanon ? OpenDKIMSign::CANON_SIMPLE : OpenDKIMSign::CANON_RELAXED; + $this->dkimHandler = new OpenDKIMSign($this->privateKey, $this->selector, $this->domainName, $headerCanon, $bodyCanon, $hash, -1); + // Hardcode signature Margin for now + $this->dkimHandler->setMargin(78); + + if (!is_numeric($this->signatureTimestamp)) { + OpenDKIM::setOption(OpenDKIM::OPTS_FIXEDTIME, time()); + } else { + if (!OpenDKIM::setOption(OpenDKIM::OPTS_FIXEDTIME, $this->signatureTimestamp)) { + throw new Swift_SwiftException('Unable to force signature timestamp ['.openssl_error_string().']'); + } + } + if (isset($this->signerIdentity)) { + $this->dkimHandler->setSigner($this->signerIdentity); + } + $listHeaders = $headers->listAll(); + foreach ($listHeaders as $hName) { + // Check if we need to ignore Header + if (!isset($this->ignoredHeaders[strtolower($hName ?? '')])) { + $tmp = $headers->getAll($hName); + if ($headers->has($hName)) { + foreach ($tmp as $header) { + if ('' != $header->getFieldBody()) { + $htosign = $header->toString(); + $this->dkimHandler->header($htosign); + $this->signedHeaders[] = $header->getFieldName(); + } + } + } + } + } + + return $this; + } + + public function startBody() + { + if (!$this->peclLoaded) { + return parent::startBody(); + } + $this->dropFirstLF = true; + $this->dkimHandler->eoh(); + + return $this; + } + + public function endBody() + { + if (!$this->peclLoaded) { + return parent::endBody(); + } + $this->dkimHandler->eom(); + + return $this; + } + + public function reset() + { + $this->dkimHandler = null; + parent::reset(); + + return $this; + } + + /** + * Set the signature timestamp. + * + * @param int $time + * + * @return $this + */ + public function setSignatureTimestamp($time) + { + $this->signatureTimestamp = $time; + + return $this; + } + + /** + * Set the signature expiration timestamp. + * + * @param int $time + * + * @return $this + */ + public function setSignatureExpiration($time) + { + $this->signatureExpiration = $time; + + return $this; + } + + /** + * Enable / disable the DebugHeaders. + * + * @param bool $debug + * + * @return $this + */ + public function setDebugHeaders($debug) + { + $this->debugHeaders = (bool) $debug; + + return $this; + } + + // Protected + + protected function canonicalizeBody($string) + { + if (!$this->peclLoaded) { + return parent::canonicalizeBody($string); + } + if (true === $this->dropFirstLF) { + if ("\r" == $string[0] && "\n" == $string[1]) { + $string = substr($string, 2); + } + } + $this->dropFirstLF = false; + if (\strlen($string)) { + $this->dkimHandler->body($string); + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php new file mode 100644 index 00000000..3dd3cd05 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php @@ -0,0 +1,542 @@ + + * @author Jan Flora + */ +class Swift_Signers_SMimeSigner implements Swift_Signers_BodySigner +{ + protected $signCertificate; + protected $signPrivateKey; + protected $encryptCert; + protected $signThenEncrypt = true; + protected $signLevel; + protected $encryptLevel; + protected $signOptions; + protected $encryptOptions; + protected $encryptCipher; + protected $extraCerts = null; + protected $wrapFullMessage = false; + + /** + * @var Swift_StreamFilters_StringReplacementFilterFactory + */ + protected $replacementFactory; + + /** + * @var Swift_Mime_SimpleHeaderFactory + */ + protected $headerFactory; + + /** + * Constructor. + * + * @param string|null $signCertificate + * @param string|null $signPrivateKey + * @param string|null $encryptCertificate + */ + public function __construct($signCertificate = null, $signPrivateKey = null, $encryptCertificate = null) + { + if (null !== $signPrivateKey) { + $this->setSignCertificate($signCertificate, $signPrivateKey); + } + + if (null !== $encryptCertificate) { + $this->setEncryptCertificate($encryptCertificate); + } + + $this->replacementFactory = Swift_DependencyContainer::getInstance() + ->lookup('transport.replacementfactory'); + + $this->signOptions = PKCS7_DETACHED; + $this->encryptCipher = OPENSSL_CIPHER_AES_128_CBC; + } + + /** + * Set the certificate location to use for signing. + * + * @see https://secure.php.net/manual/en/openssl.pkcs7.flags.php + * + * @param string $certificate + * @param string|array $privateKey If the key needs an passphrase use array('file-location', 'passphrase') instead + * @param int $signOptions Bitwise operator options for openssl_pkcs7_sign() + * @param string $extraCerts A file containing intermediate certificates needed by the signing certificate + * + * @return $this + */ + public function setSignCertificate($certificate, $privateKey = null, $signOptions = PKCS7_DETACHED, $extraCerts = null) + { + $this->signCertificate = 'file://'.str_replace('\\', '/', realpath($certificate)); + + if (null !== $privateKey) { + if (\is_array($privateKey)) { + $this->signPrivateKey = $privateKey; + $this->signPrivateKey[0] = 'file://'.str_replace('\\', '/', realpath($privateKey[0])); + } else { + $this->signPrivateKey = 'file://'.str_replace('\\', '/', realpath($privateKey)); + } + } + + $this->signOptions = $signOptions; + $this->extraCerts = $extraCerts ? realpath($extraCerts) : null; + + return $this; + } + + /** + * Set the certificate location to use for encryption. + * + * @see https://secure.php.net/manual/en/openssl.pkcs7.flags.php + * @see https://secure.php.net/manual/en/openssl.ciphers.php + * + * @param string|array $recipientCerts Either an single X.509 certificate, or an assoc array of X.509 certificates. + * @param int $cipher + * + * @return $this + */ + public function setEncryptCertificate($recipientCerts, $cipher = null) + { + if (\is_array($recipientCerts)) { + $this->encryptCert = []; + + foreach ($recipientCerts as $cert) { + $this->encryptCert[] = 'file://'.str_replace('\\', '/', realpath($cert)); + } + } else { + $this->encryptCert = 'file://'.str_replace('\\', '/', realpath($recipientCerts)); + } + + if (null !== $cipher) { + $this->encryptCipher = $cipher; + } + + return $this; + } + + /** + * @return string + */ + public function getSignCertificate() + { + return $this->signCertificate; + } + + /** + * @return string + */ + public function getSignPrivateKey() + { + return $this->signPrivateKey; + } + + /** + * Set perform signing before encryption. + * + * The default is to first sign the message and then encrypt. + * But some older mail clients, namely Microsoft Outlook 2000 will work when the message first encrypted. + * As this goes against the official specs, its recommended to only use 'encryption -> signing' when specifically targeting these 'broken' clients. + * + * @param bool $signThenEncrypt + * + * @return $this + */ + public function setSignThenEncrypt($signThenEncrypt = true) + { + $this->signThenEncrypt = $signThenEncrypt; + + return $this; + } + + /** + * @return bool + */ + public function isSignThenEncrypt() + { + return $this->signThenEncrypt; + } + + /** + * Resets internal states. + * + * @return $this + */ + public function reset() + { + return $this; + } + + /** + * Specify whether to wrap the entire MIME message in the S/MIME message. + * + * According to RFC5751 section 3.1: + * In order to protect outer, non-content-related message header fields + * (for instance, the "Subject", "To", "From", and "Cc" fields), the + * sending client MAY wrap a full MIME message in a message/rfc822 + * wrapper in order to apply S/MIME security services to these header + * fields. It is up to the receiving client to decide how to present + * this "inner" header along with the unprotected "outer" header. + * + * @param bool $wrap + * + * @return $this + */ + public function setWrapFullMessage($wrap) + { + $this->wrapFullMessage = $wrap; + } + + /** + * Change the Swift_Message to apply the signing. + * + * @return $this + */ + public function signMessage(Swift_Message $message) + { + if (null === $this->signCertificate && null === $this->encryptCert) { + return $this; + } + + if ($this->signThenEncrypt) { + $this->smimeSignMessage($message); + $this->smimeEncryptMessage($message); + } else { + $this->smimeEncryptMessage($message); + $this->smimeSignMessage($message); + } + } + + /** + * Return the list of header a signer might tamper. + * + * @return array + */ + public function getAlteredHeaders() + { + return ['Content-Type', 'Content-Transfer-Encoding', 'Content-Disposition']; + } + + /** + * Sign a Swift message. + */ + protected function smimeSignMessage(Swift_Message $message) + { + // If we don't have a certificate we can't sign the message + if (null === $this->signCertificate) { + return; + } + + // Work on a clone of the original message + $signMessage = clone $message; + $signMessage->clearSigners(); + + if ($this->wrapFullMessage) { + // The original message essentially becomes the body of the new + // wrapped message + $signMessage = $this->wrapMimeMessage($signMessage); + } else { + // Only keep header needed to parse the body correctly + $this->clearAllHeaders($signMessage); + $this->copyHeaders( + $message, + $signMessage, + [ + 'Content-Type', + 'Content-Transfer-Encoding', + 'Content-Disposition', + ] + ); + } + + // Copy the cloned message into a temporary file stream + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + $signMessage->toByteStream($messageStream); + $messageStream->commit(); + $signedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); + + // Sign the message using openssl + if (!openssl_pkcs7_sign( + $messageStream->getPath(), + $signedMessageStream->getPath(), + $this->signCertificate, + $this->signPrivateKey, + [], + $this->signOptions, + $this->extraCerts + ) + ) { + throw new Swift_IoException(sprintf('Failed to sign S/Mime message. Error: "%s".', openssl_error_string())); + } + + // Parse the resulting signed message content back into the Swift message + // preserving the original headers + $this->parseSSLOutput($signedMessageStream, $message); + } + + /** + * Encrypt a Swift message. + */ + protected function smimeEncryptMessage(Swift_Message $message) + { + // If we don't have a certificate we can't encrypt the message + if (null === $this->encryptCert) { + return; + } + + // Work on a clone of the original message + $encryptMessage = clone $message; + $encryptMessage->clearSigners(); + + if ($this->wrapFullMessage) { + // The original message essentially becomes the body of the new + // wrapped message + $encryptMessage = $this->wrapMimeMessage($encryptMessage); + } else { + // Only keep header needed to parse the body correctly + $this->clearAllHeaders($encryptMessage); + $this->copyHeaders( + $message, + $encryptMessage, + [ + 'Content-Type', + 'Content-Transfer-Encoding', + 'Content-Disposition', + ] + ); + } + + // Convert the message content (including headers) to a string + // and place it in a temporary file + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + $encryptMessage->toByteStream($messageStream); + $messageStream->commit(); + $encryptedMessageStream = new Swift_ByteStream_TemporaryFileByteStream(); + + // Encrypt the message + if (!openssl_pkcs7_encrypt( + $messageStream->getPath(), + $encryptedMessageStream->getPath(), + $this->encryptCert, + [], + 0, + $this->encryptCipher + ) + ) { + throw new Swift_IoException(sprintf('Failed to encrypt S/Mime message. Error: "%s".', openssl_error_string())); + } + + // Parse the resulting signed message content back into the Swift message + // preserving the original headers + $this->parseSSLOutput($encryptedMessageStream, $message); + } + + /** + * Copy named headers from one Swift message to another. + */ + protected function copyHeaders( + Swift_Message $fromMessage, + Swift_Message $toMessage, + array $headers = [] + ) { + foreach ($headers as $header) { + $this->copyHeader($fromMessage, $toMessage, $header); + } + } + + /** + * Copy a single header from one Swift message to another. + * + * @param string $headerName + */ + protected function copyHeader(Swift_Message $fromMessage, Swift_Message $toMessage, $headerName) + { + $header = $fromMessage->getHeaders()->get($headerName); + if (!$header) { + return; + } + $headers = $toMessage->getHeaders(); + switch ($header->getFieldType()) { + case Swift_Mime_Header::TYPE_TEXT: + $headers->addTextHeader($header->getFieldName(), $header->getValue()); + break; + case Swift_Mime_Header::TYPE_PARAMETERIZED: + $headers->addParameterizedHeader( + $header->getFieldName(), + $header->getValue(), + $header->getParameters() + ); + break; + } + } + + /** + * Remove all headers from a Swift message. + */ + protected function clearAllHeaders(Swift_Message $message) + { + $headers = $message->getHeaders(); + foreach ($headers->listAll() as $header) { + $headers->removeAll($header); + } + } + + /** + * Wraps a Swift_Message in a message/rfc822 MIME part. + * + * @return Swift_MimePart + */ + protected function wrapMimeMessage(Swift_Message $message) + { + // Start by copying the original message into a message stream + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + $message->toByteStream($messageStream); + $messageStream->commit(); + + // Create a new MIME part that wraps the original stream + $wrappedMessage = new Swift_MimePart($messageStream, 'message/rfc822'); + $wrappedMessage->setEncoder(new Swift_Mime_ContentEncoder_PlainContentEncoder('7bit')); + + return $wrappedMessage; + } + + protected function parseSSLOutput(Swift_InputByteStream $inputStream, Swift_Message $message) + { + $messageStream = new Swift_ByteStream_TemporaryFileByteStream(); + $this->copyFromOpenSSLOutput($inputStream, $messageStream); + + $this->streamToMime($messageStream, $message); + } + + /** + * Merges an OutputByteStream from OpenSSL to a Swift_Message. + */ + protected function streamToMime(Swift_OutputByteStream $fromStream, Swift_Message $message) + { + // Parse the stream into headers and body + list($headers, $messageStream) = $this->parseStream($fromStream); + + // Get the original message headers + $messageHeaders = $message->getHeaders(); + + // Let the stream determine the headers describing the body content, + // since the body of the original message is overwritten by the body + // coming from the stream. + // These are all content-* headers. + + // Default transfer encoding is 7bit if not set + $encoding = ''; + // Remove all existing transfer encoding headers + $messageHeaders->removeAll('Content-Transfer-Encoding'); + // See whether the stream sets the transfer encoding + if (isset($headers['content-transfer-encoding'])) { + $encoding = $headers['content-transfer-encoding']; + } + + // We use the null content encoder, since the body is already encoded + // according to the transfer encoding specified in the stream + $message->setEncoder(new Swift_Mime_ContentEncoder_NullContentEncoder($encoding)); + + // Set the disposition, if present + if (isset($headers['content-disposition'])) { + $messageHeaders->addTextHeader('Content-Disposition', $headers['content-disposition']); + } + + // Copy over the body from the stream using the content type dictated + // by the stream content + $message->setChildren([]); + $message->setBody($messageStream, $headers['content-type']); + } + + /** + * This message will parse the headers of a MIME email byte stream + * and return an array that contains the headers as an associative + * array and the email body as a string. + * + * @return array + */ + protected function parseStream(Swift_OutputByteStream $emailStream) + { + $bufferLength = 78; + $headerData = ''; + $headerBodySeparator = "\r\n\r\n"; + + $emailStream->setReadPointer(0); + + // Read out the headers section from the stream to a string + while (false !== ($buffer = $emailStream->read($bufferLength))) { + $headerData .= $buffer; + + $headersPosEnd = strpos($headerData, $headerBodySeparator); + + // Stop reading if we found the end of the headers + if (false !== $headersPosEnd) { + break; + } + } + + // Split the header data into lines + $headerData = trim(substr($headerData, 0, $headersPosEnd)); + $headerLines = explode("\r\n", $headerData); + unset($headerData); + + $headers = []; + $currentHeaderName = ''; + + // Transform header lines into an associative array + foreach ($headerLines as $headerLine) { + // Handle headers that span multiple lines + if (false === strpos($headerLine, ':')) { + $headers[$currentHeaderName] .= ' '.trim($headerLine ?? ''); + continue; + } + + $header = explode(':', $headerLine, 2); + $currentHeaderName = strtolower($header[0] ?? ''); + $headers[$currentHeaderName] = trim($header[1] ?? ''); + } + + // Read the entire email body into a byte stream + $bodyStream = new Swift_ByteStream_TemporaryFileByteStream(); + + // Skip the header and separator and point to the body + $emailStream->setReadPointer($headersPosEnd + \strlen($headerBodySeparator)); + + while (false !== ($buffer = $emailStream->read($bufferLength))) { + $bodyStream->write($buffer); + } + + $bodyStream->commit(); + + return [$headers, $bodyStream]; + } + + protected function copyFromOpenSSLOutput(Swift_OutputByteStream $fromStream, Swift_InputByteStream $toStream) + { + $bufferLength = 4096; + $filteredStream = new Swift_ByteStream_TemporaryFileByteStream(); + $filteredStream->addFilter($this->replacementFactory->createFilter("\r\n", "\n"), 'CRLF to LF'); + $filteredStream->addFilter($this->replacementFactory->createFilter("\n", "\r\n"), 'LF to CRLF'); + + while (false !== ($buffer = $fromStream->read($bufferLength))) { + $filteredStream->write($buffer); + } + + $filteredStream->flushBuffers(); + + while (false !== ($buffer = $filteredStream->read($bufferLength))) { + $toStream->write($buffer); + } + + $toStream->commit(); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php new file mode 100644 index 00000000..56b62323 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php @@ -0,0 +1,45 @@ +createDependenciesFor('transport.smtp') + ); + + $this->setHost($host); + $this->setPort($port); + $this->setEncryption($encryption); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php new file mode 100644 index 00000000..9d0e8fee --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Interface for spools. + * + * @author Fabien Potencier + */ +interface Swift_Spool +{ + /** + * Starts this Spool mechanism. + */ + public function start(); + + /** + * Stops this Spool mechanism. + */ + public function stop(); + + /** + * Tests if this Spool mechanism has started. + * + * @return bool + */ + public function isStarted(); + + /** + * Queues a message. + * + * @param Swift_Mime_SimpleMessage $message The message to store + * + * @return bool Whether the operation has succeeded + */ + public function queueMessage(Swift_Mime_SimpleMessage $message); + + /** + * Sends messages using the given transport instance. + * + * @param Swift_Transport $transport A transport instance + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent emails + */ + public function flushQueue(Swift_Transport $transport, &$failedRecipients = null); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php new file mode 100644 index 00000000..c08e0fb1 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages in a queue. + * + * @author Fabien Potencier + */ +class Swift_SpoolTransport extends Swift_Transport_SpoolTransport +{ + /** + * Create a new SpoolTransport. + */ + public function __construct(Swift_Spool $spool) + { + $arguments = Swift_DependencyContainer::getInstance() + ->createDependenciesFor('transport.spool'); + + $arguments[] = $spool; + + \call_user_func_array( + [$this, 'Swift_Transport_SpoolTransport::__construct'], + $arguments + ); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php new file mode 100644 index 00000000..362be2e8 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php @@ -0,0 +1,35 @@ +index = []; + $this->tree = []; + $this->replace = []; + $this->repSize = []; + + $tree = null; + $i = null; + $last_size = $size = 0; + foreach ($search as $i => $search_element) { + if (null !== $tree) { + $tree[-1] = min(\count($replace) - 1, $i - 1); + $tree[-2] = $last_size; + } + $tree = &$this->tree; + if (\is_array($search_element)) { + foreach ($search_element as $k => $char) { + $this->index[$char] = true; + if (!isset($tree[$char])) { + $tree[$char] = []; + } + $tree = &$tree[$char]; + } + $last_size = $k + 1; + $size = max($size, $last_size); + } else { + $last_size = 1; + if (!isset($tree[$search_element])) { + $tree[$search_element] = []; + } + $tree = &$tree[$search_element]; + $size = max($last_size, $size); + $this->index[$search_element] = true; + } + } + if (null !== $i) { + $tree[-1] = min(\count($replace) - 1, $i); + $tree[-2] = $last_size; + $this->treeMaxLen = $size; + } + foreach ($replace as $rep) { + if (!\is_array($rep)) { + $rep = [$rep]; + } + $this->replace[] = $rep; + } + for ($i = \count($this->replace) - 1; $i >= 0; --$i) { + $this->replace[$i] = $rep = $this->filter($this->replace[$i], $i); + $this->repSize[$i] = \count($rep); + } + } + + /** + * Returns true if based on the buffer passed more bytes should be buffered. + * + * @param array $buffer + * + * @return bool + */ + public function shouldBuffer($buffer) + { + $endOfBuffer = end($buffer); + + return isset($this->index[$endOfBuffer]); + } + + /** + * Perform the actual replacements on $buffer and return the result. + * + * @param array $buffer + * @param int $minReplaces + * + * @return array + */ + public function filter($buffer, $minReplaces = -1) + { + if (0 == $this->treeMaxLen) { + return $buffer; + } + + $newBuffer = []; + $buf_size = \count($buffer); + $last_size = 0; + for ($i = 0; $i < $buf_size; ++$i) { + $search_pos = $this->tree; + $last_found = PHP_INT_MAX; + // We try to find if the next byte is part of a search pattern + for ($j = 0; $j <= $this->treeMaxLen; ++$j) { + // We have a new byte for a search pattern + if (isset($buffer[$p = $i + $j]) && isset($search_pos[$buffer[$p]])) { + $search_pos = $search_pos[$buffer[$p]]; + // We have a complete pattern, save, in case we don't find a better match later + if (isset($search_pos[-1]) && $search_pos[-1] < $last_found + && $search_pos[-1] > $minReplaces) { + $last_found = $search_pos[-1]; + $last_size = $search_pos[-2]; + } + } + // We got a complete pattern + elseif (PHP_INT_MAX !== $last_found) { + // Adding replacement datas to output buffer + $rep_size = $this->repSize[$last_found]; + for ($j = 0; $j < $rep_size; ++$j) { + $newBuffer[] = $this->replace[$last_found][$j]; + } + // We Move cursor forward + $i += $last_size - 1; + // Edge Case, last position in buffer + if ($i >= $buf_size) { + $newBuffer[] = $buffer[$i]; + } + + // We start the next loop + continue 2; + } else { + // this byte is not in a pattern and we haven't found another pattern + break; + } + } + // Normal byte, move it to output buffer + $newBuffer[] = $buffer[$i]; + } + + return $newBuffer; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php new file mode 100644 index 00000000..50a63f1a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php @@ -0,0 +1,70 @@ +search = $search; + $this->replace = $replace; + } + + /** + * Returns true if based on the buffer passed more bytes should be buffered. + * + * @param string $buffer + * + * @return bool + */ + public function shouldBuffer($buffer) + { + if ('' === $buffer) { + return false; + } + + $endOfBuffer = substr($buffer, -1); + foreach ((array) $this->search as $needle) { + if (false !== strpos($needle, $endOfBuffer)) { + return true; + } + } + + return false; + } + + /** + * Perform the actual replacements on $buffer and return the result. + * + * @param string $buffer + * + * @return string + */ + public function filter($buffer) + { + return str_replace($this->search, $this->replace, $buffer); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php new file mode 100644 index 00000000..783b8896 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php @@ -0,0 +1,45 @@ +filters[$search][$replace])) { + if (!isset($this->filters[$search])) { + $this->filters[$search] = []; + } + + if (!isset($this->filters[$search][$replace])) { + $this->filters[$search][$replace] = []; + } + + $this->filters[$search][$replace] = new Swift_StreamFilters_StringReplacementFilter($search, $replace); + } + + return $this->filters[$search][$replace]; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php new file mode 100644 index 00000000..15e68b18 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php @@ -0,0 +1,28 @@ +ping()) { + * $transport->stop(); + * $transport->start(); + * } + * + * The Transport mechanism will be started, if it is not already. + * + * It is undefined if the Transport mechanism attempts to restart as long as + * the return value reflects whether the mechanism is now functional. + * + * @return bool TRUE if the transport is alive + */ + public function ping(); + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * This is the responsibility of the send method to start the transport if needed. + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null); + + /** + * Register a plugin in the Transport. + */ + public function registerPlugin(Swift_Events_EventListener $plugin); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php new file mode 100644 index 00000000..d2dbd7a6 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php @@ -0,0 +1,541 @@ +buffer = $buf; + $this->eventDispatcher = $dispatcher; + $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); + $this->setLocalDomain($localDomain); + } + + /** + * Set the name of the local domain which Swift will identify itself as. + * + * This should be a fully-qualified domain name and should be truly the domain + * you're using. + * + * If your server does not have a domain name, use the IP address. This will + * automatically be wrapped in square brackets as described in RFC 5321, + * section 4.1.3. + * + * @param string $domain + * + * @return $this + */ + public function setLocalDomain($domain) + { + if ('[' !== substr($domain, 0, 1)) { + if (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + $domain = '['.$domain.']'; + } elseif (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + $domain = '[IPv6:'.$domain.']'; + } + } + + $this->domain = $domain; + + return $this; + } + + /** + * Get the name of the domain Swift will identify as. + * + * If an IP address was specified, this will be returned wrapped in square + * brackets as described in RFC 5321, section 4.1.3. + * + * @return string + */ + public function getLocalDomain() + { + return $this->domain; + } + + /** + * Sets the source IP. + * + * @param string $source + */ + public function setSourceIp($source) + { + $this->sourceIp = $source; + } + + /** + * Returns the IP used to connect to the destination. + * + * @return string + */ + public function getSourceIp() + { + return $this->sourceIp; + } + + public function setAddressEncoder(Swift_AddressEncoder $addressEncoder) + { + $this->addressEncoder = $addressEncoder; + } + + public function getAddressEncoder() + { + return $this->addressEncoder; + } + + /** + * Start the SMTP connection. + */ + public function start() + { + if (!$this->started) { + if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) { + $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted'); + if ($evt->bubbleCancelled()) { + return; + } + } + + try { + $this->buffer->initialize($this->getBufferParams()); + } catch (Swift_TransportException $e) { + $this->throwException($e); + } + $this->readGreeting(); + $this->doHeloCommand(); + + if ($evt) { + $this->eventDispatcher->dispatchEvent($evt, 'transportStarted'); + } + + $this->started = true; + } + } + + /** + * Test if an SMTP connection has been established. + * + * @return bool + */ + public function isStarted() + { + return $this->started; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + if (!$this->isStarted()) { + $this->start(); + } + + $sent = 0; + $failedRecipients = (array) $failedRecipients; + + if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { + $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + if (!$reversePath = $this->getReversePath($message)) { + $this->throwException(new Swift_TransportException('Cannot send message without a sender address')); + } + + $to = (array) $message->getTo(); + $cc = (array) $message->getCc(); + $bcc = (array) $message->getBcc(); + $tos = array_merge($to, $cc, $bcc); + + $message->setBcc([]); + + try { + $sent += $this->sendTo($message, $reversePath, $tos, $failedRecipients); + } finally { + $message->setBcc($bcc); + } + + if ($evt) { + if ($sent == \count($to) + \count($cc) + \count($bcc)) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + } elseif ($sent > 0) { + $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); + } else { + $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); + } + $evt->setFailedRecipients($failedRecipients); + $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); //Make sure a new Message ID is used + + return $sent; + } + + /** + * Stop the SMTP connection. + */ + public function stop() + { + if ($this->started) { + if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) { + $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped'); + if ($evt->bubbleCancelled()) { + return; + } + } + + try { + $this->executeCommand("QUIT\r\n", [221]); + } catch (Swift_TransportException $e) { + } + + try { + $this->buffer->terminate(); + + if ($evt) { + $this->eventDispatcher->dispatchEvent($evt, 'transportStopped'); + } + } catch (Swift_TransportException $e) { + $this->throwException($e); + } + } + $this->started = false; + } + + /** + * {@inheritdoc} + */ + public function ping() + { + try { + if (!$this->isStarted()) { + $this->start(); + } + + $this->executeCommand("NOOP\r\n", [250]); + } catch (Swift_TransportException $e) { + try { + $this->stop(); + } catch (Swift_TransportException $e) { + } + + return false; + } + + return true; + } + + /** + * Register a plugin. + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->eventDispatcher->bindEventListener($plugin); + } + + /** + * Reset the current mail transaction. + */ + public function reset() + { + $this->executeCommand("RSET\r\n", [250], $failures, true); + } + + /** + * Get the IoBuffer where read/writes are occurring. + * + * @return Swift_Transport_IoBuffer + */ + public function getBuffer() + { + return $this->buffer; + } + + /** + * Run a command against the buffer, expecting the given response codes. + * + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * If the command is RCPT TO, and the pipeline is non-empty, no exception + * will be thrown; instead the failing address is added to $failures. + * + * @param string $command + * @param int[] $codes + * @param string[] $failures An array of failures by-reference + * @param bool $pipeline Do not wait for response + * @param string $address the address, if command is RCPT TO + * + * @return string|null The server response, or null if pipelining is enabled + */ + public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false, $address = null) + { + $failures = (array) $failures; + $seq = $this->buffer->write($command); + if ($evt = $this->eventDispatcher->createCommandEvent($this, $command, $codes)) { + $this->eventDispatcher->dispatchEvent($evt, 'commandSent'); + } + + $this->pipeline[] = [$command, $seq, $codes, $address]; + + if ($pipeline && $this->pipelining) { + return null; + } + + $response = null; + + while ($this->pipeline) { + list($command, $seq, $codes, $address) = array_shift($this->pipeline); + $response = $this->getFullResponse($seq); + try { + $this->assertResponseCode($response, $codes); + } catch (Swift_TransportException $e) { + if ($this->pipeline && $address) { + $failures[] = $address; + } else { + $this->throwException($e); + } + } + } + + return $response; + } + + /** Read the opening SMTP greeting */ + protected function readGreeting() + { + $this->assertResponseCode($this->getFullResponse(0), [220]); + } + + /** Send the HELO welcome */ + protected function doHeloCommand() + { + $this->executeCommand( + sprintf("HELO %s\r\n", $this->domain), [250] + ); + } + + /** Send the MAIL FROM command */ + protected function doMailFromCommand($address) + { + $address = $this->addressEncoder->encodeString($address); + $this->executeCommand( + sprintf("MAIL FROM:<%s>\r\n", $address), [250], $failures, true + ); + } + + /** Send the RCPT TO command */ + protected function doRcptToCommand($address) + { + $address = $this->addressEncoder->encodeString($address); + $this->executeCommand( + sprintf("RCPT TO:<%s>\r\n", $address), [250, 251, 252], $failures, true, $address + ); + } + + /** Send the DATA command */ + protected function doDataCommand(&$failedRecipients) + { + $this->executeCommand("DATA\r\n", [354], $failedRecipients); + } + + /** Stream the contents of the message over the buffer */ + protected function streamMessage(Swift_Mime_SimpleMessage $message) + { + $this->buffer->setWriteTranslations(["\r\n." => "\r\n.."]); + try { + $message->toByteStream($this->buffer); + $this->buffer->flushBuffers(); + } catch (Swift_TransportException $e) { + $this->throwException($e); + } + $this->buffer->setWriteTranslations([]); + $this->executeCommand("\r\n.\r\n", [250]); + } + + /** Determine the best-use reverse path for this message */ + protected function getReversePath(Swift_Mime_SimpleMessage $message) + { + $return = $message->getReturnPath(); + $sender = $message->getSender(); + $from = $message->getFrom(); + $path = null; + if (!empty($return)) { + $path = $return; + } elseif (!empty($sender)) { + // Don't use array_keys + reset($sender); // Reset Pointer to first pos + $path = key($sender); // Get key + } elseif (!empty($from)) { + reset($from); // Reset Pointer to first pos + $path = key($from); // Get key + } + + return $path; + } + + /** Throw a TransportException, first sending it to any listeners */ + protected function throwException(Swift_TransportException $e) + { + if ($evt = $this->eventDispatcher->createTransportExceptionEvent($this, $e)) { + $this->eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); + if (!$evt->bubbleCancelled()) { + throw $e; + } + } else { + throw $e; + } + } + + /** Throws an Exception if a response code is incorrect */ + protected function assertResponseCode($response, $wanted) + { + if (!$response) { + $this->throwException(new Swift_TransportException('Expected response code '.implode('/', $wanted).' but got an empty response')); + } + + list($code) = sscanf($response, '%3d'); + $valid = (empty($wanted) || \in_array($code, $wanted)); + + if ($evt = $this->eventDispatcher->createResponseEvent($this, $response, + $valid)) { + $this->eventDispatcher->dispatchEvent($evt, 'responseReceived'); + } + + if (!$valid) { + $this->throwException(new Swift_TransportException('Expected response code '.implode('/', $wanted).' but got code "'.$code.'", with message "'.$response.'"', $code)); + } + } + + /** Get an entire multi-line response using its sequence number */ + protected function getFullResponse($seq) + { + $response = ''; + try { + do { + $line = $this->buffer->readLine($seq); + $response .= $line; + } while (null !== $line && false !== $line && ' ' != $line[3]); + } catch (Swift_TransportException $e) { + $this->throwException($e); + } catch (Swift_IoException $e) { + $this->throwException(new Swift_TransportException($e->getMessage(), 0, $e)); + } + + return $response; + } + + /** Send an email to the given recipients from the given reverse path */ + private function doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients) + { + $sent = 0; + $this->doMailFromCommand($reversePath); + foreach ($recipients as $forwardPath) { + try { + $this->doRcptToCommand($forwardPath); + ++$sent; + } catch (Swift_TransportException $e) { + $failedRecipients[] = $forwardPath; + } catch (Swift_AddressEncoderException $e) { + $failedRecipients[] = $forwardPath; + } + } + + if (0 != $sent) { + $sent += \count($failedRecipients); + $this->doDataCommand($failedRecipients); + $sent -= \count($failedRecipients); + + $this->streamMessage($message); + } else { + $this->reset(); + } + + return $sent; + } + + /** Send a message to the given To: recipients */ + private function sendTo(Swift_Mime_SimpleMessage $message, $reversePath, array $to, array &$failedRecipients) + { + if (empty($to)) { + return 0; + } + + return $this->doMailTransaction($message, $reversePath, array_keys($to), + $failedRecipients); + } + + /** + * Destructor. + */ + public function __destruct() + { + try { + $this->stop(); + } catch (Exception $e) { + } + } + + public function __sleep() + { + throw new \BadMethodCallException('Cannot serialize '.__CLASS__); + } + + public function __wakeup() + { + throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php new file mode 100644 index 00000000..bb3a1615 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php @@ -0,0 +1,75 @@ +executeCommand("AUTH CRAM-MD5\r\n", [334]); + $challenge = base64_decode(substr($challenge, 4)); + $message = base64_encode( + $username.' '.$this->getResponse($password, $challenge) + ); + $agent->executeCommand(sprintf("%s\r\n", $message), [235]); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", [250]); + + throw $e; + } + } + + /** + * Generate a CRAM-MD5 response from a server challenge. + * + * @param string $secret + * @param string $challenge + * + * @return string + */ + private function getResponse($secret, $challenge) + { + if (\strlen($secret) > 64) { + $secret = pack('H32', md5($secret)); + } + + if (\strlen($secret) < 64) { + $secret = str_pad($secret, 64, \chr(0)); + } + + $k_ipad = substr($secret, 0, 64) ^ str_repeat(\chr(0x36), 64); + $k_opad = substr($secret, 0, 64) ^ str_repeat(\chr(0x5C), 64); + + $inner = pack('H32', md5($k_ipad.$challenge)); + $digest = md5($k_opad.$inner); + + return $digest; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php new file mode 100644 index 00000000..0b9d81b8 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php @@ -0,0 +1,45 @@ +executeCommand("AUTH LOGIN\r\n", [334]); + $agent->executeCommand(sprintf("%s\r\n", base64_encode($username ?? '')), [334]); + $agent->executeCommand(sprintf("%s\r\n", base64_encode($password ?? '')), [235]); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", [250]); + + throw $e; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php new file mode 100644 index 00000000..41931fdd --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php @@ -0,0 +1,681 @@ + + */ +class Swift_Transport_Esmtp_Auth_NTLMAuthenticator implements Swift_Transport_Esmtp_Authenticator +{ + const NTLMSIG = "NTLMSSP\x00"; + const DESCONST = 'KGS!@#$%'; + + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * + * @return string + */ + public function getAuthKeyword() + { + return 'NTLM'; + } + + /** + * {@inheritdoc} + * + * @throws \LogicException + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, $username, $password) + { + if (!\function_exists('openssl_encrypt')) { + throw new LogicException('The OpenSSL extension must be enabled to use the NTLM authenticator.'); + } + + if (!\function_exists('bcmul')) { + throw new LogicException('The BCMath functions must be enabled to use the NTLM authenticator.'); + } + + try { + // execute AUTH command and filter out the code at the beginning + // AUTH NTLM xxxx + $response = base64_decode(substr(trim($this->sendMessage1($agent) ?? ''), 4)); + + // extra parameters for our unit cases + $timestamp = \func_num_args() > 3 ? func_get_arg(3) : $this->getCorrectTimestamp(bcmul(microtime(true), '1000')); + $client = \func_num_args() > 4 ? func_get_arg(4) : random_bytes(8); + + // Message 3 response + $this->sendMessage3($response, $username, $password, $timestamp, $client, $agent); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", [250]); + + throw $e; + } + } + + protected function si2bin($si, $bits = 32) + { + $bin = null; + if ($si >= -2 ** ($bits - 1) && ($si <= 2 ** ($bits - 1))) { + // positive or zero + if ($si >= 0) { + $bin = base_convert($si, 10, 2); + // pad to $bits bit + $bin_length = \strlen($bin); + if ($bin_length < $bits) { + $bin = str_repeat('0', $bits - $bin_length).$bin; + } + } else { + // negative + $si = -$si - 2 ** $bits; + $bin = base_convert($si, 10, 2); + $bin_length = \strlen($bin); + if ($bin_length > $bits) { + $bin = str_repeat('1', $bits - $bin_length).$bin; + } + } + } + + return $bin; + } + + /** + * Send our auth message and returns the response. + * + * @return string SMTP Response + */ + protected function sendMessage1(Swift_Transport_SmtpAgent $agent) + { + $message = $this->createMessage1(); + + return $agent->executeCommand(sprintf("AUTH %s %s\r\n", $this->getAuthKeyword(), base64_encode($message)), [334]); + } + + /** + * Fetch all details of our response (message 2). + * + * @param string $response + * + * @return array our response parsed + */ + protected function parseMessage2($response) + { + $responseHex = bin2hex($response); + $length = floor(hexdec(substr($responseHex, 28, 4)) / 256) * 2; + $offset = floor(hexdec(substr($responseHex, 32, 4)) / 256) * 2; + $challenge = hex2bin(substr($responseHex, 48, 16)); + $context = hex2bin(substr($responseHex, 64, 16)); + $targetInfoH = hex2bin(substr($responseHex, 80, 16)); + $targetName = hex2bin(substr($responseHex, $offset, $length)); + $offset = floor(hexdec(substr($responseHex, 88, 4)) / 256) * 2; + $targetInfoBlock = substr($responseHex, $offset); + list($domainName, $serverName, $DNSDomainName, $DNSServerName, $terminatorByte) = $this->readSubBlock($targetInfoBlock); + + return [ + $challenge, + $context, + $targetInfoH, + $targetName, + $domainName, + $serverName, + $DNSDomainName, + $DNSServerName, + hex2bin($targetInfoBlock), + $terminatorByte, + ]; + } + + /** + * Read the blob information in from message2. + * + * @return array + */ + protected function readSubBlock($block) + { + // remove terminatorByte cause it's always the same + $block = substr($block, 0, -8); + + $length = \strlen($block); + $offset = 0; + $data = []; + while ($offset < $length) { + $blockLength = hexdec(substr(substr($block, $offset, 8), -4)) / 256; + $offset += 8; + $data[] = hex2bin(substr($block, $offset, $blockLength * 2)); + $offset += $blockLength * 2; + } + + if (3 == \count($data)) { + $data[] = $data[2]; + $data[2] = ''; + } + + $data[] = $this->createByte('00'); + + return $data; + } + + /** + * Send our final message with all our data. + * + * @param string $response Message 1 response (message 2) + * @param string $username + * @param string $password + * @param string $timestamp + * @param string $client + * @param bool $v2 Use version2 of the protocol + * + * @return string + */ + protected function sendMessage3($response, $username, $password, $timestamp, $client, Swift_Transport_SmtpAgent $agent, $v2 = true) + { + list($domain, $username) = $this->getDomainAndUsername($username); + //$challenge, $context, $targetInfoH, $targetName, $domainName, $workstation, $DNSDomainName, $DNSServerName, $blob, $ter + list($challenge, , , , , $workstation, , , $blob) = $this->parseMessage2($response); + + if (!$v2) { + // LMv1 + $lmResponse = $this->createLMPassword($password, $challenge); + // NTLMv1 + $ntlmResponse = $this->createNTLMPassword($password, $challenge); + } else { + // LMv2 + $lmResponse = $this->createLMv2Password($password, $username, $domain, $challenge, $client); + // NTLMv2 + $ntlmResponse = $this->createNTLMv2Hash($password, $username, $domain, $challenge, $blob, $timestamp, $client); + } + + $message = $this->createMessage3($domain, $username, $workstation, $lmResponse, $ntlmResponse); + + return $agent->executeCommand(sprintf("%s\r\n", base64_encode($message)), [235]); + } + + /** + * Create our message 1. + * + * @return string + */ + protected function createMessage1() + { + return self::NTLMSIG + .$this->createByte('01') // Message 1 +.$this->createByte('0702'); // Flags + } + + /** + * Create our message 3. + * + * @param string $domain + * @param string $username + * @param string $workstation + * @param string $lmResponse + * @param string $ntlmResponse + * + * @return string + */ + protected function createMessage3($domain, $username, $workstation, $lmResponse, $ntlmResponse) + { + // Create security buffers + $domainSec = $this->createSecurityBuffer($domain, 64); + $domainInfo = $this->readSecurityBuffer(bin2hex($domainSec)); + $userSec = $this->createSecurityBuffer($username, ($domainInfo[0] + $domainInfo[1]) / 2); + $userInfo = $this->readSecurityBuffer(bin2hex($userSec)); + $workSec = $this->createSecurityBuffer($workstation, ($userInfo[0] + $userInfo[1]) / 2); + $workInfo = $this->readSecurityBuffer(bin2hex($workSec)); + $lmSec = $this->createSecurityBuffer($lmResponse, ($workInfo[0] + $workInfo[1]) / 2, true); + $lmInfo = $this->readSecurityBuffer(bin2hex($lmSec)); + $ntlmSec = $this->createSecurityBuffer($ntlmResponse, ($lmInfo[0] + $lmInfo[1]) / 2, true); + + return self::NTLMSIG + .$this->createByte('03') // TYPE 3 message +.$lmSec // LM response header +.$ntlmSec // NTLM response header +.$domainSec // Domain header +.$userSec // User header +.$workSec // Workstation header +.$this->createByte('000000009a', 8) // session key header (empty) +.$this->createByte('01020000') // FLAGS +.$this->convertTo16bit($domain) // domain name +.$this->convertTo16bit($username) // username +.$this->convertTo16bit($workstation) // workstation +.$lmResponse + .$ntlmResponse; + } + + /** + * @param string $timestamp Epoch timestamp in microseconds + * @param string $client Random bytes + * @param string $targetInfo + * + * @return string + */ + protected function createBlob($timestamp, $client, $targetInfo) + { + return $this->createByte('0101') + .$this->createByte('00') + .$timestamp + .$client + .$this->createByte('00') + .$targetInfo + .$this->createByte('00'); + } + + /** + * Get domain and username from our username. + * + * @example DOMAIN\username + * + * @param string $name + * + * @return array + */ + protected function getDomainAndUsername($name) + { + if (false !== strpos($name, '\\')) { + return explode('\\', $name); + } + + if (false !== strpos($name, '@')) { + list($user, $domain) = explode('@', $name); + + return [$domain, $user]; + } + + // no domain passed + return ['', $name]; + } + + /** + * Create LMv1 response. + * + * @param string $password + * @param string $challenge + * + * @return string + */ + protected function createLMPassword($password, $challenge) + { + // FIRST PART + $password = $this->createByte(strtoupper($password), 14, false); + list($key1, $key2) = str_split($password, 7); + + $desKey1 = $this->createDesKey($key1); + $desKey2 = $this->createDesKey($key2); + + $constantDecrypt = $this->createByte($this->desEncrypt(self::DESCONST, $desKey1).$this->desEncrypt(self::DESCONST, $desKey2), 21, false); + + // SECOND PART + list($key1, $key2, $key3) = str_split($constantDecrypt, 7); + + $desKey1 = $this->createDesKey($key1); + $desKey2 = $this->createDesKey($key2); + $desKey3 = $this->createDesKey($key3); + + return $this->desEncrypt($challenge, $desKey1).$this->desEncrypt($challenge, $desKey2).$this->desEncrypt($challenge, $desKey3); + } + + /** + * Create NTLMv1 response. + * + * @param string $password + * @param string $challenge + * + * @return string + */ + protected function createNTLMPassword($password, $challenge) + { + // FIRST PART + $ntlmHash = $this->createByte($this->md4Encrypt($password), 21, false); + list($key1, $key2, $key3) = str_split($ntlmHash, 7); + + $desKey1 = $this->createDesKey($key1); + $desKey2 = $this->createDesKey($key2); + $desKey3 = $this->createDesKey($key3); + + return $this->desEncrypt($challenge, $desKey1).$this->desEncrypt($challenge, $desKey2).$this->desEncrypt($challenge, $desKey3); + } + + /** + * Convert a normal timestamp to a tenth of a microtime epoch time. + * + * @param string $time + * + * @return string + */ + protected function getCorrectTimestamp($time) + { + // Get our timestamp (tricky!) + $time = number_format($time, 0, '.', ''); // save microtime to string + $time = bcadd($time, '11644473600000', 0); // add epoch time + $time = bcmul($time, 10000, 0); // tenths of a microsecond. + + $binary = $this->si2bin($time, 64); // create 64 bit binary string + $timestamp = ''; + for ($i = 0; $i < 8; ++$i) { + $timestamp .= \chr(bindec(substr($binary, -(($i + 1) * 8), 8))); + } + + return $timestamp; + } + + /** + * Create LMv2 response. + * + * @param string $password + * @param string $username + * @param string $domain + * @param string $challenge NTLM Challenge + * @param string $client Random string + * + * @return string + */ + protected function createLMv2Password($password, $username, $domain, $challenge, $client) + { + $lmPass = '00'; // by default 00 + // if $password > 15 than we can't use this method + if (\strlen($password) <= 15) { + $ntlmHash = $this->md4Encrypt($password); + $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); + + $lmPass = bin2hex($this->md5Encrypt($ntml2Hash, $challenge.$client).$client); + } + + return $this->createByte($lmPass, 24); + } + + /** + * Create NTLMv2 response. + * + * @param string $password + * @param string $username + * @param string $domain + * @param string $challenge Hex values + * @param string $targetInfo Hex values + * @param string $timestamp + * @param string $client Random bytes + * + * @return string + * + * @see http://davenport.sourceforge.net/ntlm.html#theNtlmResponse + */ + protected function createNTLMv2Hash($password, $username, $domain, $challenge, $targetInfo, $timestamp, $client) + { + $ntlmHash = $this->md4Encrypt($password); + $ntml2Hash = $this->md5Encrypt($ntlmHash, $this->convertTo16bit(strtoupper($username).$domain)); + + // create blob + $blob = $this->createBlob($timestamp, $client, $targetInfo); + + $ntlmv2Response = $this->md5Encrypt($ntml2Hash, $challenge.$blob); + + return $ntlmv2Response.$blob; + } + + protected function createDesKey($key) + { + $material = [bin2hex($key[0])]; + $len = \strlen($key); + for ($i = 1; $i < $len; ++$i) { + list($high, $low) = str_split(bin2hex($key[$i])); + $v = $this->castToByte(\ord($key[$i - 1]) << (7 + 1 - $i) | $this->uRShift(hexdec(dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xf)), $i)); + $material[] = str_pad(substr(dechex($v), -2), 2, '0', STR_PAD_LEFT); // cast to byte + } + $material[] = str_pad(substr(dechex($this->castToByte(\ord($key[6]) << 1)), -2), 2, '0'); + + // odd parity + foreach ($material as $k => $v) { + $b = $this->castToByte(hexdec($v)); + $needsParity = 0 == (($this->uRShift($b, 7) ^ $this->uRShift($b, 6) ^ $this->uRShift($b, 5) + ^ $this->uRShift($b, 4) ^ $this->uRShift($b, 3) ^ $this->uRShift($b, 2) + ^ $this->uRShift($b, 1)) & 0x01); + + list($high, $low) = str_split($v); + if ($needsParity) { + $material[$k] = dechex(hexdec($high) | 0x0).dechex(hexdec($low) | 0x1); + } else { + $material[$k] = dechex(hexdec($high) & 0xf).dechex(hexdec($low) & 0xe); + } + } + + return hex2bin(implode('', $material)); + } + + /** HELPER FUNCTIONS */ + + /** + * Create our security buffer depending on length and offset. + * + * @param string $value Value we want to put in + * @param int $offset start of value + * @param bool $is16 Do we 16bit string or not? + * + * @return string + */ + protected function createSecurityBuffer($value, $offset, $is16 = false) + { + $length = \strlen(bin2hex($value)); + $length = $is16 ? $length / 2 : $length; + $length = $this->createByte(str_pad(dechex($length), 2, '0', STR_PAD_LEFT), 2); + + return $length.$length.$this->createByte(dechex($offset), 4); + } + + /** + * Read our security buffer to fetch length and offset of our value. + * + * @param string $value Securitybuffer in hex + * + * @return array array with length and offset + */ + protected function readSecurityBuffer($value) + { + $length = floor(hexdec(substr($value, 0, 4)) / 256) * 2; + $offset = floor(hexdec(substr($value, 8, 4)) / 256) * 2; + + return [$length, $offset]; + } + + /** + * Cast to byte java equivalent to (byte). + * + * @param int $v + * + * @return int + */ + protected function castToByte($v) + { + return (($v + 128) % 256) - 128; + } + + /** + * Java unsigned right bitwise + * $a >>> $b. + * + * @param int $a + * @param int $b + * + * @return int + */ + protected function uRShift($a, $b) + { + if (0 == $b) { + return $a; + } + + return ($a >> $b) & ~(1 << (8 * PHP_INT_SIZE - 1) >> ($b - 1)); + } + + /** + * Right padding with 0 to certain length. + * + * @param string $input + * @param int $bytes Length of bytes + * @param bool $isHex Did we provided hex value + * + * @return string + */ + protected function createByte($input, $bytes = 4, $isHex = true) + { + if ($isHex) { + $byte = hex2bin(str_pad($input, $bytes * 2, '00')); + } else { + $byte = str_pad($input, $bytes, "\x00"); + } + + return $byte; + } + + /** ENCRYPTION ALGORITHMS */ + + /** + * DES Encryption. + * + * @param string $value An 8-byte string + * @param string $key + * + * @return string + */ + protected function desEncrypt($value, $key) + { + return substr(openssl_encrypt($value, 'DES-ECB', $key, \OPENSSL_RAW_DATA), 0, 8); + } + + /** + * MD5 Encryption. + * + * @param string $key Encryption key + * @param string $msg Message to encrypt + * + * @return string + */ + protected function md5Encrypt($key, $msg) + { + $blocksize = 64; + if (\strlen($key) > $blocksize) { + $key = pack('H*', md5($key)); + } + + $key = str_pad($key, $blocksize, "\0"); + $ipadk = $key ^ str_repeat("\x36", $blocksize); + $opadk = $key ^ str_repeat("\x5c", $blocksize); + + return pack('H*', md5($opadk.pack('H*', md5($ipadk.$msg)))); + } + + /** + * MD4 Encryption. + * + * @param string $input + * + * @return string + * + * @see https://secure.php.net/manual/en/ref.hash.php + */ + protected function md4Encrypt($input) + { + $input = $this->convertTo16bit($input); + + return \function_exists('hash') ? hex2bin(hash('md4', $input)) : mhash(MHASH_MD4, $input); + } + + /** + * Convert UTF-8 to UTF-16. + * + * @param string $input + * + * @return string + */ + protected function convertTo16bit($input) + { + return iconv('UTF-8', 'UTF-16LE', $input); + } + + /** + * @param string $message + */ + protected function debug($message) + { + $message = bin2hex($message); + $messageId = substr($message, 16, 8); + echo substr($message, 0, 16)." NTLMSSP Signature
    \n"; + echo $messageId." Type Indicator
    \n"; + + if ('02000000' == $messageId) { + $map = [ + 'Challenge', + 'Context', + 'Target Information Security Buffer', + 'Target Name Data', + 'NetBIOS Domain Name', + 'NetBIOS Server Name', + 'DNS Domain Name', + 'DNS Server Name', + 'BLOB', + 'Target Information Terminator', + ]; + + $data = $this->parseMessage2(hex2bin($message)); + + foreach ($map as $key => $value) { + echo bin2hex($data[$key]).' - '.$data[$key].' ||| '.$value."
    \n"; + } + } elseif ('03000000' == $messageId) { + $i = 0; + $data[$i++] = substr($message, 24, 16); + list($lmLength, $lmOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 40, 16); + list($ntmlLength, $ntmlOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 56, 16); + list($targetLength, $targetOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 72, 16); + list($userLength, $userOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 88, 16); + list($workLength, $workOffset) = $this->readSecurityBuffer($data[$i - 1]); + + $data[$i++] = substr($message, 104, 16); + $data[$i++] = substr($message, 120, 8); + $data[$i++] = substr($message, $targetOffset, $targetLength); + $data[$i++] = substr($message, $userOffset, $userLength); + $data[$i++] = substr($message, $workOffset, $workLength); + $data[$i++] = substr($message, $lmOffset, $lmLength); + $data[$i] = substr($message, $ntmlOffset, $ntmlLength); + + $map = [ + 'LM Response Security Buffer', + 'NTLM Response Security Buffer', + 'Target Name Security Buffer', + 'User Name Security Buffer', + 'Workstation Name Security Buffer', + 'Session Key Security Buffer', + 'Flags', + 'Target Name Data', + 'User Name Data', + 'Workstation Name Data', + 'LM Response Data', + 'NTLM Response Data', + ]; + + foreach ($map as $key => $value) { + echo $data[$key].' - '.hex2bin($data[$key]).' ||| '.$value."
    \n"; + } + } + + echo '

    '; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php new file mode 100644 index 00000000..41d0a50a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php @@ -0,0 +1,44 @@ +executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), [235]); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", [250]); + + throw $e; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php new file mode 100644 index 00000000..859f22f3 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php @@ -0,0 +1,64 @@ + + * $transport = (new Swift_SmtpTransport('smtp.gmail.com', 587, 'tls')) + * ->setAuthMode('XOAUTH2') + * ->setUsername('YOUR_EMAIL_ADDRESS') + * ->setPassword('YOUR_ACCESS_TOKEN'); + * + * + * @author xu.li + * + * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol + */ +class Swift_Transport_Esmtp_Auth_XOAuth2Authenticator implements Swift_Transport_Esmtp_Authenticator +{ + /** + * Get the name of the AUTH mechanism this Authenticator handles. + * + * @return string + */ + public function getAuthKeyword() + { + return 'XOAUTH2'; + } + + /** + * {@inheritdoc} + */ + public function authenticate(Swift_Transport_SmtpAgent $agent, $email, $token) + { + try { + $param = $this->constructXOAuth2Params($email, $token); + $agent->executeCommand('AUTH XOAUTH2 '.$param."\r\n", [235]); + + return true; + } catch (Swift_TransportException $e) { + $agent->executeCommand("RSET\r\n", [250]); + + throw $e; + } + } + + /** + * Construct the auth parameter. + * + * @see https://developers.google.com/google-apps/gmail/xoauth2_protocol#the_sasl_xoauth2_mechanism + */ + protected function constructXOAuth2Params($email, $token) + { + return base64_encode("user=$email\1auth=Bearer $token\1\1"); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php new file mode 100644 index 00000000..53a90a87 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php @@ -0,0 +1,268 @@ +setAuthenticators($authenticators); + } + + /** + * Set the Authenticators which can process a login request. + * + * @param Swift_Transport_Esmtp_Authenticator[] $authenticators + */ + public function setAuthenticators(array $authenticators) + { + $this->authenticators = $authenticators; + } + + /** + * Get the Authenticators which can process a login request. + * + * @return Swift_Transport_Esmtp_Authenticator[] + */ + public function getAuthenticators() + { + return $this->authenticators; + } + + /** + * Set the username to authenticate with. + * + * @param string $username + */ + public function setUsername($username) + { + $this->username = $username; + } + + /** + * Get the username to authenticate with. + * + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Set the password to authenticate with. + * + * @param string $password + */ + public function setPassword($password) + { + $this->password = $password; + } + + /** + * Get the password to authenticate with. + * + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Set the auth mode to use to authenticate. + * + * @param string $mode + */ + public function setAuthMode($mode) + { + $this->auth_mode = $mode; + } + + /** + * Get the auth mode to use to authenticate. + * + * @return string + */ + public function getAuthMode() + { + return $this->auth_mode; + } + + /** + * Get the name of the ESMTP extension this handles. + * + * @return string + */ + public function getHandledKeyword() + { + return 'AUTH'; + } + + /** + * Set the parameters which the EHLO greeting indicated. + * + * @param string[] $parameters + */ + public function setKeywordParams(array $parameters) + { + $this->esmtpParams = $parameters; + } + + /** + * Runs immediately after a EHLO has been issued. + * + * @param Swift_Transport_SmtpAgent $agent to read/write + */ + public function afterEhlo(Swift_Transport_SmtpAgent $agent) + { + if ($this->username) { + $count = 0; + $errors = []; + foreach ($this->getAuthenticatorsForAgent() as $authenticator) { + if (\in_array(strtolower($authenticator->getAuthKeyword() ?? ''), array_map('strtolower', $this->esmtpParams))) { + ++$count; + try { + if ($authenticator->authenticate($agent, $this->username, $this->password)) { + return; + } + } catch (Swift_TransportException $e) { + // keep the error message, but tries the other authenticators + $errors[] = [$authenticator->getAuthKeyword(), $e->getMessage()]; + } + } + } + + $message = 'Failed to authenticate on SMTP server with username "'.$this->username.'" using '.$count.' possible authenticators.'; + foreach ($errors as $error) { + $message .= ' Authenticator '.$error[0].' returned '.$error[1].'.'; + } + throw new Swift_TransportException($message); + } + } + + /** + * Not used. + */ + public function getMailParams() + { + return []; + } + + /** + * Not used. + */ + public function getRcptParams() + { + return []; + } + + /** + * Not used. + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false) + { + } + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * + * This method is called to ensure extensions can be execute in an appropriate order. + * + * @param string $esmtpKeyword to compare with + * + * @return int + */ + public function getPriorityOver($esmtpKeyword) + { + return 0; + } + + /** + * Returns an array of method names which are exposed to the Esmtp class. + * + * @return string[] + */ + public function exposeMixinMethods() + { + return ['setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode']; + } + + /** + * Not used. + */ + public function resetState() + { + } + + /** + * Returns the authenticator list for the given agent. + * + * @return array + */ + protected function getAuthenticatorsForAgent() + { + if (!$mode = strtolower($this->auth_mode ?? '')) { + return $this->authenticators; + } + + foreach ($this->authenticators as $authenticator) { + if (strtolower($authenticator->getAuthKeyword() ?? '') == $mode) { + return [$authenticator]; + } + } + + throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php new file mode 100644 index 00000000..f692a6fe --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php @@ -0,0 +1,36 @@ +encoding = $encoding; + } + + /** + * Get the name of the ESMTP extension this handles. + * + * @return string + */ + public function getHandledKeyword() + { + return '8BITMIME'; + } + + /** + * Not used. + */ + public function setKeywordParams(array $parameters) + { + } + + /** + * Not used. + */ + public function afterEhlo(Swift_Transport_SmtpAgent $agent) + { + } + + /** + * Get params which are appended to MAIL FROM:<>. + * + * @return string[] + */ + public function getMailParams() + { + return ['BODY='.$this->encoding]; + } + + /** + * Not used. + */ + public function getRcptParams() + { + return []; + } + + /** + * Not used. + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false) + { + } + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * + * This method is called to ensure extensions can be execute in an appropriate order. + * + * @param string $esmtpKeyword to compare with + * + * @return int + */ + public function getPriorityOver($esmtpKeyword) + { + return 0; + } + + /** + * Not used. + */ + public function exposeMixinMethods() + { + return []; + } + + /** + * Not used. + */ + public function resetState() + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/SmtpUtf8Handler.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/SmtpUtf8Handler.php new file mode 100644 index 00000000..7d0252a0 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/SmtpUtf8Handler.php @@ -0,0 +1,107 @@ +. + * + * @return string[] + */ + public function getMailParams() + { + return ['SMTPUTF8']; + } + + /** + * Not used. + */ + public function getRcptParams() + { + return []; + } + + /** + * Not used. + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false) + { + } + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * + * This method is called to ensure extensions can be execute in an appropriate order. + * + * @param string $esmtpKeyword to compare with + * + * @return int + */ + public function getPriorityOver($esmtpKeyword) + { + return 0; + } + + /** + * Not used. + */ + public function exposeMixinMethods() + { + return []; + } + + /** + * Not used. + */ + public function resetState() + { + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php new file mode 100644 index 00000000..b8ea36e2 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php @@ -0,0 +1,86 @@ +. + * + * @return string[] + */ + public function getMailParams(); + + /** + * Get params which are appended to RCPT TO:<>. + * + * @return string[] + */ + public function getRcptParams(); + + /** + * Runs when a command is due to be sent. + * + * @param Swift_Transport_SmtpAgent $agent to read/write + * @param string $command to send + * @param int[] $codes expected in response + * @param string[] $failedRecipients to collect failures + * @param bool $stop to be set true by-reference if the command is now sent + */ + public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false); + + /** + * Returns +1, -1 or 0 according to the rules for usort(). + * + * This method is called to ensure extensions can be execute in an appropriate order. + * + * @param string $esmtpKeyword to compare with + * + * @return int + */ + public function getPriorityOver($esmtpKeyword); + + /** + * Returns an array of method names which are exposed to the Esmtp class. + * + * @return string[] + */ + public function exposeMixinMethods(); + + /** + * Tells this handler to clear any buffers and reset its state. + */ + public function resetState(); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php new file mode 100644 index 00000000..36545f51 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php @@ -0,0 +1,446 @@ + 'tcp', + 'host' => 'localhost', + 'port' => 25, + 'timeout' => 30, + 'blocking' => 1, + 'tls' => false, + 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, + 'stream_context_options' => [], + ]; + + /** + * Creates a new EsmtpTransport using the given I/O buffer. + * + * @param Swift_Transport_EsmtpHandler[] $extensionHandlers + * @param string $localDomain + */ + public function __construct(Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher, $localDomain = '127.0.0.1', Swift_AddressEncoder $addressEncoder = null) + { + parent::__construct($buf, $dispatcher, $localDomain, $addressEncoder); + $this->setExtensionHandlers($extensionHandlers); + } + + /** + * Set the host to connect to. + * + * Literal IPv6 addresses should be wrapped in square brackets. + * + * @param string $host + * + * @return $this + */ + public function setHost($host) + { + $this->params['host'] = $host; + + return $this; + } + + /** + * Get the host to connect to. + * + * @return string + */ + public function getHost() + { + return $this->params['host']; + } + + /** + * Set the port to connect to. + * + * @param int $port + * + * @return $this + */ + public function setPort($port) + { + $this->params['port'] = (int) $port; + + return $this; + } + + /** + * Get the port to connect to. + * + * @return int + */ + public function getPort() + { + return $this->params['port']; + } + + /** + * Set the connection timeout. + * + * @param int $timeout seconds + * + * @return $this + */ + public function setTimeout($timeout) + { + $this->params['timeout'] = (int) $timeout; + $this->buffer->setParam('timeout', (int) $timeout); + + return $this; + } + + /** + * Get the connection timeout. + * + * @return int + */ + public function getTimeout() + { + return $this->params['timeout']; + } + + /** + * Set the encryption type (tls or ssl). + * + * @param string $encryption + * + * @return $this + */ + public function setEncryption($encryption) + { + $encryption = strtolower($encryption ?? ''); + if ('tls' == $encryption) { + $this->params['protocol'] = 'tcp'; + $this->params['tls'] = true; + } else { + $this->params['protocol'] = $encryption; + $this->params['tls'] = false; + } + + return $this; + } + + /** + * Get the encryption type. + * + * @return string + */ + public function getEncryption() + { + return $this->params['tls'] ? 'tls' : $this->params['protocol']; + } + + /** + * Sets the stream context options. + * + * @param array $options + * + * @return $this + */ + public function setStreamOptions($options) + { + $this->params['stream_context_options'] = $options; + + return $this; + } + + /** + * Returns the stream context options. + * + * @return array + */ + public function getStreamOptions() + { + return $this->params['stream_context_options']; + } + + /** + * Sets the source IP. + * + * IPv6 addresses should be wrapped in square brackets. + * + * @param string $source + * + * @return $this + */ + public function setSourceIp($source) + { + $this->params['sourceIp'] = $source; + + return $this; + } + + /** + * Returns the IP used to connect to the destination. + * + * @return string + */ + public function getSourceIp() + { + return $this->params['sourceIp'] ?? null; + } + + /** + * Sets whether SMTP pipelining is enabled. + * + * By default, support is auto-detected using the PIPELINING SMTP extension. + * Use this function to override that in the unlikely event of compatibility + * issues. + * + * @param bool $enabled + * + * @return $this + */ + public function setPipelining($enabled) + { + $this->pipelining = $enabled; + + return $this; + } + + /** + * Returns whether SMTP pipelining is enabled. + * + * @return bool|null a boolean if pipelining is explicitly enabled or disabled, + * or null if support is auto-detected + */ + public function getPipelining() + { + return $this->pipelining; + } + + /** + * Set ESMTP extension handlers. + * + * @param Swift_Transport_EsmtpHandler[] $handlers + * + * @return $this + */ + public function setExtensionHandlers(array $handlers) + { + $assoc = []; + foreach ($handlers as $handler) { + $assoc[$handler->getHandledKeyword()] = $handler; + } + uasort($assoc, function ($a, $b) { + return $a->getPriorityOver($b->getHandledKeyword()); + }); + $this->handlers = $assoc; + $this->setHandlerParams(); + + return $this; + } + + /** + * Get ESMTP extension handlers. + * + * @return Swift_Transport_EsmtpHandler[] + */ + public function getExtensionHandlers() + { + return array_values($this->handlers); + } + + /** + * Run a command against the buffer, expecting the given response codes. + * + * If no response codes are given, the response will not be validated. + * If codes are given, an exception will be thrown on an invalid response. + * + * @param string $command + * @param int[] $codes + * @param string[] $failures An array of failures by-reference + * @param bool $pipeline Do not wait for response + * @param string $address the address, if command is RCPT TO + * + * @return string|null The server response, or null if pipelining is enabled + */ + public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false, $address = null) + { + $failures = (array) $failures; + $stopSignal = false; + $response = null; + foreach ($this->getActiveHandlers() as $handler) { + $response = $handler->onCommand( + $this, $command, $codes, $failures, $stopSignal + ); + if ($stopSignal) { + return $response; + } + } + + return parent::executeCommand($command, $codes, $failures, $pipeline, $address); + } + + /** Mixin handling method for ESMTP handlers */ + public function __call($method, $args) + { + foreach ($this->handlers as $handler) { + if (\in_array(strtolower($method), + array_map('strtolower', (array) $handler->exposeMixinMethods()) + )) { + $return = \call_user_func_array([$handler, $method], $args); + // Allow fluid method calls + if (null === $return && 'set' == substr($method, 0, 3)) { + return $this; + } else { + return $return; + } + } + } + trigger_error('Call to undefined method '.$method, E_USER_ERROR); + } + + /** Get the params to initialize the buffer */ + protected function getBufferParams() + { + return $this->params; + } + + /** Overridden to perform EHLO instead */ + protected function doHeloCommand() + { + try { + $response = $this->executeCommand( + sprintf("EHLO %s\r\n", $this->domain), [250] + ); + } catch (Swift_TransportException $e) { + return parent::doHeloCommand(); + } + + if ($this->params['tls']) { + try { + $this->executeCommand("STARTTLS\r\n", [220]); + + if (!$this->buffer->startTLS()) { + throw new Swift_TransportException('Unable to connect with TLS encryption'); + } + + try { + $response = $this->executeCommand( + sprintf("EHLO %s\r\n", $this->domain), [250] + ); + } catch (Swift_TransportException $e) { + return parent::doHeloCommand(); + } + } catch (Swift_TransportException $e) { + $this->throwException($e); + } + } + + $this->capabilities = $this->getCapabilities($response); + if (!isset($this->pipelining)) { + $this->pipelining = isset($this->capabilities['PIPELINING']); + } + + $this->setHandlerParams(); + foreach ($this->getActiveHandlers() as $handler) { + $handler->afterEhlo($this); + } + } + + /** Overridden to add Extension support */ + protected function doMailFromCommand($address) + { + $address = $this->addressEncoder->encodeString($address); + $handlers = $this->getActiveHandlers(); + $params = []; + foreach ($handlers as $handler) { + $params = array_merge($params, (array) $handler->getMailParams()); + } + $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; + $this->executeCommand( + sprintf("MAIL FROM:<%s>%s\r\n", $address, $paramStr), [250], $failures, true + ); + } + + /** Overridden to add Extension support */ + protected function doRcptToCommand($address) + { + $address = $this->addressEncoder->encodeString($address); + $handlers = $this->getActiveHandlers(); + $params = []; + foreach ($handlers as $handler) { + $params = array_merge($params, (array) $handler->getRcptParams()); + } + $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; + $this->executeCommand( + sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), [250, 251, 252], $failures, true, $address + ); + } + + /** Determine ESMTP capabilities by function group */ + private function getCapabilities($ehloResponse) + { + $capabilities = []; + $ehloResponse = trim($ehloResponse ?? ''); + $lines = explode("\r\n", $ehloResponse); + array_shift($lines); + foreach ($lines as $line) { + if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) { + $keyword = strtoupper($matches[1]); + $paramStr = strtoupper(ltrim($matches[2], ' =')); + $params = !empty($paramStr) ? explode(' ', $paramStr) : []; + $capabilities[$keyword] = $params; + } + } + + return $capabilities; + } + + /** Set parameters which are used by each extension handler */ + private function setHandlerParams() + { + foreach ($this->handlers as $keyword => $handler) { + if (\array_key_exists($keyword, $this->capabilities)) { + $handler->setKeywordParams($this->capabilities[$keyword]); + } + } + } + + /** Get ESMTP handlers which are currently ok to use */ + private function getActiveHandlers() + { + $handlers = []; + foreach ($this->handlers as $keyword => $handler) { + if (\array_key_exists($keyword, $this->capabilities)) { + $handlers[] = $handler; + } + } + + return $handlers; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php new file mode 100644 index 00000000..1a4b4754 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php @@ -0,0 +1,103 @@ +transports); + for ($i = 0; $i < $maxTransports + && $transport = $this->getNextTransport(); ++$i) { + if ($transport->ping()) { + return true; + } else { + $this->killCurrentTransport(); + } + } + + return \count($this->transports) > 0; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + $maxTransports = \count($this->transports); + $sent = 0; + $this->lastUsedTransport = null; + + for ($i = 0; $i < $maxTransports + && $transport = $this->getNextTransport(); ++$i) { + try { + if (!$transport->isStarted()) { + $transport->start(); + } + + if ($sent = $transport->send($message, $failedRecipients)) { + $this->lastUsedTransport = $transport; + + return $sent; + } + } catch (Swift_TransportException $e) { + $this->killCurrentTransport(); + } + } + + if (0 == \count($this->transports)) { + throw new Swift_TransportException('All Transports in FailoverTransport failed, or no Transports available'); + } + + return $sent; + } + + protected function getNextTransport() + { + if (!isset($this->currentTransport)) { + $this->currentTransport = parent::getNextTransport(); + } + + return $this->currentTransport; + } + + protected function killCurrentTransport() + { + $this->currentTransport = null; + parent::killCurrentTransport(); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php new file mode 100644 index 00000000..50f1e5e4 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php @@ -0,0 +1,65 @@ +transports = $transports; + $this->deadTransports = []; + } + + /** + * Get $transports to delegate to. + * + * @return Swift_Transport[] + */ + public function getTransports() + { + return array_merge($this->transports, $this->deadTransports); + } + + /** + * Get the Transport used in the last successful send operation. + * + * @return Swift_Transport + */ + public function getLastUsedTransport() + { + return $this->lastUsedTransport; + } + + /** + * Test if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return \count($this->transports) > 0; + } + + /** + * Start this Transport mechanism. + */ + public function start() + { + $this->transports = array_merge($this->transports, $this->deadTransports); + } + + /** + * Stop this Transport mechanism. + */ + public function stop() + { + foreach ($this->transports as $transport) { + $transport->stop(); + } + } + + /** + * {@inheritdoc} + */ + public function ping() + { + foreach ($this->transports as $transport) { + if (!$transport->ping()) { + $this->killCurrentTransport(); + } + } + + return \count($this->transports) > 0; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * The return value is the number of recipients who were accepted for delivery. + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + $maxTransports = \count($this->transports); + $sent = 0; + $this->lastUsedTransport = null; + + for ($i = 0; $i < $maxTransports + && $transport = $this->getNextTransport(); ++$i) { + try { + if (!$transport->isStarted()) { + $transport->start(); + } + if ($sent = $transport->send($message, $failedRecipients)) { + $this->lastUsedTransport = $transport; + break; + } + } catch (Swift_TransportException $e) { + $this->killCurrentTransport(); + } + } + + if (0 == \count($this->transports)) { + throw new Swift_TransportException('All Transports in LoadBalancedTransport failed, or no Transports available'); + } + + return $sent; + } + + /** + * Register a plugin. + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + foreach ($this->transports as $transport) { + $transport->registerPlugin($plugin); + } + } + + /** + * Rotates the transport list around and returns the first instance. + * + * @return Swift_Transport + */ + protected function getNextTransport() + { + if ($next = array_shift($this->transports)) { + $this->transports[] = $next; + } + + return $next; + } + + /** + * Tag the currently used (top of stack) transport as dead/useless. + */ + protected function killCurrentTransport() + { + if ($transport = array_pop($this->transports)) { + try { + $transport->stop(); + } catch (Exception $e) { + } + $this->deadTransports[] = $transport; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php new file mode 100644 index 00000000..7d910db5 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php @@ -0,0 +1,98 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Pretends messages have been sent, but just ignores them. + * + * @author Fabien Potencier + */ +class Swift_Transport_NullTransport implements Swift_Transport +{ + /** The event dispatcher from the plugin API */ + private $eventDispatcher; + + /** + * Constructor. + */ + public function __construct(Swift_Events_EventDispatcher $eventDispatcher) + { + $this->eventDispatcher = $eventDispatcher; + } + + /** + * Tests if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Transport mechanism. + */ + public function start() + { + } + + /** + * Stops this Transport mechanism. + */ + public function stop() + { + } + + /** + * {@inheritdoc} + */ + public function ping() + { + return true; + } + + /** + * Sends the given message. + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent emails + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { + $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + if ($evt) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $count = ( + \count((array) $message->getTo()) + + \count((array) $message->getCc()) + + \count((array) $message->getBcc()) + ); + + return $count; + } + + /** + * Register a plugin. + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->eventDispatcher->bindEventListener($plugin); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php new file mode 100644 index 00000000..65a434d1 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php @@ -0,0 +1,158 @@ + 30, + 'blocking' => 1, + 'command' => '/usr/sbin/sendmail -bs', + 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS, + ]; + + /** + * Create a new SendmailTransport with $buf for I/O. + * + * @param string $localDomain + */ + public function __construct(Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher, $localDomain = '127.0.0.1', Swift_AddressEncoder $addressEncoder = null) + { + parent::__construct($buf, $dispatcher, $localDomain, $addressEncoder); + } + + /** + * Start the standalone SMTP session if running in -bs mode. + */ + public function start() + { + if (false !== strpos($this->getCommand(), ' -bs')) { + parent::start(); + } + } + + /** + * Set the command to invoke. + * + * If using -t mode you are strongly advised to include -oi or -i in the flags. + * For example: /usr/sbin/sendmail -oi -t + * Swift will append a -f flag if one is not present. + * + * The recommended mode is "-bs" since it is interactive and failure notifications + * are hence possible. + * + * @param string $command + * + * @return $this + */ + public function setCommand($command) + { + $this->params['command'] = $command; + + return $this; + } + + /** + * Get the sendmail command which will be invoked. + * + * @return string + */ + public function getCommand() + { + return $this->params['command']; + } + + /** + * Send the given Message. + * + * Recipient/sender data will be retrieved from the Message API. + * + * The return value is the number of recipients who were accepted for delivery. + * NOTE: If using 'sendmail -t' you will not be aware of any failures until + * they bounce (i.e. send() will always return 100% success). + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + $failedRecipients = (array) $failedRecipients; + $command = $this->getCommand(); + $buffer = $this->getBuffer(); + $count = 0; + + if (false !== strpos($command, ' -t')) { + if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { + $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + if (false === strpos($command, ' -f')) { + $command .= ' -f'.escapeshellarg($this->getReversePath($message) ?? ''); + } + + $buffer->initialize(array_merge($this->params, ['command' => $command])); + + if (false === strpos($command, ' -i') && false === strpos($command, ' -oi')) { + $buffer->setWriteTranslations(["\r\n" => "\n", "\n." => "\n.."]); + } else { + $buffer->setWriteTranslations(["\r\n" => "\n"]); + } + + $count = \count((array) $message->getTo()) + + \count((array) $message->getCc()) + + \count((array) $message->getBcc()) + ; + $message->toByteStream($buffer); + $buffer->flushBuffers(); + $buffer->setWriteTranslations([]); + $buffer->terminate(); + + if ($evt) { + $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); + $evt->setFailedRecipients($failedRecipients); + $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + $message->generateId(); + } elseif (false !== strpos($command, ' -bs')) { + $count = parent::send($message, $failedRecipients); + } else { + $this->throwException(new Swift_TransportException( + 'Unsupported sendmail command flags ['.$command.']. '. + 'Must be one of "-bs" or "-t" but can include additional flags.' + )); + } + + return $count; + } + + /** Get the params to initialize the buffer */ + protected function getBufferParams() + { + return $this->params; + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php new file mode 100644 index 00000000..e8ce65c2 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Stores Messages in a queue. + * + * @author Fabien Potencier + */ +class Swift_Transport_SpoolTransport implements Swift_Transport +{ + /** The spool instance */ + private $spool; + + /** The event dispatcher from the plugin API */ + private $eventDispatcher; + + /** + * Constructor. + */ + public function __construct(Swift_Events_EventDispatcher $eventDispatcher, Swift_Spool $spool = null) + { + $this->eventDispatcher = $eventDispatcher; + $this->spool = $spool; + } + + /** + * Sets the spool object. + * + * @return $this + */ + public function setSpool(Swift_Spool $spool) + { + $this->spool = $spool; + + return $this; + } + + /** + * Get the spool object. + * + * @return Swift_Spool + */ + public function getSpool() + { + return $this->spool; + } + + /** + * Tests if this Transport mechanism has started. + * + * @return bool + */ + public function isStarted() + { + return true; + } + + /** + * Starts this Transport mechanism. + */ + public function start() + { + } + + /** + * Stops this Transport mechanism. + */ + public function stop() + { + } + + /** + * {@inheritdoc} + */ + public function ping() + { + return true; + } + + /** + * Sends the given message. + * + * @param string[] $failedRecipients An array of failures by-reference + * + * @return int The number of sent e-mail's + */ + public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) + { + if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { + $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); + if ($evt->bubbleCancelled()) { + return 0; + } + } + + $success = $this->spool->queueMessage($message); + + if ($evt) { + $evt->setResult($success ? Swift_Events_SendEvent::RESULT_SPOOLED : Swift_Events_SendEvent::RESULT_FAILED); + $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); + } + + return 1; + } + + /** + * Register a plugin. + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + $this->eventDispatcher->bindEventListener($plugin); + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php new file mode 100644 index 00000000..70782ada --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php @@ -0,0 +1,319 @@ +replacementFactory = $replacementFactory; + } + + /** + * Perform any initialization needed, using the given $params. + * + * Parameters will vary depending upon the type of IoBuffer used. + */ + public function initialize(array $params) + { + $this->params = $params; + switch ($params['type']) { + case self::TYPE_PROCESS: + $this->establishProcessConnection(); + break; + case self::TYPE_SOCKET: + default: + $this->establishSocketConnection(); + break; + } + } + + /** + * Set an individual param on the buffer (e.g. switching to SSL). + * + * @param string $param + * @param mixed $value + */ + public function setParam($param, $value) + { + if (isset($this->stream)) { + switch ($param) { + case 'timeout': + if ($this->stream) { + stream_set_timeout($this->stream, $value); + } + break; + + case 'blocking': + if ($this->stream) { + stream_set_blocking($this->stream, 1); + } + } + } + $this->params[$param] = $value; + } + + public function startTLS() + { + // STREAM_CRYPTO_METHOD_TLS_CLIENT only allow tls1.0 connections (some php versions) + // To support modern tls we allow explicit tls1.0, tls1.1, tls1.2 + // Ssl3 and older are not allowed because they are vulnerable + // @TODO make tls arguments configurable + return stream_socket_enable_crypto($this->stream, true, STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT); + } + + /** + * Perform any shutdown logic needed. + */ + public function terminate() + { + if (isset($this->stream)) { + switch ($this->params['type']) { + case self::TYPE_PROCESS: + fclose($this->in); + fclose($this->out); + proc_close($this->stream); + break; + case self::TYPE_SOCKET: + default: + fclose($this->stream); + break; + } + } + $this->stream = null; + $this->out = null; + $this->in = null; + } + + /** + * Set an array of string replacements which should be made on data written + * to the buffer. + * + * This could replace LF with CRLF for example. + * + * @param string[] $replacements + */ + public function setWriteTranslations(array $replacements) + { + foreach ($this->translations as $search => $replace) { + if (!isset($replacements[$search])) { + $this->removeFilter($search); + unset($this->translations[$search]); + } + } + + foreach ($replacements as $search => $replace) { + if (!isset($this->translations[$search])) { + $this->addFilter( + $this->replacementFactory->createFilter($search, $replace), $search + ); + $this->translations[$search] = true; + } + } + } + + /** + * Get a line of output (including any CRLF). + * + * The $sequence number comes from any writes and may or may not be used + * depending upon the implementation. + * + * @param int $sequence of last write to scan from + * + * @return string + * + * @throws Swift_IoException + */ + public function readLine($sequence) + { + if (isset($this->out) && !feof($this->out)) { + $line = fgets($this->out); + if (0 == \strlen($line)) { + $metas = stream_get_meta_data($this->out); + if ($metas['timed_out']) { + throw new Swift_IoException('Connection to '.$this->getReadConnectionDescription().' Timed Out'); + } + } + + return $line; + } + } + + /** + * Reads $length bytes from the stream into a string and moves the pointer + * through the stream by $length. + * + * If less bytes exist than are requested the remaining bytes are given instead. + * If no bytes are remaining at all, boolean false is returned. + * + * @param int $length + * + * @return string|bool + * + * @throws Swift_IoException + */ + public function read($length) + { + if (isset($this->out) && !feof($this->out)) { + $ret = fread($this->out, $length); + if (0 == \strlen($ret)) { + $metas = stream_get_meta_data($this->out); + if ($metas['timed_out']) { + throw new Swift_IoException('Connection to '.$this->getReadConnectionDescription().' Timed Out'); + } + } + + return $ret; + } + } + + /** Not implemented */ + public function setReadPointer($byteOffset) + { + } + + /** Flush the stream contents */ + protected function flush() + { + if (isset($this->in)) { + fflush($this->in); + } + } + + /** Write this bytes to the stream */ + protected function doCommit($bytes) + { + if (isset($this->in)) { + $bytesToWrite = \strlen($bytes); + $totalBytesWritten = 0; + + while ($totalBytesWritten < $bytesToWrite) { + $bytesWritten = fwrite($this->in, substr($bytes, $totalBytesWritten)); + if (false === $bytesWritten || 0 === $bytesWritten) { + break; + } + + $totalBytesWritten += $bytesWritten; + } + + if ($totalBytesWritten > 0) { + return ++$this->sequence; + } + } + } + + /** + * Establishes a connection to a remote server. + */ + private function establishSocketConnection() + { + $host = $this->params['host']; + if (!empty($this->params['protocol'])) { + $host = $this->params['protocol'].'://'.$host; + } + $timeout = 15; + if (!empty($this->params['timeout'])) { + $timeout = $this->params['timeout']; + } + $options = []; + if (!empty($this->params['sourceIp'])) { + $options['socket']['bindto'] = $this->params['sourceIp'].':0'; + } + + if (isset($this->params['stream_context_options'])) { + $options = array_merge($options, $this->params['stream_context_options']); + } + $streamContext = stream_context_create($options); + + set_error_handler(function ($type, $msg) { + throw new Swift_TransportException('Connection could not be established with host '.$this->params['host'].' :'.$msg); + }); + try { + $this->stream = stream_socket_client($host.':'.$this->params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $streamContext); + } finally { + restore_error_handler(); + } + + if (!empty($this->params['blocking'])) { + stream_set_blocking($this->stream, 1); + } else { + stream_set_blocking($this->stream, 0); + } + stream_set_timeout($this->stream, $timeout); + $this->in = &$this->stream; + $this->out = &$this->stream; + } + + /** + * Opens a process for input/output. + */ + private function establishProcessConnection() + { + $command = $this->params['command']; + $descriptorSpec = [ + 0 => ['pipe', 'r'], + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; + $pipes = []; + $this->stream = proc_open($command, $descriptorSpec, $pipes); + stream_set_blocking($pipes[2], 0); + if ($err = stream_get_contents($pipes[2])) { + throw new Swift_TransportException('Process could not be started ['.$err.']'); + } + $this->in = &$pipes[0]; + $this->out = &$pipes[1]; + } + + private function getReadConnectionDescription() + { + switch ($this->params['type']) { + case self::TYPE_PROCESS: + return 'Process '.$this->params['command']; + break; + + case self::TYPE_SOCKET: + default: + $host = $this->params['host']; + if (!empty($this->params['protocol'])) { + $host = $this->params['protocol'].'://'.$host; + } + $host .= ':'.$this->params['port']; + + return $host; + break; + } + } +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php new file mode 100644 index 00000000..c7417455 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php @@ -0,0 +1,28 @@ +register('cache') + ->asAliasOf('cache.array') + + ->register('tempdir') + ->asValue('/tmp') + + ->register('cache.null') + ->asSharedInstanceOf('Swift_KeyCache_NullKeyCache') + + ->register('cache.array') + ->asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache') + ->withDependencies(['cache.inputstream']) + + ->register('cache.disk') + ->asSharedInstanceOf('Swift_KeyCache_DiskKeyCache') + ->withDependencies(['cache.inputstream', 'tempdir']) + + ->register('cache.inputstream') + ->asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream') +; diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php new file mode 100644 index 00000000..64d69d21 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php @@ -0,0 +1,9 @@ +register('message.message') + ->asNewInstanceOf('Swift_Message') + + ->register('message.mimepart') + ->asNewInstanceOf('Swift_MimePart') +; diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php new file mode 100644 index 00000000..307756c8 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php @@ -0,0 +1,134 @@ +register('properties.charset') + ->asValue('utf-8') + + ->register('email.validator') + ->asSharedInstanceOf('Egulias\EmailValidator\EmailValidator') + + ->register('mime.idgenerator.idright') + // As SERVER_NAME can come from the user in certain configurations, check that + // it does not contain forbidden characters (see RFC 952 and RFC 2181). Use + // preg_replace() instead of preg_match() to prevent DoS attacks with long host names. + ->asValue(!empty($_SERVER['SERVER_NAME']) && '' === preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated') + + ->register('mime.idgenerator') + ->asSharedInstanceOf('Swift_Mime_IdGenerator') + ->withDependencies([ + 'mime.idgenerator.idright', + ]) + + ->register('mime.message') + ->asNewInstanceOf('Swift_Mime_SimpleMessage') + ->withDependencies([ + 'mime.headerset', + 'mime.textcontentencoder', + 'cache', + 'mime.idgenerator', + 'properties.charset', + ]) + + ->register('mime.part') + ->asNewInstanceOf('Swift_Mime_MimePart') + ->withDependencies([ + 'mime.headerset', + 'mime.textcontentencoder', + 'cache', + 'mime.idgenerator', + 'properties.charset', + ]) + + ->register('mime.attachment') + ->asNewInstanceOf('Swift_Mime_Attachment') + ->withDependencies([ + 'mime.headerset', + 'mime.base64contentencoder', + 'cache', + 'mime.idgenerator', + ]) + ->addConstructorValue($swift_mime_types) + + ->register('mime.embeddedfile') + ->asNewInstanceOf('Swift_Mime_EmbeddedFile') + ->withDependencies([ + 'mime.headerset', + 'mime.base64contentencoder', + 'cache', + 'mime.idgenerator', + ]) + ->addConstructorValue($swift_mime_types) + + ->register('mime.headerfactory') + ->asNewInstanceOf('Swift_Mime_SimpleHeaderFactory') + ->withDependencies([ + 'mime.qpheaderencoder', + 'mime.rfc2231encoder', + 'email.validator', + 'properties.charset', + 'address.idnaddressencoder', + ]) + + ->register('mime.headerset') + ->asNewInstanceOf('Swift_Mime_SimpleHeaderSet') + ->withDependencies(['mime.headerfactory', 'properties.charset']) + + ->register('mime.qpheaderencoder') + ->asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder') + ->withDependencies(['mime.charstream']) + + ->register('mime.base64headerencoder') + ->asNewInstanceOf('Swift_Mime_HeaderEncoder_Base64HeaderEncoder') + ->withDependencies(['mime.charstream']) + + ->register('mime.charstream') + ->asNewInstanceOf('Swift_CharacterStream_NgCharacterStream') + ->withDependencies(['mime.characterreaderfactory', 'properties.charset']) + + ->register('mime.bytecanonicalizer') + ->asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter') + ->addConstructorValue([[0x0D, 0x0A], [0x0D], [0x0A]]) + ->addConstructorValue([[0x0A], [0x0A], [0x0D, 0x0A]]) + + ->register('mime.characterreaderfactory') + ->asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory') + + ->register('mime.textcontentencoder') + ->asAliasOf('mime.qpcontentencoder') + + ->register('mime.safeqpcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') + ->withDependencies(['mime.charstream', 'mime.bytecanonicalizer']) + + ->register('mime.rawcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_RawContentEncoder') + + ->register('mime.nativeqpcontentencoder') + ->withDependencies(['properties.charset']) + ->asNewInstanceOf('Swift_Mime_ContentEncoder_NativeQpContentEncoder') + + ->register('mime.qpcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoderProxy') + ->withDependencies(['mime.safeqpcontentencoder', 'mime.nativeqpcontentencoder', 'properties.charset']) + + ->register('mime.7bitcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') + ->addConstructorValue('7bit') + ->addConstructorValue(true) + + ->register('mime.8bitcontentencoder') + ->asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') + ->addConstructorValue('8bit') + ->addConstructorValue(true) + + ->register('mime.base64contentencoder') + ->asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder') + + ->register('mime.rfc2231encoder') + ->asNewInstanceOf('Swift_Encoder_Rfc2231Encoder') + ->withDependencies(['mime.charstream']) +; + +unset($swift_mime_types); diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php new file mode 100644 index 00000000..34a63c78 --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php @@ -0,0 +1,97 @@ +register('transport.localdomain') + // As SERVER_NAME can come from the user in certain configurations, check that + // it does not contain forbidden characters (see RFC 952 and RFC 2181). Use + // preg_replace() instead of preg_match() to prevent DoS attacks with long host names. + ->asValue(!empty($_SERVER['SERVER_NAME']) && '' === preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $_SERVER['SERVER_NAME']) ? trim($_SERVER['SERVER_NAME'], '[]') : '127.0.0.1') + + ->register('transport.smtp') + ->asNewInstanceOf('Swift_Transport_EsmtpTransport') + ->withDependencies([ + 'transport.buffer', + 'transport.smtphandlers', + 'transport.eventdispatcher', + 'transport.localdomain', + 'address.idnaddressencoder', + ]) + + ->register('transport.sendmail') + ->asNewInstanceOf('Swift_Transport_SendmailTransport') + ->withDependencies([ + 'transport.buffer', + 'transport.eventdispatcher', + 'transport.localdomain', + ]) + + ->register('transport.loadbalanced') + ->asNewInstanceOf('Swift_Transport_LoadBalancedTransport') + + ->register('transport.failover') + ->asNewInstanceOf('Swift_Transport_FailoverTransport') + + ->register('transport.spool') + ->asNewInstanceOf('Swift_Transport_SpoolTransport') + ->withDependencies(['transport.eventdispatcher']) + + ->register('transport.null') + ->asNewInstanceOf('Swift_Transport_NullTransport') + ->withDependencies(['transport.eventdispatcher']) + + ->register('transport.buffer') + ->asNewInstanceOf('Swift_Transport_StreamBuffer') + ->withDependencies(['transport.replacementfactory']) + + ->register('transport.smtphandlers') + ->asArray() + ->withDependencies(['transport.authhandler']) + + ->register('transport.authhandler') + ->asNewInstanceOf('Swift_Transport_Esmtp_AuthHandler') + ->withDependencies(['transport.authhandlers']) + + ->register('transport.authhandlers') + ->asArray() + ->withDependencies([ + 'transport.crammd5auth', + 'transport.loginauth', + 'transport.plainauth', + 'transport.ntlmauth', + 'transport.xoauth2auth', + ]) + + ->register('transport.smtputf8handler') + ->asNewInstanceOf('Swift_Transport_Esmtp_SmtpUtf8Handler') + + ->register('transport.8bitmimehandler') + ->asNewInstanceOf('Swift_Transport_Esmtp_EightBitMimeHandler') + ->addConstructorValue('8BITMIME') + + ->register('transport.crammd5auth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_CramMd5Authenticator') + + ->register('transport.loginauth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_LoginAuthenticator') + + ->register('transport.plainauth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_PlainAuthenticator') + + ->register('transport.xoauth2auth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_XOAuth2Authenticator') + + ->register('transport.ntlmauth') + ->asNewInstanceOf('Swift_Transport_Esmtp_Auth_NTLMAuthenticator') + + ->register('transport.eventdispatcher') + ->asNewInstanceOf('Swift_Events_SimpleEventDispatcher') + + ->register('transport.replacementfactory') + ->asSharedInstanceOf('Swift_StreamFilters_StringReplacementFilterFactory') + + ->register('address.idnaddressencoder') + ->asNewInstanceOf('Swift_AddressEncoder_IdnAddressEncoder') + + ->register('address.utf8addressencoder') + ->asNewInstanceOf('Swift_AddressEncoder_Utf8AddressEncoder') +; diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/mime_types.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/mime_types.php new file mode 100644 index 00000000..72c6fd2a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/mime_types.php @@ -0,0 +1,1007 @@ + 'text/vnd.in3d.3dml', + '3ds' => 'image/x-3ds', + '3g2' => 'video/3gpp2', + '3gp' => 'video/3gpp', + '7z' => 'application/x-7z-compressed', + 'aab' => 'application/x-authorware-bin', + 'aac' => 'audio/x-aac', + 'aam' => 'application/x-authorware-map', + 'aas' => 'application/x-authorware-seg', + 'abw' => 'application/x-abiword', + 'ac' => 'application/pkix-attr-cert', + 'acc' => 'application/vnd.americandynamics.acc', + 'ace' => 'application/x-ace-compressed', + 'acu' => 'application/vnd.acucobol', + 'acutc' => 'application/vnd.acucorp', + 'adp' => 'audio/adpcm', + 'aep' => 'application/vnd.audiograph', + 'afm' => 'application/x-font-type1', + 'afp' => 'application/vnd.ibm.modcap', + 'ahead' => 'application/vnd.ahead.space', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'air' => 'application/vnd.adobe.air-application-installer-package+zip', + 'ait' => 'application/vnd.dvb.ait', + 'ami' => 'application/vnd.amiga.ami', + 'apk' => 'application/vnd.android.package-archive', + 'appcache' => 'text/cache-manifest', + 'apr' => 'application/vnd.lotus-approach', + 'aps' => 'application/postscript', + 'arc' => 'application/x-freearc', + 'asc' => 'application/pgp-signature', + 'asf' => 'video/x-ms-asf', + 'asm' => 'text/x-asm', + 'aso' => 'application/vnd.accpac.simply.aso', + 'asx' => 'video/x-ms-asf', + 'atc' => 'application/vnd.acucorp', + 'atom' => 'application/atom+xml', + 'atomcat' => 'application/atomcat+xml', + 'atomsvc' => 'application/atomsvc+xml', + 'atx' => 'application/vnd.antix.game-component', + 'au' => 'audio/basic', + 'avi' => 'video/x-msvideo', + 'aw' => 'application/applixware', + 'azf' => 'application/vnd.airzip.filesecure.azf', + 'azs' => 'application/vnd.airzip.filesecure.azs', + 'azw' => 'application/vnd.amazon.ebook', + 'bat' => 'application/x-msdownload', + 'bcpio' => 'application/x-bcpio', + 'bdf' => 'application/x-font-bdf', + 'bdm' => 'application/vnd.syncml.dm+wbxml', + 'bed' => 'application/vnd.realvnc.bed', + 'bh2' => 'application/vnd.fujitsu.oasysprs', + 'bin' => 'application/octet-stream', + 'blb' => 'application/x-blorb', + 'blorb' => 'application/x-blorb', + 'bmi' => 'application/vnd.bmi', + 'bmp' => 'image/bmp', + 'book' => 'application/vnd.framemaker', + 'box' => 'application/vnd.previewsystems.box', + 'boz' => 'application/x-bzip2', + 'bpk' => 'application/octet-stream', + 'btif' => 'image/prs.btif', + 'bz' => 'application/x-bzip', + 'bz2' => 'application/x-bzip2', + 'c' => 'text/x-c', + 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', + 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', + 'c4d' => 'application/vnd.clonk.c4group', + 'c4f' => 'application/vnd.clonk.c4group', + 'c4g' => 'application/vnd.clonk.c4group', + 'c4p' => 'application/vnd.clonk.c4group', + 'c4u' => 'application/vnd.clonk.c4group', + 'cab' => 'application/vnd.ms-cab-compressed', + 'caf' => 'audio/x-caf', + 'cap' => 'application/vnd.tcpdump.pcap', + 'car' => 'application/vnd.curl.car', + 'cat' => 'application/vnd.ms-pki.seccat', + 'cb7' => 'application/x-cbr', + 'cba' => 'application/x-cbr', + 'cbr' => 'application/x-cbr', + 'cbt' => 'application/x-cbr', + 'cbz' => 'application/x-cbr', + 'cc' => 'text/x-c', + 'cct' => 'application/x-director', + 'ccxml' => 'application/ccxml+xml', + 'cdbcmsg' => 'application/vnd.contact.cmsg', + 'cdf' => 'application/x-netcdf', + 'cdkey' => 'application/vnd.mediastation.cdkey', + 'cdmia' => 'application/cdmi-capability', + 'cdmic' => 'application/cdmi-container', + 'cdmid' => 'application/cdmi-domain', + 'cdmio' => 'application/cdmi-object', + 'cdmiq' => 'application/cdmi-queue', + 'cdx' => 'chemical/x-cdx', + 'cdxml' => 'application/vnd.chemdraw+xml', + 'cdy' => 'application/vnd.cinderella', + 'cer' => 'application/pkix-cert', + 'cfs' => 'application/x-cfs-compressed', + 'cgm' => 'image/cgm', + 'chat' => 'application/x-chat', + 'chm' => 'application/vnd.ms-htmlhelp', + 'chrt' => 'application/vnd.kde.kchart', + 'cif' => 'chemical/x-cif', + 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', + 'cil' => 'application/vnd.ms-artgalry', + 'cla' => 'application/vnd.claymore', + 'class' => 'application/java-vm', + 'clkk' => 'application/vnd.crick.clicker.keyboard', + 'clkp' => 'application/vnd.crick.clicker.palette', + 'clkt' => 'application/vnd.crick.clicker.template', + 'clkw' => 'application/vnd.crick.clicker.wordbank', + 'clkx' => 'application/vnd.crick.clicker', + 'clp' => 'application/x-msclip', + 'cmc' => 'application/vnd.cosmocaller', + 'cmdf' => 'chemical/x-cmdf', + 'cml' => 'chemical/x-cml', + 'cmp' => 'application/vnd.yellowriver-custom-menu', + 'cmx' => 'image/x-cmx', + 'cod' => 'application/vnd.rim.cod', + 'com' => 'application/x-msdownload', + 'conf' => 'text/plain', + 'cpio' => 'application/x-cpio', + 'cpp' => 'text/x-c', + 'cpt' => 'application/mac-compactpro', + 'crd' => 'application/x-mscardfile', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'csh' => 'application/x-csh', + 'csml' => 'chemical/x-csml', + 'csp' => 'application/vnd.commonspace', + 'css' => 'text/css', + 'cst' => 'application/x-director', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'curl' => 'text/vnd.curl', + 'cww' => 'application/prs.cww', + 'cxt' => 'application/x-director', + 'cxx' => 'text/x-c', + 'dae' => 'model/vnd.collada+xml', + 'daf' => 'application/vnd.mobius.daf', + 'dart' => 'application/vnd.dart', + 'dataless' => 'application/vnd.fdsn.seed', + 'davmount' => 'application/davmount+xml', + 'dbk' => 'application/docbook+xml', + 'dcr' => 'application/x-director', + 'dcurl' => 'text/vnd.curl.dcurl', + 'dd2' => 'application/vnd.oma.dd2+xml', + 'ddd' => 'application/vnd.fujixerox.ddd', + 'deb' => 'application/x-debian-package', + 'def' => 'text/plain', + 'deploy' => 'application/octet-stream', + 'der' => 'application/x-x509-ca-cert', + 'dfac' => 'application/vnd.dreamfactory', + 'dgc' => 'application/x-dgc-compressed', + 'dic' => 'text/x-c', + 'dir' => 'application/x-director', + 'dis' => 'application/vnd.mobius.dis', + 'dist' => 'application/octet-stream', + 'distz' => 'application/octet-stream', + 'djv' => 'image/vnd.djvu', + 'djvu' => 'image/vnd.djvu', + 'dll' => 'application/x-msdownload', + 'dmg' => 'application/x-apple-diskimage', + 'dmp' => 'application/vnd.tcpdump.pcap', + 'dms' => 'application/octet-stream', + 'dna' => 'application/vnd.dna', + 'doc' => 'application/msword', + 'docm' => 'application/vnd.ms-word.document.macroenabled.12', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dot' => 'application/msword', + 'dotm' => 'application/vnd.ms-word.template.macroenabled.12', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'dp' => 'application/vnd.osgi.dp', + 'dpg' => 'application/vnd.dpgraph', + 'dra' => 'audio/vnd.dra', + 'dsc' => 'text/prs.lines.tag', + 'dssc' => 'application/dssc+der', + 'dtb' => 'application/x-dtbook+xml', + 'dtd' => 'application/xml-dtd', + 'dts' => 'audio/vnd.dts', + 'dtshd' => 'audio/vnd.dts.hd', + 'dump' => 'application/octet-stream', + 'dvb' => 'video/vnd.dvb.file', + 'dvi' => 'application/x-dvi', + 'dwf' => 'model/vnd.dwf', + 'dwg' => 'image/vnd.dwg', + 'dxf' => 'image/vnd.dxf', + 'dxp' => 'application/vnd.spotfire.dxp', + 'dxr' => 'application/x-director', + 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', + 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', + 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', + 'ecma' => 'application/ecmascript', + 'edm' => 'application/vnd.novadigm.edm', + 'edx' => 'application/vnd.novadigm.edx', + 'efif' => 'application/vnd.picsel', + 'ei6' => 'application/vnd.pg.osasli', + 'elc' => 'application/octet-stream', + 'emf' => 'application/x-msmetafile', + 'eml' => 'message/rfc822', + 'emma' => 'application/emma+xml', + 'emz' => 'application/x-msmetafile', + 'eol' => 'audio/vnd.digital-winds', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'es3' => 'application/vnd.eszigno3+xml', + 'esa' => 'application/vnd.osgi.subsystem', + 'esf' => 'application/vnd.epson.esf', + 'et3' => 'application/vnd.eszigno3+xml', + 'etx' => 'text/x-setext', + 'eva' => 'application/x-eva', + 'evy' => 'application/x-envoy', + 'exe' => 'application/x-msdownload', + 'exi' => 'application/exi', + 'ext' => 'application/vnd.novadigm.ext', + 'ez' => 'application/andrew-inset', + 'ez2' => 'application/vnd.ezpix-album', + 'ez3' => 'application/vnd.ezpix-package', + 'f' => 'text/x-fortran', + 'f4v' => 'video/x-f4v', + 'f77' => 'text/x-fortran', + 'f90' => 'text/x-fortran', + 'fbs' => 'image/vnd.fastbidsheet', + 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', + 'fcs' => 'application/vnd.isac.fcs', + 'fdf' => 'application/vnd.fdf', + 'fe_launch' => 'application/vnd.denovo.fcselayout-link', + 'fg5' => 'application/vnd.fujitsu.oasysgp', + 'fgd' => 'application/x-director', + 'fh' => 'image/x-freehand', + 'fh4' => 'image/x-freehand', + 'fh5' => 'image/x-freehand', + 'fh7' => 'image/x-freehand', + 'fhc' => 'image/x-freehand', + 'fig' => 'application/x-xfig', + 'flac' => 'audio/x-flac', + 'fli' => 'video/x-fli', + 'flo' => 'application/vnd.micrografx.flo', + 'flv' => 'video/x-flv', + 'flw' => 'application/vnd.kde.kivio', + 'flx' => 'text/vnd.fmi.flexstor', + 'fly' => 'text/vnd.fly', + 'fm' => 'application/vnd.framemaker', + 'fnc' => 'application/vnd.frogans.fnc', + 'for' => 'text/x-fortran', + 'fpx' => 'image/vnd.fpx', + 'frame' => 'application/vnd.framemaker', + 'fsc' => 'application/vnd.fsc.weblaunch', + 'fst' => 'image/vnd.fst', + 'ftc' => 'application/vnd.fluxtime.clip', + 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', + 'fvt' => 'video/vnd.fvt', + 'fxp' => 'application/vnd.adobe.fxp', + 'fxpl' => 'application/vnd.adobe.fxp', + 'fzs' => 'application/vnd.fuzzysheet', + 'g2w' => 'application/vnd.geoplan', + 'g3' => 'image/g3fax', + 'g3w' => 'application/vnd.geospace', + 'gac' => 'application/vnd.groove-account', + 'gam' => 'application/x-tads', + 'gbr' => 'application/rpki-ghostbusters', + 'gca' => 'application/x-gca-compressed', + 'gdl' => 'model/vnd.gdl', + 'geo' => 'application/vnd.dynageo', + 'gex' => 'application/vnd.geometry-explorer', + 'ggb' => 'application/vnd.geogebra.file', + 'ggt' => 'application/vnd.geogebra.tool', + 'ghf' => 'application/vnd.groove-help', + 'gif' => 'image/gif', + 'gim' => 'application/vnd.groove-identity-message', + 'gml' => 'application/gml+xml', + 'gmx' => 'application/vnd.gmx', + 'gnumeric' => 'application/x-gnumeric', + 'gph' => 'application/vnd.flographit', + 'gpx' => 'application/gpx+xml', + 'gqf' => 'application/vnd.grafeq', + 'gqs' => 'application/vnd.grafeq', + 'gram' => 'application/srgs', + 'gramps' => 'application/x-gramps-xml', + 'gre' => 'application/vnd.geometry-explorer', + 'grv' => 'application/vnd.groove-injector', + 'grxml' => 'application/srgs+xml', + 'gsf' => 'application/x-font-ghostscript', + 'gtar' => 'application/x-gtar', + 'gtm' => 'application/vnd.groove-tool-message', + 'gtw' => 'model/vnd.gtw', + 'gv' => 'text/vnd.graphviz', + 'gxf' => 'application/gxf', + 'gxt' => 'application/vnd.geonext', + 'gz' => 'application/x-gzip', + 'h' => 'text/x-c', + 'h261' => 'video/h261', + 'h263' => 'video/h263', + 'h264' => 'video/h264', + 'hal' => 'application/vnd.hal+xml', + 'hbci' => 'application/vnd.hbci', + 'hdf' => 'application/x-hdf', + 'hh' => 'text/x-c', + 'hlp' => 'application/winhlp', + 'hpgl' => 'application/vnd.hp-hpgl', + 'hpid' => 'application/vnd.hp-hpid', + 'hps' => 'application/vnd.hp-hps', + 'hqx' => 'application/mac-binhex40', + 'htke' => 'application/vnd.kenameaapp', + 'htm' => 'text/html', + 'html' => 'text/html', + 'hvd' => 'application/vnd.yamaha.hv-dic', + 'hvp' => 'application/vnd.yamaha.hv-voice', + 'hvs' => 'application/vnd.yamaha.hv-script', + 'i2g' => 'application/vnd.intergeo', + 'icc' => 'application/vnd.iccprofile', + 'ice' => 'x-conference/x-cooltalk', + 'icm' => 'application/vnd.iccprofile', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ief' => 'image/ief', + 'ifb' => 'text/calendar', + 'ifm' => 'application/vnd.shana.informed.formdata', + 'iges' => 'model/iges', + 'igl' => 'application/vnd.igloader', + 'igm' => 'application/vnd.insors.igm', + 'igs' => 'model/iges', + 'igx' => 'application/vnd.micrografx.igx', + 'iif' => 'application/vnd.shana.informed.interchange', + 'imp' => 'application/vnd.accpac.simply.imp', + 'ims' => 'application/vnd.ms-ims', + 'in' => 'text/plain', + 'ink' => 'application/inkml+xml', + 'inkml' => 'application/inkml+xml', + 'install' => 'application/x-install-instructions', + 'iota' => 'application/vnd.astraea-software.iota', + 'ipfix' => 'application/ipfix', + 'ipk' => 'application/vnd.shana.informed.package', + 'irm' => 'application/vnd.ibm.rights-management', + 'irp' => 'application/vnd.irepository.package+xml', + 'iso' => 'application/x-iso9660-image', + 'itp' => 'application/vnd.shana.informed.formtemplate', + 'ivp' => 'application/vnd.immervision-ivp', + 'ivu' => 'application/vnd.immervision-ivu', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'jam' => 'application/vnd.jam', + 'jar' => 'application/java-archive', + 'java' => 'text/x-java-source', + 'jisp' => 'application/vnd.jisp', + 'jlt' => 'application/vnd.hp-jlyt', + 'jnlp' => 'application/x-java-jnlp-file', + 'joda' => 'application/vnd.joost.joda-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpgm' => 'video/jpm', + 'jpgv' => 'video/jpeg', + 'jpm' => 'video/jpm', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'jsonml' => 'application/jsonml+json', + 'kar' => 'audio/midi', + 'karbon' => 'application/vnd.kde.karbon', + 'kfo' => 'application/vnd.kde.kformula', + 'kia' => 'application/vnd.kidspiration', + 'kml' => 'application/vnd.google-earth.kml+xml', + 'kmz' => 'application/vnd.google-earth.kmz', + 'kne' => 'application/vnd.kinar', + 'knp' => 'application/vnd.kinar', + 'kon' => 'application/vnd.kde.kontour', + 'kpr' => 'application/vnd.kde.kpresenter', + 'kpt' => 'application/vnd.kde.kpresenter', + 'kpxx' => 'application/vnd.ds-keypoint', + 'ksp' => 'application/vnd.kde.kspread', + 'ktr' => 'application/vnd.kahootz', + 'ktx' => 'image/ktx', + 'ktz' => 'application/vnd.kahootz', + 'kwd' => 'application/vnd.kde.kword', + 'kwt' => 'application/vnd.kde.kword', + 'lasxml' => 'application/vnd.las.las+xml', + 'latex' => 'application/x-latex', + 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', + 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', + 'les' => 'application/vnd.hhe.lesson-player', + 'lha' => 'application/x-lzh-compressed', + 'link66' => 'application/vnd.route66.link66+xml', + 'list' => 'text/plain', + 'list3820' => 'application/vnd.ibm.modcap', + 'listafp' => 'application/vnd.ibm.modcap', + 'lnk' => 'application/x-ms-shortcut', + 'log' => 'text/plain', + 'lostxml' => 'application/lost+xml', + 'lrf' => 'application/octet-stream', + 'lrm' => 'application/vnd.ms-lrm', + 'ltf' => 'application/vnd.frogans.ltf', + 'lvp' => 'audio/vnd.lucent.voice', + 'lwp' => 'application/vnd.lotus-wordpro', + 'lzh' => 'application/x-lzh-compressed', + 'm13' => 'application/x-msmediaview', + 'm14' => 'application/x-msmediaview', + 'm1v' => 'video/mpeg', + 'm21' => 'application/mp21', + 'm2a' => 'audio/mpeg', + 'm2v' => 'video/mpeg', + 'm3a' => 'audio/mpeg', + 'm3u' => 'audio/x-mpegurl', + 'm3u8' => 'application/vnd.apple.mpegurl', + 'm4a' => 'audio/mp4', + 'm4u' => 'video/vnd.mpegurl', + 'm4v' => 'video/x-m4v', + 'ma' => 'application/mathematica', + 'mads' => 'application/mads+xml', + 'mag' => 'application/vnd.ecowin.chart', + 'maker' => 'application/vnd.framemaker', + 'man' => 'text/troff', + 'mar' => 'application/octet-stream', + 'mathml' => 'application/mathml+xml', + 'mb' => 'application/mathematica', + 'mbk' => 'application/vnd.mobius.mbk', + 'mbox' => 'application/mbox', + 'mc1' => 'application/vnd.medcalcdata', + 'mcd' => 'application/vnd.mcd', + 'mcurl' => 'text/vnd.curl.mcurl', + 'mdb' => 'application/x-msaccess', + 'mdi' => 'image/vnd.ms-modi', + 'me' => 'text/troff', + 'mesh' => 'model/mesh', + 'meta4' => 'application/metalink4+xml', + 'metalink' => 'application/metalink+xml', + 'mets' => 'application/mets+xml', + 'mfm' => 'application/vnd.mfmp', + 'mft' => 'application/rpki-manifest', + 'mgp' => 'application/vnd.osgeo.mapguide.package', + 'mgz' => 'application/vnd.proteus.magazine', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mie' => 'application/x-mie', + 'mif' => 'application/vnd.mif', + 'mime' => 'message/rfc822', + 'mj2' => 'video/mj2', + 'mjp2' => 'video/mj2', + 'mk3d' => 'video/x-matroska', + 'mka' => 'audio/x-matroska', + 'mks' => 'video/x-matroska', + 'mkv' => 'video/x-matroska', + 'mlp' => 'application/vnd.dolby.mlp', + 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', + 'mmf' => 'application/vnd.smaf', + 'mmr' => 'image/vnd.fujixerox.edmics-mmr', + 'mng' => 'video/x-mng', + 'mny' => 'application/x-msmoney', + 'mobi' => 'application/x-mobipocket-ebook', + 'mods' => 'application/mods+xml', + 'mov' => 'video/quicktime', + 'movie' => 'video/x-sgi-movie', + 'mp2' => 'audio/mpeg', + 'mp21' => 'application/mp21', + 'mp2a' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4s' => 'application/mp4', + 'mp4v' => 'video/mp4', + 'mpc' => 'application/vnd.mophun.certificate', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'mpga' => 'audio/mpeg', + 'mpkg' => 'application/vnd.apple.installer+xml', + 'mpm' => 'application/vnd.blueice.multipass', + 'mpn' => 'application/vnd.mophun.application', + 'mpp' => 'application/vnd.ms-project', + 'mpt' => 'application/vnd.ms-project', + 'mpy' => 'application/vnd.ibm.minipay', + 'mqy' => 'application/vnd.mobius.mqy', + 'mrc' => 'application/marc', + 'mrcx' => 'application/marcxml+xml', + 'ms' => 'text/troff', + 'mscml' => 'application/mediaservercontrol+xml', + 'mseed' => 'application/vnd.fdsn.mseed', + 'mseq' => 'application/vnd.mseq', + 'msf' => 'application/vnd.epson.msf', + 'msh' => 'model/mesh', + 'msi' => 'application/x-msdownload', + 'msl' => 'application/vnd.mobius.msl', + 'msty' => 'application/vnd.muvee.style', + 'mts' => 'model/vnd.mts', + 'mus' => 'application/vnd.musician', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + 'mvb' => 'application/x-msmediaview', + 'mwf' => 'application/vnd.mfer', + 'mxf' => 'application/mxf', + 'mxl' => 'application/vnd.recordare.musicxml', + 'mxml' => 'application/xv+xml', + 'mxs' => 'application/vnd.triscape.mxs', + 'mxu' => 'video/vnd.mpegurl', + 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', + 'n3' => 'text/n3', + 'nb' => 'application/mathematica', + 'nbp' => 'application/vnd.wolfram.player', + 'nc' => 'application/x-netcdf', + 'ncx' => 'application/x-dtbncx+xml', + 'nfo' => 'text/x-nfo', + 'ngdat' => 'application/vnd.nokia.n-gage.data', + 'nitf' => 'application/vnd.nitf', + 'nlu' => 'application/vnd.neurolanguage.nlu', + 'nml' => 'application/vnd.enliven', + 'nnd' => 'application/vnd.noblenet-directory', + 'nns' => 'application/vnd.noblenet-sealer', + 'nnw' => 'application/vnd.noblenet-web', + 'npx' => 'image/vnd.net-fpx', + 'nsc' => 'application/x-conference', + 'nsf' => 'application/vnd.lotus-notes', + 'ntf' => 'application/vnd.nitf', + 'nzb' => 'application/x-nzb', + 'oa2' => 'application/vnd.fujitsu.oasys2', + 'oa3' => 'application/vnd.fujitsu.oasys3', + 'oas' => 'application/vnd.fujitsu.oasys', + 'obd' => 'application/x-msbinder', + 'obj' => 'application/x-tgif', + 'oda' => 'application/oda', + 'odb' => 'application/vnd.oasis.opendocument.database', + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'odft' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'omdoc' => 'application/omdoc+xml', + 'onepkg' => 'application/onenote', + 'onetmp' => 'application/onenote', + 'onetoc' => 'application/onenote', + 'onetoc2' => 'application/onenote', + 'opf' => 'application/oebps-package+xml', + 'opml' => 'text/x-opml', + 'oprc' => 'application/vnd.palm', + 'org' => 'application/vnd.lotus-organizer', + 'osf' => 'application/vnd.yamaha.openscoreformat', + 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'otf' => 'application/x-font-otf', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oxps' => 'application/oxps', + 'oxt' => 'application/vnd.openofficeorg.extension', + 'p' => 'text/x-pascal', + 'p10' => 'application/pkcs10', + 'p12' => 'application/x-pkcs12', + 'p7b' => 'application/x-pkcs7-certificates', + 'p7c' => 'application/pkcs7-mime', + 'p7m' => 'application/pkcs7-mime', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'p8' => 'application/pkcs8', + 'pas' => 'text/x-pascal', + 'paw' => 'application/vnd.pawaafile', + 'pbd' => 'application/vnd.powerbuilder6', + 'pbm' => 'image/x-portable-bitmap', + 'pcap' => 'application/vnd.tcpdump.pcap', + 'pcf' => 'application/x-font-pcf', + 'pcl' => 'application/vnd.hp-pcl', + 'pclxl' => 'application/vnd.hp-pclxl', + 'pct' => 'image/x-pict', + 'pcurl' => 'application/vnd.curl.pcurl', + 'pcx' => 'image/x-pcx', + 'pdb' => 'application/vnd.palm', + 'pdf' => 'application/pdf', + 'pfa' => 'application/x-font-type1', + 'pfb' => 'application/x-font-type1', + 'pfm' => 'application/x-font-type1', + 'pfr' => 'application/font-tdpfr', + 'pfx' => 'application/x-pkcs12', + 'pgm' => 'image/x-portable-graymap', + 'pgn' => 'application/x-chess-pgn', + 'pgp' => 'application/pgp-encrypted', + 'php' => 'application/x-php', + 'php3' => 'application/x-php', + 'php4' => 'application/x-php', + 'php5' => 'application/x-php', + 'pic' => 'image/x-pict', + 'pkg' => 'application/octet-stream', + 'pki' => 'application/pkixcmp', + 'pkipath' => 'application/pkix-pkipath', + 'plb' => 'application/vnd.3gpp.pic-bw-large', + 'plc' => 'application/vnd.mobius.plc', + 'plf' => 'application/vnd.pocketlearn', + 'pls' => 'application/pls+xml', + 'pml' => 'application/vnd.ctc-posml', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'portpkg' => 'application/vnd.macports.portpkg', + 'pot' => 'application/vnd.ms-powerpoint', + 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12', + 'ppd' => 'application/vnd.cups-ppd', + 'ppm' => 'image/x-portable-pixmap', + 'pps' => 'application/vnd.ms-powerpoint', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'pqa' => 'application/vnd.palm', + 'prc' => 'application/x-mobipocket-ebook', + 'pre' => 'application/vnd.lotus-freelance', + 'prf' => 'application/pics-rules', + 'ps' => 'application/postscript', + 'psb' => 'application/vnd.3gpp.pic-bw-small', + 'psd' => 'image/vnd.adobe.photoshop', + 'psf' => 'application/x-font-linux-psf', + 'pskcxml' => 'application/pskc+xml', + 'ptid' => 'application/vnd.pvi.ptid1', + 'pub' => 'application/x-mspublisher', + 'pvb' => 'application/vnd.3gpp.pic-bw-var', + 'pwn' => 'application/vnd.3m.post-it-notes', + 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyv' => 'video/vnd.ms-playready.media.pyv', + 'qam' => 'application/vnd.epson.quickanime', + 'qbo' => 'application/vnd.intu.qbo', + 'qfx' => 'application/vnd.intu.qfx', + 'qps' => 'application/vnd.publishare-delta-tree', + 'qt' => 'video/quicktime', + 'qwd' => 'application/vnd.quark.quarkxpress', + 'qwt' => 'application/vnd.quark.quarkxpress', + 'qxb' => 'application/vnd.quark.quarkxpress', + 'qxd' => 'application/vnd.quark.quarkxpress', + 'qxl' => 'application/vnd.quark.quarkxpress', + 'qxt' => 'application/vnd.quark.quarkxpress', + 'ra' => 'audio/x-pn-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', + 'rdf' => 'application/rdf+xml', + 'rdz' => 'application/vnd.data-vision.rdz', + 'rep' => 'application/vnd.businessobjects', + 'res' => 'application/x-dtbresource+xml', + 'rgb' => 'image/x-rgb', + 'rif' => 'application/reginfo+xml', + 'rip' => 'audio/vnd.rip', + 'ris' => 'application/x-research-info-systems', + 'rl' => 'application/resource-lists+xml', + 'rlc' => 'image/vnd.fujixerox.edmics-rlc', + 'rld' => 'application/resource-lists-diff+xml', + 'rm' => 'application/vnd.rn-realmedia', + 'rmi' => 'audio/midi', + 'rmp' => 'audio/x-pn-realaudio-plugin', + 'rms' => 'application/vnd.jcp.javame.midlet-rms', + 'rmvb' => 'application/vnd.rn-realmedia-vbr', + 'rnc' => 'application/relax-ng-compact-syntax', + 'roa' => 'application/rpki-roa', + 'roff' => 'text/troff', + 'rp9' => 'application/vnd.cloanto.rp9', + 'rpss' => 'application/vnd.nokia.radio-presets', + 'rpst' => 'application/vnd.nokia.radio-preset', + 'rq' => 'application/sparql-query', + 'rs' => 'application/rls-services+xml', + 'rsd' => 'application/rsd+xml', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'rtx' => 'text/richtext', + 's' => 'text/x-asm', + 's3m' => 'audio/s3m', + 'saf' => 'application/vnd.yamaha.smaf-audio', + 'sbml' => 'application/sbml+xml', + 'sc' => 'application/vnd.ibm.secure-container', + 'scd' => 'application/x-msschedule', + 'scm' => 'application/vnd.lotus-screencam', + 'scq' => 'application/scvp-cv-request', + 'scs' => 'application/scvp-cv-response', + 'scurl' => 'text/vnd.curl.scurl', + 'sda' => 'application/vnd.stardivision.draw', + 'sdc' => 'application/vnd.stardivision.calc', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdkd' => 'application/vnd.solent.sdkm+xml', + 'sdkm' => 'application/vnd.solent.sdkm+xml', + 'sdp' => 'application/sdp', + 'sdw' => 'application/vnd.stardivision.writer', + 'see' => 'application/vnd.seemail', + 'seed' => 'application/vnd.fdsn.seed', + 'sema' => 'application/vnd.sema', + 'semd' => 'application/vnd.semd', + 'semf' => 'application/vnd.semf', + 'ser' => 'application/java-serialized-object', + 'setpay' => 'application/set-payment-initiation', + 'setreg' => 'application/set-registration-initiation', + 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', + 'sfs' => 'application/vnd.spotfire.sfs', + 'sfv' => 'text/x-sfv', + 'sgi' => 'image/sgi', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'sh' => 'application/x-sh', + 'shar' => 'application/x-shar', + 'shf' => 'application/shf+xml', + 'sid' => 'image/x-mrsid-image', + 'sig' => 'application/pgp-signature', + 'sil' => 'audio/silk', + 'silo' => 'model/mesh', + 'sis' => 'application/vnd.symbian.install', + 'sisx' => 'application/vnd.symbian.install', + 'sit' => 'application/x-stuffit', + 'sitx' => 'application/x-stuffitx', + 'skd' => 'application/vnd.koan', + 'skm' => 'application/vnd.koan', + 'skp' => 'application/vnd.koan', + 'skt' => 'application/vnd.koan', + 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'slt' => 'application/vnd.epson.salt', + 'sm' => 'application/vnd.stepmania.stepchart', + 'smf' => 'application/vnd.stardivision.math', + 'smi' => 'application/smil+xml', + 'smil' => 'application/smil+xml', + 'smv' => 'video/x-smv', + 'smzip' => 'application/vnd.stepmania.package', + 'snd' => 'audio/basic', + 'snf' => 'application/x-font-snf', + 'so' => 'application/octet-stream', + 'spc' => 'application/x-pkcs7-certificates', + 'spf' => 'application/vnd.yamaha.smaf-phrase', + 'spl' => 'application/x-futuresplash', + 'spot' => 'text/vnd.in3d.spot', + 'spp' => 'application/scvp-vp-response', + 'spq' => 'application/scvp-vp-request', + 'spx' => 'audio/ogg', + 'sql' => 'application/x-sql', + 'src' => 'application/x-wais-source', + 'srt' => 'application/x-subrip', + 'sru' => 'application/sru+xml', + 'srx' => 'application/sparql-results+xml', + 'ssdl' => 'application/ssdl+xml', + 'sse' => 'application/vnd.kodak-descriptor', + 'ssf' => 'application/vnd.epson.ssf', + 'ssml' => 'application/ssml+xml', + 'st' => 'application/vnd.sailingtracker.track', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'std' => 'application/vnd.sun.xml.draw.template', + 'stf' => 'application/vnd.wt.stf', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'stk' => 'application/hyperstudio', + 'stl' => 'application/vnd.ms-pki.stl', + 'str' => 'application/vnd.pg.format', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sub' => 'text/vnd.dvb.subtitle', + 'sus' => 'application/vnd.sus-calendar', + 'susp' => 'application/vnd.sus-calendar', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'svc' => 'application/vnd.dvb.service', + 'svd' => 'application/vnd.svd', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + 'swa' => 'application/x-director', + 'swf' => 'application/x-shockwave-flash', + 'swi' => 'application/vnd.aristanetworks.swi', + 'sxc' => 'application/vnd.sun.xml.calc', + 'sxd' => 'application/vnd.sun.xml.draw', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 't' => 'text/troff', + 't3' => 'application/x-t3vm-image', + 'taglet' => 'application/vnd.mynfc', + 'tao' => 'application/vnd.tao.intent-module-archive', + 'tar' => 'application/x-tar', + 'tcap' => 'application/vnd.3gpp2.tcap', + 'tcl' => 'application/x-tcl', + 'teacher' => 'application/vnd.smart.teacher', + 'tei' => 'application/tei+xml', + 'teicorpus' => 'application/tei+xml', + 'tex' => 'application/x-tex', + 'texi' => 'application/x-texinfo', + 'texinfo' => 'application/x-texinfo', + 'text' => 'text/plain', + 'tfi' => 'application/thraud+xml', + 'tfm' => 'application/x-tex-tfm', + 'tga' => 'image/x-tga', + 'thmx' => 'application/vnd.ms-officetheme', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'tmo' => 'application/vnd.tmobile-livetv', + 'torrent' => 'application/x-bittorrent', + 'tpl' => 'application/vnd.groove-tool-template', + 'tpt' => 'application/vnd.trid.tpt', + 'tr' => 'text/troff', + 'tra' => 'application/vnd.trueapp', + 'trm' => 'application/x-msterminal', + 'tsd' => 'application/timestamped-data', + 'tsv' => 'text/tab-separated-values', + 'ttc' => 'application/x-font-ttf', + 'ttf' => 'application/x-font-ttf', + 'ttl' => 'text/turtle', + 'twd' => 'application/vnd.simtech-mindmapper', + 'twds' => 'application/vnd.simtech-mindmapper', + 'txd' => 'application/vnd.genomatix.tuxedo', + 'txf' => 'application/vnd.mobius.txf', + 'txt' => 'text/plain', + 'u32' => 'application/x-authorware-bin', + 'udeb' => 'application/x-debian-package', + 'ufd' => 'application/vnd.ufdl', + 'ufdl' => 'application/vnd.ufdl', + 'ulx' => 'application/x-glulx', + 'umj' => 'application/vnd.umajin', + 'unityweb' => 'application/vnd.unity', + 'uoml' => 'application/vnd.uoml+xml', + 'uri' => 'text/uri-list', + 'uris' => 'text/uri-list', + 'urls' => 'text/uri-list', + 'ustar' => 'application/x-ustar', + 'utz' => 'application/vnd.uiq.theme', + 'uu' => 'text/x-uuencode', + 'uva' => 'audio/vnd.dece.audio', + 'uvd' => 'application/vnd.dece.data', + 'uvf' => 'application/vnd.dece.data', + 'uvg' => 'image/vnd.dece.graphic', + 'uvh' => 'video/vnd.dece.hd', + 'uvi' => 'image/vnd.dece.graphic', + 'uvm' => 'video/vnd.dece.mobile', + 'uvp' => 'video/vnd.dece.pd', + 'uvs' => 'video/vnd.dece.sd', + 'uvt' => 'application/vnd.dece.ttml+xml', + 'uvu' => 'video/vnd.uvvu.mp4', + 'uvv' => 'video/vnd.dece.video', + 'uvva' => 'audio/vnd.dece.audio', + 'uvvd' => 'application/vnd.dece.data', + 'uvvf' => 'application/vnd.dece.data', + 'uvvg' => 'image/vnd.dece.graphic', + 'uvvh' => 'video/vnd.dece.hd', + 'uvvi' => 'image/vnd.dece.graphic', + 'uvvm' => 'video/vnd.dece.mobile', + 'uvvp' => 'video/vnd.dece.pd', + 'uvvs' => 'video/vnd.dece.sd', + 'uvvt' => 'application/vnd.dece.ttml+xml', + 'uvvu' => 'video/vnd.uvvu.mp4', + 'uvvv' => 'video/vnd.dece.video', + 'uvvx' => 'application/vnd.dece.unspecified', + 'uvvz' => 'application/vnd.dece.zip', + 'uvx' => 'application/vnd.dece.unspecified', + 'uvz' => 'application/vnd.dece.zip', + 'vcard' => 'text/vcard', + 'vcd' => 'application/x-cdlink', + 'vcf' => 'text/x-vcard', + 'vcg' => 'application/vnd.groove-vcard', + 'vcs' => 'text/x-vcalendar', + 'vcx' => 'application/vnd.vcx', + 'vis' => 'application/vnd.visionary', + 'viv' => 'video/vnd.vivo', + 'vob' => 'video/x-ms-vob', + 'vor' => 'application/vnd.stardivision.writer', + 'vox' => 'application/x-authorware-bin', + 'vrml' => 'model/vrml', + 'vsd' => 'application/vnd.visio', + 'vsf' => 'application/vnd.vsf', + 'vss' => 'application/vnd.visio', + 'vst' => 'application/vnd.visio', + 'vsw' => 'application/vnd.visio', + 'vtu' => 'model/vnd.vtu', + 'vxml' => 'application/voicexml+xml', + 'w3d' => 'application/x-director', + 'wad' => 'application/x-doom', + 'wav' => 'audio/x-wav', + 'wax' => 'audio/x-ms-wax', + 'wbmp' => 'image/vnd.wap.wbmp', + 'wbs' => 'application/vnd.criticaltools.wbs+xml', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wcm' => 'application/vnd.ms-works', + 'wdb' => 'application/vnd.ms-works', + 'wdp' => 'image/vnd.ms-photo', + 'weba' => 'audio/webm', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wg' => 'application/vnd.pmi.widget', + 'wgt' => 'application/widget', + 'wks' => 'application/vnd.ms-works', + 'wm' => 'video/x-ms-wm', + 'wma' => 'audio/x-ms-wma', + 'wmd' => 'application/x-ms-wmd', + 'wmf' => 'application/x-msmetafile', + 'wml' => 'text/vnd.wap.wml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmls' => 'text/vnd.wap.wmlscript', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wmz' => 'application/x-msmetafile', + 'woff' => 'application/font-woff', + 'wpd' => 'application/vnd.wordperfect', + 'wpl' => 'application/vnd.ms-wpl', + 'wps' => 'application/vnd.ms-works', + 'wqd' => 'application/vnd.wqd', + 'wri' => 'application/x-mswrite', + 'wrl' => 'model/vrml', + 'wsdl' => 'application/wsdl+xml', + 'wspolicy' => 'application/wspolicy+xml', + 'wtb' => 'application/vnd.webturbo', + 'wvx' => 'video/x-ms-wvx', + 'x32' => 'application/x-authorware-bin', + 'x3d' => 'model/x3d+xml', + 'x3db' => 'model/x3d+binary', + 'x3dbz' => 'model/x3d+binary', + 'x3dv' => 'model/x3d+vrml', + 'x3dvz' => 'model/x3d+vrml', + 'x3dz' => 'model/x3d+xml', + 'xaml' => 'application/xaml+xml', + 'xap' => 'application/x-silverlight-app', + 'xar' => 'application/vnd.xara', + 'xbap' => 'application/x-ms-xbap', + 'xbd' => 'application/vnd.fujixerox.docuworks.binder', + 'xbm' => 'image/x-xbitmap', + 'xdf' => 'application/xcap-diff+xml', + 'xdm' => 'application/vnd.syncml.dm+xml', + 'xdp' => 'application/vnd.adobe.xdp+xml', + 'xdssc' => 'application/dssc+xml', + 'xdw' => 'application/vnd.fujixerox.docuworks', + 'xenc' => 'application/xenc+xml', + 'xer' => 'application/patch-ops-error+xml', + 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdl' => 'application/vnd.xfdl', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'xhvml' => 'application/xv+xml', + 'xif' => 'image/vnd.xiff', + 'xla' => 'application/vnd.ms-excel', + 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12', + 'xlc' => 'application/vnd.ms-excel', + 'xlf' => 'application/x-xliff+xml', + 'xlm' => 'application/vnd.ms-excel', + 'xls' => 'application/vnd.ms-excel', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xlt' => 'application/vnd.ms-excel', + 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'xlw' => 'application/vnd.ms-excel', + 'xm' => 'audio/xm', + 'xml' => 'application/xml', + 'xo' => 'application/vnd.olpc-sugar', + 'xop' => 'application/xop+xml', + 'xpi' => 'application/x-xpinstall', + 'xpl' => 'application/xproc+xml', + 'xpm' => 'image/x-xpixmap', + 'xpr' => 'application/vnd.is-xpr', + 'xps' => 'application/vnd.ms-xpsdocument', + 'xpw' => 'application/vnd.intercon.formnet', + 'xpx' => 'application/vnd.intercon.formnet', + 'xsl' => 'application/xml', + 'xslt' => 'application/xslt+xml', + 'xsm' => 'application/vnd.syncml+xml', + 'xspf' => 'application/xspf+xml', + 'xul' => 'application/vnd.mozilla.xul+xml', + 'xvm' => 'application/xv+xml', + 'xvml' => 'application/xv+xml', + 'xwd' => 'image/x-xwindowdump', + 'xyz' => 'chemical/x-xyz', + 'xz' => 'application/x-xz', + 'yang' => 'application/yang', + 'yin' => 'application/yin+xml', + 'z1' => 'application/x-zmachine', + 'z2' => 'application/x-zmachine', + 'z3' => 'application/x-zmachine', + 'z4' => 'application/x-zmachine', + 'z5' => 'application/x-zmachine', + 'z6' => 'application/x-zmachine', + 'z7' => 'application/x-zmachine', + 'z8' => 'application/x-zmachine', + 'zaz' => 'application/vnd.zzazz.deck+xml', + 'zip' => 'application/zip', + 'zir' => 'application/vnd.zul', + 'zirz' => 'application/vnd.zul', + 'zmm' => 'application/vnd.handheld-entertainment+xml', + '123' => 'application/vnd.lotus-1-2-3', +]; diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/preferences.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/preferences.php new file mode 100644 index 00000000..27b7065d --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/preferences.php @@ -0,0 +1,19 @@ +setCharset('utf-8'); + +// Without these lines the default caching mechanism is "array" but this uses a lot of memory. +// If possible, use a disk cache to enable attaching large attachments etc. +// You can override the default temporary directory by setting the TMPDIR environment variable. +if (@is_writable($tmpDir = sys_get_temp_dir())) { + $preferences->setTempDir($tmpDir)->setCacheType('disk'); +} diff --git a/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/swift_required.php b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/swift_required.php new file mode 100644 index 00000000..d696056a --- /dev/null +++ b/dev/plugins/email/vendor/swiftmailer/swiftmailer/lib/swift_required.php @@ -0,0 +1,22 @@ + 'application/x-php', + 'php3' => 'application/x-php', + 'php4' => 'application/x-php', + 'php5' => 'application/x-php', + 'zip' => 'application/zip', + 'gif' => 'image/gif', + 'png' => 'image/png', + 'css' => 'text/css', + 'js' => 'text/javascript', + 'txt' => 'text/plain', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'avi' => 'video/avi', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bz2', + 'csv' => 'text/csv', + 'dmg' => 'application/x-apple-diskimage', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'eml' => 'message/rfc822', + 'aps' => 'application/postscript', + 'exe' => 'application/x-ms-dos-executable', + 'flv' => 'video/x-flv', + 'gz' => 'application/x-gzip', + 'hqx' => 'application/stuffit', + 'htm' => 'text/html', + 'html' => 'text/html', + 'jar' => 'application/x-java-archive', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'm3u' => 'audio/x-mpegurl', + 'm4a' => 'audio/mp4', + 'mdb' => 'application/x-msaccess', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'odg' => 'vnd.oasis.opendocument.graphics', + 'odp' => 'vnd.oasis.opendocument.presentation', + 'odt' => 'vnd.oasis.opendocument.text', + 'ods' => 'vnd.oasis.opendocument.spreadsheet', + 'ogg' => 'audio/ogg', + 'pdf' => 'application/pdf', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'rar' => 'application/x-rar-compressed', + 'rtf' => 'application/rtf', + 'tar' => 'application/x-tar', + 'sit' => 'application/x-stuffit', + 'svg' => 'image/svg+xml', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'ttf' => 'application/x-font-truetype', + 'vcf' => 'text/x-vcard', + 'wav' => 'audio/wav', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'audio/x-ms-wmv', + 'xls' => 'application/vnd.ms-excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + ]; + + // wrap array for generating file + foreach ($valid_mime_types_preset as $extension => $mime_type) { + // generate array for mimetype to extension resolver (only first match) + $valid_mime_types[$extension] = "'{$extension}' => '{$mime_type}'"; + } + + // all extensions from second match + foreach ($matches[2] as $i => $extensions) { + // explode multiple extensions from string + $extensions = explode(' ', strtolower($extensions ?? '')); + + // force array for foreach + if (!\is_array($extensions)) { + $extensions = [$extensions]; + } + + foreach ($extensions as $extension) { + // get mime type + $mime_type = $matches[1][$i]; + + // check if string length lower than 10 + if (\strlen($extension) < 10) { + if (!isset($valid_mime_types[$mime_type])) { + // generate array for mimetype to extension resolver (only first match) + $valid_mime_types[$extension] = "'{$extension}' => '{$mime_type}'"; + } + } + } + } + } + + $xml = simplexml_load_string($mime_xml); + + foreach ($xml as $node) { + // check if there is no pattern + if (!isset($node->glob['pattern'])) { + continue; + } + + // get all matching extensions from match + foreach ((array) $node->glob['pattern'] as $extension) { + // skip none glob extensions + if (false === strpos($extension ?? '', '.')) { + continue; + } + + // remove get only last part + $extension = explode('.', strtolower($extension ?? '')); + $extension = end($extension); + } + + if (isset($node->glob['pattern'][0])) { + // mime type + $mime_type = strtolower((string) $node['type'] ?? ''); + + // get first extension + $extension = strtolower(trim($node->glob['ddpattern'][0] ?? '', '*.')); + + // skip none glob extensions and check if string length between 1 and 10 + if (false !== strpos($extension, '.') || \strlen($extension) < 1 || \strlen($extension) > 9) { + continue; + } + + // check if string length lower than 10 + if (!isset($valid_mime_types[$mime_type])) { + // generate array for mimetype to extension resolver (only first match) + $valid_mime_types[$extension] = "'{$extension}' => '{$mime_type}'"; + } + } + } + + // full list of valid extensions only + $valid_mime_types = array_unique($valid_mime_types); + ksort($valid_mime_types); + + // combine mime types and extensions array + $output = "$preamble\$swift_mime_types = array(\n ".implode(",\n ", $valid_mime_types)."\n);"; + + // write mime_types.php config file + @file_put_contents('./mime_types.php', $output); +} + +generateUpToDateMimeArray(); diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Iconv.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Iconv.php new file mode 100644 index 00000000..c17a70dc --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/Iconv.php @@ -0,0 +1,744 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Iconv; + +/** + * iconv implementation in pure PHP, UTF-8 centric. + * + * Implemented: + * - iconv - Convert string to requested character encoding + * - iconv_mime_decode - Decodes a MIME header field + * - iconv_mime_decode_headers - Decodes multiple MIME header fields at once + * - iconv_get_encoding - Retrieve internal configuration variables of iconv extension + * - iconv_set_encoding - Set current setting for character encoding conversion + * - iconv_mime_encode - Composes a MIME header field + * - iconv_strlen - Returns the character count of string + * - iconv_strpos - Finds position of first occurrence of a needle within a haystack + * - iconv_strrpos - Finds the last occurrence of a needle within a haystack + * - iconv_substr - Cut out part of a string + * + * Charsets available for conversion are defined by files + * in the charset/ directory and by Iconv::$alias below. + * You're welcome to send back any addition you make. + * + * @author Nicolas Grekas + * + * @internal + */ +final class Iconv +{ + public const ERROR_ILLEGAL_CHARACTER = 'iconv(): Detected an illegal character in input string'; + public const ERROR_WRONG_CHARSET = 'iconv(): Wrong charset, conversion from `%s\' to `%s\' is not allowed'; + + public static $inputEncoding = 'utf-8'; + public static $outputEncoding = 'utf-8'; + public static $internalEncoding = 'utf-8'; + + private static $alias = [ + 'utf8' => 'utf-8', + 'ascii' => 'us-ascii', + 'tis-620' => 'iso-8859-11', + 'cp1250' => 'windows-1250', + 'cp1251' => 'windows-1251', + 'cp1252' => 'windows-1252', + 'cp1253' => 'windows-1253', + 'cp1254' => 'windows-1254', + 'cp1255' => 'windows-1255', + 'cp1256' => 'windows-1256', + 'cp1257' => 'windows-1257', + 'cp1258' => 'windows-1258', + 'shift-jis' => 'cp932', + 'shift_jis' => 'cp932', + 'latin1' => 'iso-8859-1', + 'latin2' => 'iso-8859-2', + 'latin3' => 'iso-8859-3', + 'latin4' => 'iso-8859-4', + 'latin5' => 'iso-8859-9', + 'latin6' => 'iso-8859-10', + 'latin7' => 'iso-8859-13', + 'latin8' => 'iso-8859-14', + 'latin9' => 'iso-8859-15', + 'latin10' => 'iso-8859-16', + 'iso8859-1' => 'iso-8859-1', + 'iso8859-2' => 'iso-8859-2', + 'iso8859-3' => 'iso-8859-3', + 'iso8859-4' => 'iso-8859-4', + 'iso8859-5' => 'iso-8859-5', + 'iso8859-6' => 'iso-8859-6', + 'iso8859-7' => 'iso-8859-7', + 'iso8859-8' => 'iso-8859-8', + 'iso8859-9' => 'iso-8859-9', + 'iso8859-10' => 'iso-8859-10', + 'iso8859-11' => 'iso-8859-11', + 'iso8859-12' => 'iso-8859-12', + 'iso8859-13' => 'iso-8859-13', + 'iso8859-14' => 'iso-8859-14', + 'iso8859-15' => 'iso-8859-15', + 'iso8859-16' => 'iso-8859-16', + 'iso_8859-1' => 'iso-8859-1', + 'iso_8859-2' => 'iso-8859-2', + 'iso_8859-3' => 'iso-8859-3', + 'iso_8859-4' => 'iso-8859-4', + 'iso_8859-5' => 'iso-8859-5', + 'iso_8859-6' => 'iso-8859-6', + 'iso_8859-7' => 'iso-8859-7', + 'iso_8859-8' => 'iso-8859-8', + 'iso_8859-9' => 'iso-8859-9', + 'iso_8859-10' => 'iso-8859-10', + 'iso_8859-11' => 'iso-8859-11', + 'iso_8859-12' => 'iso-8859-12', + 'iso_8859-13' => 'iso-8859-13', + 'iso_8859-14' => 'iso-8859-14', + 'iso_8859-15' => 'iso-8859-15', + 'iso_8859-16' => 'iso-8859-16', + 'iso88591' => 'iso-8859-1', + 'iso88592' => 'iso-8859-2', + 'iso88593' => 'iso-8859-3', + 'iso88594' => 'iso-8859-4', + 'iso88595' => 'iso-8859-5', + 'iso88596' => 'iso-8859-6', + 'iso88597' => 'iso-8859-7', + 'iso88598' => 'iso-8859-8', + 'iso88599' => 'iso-8859-9', + 'iso885910' => 'iso-8859-10', + 'iso885911' => 'iso-8859-11', + 'iso885912' => 'iso-8859-12', + 'iso885913' => 'iso-8859-13', + 'iso885914' => 'iso-8859-14', + 'iso885915' => 'iso-8859-15', + 'iso885916' => 'iso-8859-16', + ]; + private static $translitMap = []; + private static $convertMap = []; + private static $errorHandler; + private static $lastError; + + private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + private static $isValidUtf8; + + public static function iconv($inCharset, $outCharset, $str) + { + $str = (string) $str; + if ('' === $str) { + return ''; + } + + // Prepare for //IGNORE and //TRANSLIT + + $translit = $ignore = ''; + + $outCharset = strtolower($outCharset); + $inCharset = strtolower($inCharset); + + if ('' === $outCharset) { + $outCharset = 'iso-8859-1'; + } + if ('' === $inCharset) { + $inCharset = 'iso-8859-1'; + } + + do { + $loop = false; + + if ('//translit' === substr($outCharset, -10)) { + $loop = $translit = true; + $outCharset = substr($outCharset, 0, -10); + } + + if ('//ignore' === substr($outCharset, -8)) { + $loop = $ignore = true; + $outCharset = substr($outCharset, 0, -8); + } + } while ($loop); + + do { + $loop = false; + + if ('//translit' === substr($inCharset, -10)) { + $loop = true; + $inCharset = substr($inCharset, 0, -10); + } + + if ('//ignore' === substr($inCharset, -8)) { + $loop = true; + $inCharset = substr($inCharset, 0, -8); + } + } while ($loop); + + if (isset(self::$alias[$inCharset])) { + $inCharset = self::$alias[$inCharset]; + } + if (isset(self::$alias[$outCharset])) { + $outCharset = self::$alias[$outCharset]; + } + + // Load charset maps + + if (('utf-8' !== $inCharset && !self::loadMap('from.', $inCharset, $inMap)) + || ('utf-8' !== $outCharset && !self::loadMap('to.', $outCharset, $outMap))) { + trigger_error(sprintf(self::ERROR_WRONG_CHARSET, $inCharset, $outCharset)); + + return false; + } + + if ('utf-8' !== $inCharset) { + // Convert input to UTF-8 + $result = ''; + if (self::mapToUtf8($result, $inMap, $str, $ignore)) { + $str = $result; + } else { + $str = false; + } + self::$isValidUtf8 = true; + } else { + self::$isValidUtf8 = preg_match('//u', $str); + + if (!self::$isValidUtf8 && !$ignore) { + trigger_error(self::ERROR_ILLEGAL_CHARACTER); + + return false; + } + + if ('utf-8' === $outCharset) { + // UTF-8 validation + $str = self::utf8ToUtf8($str, $ignore); + } + } + + if ('utf-8' !== $outCharset && false !== $str) { + // Convert output to UTF-8 + $result = ''; + if (self::mapFromUtf8($result, $outMap, $str, $ignore, $translit)) { + return $result; + } + + return false; + } + + return $str; + } + + public static function iconv_mime_decode_headers($str, $mode = 0, $charset = null) + { + if (null === $charset) { + $charset = self::$internalEncoding; + } + + if (false !== strpos($str, "\r")) { + $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); + } + $str = explode("\n\n", $str, 2); + + $headers = []; + + $str = preg_split('/\n(?![ \t])/', $str[0]); + foreach ($str as $str) { + $str = self::iconv_mime_decode($str, $mode, $charset); + if (false === $str) { + return false; + } + $str = explode(':', $str, 2); + + if (2 === \count($str)) { + if (isset($headers[$str[0]])) { + if (!\is_array($headers[$str[0]])) { + $headers[$str[0]] = [$headers[$str[0]]]; + } + $headers[$str[0]][] = ltrim($str[1]); + } else { + $headers[$str[0]] = ltrim($str[1]); + } + } + } + + return $headers; + } + + public static function iconv_mime_decode($str, $mode = 0, $charset = null) + { + if (null === $charset) { + $charset = self::$internalEncoding; + } + if (\ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) { + $charset .= '//IGNORE'; + } + + if (false !== strpos($str, "\r")) { + $str = strtr(str_replace("\r\n", "\n", $str), "\r", "\n"); + } + $str = preg_split('/\n(?![ \t])/', rtrim($str), 2); + $str = preg_replace('/[ \t]*\n[ \t]+/', ' ', rtrim($str[0])); + $str = preg_split('/=\?([^?]+)\?([bqBQ])\?(.*?)\?=/', $str, -1, \PREG_SPLIT_DELIM_CAPTURE); + + $result = self::iconv('utf-8', $charset, $str[0]); + if (false === $result) { + return false; + } + + $i = 1; + $len = \count($str); + + while ($i < $len) { + $c = strtolower($str[$i]); + if ((\ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) + && 'utf-8' !== $c + && !isset(self::$alias[$c]) + && !self::loadMap('from.', $c, $d)) { + $d = false; + } elseif ('B' === strtoupper($str[$i + 1])) { + $d = base64_decode($str[$i + 2]); + } else { + $d = rawurldecode(strtr(str_replace('%', '%25', $str[$i + 2]), '=_', '% ')); + } + + if (false !== $d) { + if ('' !== $d) { + if ('' === $d = self::iconv($c, $charset, $d)) { + $str[$i + 3] = substr($str[$i + 3], 1); + } else { + $result .= $d; + } + } + $d = self::iconv('utf-8', $charset, $str[$i + 3]); + if ('' !== trim($d)) { + $result .= $d; + } + } elseif (\ICONV_MIME_DECODE_CONTINUE_ON_ERROR & $mode) { + $result .= "=?{$str[$i]}?{$str[$i + 1]}?{$str[$i + 2]}?={$str[$i + 3]}"; + } else { + $result = false; + break; + } + + $i += 4; + } + + return $result; + } + + public static function iconv_get_encoding($type = 'all') + { + switch ($type) { + case 'input_encoding': return self::$inputEncoding; + case 'output_encoding': return self::$outputEncoding; + case 'internal_encoding': return self::$internalEncoding; + } + + return [ + 'input_encoding' => self::$inputEncoding, + 'output_encoding' => self::$outputEncoding, + 'internal_encoding' => self::$internalEncoding, + ]; + } + + public static function iconv_set_encoding($type, $charset) + { + switch ($type) { + case 'input_encoding': self::$inputEncoding = $charset; break; + case 'output_encoding': self::$outputEncoding = $charset; break; + case 'internal_encoding': self::$internalEncoding = $charset; break; + default: return false; + } + + return true; + } + + public static function iconv_mime_encode($fieldName, $fieldValue, $pref = null) + { + if (!\is_array($pref)) { + $pref = []; + } + + $pref += [ + 'scheme' => 'B', + 'input-charset' => self::$internalEncoding, + 'output-charset' => self::$internalEncoding, + 'line-length' => 76, + 'line-break-chars' => "\r\n", + ]; + + if (preg_match('/[\x80-\xFF]/', $fieldName)) { + $fieldName = ''; + } + + $scheme = strtoupper(substr($pref['scheme'], 0, 1)); + $in = strtolower($pref['input-charset']); + $out = strtolower($pref['output-charset']); + + if ('utf-8' !== $in && false === $fieldValue = self::iconv($in, 'utf-8', $fieldValue)) { + return false; + } + + preg_match_all('/./us', $fieldValue, $chars); + + $chars = $chars[0] ?? []; + + $lineBreak = (int) $pref['line-length']; + $lineStart = "=?{$pref['output-charset']}?{$scheme}?"; + $lineLength = \strlen($fieldName) + 2 + \strlen($lineStart) + 2; + $lineOffset = \strlen($lineStart) + 3; + $lineData = ''; + + $fieldValue = []; + + $Q = 'Q' === $scheme; + + foreach ($chars as $c) { + if ('utf-8' !== $out && false === $c = self::iconv('utf-8', $out, $c)) { + return false; + } + + $o = $Q + ? $c = preg_replace_callback( + '/[=_\?\x00-\x1F\x80-\xFF]/', + [__CLASS__, 'qpByteCallback'], + $c + ) + : base64_encode($lineData.$c); + + if (isset($o[$lineBreak - $lineLength])) { + if (!$Q) { + $lineData = base64_encode($lineData); + } + $fieldValue[] = $lineStart.$lineData.'?='; + $lineLength = $lineOffset; + $lineData = ''; + } + + $lineData .= $c; + $Q && $lineLength += \strlen($c); + } + + if ('' !== $lineData) { + if (!$Q) { + $lineData = base64_encode($lineData); + } + $fieldValue[] = $lineStart.$lineData.'?='; + } + + return $fieldName.': '.implode($pref['line-break-chars'].' ', $fieldValue); + } + + public static function iconv_strlen($s, $encoding = null) + { + static $hasXml = null; + if (null === $hasXml) { + $hasXml = \extension_loaded('xml'); + } + + if ($hasXml) { + return self::strlen1($s, $encoding); + } + + return self::strlen2($s, $encoding); + } + + public static function strlen1($s, $encoding = null) + { + if (null === $encoding) { + $encoding = self::$internalEncoding; + } + if (0 !== stripos($encoding, 'utf-8') && false === $s = self::iconv($encoding, 'utf-8', $s)) { + return false; + } + + return \strlen(utf8_decode($s)); + } + + public static function strlen2($s, $encoding = null) + { + if (null === $encoding) { + $encoding = self::$internalEncoding; + } + if (0 !== stripos($encoding, 'utf-8') && false === $s = self::iconv($encoding, 'utf-8', $s)) { + return false; + } + + $ulenMask = self::$ulenMask; + + $i = 0; + $j = 0; + $len = \strlen($s); + + while ($i < $len) { + $u = $s[$i] & "\xF0"; + $i += $ulenMask[$u] ?? 1; + ++$j; + } + + return $j; + } + + public static function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + if (null === $encoding) { + $encoding = self::$internalEncoding; + } + + if (0 !== stripos($encoding, 'utf-8')) { + if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) { + return false; + } + if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) { + return false; + } + } + + if ($offset = (int) $offset) { + $haystack = self::iconv_substr($haystack, $offset, 2147483647, 'utf-8'); + } + $pos = strpos($haystack, $needle); + + return false === $pos ? false : ($offset + ($pos ? self::iconv_strlen(substr($haystack, 0, $pos), 'utf-8') : 0)); + } + + public static function iconv_strrpos($haystack, $needle, $encoding = null) + { + if (null === $encoding) { + $encoding = self::$internalEncoding; + } + + if (0 !== stripos($encoding, 'utf-8')) { + if (false === $haystack = self::iconv($encoding, 'utf-8', $haystack)) { + return false; + } + if (false === $needle = self::iconv($encoding, 'utf-8', $needle)) { + return false; + } + } + + $pos = isset($needle[0]) ? strrpos($haystack, $needle) : false; + + return false === $pos ? false : self::iconv_strlen($pos ? substr($haystack, 0, $pos) : $haystack, 'utf-8'); + } + + public static function iconv_substr($s, $start, $length = 2147483647, $encoding = null) + { + if (null === $encoding) { + $encoding = self::$internalEncoding; + } + if (0 !== stripos($encoding, 'utf-8')) { + $encoding = null; + } elseif (false === $s = self::iconv($encoding, 'utf-8', $s)) { + return false; + } + + $s = (string) $s; + $slen = self::iconv_strlen($s, 'utf-8'); + $start = (int) $start; + + if (0 > $start) { + $start += $slen; + } + if (0 > $start) { + if (\PHP_VERSION_ID < 80000) { + return false; + } + + $start = 0; + } + if ($start >= $slen) { + return \PHP_VERSION_ID >= 80000 ? '' : false; + } + + $rx = $slen - $start; + + if (0 > $length) { + $length += $rx; + } + if (0 === $length) { + return ''; + } + if (0 > $length) { + return \PHP_VERSION_ID >= 80000 ? '' : false; + } + + if ($length > $rx) { + $length = $rx; + } + + $rx = '/^'.($start ? self::pregOffset($start) : '').'('.self::pregOffset($length).')/u'; + + $s = preg_match($rx, $s, $s) ? $s[1] : ''; + + if (null === $encoding) { + return $s; + } + + return self::iconv('utf-8', $encoding, $s); + } + + private static function loadMap($type, $charset, &$map) + { + if (!isset(self::$convertMap[$type.$charset])) { + if (false === $map = self::getData($type.$charset)) { + if ('to.' === $type && self::loadMap('from.', $charset, $map)) { + $map = array_flip($map); + } else { + return false; + } + } + + self::$convertMap[$type.$charset] = $map; + } else { + $map = self::$convertMap[$type.$charset]; + } + + return true; + } + + private static function utf8ToUtf8($str, $ignore) + { + $ulenMask = self::$ulenMask; + $valid = self::$isValidUtf8; + + $u = $str; + $i = $j = 0; + $len = \strlen($str); + + while ($i < $len) { + if ($str[$i] < "\x80") { + $u[$j++] = $str[$i++]; + } else { + $ulen = $str[$i] & "\xF0"; + $ulen = $ulenMask[$ulen] ?? 1; + $uchr = substr($str, $i, $ulen); + + if (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr))) { + if ($ignore) { + ++$i; + continue; + } + + trigger_error(self::ERROR_ILLEGAL_CHARACTER); + + return false; + } + + $i += $ulen; + + $u[$j++] = $uchr[0]; + + isset($uchr[1]) && 0 !== ($u[$j++] = $uchr[1]) + && isset($uchr[2]) && 0 !== ($u[$j++] = $uchr[2]) + && isset($uchr[3]) && 0 !== ($u[$j++] = $uchr[3]); + } + } + + return substr($u, 0, $j); + } + + private static function mapToUtf8(&$result, array $map, $str, $ignore) + { + $len = \strlen($str); + for ($i = 0; $i < $len; ++$i) { + if (isset($str[$i + 1], $map[$str[$i].$str[$i + 1]])) { + $result .= $map[$str[$i].$str[++$i]]; + } elseif (isset($map[$str[$i]])) { + $result .= $map[$str[$i]]; + } elseif (!$ignore) { + trigger_error(self::ERROR_ILLEGAL_CHARACTER); + + return false; + } + } + + return true; + } + + private static function mapFromUtf8(&$result, array $map, $str, $ignore, $translit) + { + $ulenMask = self::$ulenMask; + $valid = self::$isValidUtf8; + + if ($translit && !self::$translitMap) { + self::$translitMap = self::getData('translit'); + } + + $i = 0; + $len = \strlen($str); + + while ($i < $len) { + if ($str[$i] < "\x80") { + $uchr = $str[$i++]; + } else { + $ulen = $str[$i] & "\xF0"; + $ulen = $ulenMask[$ulen] ?? 1; + $uchr = substr($str, $i, $ulen); + + if ($ignore && (1 === $ulen || !($valid || preg_match('/^.$/us', $uchr)))) { + ++$i; + continue; + } + + $i += $ulen; + } + + if (isset($map[$uchr])) { + $result .= $map[$uchr]; + } elseif ($translit) { + if (isset(self::$translitMap[$uchr])) { + $uchr = self::$translitMap[$uchr]; + } elseif ($uchr >= "\xC3\x80") { + $uchr = \Normalizer::normalize($uchr, \Normalizer::NFD); + + if ($uchr[0] < "\x80") { + $uchr = $uchr[0]; + } elseif ($ignore) { + continue; + } else { + return false; + } + } elseif ($ignore) { + continue; + } else { + return false; + } + + $str = $uchr.substr($str, $i); + $len = \strlen($str); + $i = 0; + } elseif (!$ignore) { + return false; + } + } + + return true; + } + + private static function qpByteCallback(array $m) + { + return '='.strtoupper(dechex(\ord($m[0]))); + } + + private static function pregOffset($offset) + { + $rx = []; + $offset = (int) $offset; + + while ($offset > 65535) { + $rx[] = '.{65535}'; + $offset -= 65535; + } + + return implode('', $rx).'.{'.$offset.'}'; + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/charset/'.$file.'.php')) { + return require $file; + } + + return false; + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/LICENSE b/dev/plugins/email/vendor/symfony/polyfill-iconv/LICENSE new file mode 100644 index 00000000..4cd8bdd3 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/README.md b/dev/plugins/email/vendor/symfony/polyfill-iconv/README.md new file mode 100644 index 00000000..b0c8984c --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/README.md @@ -0,0 +1,14 @@ +Symfony Polyfill / Iconv +======================== + +This component provides a native PHP implementation of the +[php.net/iconv](https://php.net/iconv) functions +(short of [`ob_iconv_handler`](https://php.net/ob-iconv-handler)). + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php new file mode 100644 index 00000000..b1198549 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php @@ -0,0 +1,13719 @@ + ' ', + '¡A' => ',', + '¡B' => 'ã€', + '¡C' => '。', + '¡D' => '.', + '¡E' => '•', + '¡F' => 'ï¼›', + '¡G' => ':', + '¡H' => '?', + '¡I' => 'ï¼', + '¡J' => '︰', + '¡K' => '…', + '¡L' => '‥', + '¡M' => 'ï¹', + '¡N' => '、', + '¡O' => 'ï¹’', + '¡P' => '·', + '¡Q' => 'ï¹”', + '¡R' => '﹕', + '¡S' => 'ï¹–', + '¡T' => 'ï¹—', + '¡U' => '|', + '¡V' => '–', + '¡W' => '︱', + '¡X' => '—', + '¡Y' => '︳', + '¡Z' => '�', + '¡[' => '︴', + '¡\\' => 'ï¹', + '¡]' => '(', + '¡^' => ')', + '¡_' => '︵', + '¡`' => '︶', + '¡a' => 'ï½›', + '¡b' => 'ï½', + '¡c' => '︷', + '¡d' => '︸', + '¡e' => '〔', + '¡f' => '〕', + '¡g' => '︹', + '¡h' => '︺', + '¡i' => 'ã€', + '¡j' => '】', + '¡k' => '︻', + '¡l' => '︼', + '¡m' => '《', + '¡n' => '》', + '¡o' => '︽', + '¡p' => '︾', + '¡q' => '〈', + '¡r' => '〉', + '¡s' => '︿', + '¡t' => 'ï¹€', + '¡u' => '「', + '¡v' => 'ã€', + '¡w' => 'ï¹', + '¡x' => '﹂', + '¡y' => '『', + '¡z' => 'ã€', + '¡{' => '﹃', + '¡|' => '﹄', + '¡}' => 'ï¹™', + '¡~' => '﹚', + '¡¡' => 'ï¹›', + '¡¢' => '﹜', + '¡£' => 'ï¹', + '¡¤' => '﹞', + '¡¥' => '‘', + '¡¦' => '’', + '¡§' => '“', + '¡¨' => 'â€', + '¡©' => 'ã€', + '¡ª' => '〞', + '¡«' => '‵', + '¡¬' => '′', + '¡­' => '#', + '¡®' => '&', + '¡¯' => '*', + '¡°' => '※', + '¡±' => '§', + '¡²' => '〃', + '¡³' => 'â—‹', + '¡´' => 'â—', + '¡µ' => 'â–³', + '¡¶' => 'â–²', + '¡·' => 'â—Ž', + '¡¸' => '☆', + '¡¹' => '★', + '¡º' => 'â—‡', + '¡»' => 'â—†', + '¡¼' => 'â–¡', + '¡½' => 'â– ', + '¡¾' => 'â–½', + '¡¿' => 'â–¼', + '¡À' => '㊣', + '¡Á' => 'â„…', + '¡Â' => '‾', + '¡Ã' => '�', + '¡Ä' => '_', + '¡Å' => '�', + '¡Æ' => '﹉', + '¡Ç' => '﹊', + '¡È' => 'ï¹', + '¡É' => '﹎', + '¡Ê' => '﹋', + '¡Ë' => '﹌', + '¡Ì' => '﹟', + '¡Í' => 'ï¹ ', + '¡Î' => '﹡', + '¡Ï' => '+', + '¡Ð' => 'ï¼', + '¡Ñ' => '×', + '¡Ò' => '÷', + '¡Ó' => '±', + '¡Ô' => '√', + '¡Õ' => '<', + '¡Ö' => '>', + '¡×' => 'ï¼', + '¡Ø' => '≦', + '¡Ù' => '≧', + '¡Ú' => '≠', + '¡Û' => '∞', + '¡Ü' => '≒', + '¡Ý' => '≡', + '¡Þ' => 'ï¹¢', + '¡ß' => 'ï¹£', + '¡à' => '﹤', + '¡á' => 'ï¹¥', + '¡â' => '﹦', + '¡ã' => '∼', + '¡ä' => '∩', + '¡å' => '∪', + '¡æ' => '⊥', + '¡ç' => '∠', + '¡è' => '∟', + '¡é' => '⊿', + '¡ê' => 'ã’', + '¡ë' => 'ã‘', + '¡ì' => '∫', + '¡í' => '∮', + '¡î' => '∵', + '¡ï' => '∴', + '¡ð' => '♀', + '¡ñ' => '♂', + '¡ò' => 'â™', + '¡ó' => '☉', + '¡ô' => '↑', + '¡õ' => '↓', + '¡ö' => 'â†', + '¡÷' => '→', + '¡ø' => '↖', + '¡ù' => '↗', + '¡ú' => '↙', + '¡û' => '↘', + '¡ü' => '∥', + '¡ý' => '∣', + '¡þ' => '�', + '¢@' => '�', + '¢A' => 'ï¼', + '¢B' => 'ï¼¼', + '¢C' => '$', + '¢D' => 'Â¥', + '¢E' => '〒', + '¢F' => '¢', + '¢G' => '£', + '¢H' => 'ï¼…', + '¢I' => 'ï¼ ', + '¢J' => '℃', + '¢K' => '℉', + '¢L' => '﹩', + '¢M' => '﹪', + '¢N' => '﹫', + '¢O' => 'ã•', + '¢P' => '㎜', + '¢Q' => 'ãŽ', + '¢R' => '㎞', + '¢S' => 'ãŽ', + '¢T' => '㎡', + '¢U' => '㎎', + '¢V' => 'ãŽ', + '¢W' => 'ã„', + '¢X' => '°', + '¢Y' => 'å…™', + '¢Z' => 'å…›', + '¢[' => 'å…ž', + '¢\\' => 'å…', + '¢]' => 'å…¡', + '¢^' => 'å…£', + '¢_' => 'å—§', + '¢`' => 'ç“©', + '¢a' => '糎', + '¢b' => 'â–', + '¢c' => 'â–‚', + '¢d' => 'â–ƒ', + '¢e' => 'â–„', + '¢f' => 'â–…', + '¢g' => 'â–†', + '¢h' => 'â–‡', + '¢i' => 'â–ˆ', + '¢j' => 'â–', + '¢k' => 'â–Ž', + '¢l' => 'â–', + '¢m' => 'â–Œ', + '¢n' => 'â–‹', + '¢o' => 'â–Š', + '¢p' => 'â–‰', + '¢q' => '┼', + '¢r' => 'â”´', + '¢s' => '┬', + '¢t' => '┤', + '¢u' => '├', + '¢v' => 'â–”', + '¢w' => '─', + '¢x' => '│', + '¢y' => 'â–•', + '¢z' => '┌', + '¢{' => 'â”', + '¢|' => 'â””', + '¢}' => '┘', + '¢~' => 'â•­', + '¢¡' => 'â•®', + '¢¢' => 'â•°', + '¢£' => '╯', + '¢¤' => 'â•', + '¢¥' => 'â•ž', + '¢¦' => '╪', + '¢§' => 'â•¡', + '¢¨' => 'â—¢', + '¢©' => 'â—£', + '¢ª' => 'â—¥', + '¢«' => 'â—¤', + '¢¬' => '╱', + '¢­' => '╲', + '¢®' => '╳', + '¢¯' => 'ï¼', + '¢°' => '1', + '¢±' => 'ï¼’', + '¢²' => '3', + '¢³' => 'ï¼”', + '¢´' => '5', + '¢µ' => 'ï¼–', + '¢¶' => 'ï¼—', + '¢·' => '8', + '¢¸' => 'ï¼™', + '¢¹' => 'â… ', + '¢º' => 'â…¡', + '¢»' => 'â…¢', + '¢¼' => 'â…£', + '¢½' => 'â…¤', + '¢¾' => 'â…¥', + '¢¿' => 'â…¦', + '¢À' => 'â…§', + '¢Á' => 'â…¨', + '¢Â' => 'â…©', + '¢Ã' => '〡', + '¢Ä' => '〢', + '¢Å' => '〣', + '¢Æ' => '〤', + '¢Ç' => '〥', + '¢È' => '〦', + '¢É' => '〧', + '¢Ê' => '〨', + '¢Ë' => '〩', + '¢Ì' => '�', + '¢Í' => 'å„', + '¢Î' => '�', + '¢Ï' => 'A', + '¢Ð' => 'ï¼¢', + '¢Ñ' => 'ï¼£', + '¢Ò' => 'D', + '¢Ó' => 'ï¼¥', + '¢Ô' => 'F', + '¢Õ' => 'G', + '¢Ö' => 'H', + '¢×' => 'I', + '¢Ø' => 'J', + '¢Ù' => 'K', + '¢Ú' => 'L', + '¢Û' => 'ï¼­', + '¢Ü' => 'ï¼®', + '¢Ý' => 'O', + '¢Þ' => 'ï¼°', + '¢ß' => 'ï¼±', + '¢à' => 'ï¼²', + '¢á' => 'ï¼³', + '¢â' => 'ï¼´', + '¢ã' => 'ï¼µ', + '¢ä' => 'V', + '¢å' => 'ï¼·', + '¢æ' => 'X', + '¢ç' => 'ï¼¹', + '¢è' => 'Z', + '¢é' => 'ï½', + '¢ê' => 'b', + '¢ë' => 'c', + '¢ì' => 'd', + '¢í' => 'ï½…', + '¢î' => 'f', + '¢ï' => 'g', + '¢ð' => 'h', + '¢ñ' => 'i', + '¢ò' => 'j', + '¢ó' => 'k', + '¢ô' => 'l', + '¢õ' => 'ï½', + '¢ö' => 'n', + '¢÷' => 'ï½', + '¢ø' => 'ï½', + '¢ù' => 'q', + '¢ú' => 'ï½’', + '¢û' => 's', + '¢ü' => 'ï½”', + '¢ý' => 'u', + '¢þ' => 'ï½–', + '£@' => 'ï½—', + '£A' => 'x', + '£B' => 'ï½™', + '£C' => 'z', + '£D' => 'Α', + '£E' => 'Î’', + '£F' => 'Γ', + '£G' => 'Δ', + '£H' => 'Ε', + '£I' => 'Ζ', + '£J' => 'Η', + '£K' => 'Θ', + '£L' => 'Ι', + '£M' => 'Κ', + '£N' => 'Λ', + '£O' => 'Îœ', + '£P' => 'Î', + '£Q' => 'Ξ', + '£R' => 'Ο', + '£S' => 'Π', + '£T' => 'Ρ', + '£U' => 'Σ', + '£V' => 'Τ', + '£W' => 'Î¥', + '£X' => 'Φ', + '£Y' => 'Χ', + '£Z' => 'Ψ', + '£[' => 'Ω', + '£\\' => 'α', + '£]' => 'β', + '£^' => 'γ', + '£_' => 'δ', + '£`' => 'ε', + '£a' => 'ζ', + '£b' => 'η', + '£c' => 'θ', + '£d' => 'ι', + '£e' => 'κ', + '£f' => 'λ', + '£g' => 'μ', + '£h' => 'ν', + '£i' => 'ξ', + '£j' => 'ο', + '£k' => 'Ï€', + '£l' => 'Ï', + '£m' => 'σ', + '£n' => 'Ï„', + '£o' => 'Ï…', + '£p' => 'φ', + '£q' => 'χ', + '£r' => 'ψ', + '£s' => 'ω', + '£t' => 'ã„…', + '£u' => 'ㄆ', + '£v' => 'ㄇ', + '£w' => 'ㄈ', + '£x' => 'ㄉ', + '£y' => 'ã„Š', + '£z' => 'ã„‹', + '£{' => 'ã„Œ', + '£|' => 'ã„', + '£}' => 'ã„Ž', + '£~' => 'ã„', + '£¡' => 'ã„', + '£¢' => 'ã„‘', + '££' => 'ã„’', + '£¤' => 'ã„“', + '£¥' => 'ã„”', + '£¦' => 'ã„•', + '£§' => 'ã„–', + '£¨' => 'ã„—', + '£©' => 'ㄘ', + '£ª' => 'ã„™', + '£«' => 'ã„š', + '£¬' => 'ã„›', + '£­' => 'ã„œ', + '£®' => 'ã„', + '£¯' => 'ã„ž', + '£°' => 'ã„Ÿ', + '£±' => 'ã„ ', + '£²' => 'ã„¡', + '£³' => 'ã„¢', + '£´' => 'ã„£', + '£µ' => 'ㄤ', + '£¶' => 'ã„¥', + '£·' => 'ㄦ', + '£¸' => 'ㄧ', + '£¹' => 'ㄨ', + '£º' => 'ã„©', + '£»' => 'Ë™', + '£¼' => 'ˉ', + '£½' => 'ËŠ', + '£¾' => 'ˇ', + '£¿' => 'Ë‹', + '¤@' => '一', + '¤A' => 'ä¹™', + '¤B' => 'ä¸', + '¤C' => '七', + '¤D' => '乃', + '¤E' => 'ä¹', + '¤F' => '了', + '¤G' => '二', + '¤H' => '人', + '¤I' => 'å„¿', + '¤J' => 'å…¥', + '¤K' => 'å…«', + '¤L' => '几', + '¤M' => '刀', + '¤N' => 'åˆ', + '¤O' => '力', + '¤P' => '匕', + '¤Q' => 'å', + '¤R' => 'åœ', + '¤S' => 'åˆ', + '¤T' => '三', + '¤U' => '下', + '¤V' => '丈', + '¤W' => '上', + '¤X' => '丫', + '¤Y' => '丸', + '¤Z' => '凡', + '¤[' => 'ä¹…', + '¤\\' => '么', + '¤]' => '也', + '¤^' => '乞', + '¤_' => '于', + '¤`' => '亡', + '¤a' => 'å…€', + '¤b' => '刃', + '¤c' => '勺', + '¤d' => 'åƒ', + '¤e' => 'å‰', + '¤f' => 'å£', + '¤g' => '土', + '¤h' => '士', + '¤i' => '夕', + '¤j' => '大', + '¤k' => '女', + '¤l' => 'å­', + '¤m' => 'å­‘', + '¤n' => 'å­“', + '¤o' => '寸', + '¤p' => 'å°', + '¤q' => 'å°¢', + '¤r' => 'å°¸', + '¤s' => 'å±±', + '¤t' => 'å·', + '¤u' => 'å·¥', + '¤v' => 'å·±', + '¤w' => 'å·²', + '¤x' => 'å·³', + '¤y' => 'å·¾', + '¤z' => 'å¹²', + '¤{' => '廾', + '¤|' => '弋', + '¤}' => '弓', + '¤~' => 'æ‰', + '¤¡' => '丑', + '¤¢' => 'ä¸', + '¤£' => 'ä¸', + '¤¤' => '中', + '¤¥' => '丰', + '¤¦' => '丹', + '¤§' => '之', + '¤¨' => 'å°¹', + '¤©' => '予', + '¤ª' => '云', + '¤«' => '井', + '¤¬' => '互', + '¤­' => '五', + '¤®' => '亢', + '¤¯' => 'ä»', + '¤°' => '什', + '¤±' => '仃', + '¤²' => '仆', + '¤³' => '仇', + '¤´' => 'ä»', + '¤µ' => '今', + '¤¶' => '介', + '¤·' => '仄', + '¤¸' => 'å…ƒ', + '¤¹' => 'å…', + '¤º' => 'å…§', + '¤»' => 'å…­', + '¤¼' => 'å…®', + '¤½' => 'å…¬', + '¤¾' => '冗', + '¤¿' => '凶', + '¤À' => '分', + '¤Á' => '切', + '¤Â' => '刈', + '¤Ã' => 'å‹»', + '¤Ä' => '勾', + '¤Å' => 'å‹¿', + '¤Æ' => '化', + '¤Ç' => '匹', + '¤È' => 'åˆ', + '¤É' => 'å‡', + '¤Ê' => 'å…', + '¤Ë' => 'åž', + '¤Ì' => '厄', + '¤Í' => 'å‹', + '¤Î' => 'åŠ', + '¤Ï' => 'å', + '¤Ð' => '壬', + '¤Ñ' => '天', + '¤Ò' => '夫', + '¤Ó' => '太', + '¤Ô' => '夭', + '¤Õ' => 'å­”', + '¤Ö' => 'å°‘', + '¤×' => 'å°¤', + '¤Ø' => 'å°º', + '¤Ù' => '屯', + '¤Ú' => 'å·´', + '¤Û' => 'å¹»', + '¤Ü' => '廿', + '¤Ý' => 'å¼”', + '¤Þ' => '引', + '¤ß' => '心', + '¤à' => '戈', + '¤á' => '戶', + '¤â' => '手', + '¤ã' => '扎', + '¤ä' => '支', + '¤å' => 'æ–‡', + '¤æ' => 'æ–—', + '¤ç' => 'æ–¤', + '¤è' => 'æ–¹', + '¤é' => 'æ—¥', + '¤ê' => 'æ›°', + '¤ë' => '月', + '¤ì' => '木', + '¤í' => '欠', + '¤î' => 'æ­¢', + '¤ï' => 'æ­¹', + '¤ð' => '毋', + '¤ñ' => '比', + '¤ò' => '毛', + '¤ó' => 'æ°', + '¤ô' => 'æ°´', + '¤õ' => 'ç«', + '¤ö' => '爪', + '¤÷' => '父', + '¤ø' => '爻', + '¤ù' => '片', + '¤ú' => '牙', + '¤û' => '牛', + '¤ü' => '犬', + '¤ý' => '王', + '¤þ' => '丙', + '¥@' => '世', + '¥A' => '丕', + '¥B' => '且', + '¥C' => '丘', + '¥D' => '主', + '¥E' => 'ä¹', + '¥F' => 'ä¹', + '¥G' => '乎', + '¥H' => '以', + '¥I' => '付', + '¥J' => 'ä»”', + '¥K' => '仕', + '¥L' => 'ä»–', + '¥M' => 'ä»—', + '¥N' => '代', + '¥O' => '令', + '¥P' => 'ä»™', + '¥Q' => '仞', + '¥R' => 'å……', + '¥S' => 'å…„', + '¥T' => '冉', + '¥U' => '冊', + '¥V' => '冬', + '¥W' => '凹', + '¥X' => '出', + '¥Y' => '凸', + '¥Z' => '刊', + '¥[' => '加', + '¥\\' => '功', + '¥]' => '包', + '¥^' => '匆', + '¥_' => '北', + '¥`' => 'åŒ', + '¥a' => '仟', + '¥b' => 'åŠ', + '¥c' => 'å‰', + '¥d' => 'å¡', + '¥e' => 'å ', + '¥f' => 'å¯', + '¥g' => 'å®', + '¥h' => '去', + '¥i' => 'å¯', + '¥j' => 'å¤', + '¥k' => 'å³', + '¥l' => 'å¬', + '¥m' => 'å®', + '¥n' => 'å©', + '¥o' => 'å¨', + '¥p' => 'å¼', + '¥q' => 'å¸', + '¥r' => 'åµ', + '¥s' => 'å«', + '¥t' => 'å¦', + '¥u' => 'åª', + '¥v' => 'å²', + '¥w' => 'å±', + '¥x' => 'å°', + '¥y' => 'å¥', + '¥z' => 'å­', + '¥{' => 'å»', + '¥|' => 'å››', + '¥}' => '囚', + '¥~' => '外', + '¥¡' => '央', + '¥¢' => '失', + '¥£' => '奴', + '¥¤' => '奶', + '¥¥' => 'å­•', + '¥¦' => '它', + '¥§' => 'å°¼', + '¥¨' => 'å·¨', + '¥©' => 'å·§', + '¥ª' => 'å·¦', + '¥«' => '市', + '¥¬' => '布', + '¥­' => 'å¹³', + '¥®' => 'å¹¼', + '¥¯' => 'å¼', + '¥°' => '弘', + '¥±' => 'å¼—', + '¥²' => 'å¿…', + '¥³' => '戊', + '¥´' => '打', + '¥µ' => '扔', + '¥¶' => '扒', + '¥·' => '扑', + '¥¸' => 'æ–¥', + '¥¹' => 'æ—¦', + '¥º' => '朮', + '¥»' => '本', + '¥¼' => '未', + '¥½' => '末', + '¥¾' => '札', + '¥¿' => 'æ­£', + '¥À' => 'æ¯', + '¥Á' => 'æ°‘', + '¥Â' => 'æ°', + '¥Ã' => 'æ°¸', + '¥Ä' => 'æ±', + '¥Å' => 'æ±€', + '¥Æ' => 'æ°¾', + '¥Ç' => '犯', + '¥È' => '玄', + '¥É' => '玉', + '¥Ê' => 'ç“œ', + '¥Ë' => '瓦', + '¥Ì' => '甘', + '¥Í' => '生', + '¥Î' => '用', + '¥Ï' => '甩', + '¥Ð' => 'ç”°', + '¥Ñ' => 'ç”±', + '¥Ò' => '甲', + '¥Ó' => '申', + '¥Ô' => 'ç–‹', + '¥Õ' => '白', + '¥Ö' => 'çš®', + '¥×' => 'çš¿', + '¥Ø' => 'ç›®', + '¥Ù' => '矛', + '¥Ú' => '矢', + '¥Û' => '石', + '¥Ü' => '示', + '¥Ý' => '禾', + '¥Þ' => 'ç©´', + '¥ß' => 'ç«‹', + '¥à' => '丞', + '¥á' => '丟', + '¥â' => 'ä¹’', + '¥ã' => '乓', + '¥ä' => '乩', + '¥å' => '亙', + '¥æ' => '交', + '¥ç' => '亦', + '¥è' => '亥', + '¥é' => '仿', + '¥ê' => '伉', + '¥ë' => 'ä¼™', + '¥ì' => '伊', + '¥í' => '伕', + '¥î' => 'ä¼', + '¥ï' => 'ä¼', + '¥ð' => '休', + '¥ñ' => 'ä¼', + '¥ò' => '仲', + '¥ó' => '件', + '¥ô' => 'ä»»', + '¥õ' => 'ä»°', + '¥ö' => '仳', + '¥÷' => '份', + '¥ø' => 'ä¼', + '¥ù' => '伋', + '¥ú' => 'å…‰', + '¥û' => 'å…‡', + '¥ü' => 'å…†', + '¥ý' => 'å…ˆ', + '¥þ' => 'å…¨', + '¦@' => 'å…±', + '¦A' => 'å†', + '¦B' => '冰', + '¦C' => '列', + '¦D' => '刑', + '¦E' => '划', + '¦F' => '刎', + '¦G' => '刖', + '¦H' => '劣', + '¦I' => '匈', + '¦J' => '匡', + '¦K' => '匠', + '¦L' => 'å°', + '¦M' => 'å±', + '¦N' => 'å‰', + '¦O' => 'å', + '¦P' => 'åŒ', + '¦Q' => 'åŠ', + '¦R' => 'å', + '¦S' => 'å', + '¦T' => 'å‹', + '¦U' => 'å„', + '¦V' => 'å‘', + '¦W' => 'å', + '¦X' => 'åˆ', + '¦Y' => 'åƒ', + '¦Z' => 'åŽ', + '¦[' => 'å†', + '¦\\' => 'å’', + '¦]' => 'å› ', + '¦^' => '回', + '¦_' => 'å›', + '¦`' => '圳', + '¦a' => '地', + '¦b' => '在', + '¦c' => '圭', + '¦d' => '圬', + '¦e' => '圯', + '¦f' => '圩', + '¦g' => '夙', + '¦h' => '多', + '¦i' => '夷', + '¦j' => '夸', + '¦k' => '妄', + '¦l' => '奸', + '¦m' => '妃', + '¦n' => '好', + '¦o' => '她', + '¦p' => '如', + '¦q' => 'å¦', + '¦r' => 'å­—', + '¦s' => 'å­˜', + '¦t' => '宇', + '¦u' => '守', + '¦v' => 'å®…', + '¦w' => '安', + '¦x' => '寺', + '¦y' => 'å°–', + '¦z' => 'å±¹', + '¦{' => 'å·ž', + '¦|' => '帆', + '¦}' => '并', + '¦~' => 'å¹´', + '¦¡' => 'å¼', + '¦¢' => 'å¼›', + '¦£' => 'å¿™', + '¦¤' => 'å¿–', + '¦¥' => '戎', + '¦¦' => '戌', + '¦§' => 'æˆ', + '¦¨' => 'æˆ', + '¦©' => '扣', + '¦ª' => '扛', + '¦«' => '托', + '¦¬' => '收', + '¦­' => 'æ—©', + '¦®' => 'æ—¨', + '¦¯' => 'æ—¬', + '¦°' => 'æ—­', + '¦±' => '曲', + '¦²' => '曳', + '¦³' => '有', + '¦´' => '朽', + '¦µ' => '朴', + '¦¶' => '朱', + '¦·' => '朵', + '¦¸' => '次', + '¦¹' => 'æ­¤', + '¦º' => 'æ­»', + '¦»' => 'æ°–', + '¦¼' => 'æ±', + '¦½' => 'æ±—', + '¦¾' => 'æ±™', + '¦¿' => '江', + '¦À' => 'æ± ', + '¦Á' => 'æ±', + '¦Â' => '汕', + '¦Ã' => '污', + '¦Ä' => 'æ±›', + '¦Å' => 'æ±', + '¦Æ' => '汎', + '¦Ç' => 'ç°', + '¦È' => '牟', + '¦É' => 'ç‰', + '¦Ê' => '百', + '¦Ë' => '竹', + '¦Ì' => 'ç±³', + '¦Í' => '糸', + '¦Î' => '缶', + '¦Ï' => '羊', + '¦Ð' => 'ç¾½', + '¦Ñ' => 'è€', + '¦Ò' => '考', + '¦Ó' => '而', + '¦Ô' => '耒', + '¦Õ' => '耳', + '¦Ö' => 'è¿', + '¦×' => '肉', + '¦Ø' => 'è‚‹', + '¦Ù' => 'è‚Œ', + '¦Ú' => '臣', + '¦Û' => '自', + '¦Ü' => '至', + '¦Ý' => '臼', + '¦Þ' => '舌', + '¦ß' => '舛', + '¦à' => '舟', + '¦á' => '艮', + '¦â' => '色', + '¦ã' => '艾', + '¦ä' => '虫', + '¦å' => 'è¡€', + '¦æ' => 'è¡Œ', + '¦ç' => 'è¡£', + '¦è' => '西', + '¦é' => '阡', + '¦ê' => '串', + '¦ë' => '亨', + '¦ì' => 'ä½', + '¦í' => 'ä½', + '¦î' => '佇', + '¦ï' => 'ä½—', + '¦ð' => '佞', + '¦ñ' => 'ä¼´', + '¦ò' => 'ä½›', + '¦ó' => '何', + '¦ô' => 'ä¼°', + '¦õ' => 'ä½', + '¦ö' => '佑', + '¦÷' => 'ä¼½', + '¦ø' => '伺', + '¦ù' => '伸', + '¦ú' => '佃', + '¦û' => 'ä½”', + '¦ü' => 'ä¼¼', + '¦ý' => '但', + '¦þ' => 'ä½£', + '§@' => '作', + '§A' => 'ä½ ', + '§B' => '伯', + '§C' => '低', + '§D' => '伶', + '§E' => 'ä½™', + '§F' => 'ä½', + '§G' => '佈', + '§H' => '佚', + '§I' => 'å…Œ', + '§J' => 'å…‹', + '§K' => 'å…', + '§L' => 'å…µ', + '§M' => '冶', + '§N' => '冷', + '§O' => '別', + '§P' => '判', + '§Q' => '利', + '§R' => '刪', + '§S' => '刨', + '§T' => '劫', + '§U' => '助', + '§V' => '努', + '§W' => '劬', + '§X' => '匣', + '§Y' => 'å³', + '§Z' => 'åµ', + '§[' => 'å', + '§\\' => 'å­', + '§]' => 'åž', + '§^' => 'å¾', + '§_' => 'å¦', + '§`' => 'å‘Ž', + '§a' => 'å§', + '§b' => '呆', + '§c' => '呃', + '§d' => 'å³', + '§e' => '呈', + '§f' => 'å‘‚', + '§g' => 'å›', + '§h' => 'å©', + '§i' => 'å‘Š', + '§j' => 'å¹', + '§k' => 'å»', + '§l' => 'å¸', + '§m' => 'å®', + '§n' => 'åµ', + '§o' => 'å¶', + '§p' => 'å ', + '§q' => 'å¼', + '§r' => 'å‘€', + '§s' => 'å±', + '§t' => 'å«', + '§u' => 'åŸ', + '§v' => 'å¬', + '§w' => '囪', + '§x' => 'å›°', + '§y' => '囤', + '§z' => '囫', + '§{' => 'åŠ', + '§|' => 'å‘', + '§}' => 'å€', + '§~' => 'å', + '§¡' => 'å‡', + '§¢' => 'åŽ', + '§£' => '圾', + '§¤' => 'å', + '§¥' => 'å', + '§¦' => '圻', + '§§' => '壯', + '§¨' => '夾', + '§©' => 'å¦', + '§ª' => '妒', + '§«' => '妨', + '§¬' => '妞', + '§­' => '妣', + '§®' => '妙', + '§¯' => '妖', + '§°' => 'å¦', + '§±' => '妤', + '§²' => '妓', + '§³' => '妊', + '§´' => '妥', + '§µ' => 'å­', + '§¶' => 'å­œ', + '§·' => 'å­š', + '§¸' => 'å­›', + '§¹' => '完', + '§º' => '宋', + '§»' => 'å®', + '§¼' => 'å°¬', + '§½' => 'å±€', + '§¾' => 'å±', + '§¿' => 'å°¿', + '§À' => 'å°¾', + '§Á' => 'å²', + '§Â' => '岑', + '§Ã' => 'å²”', + '§Ä' => '岌', + '§Å' => 'å·«', + '§Æ' => '希', + '§Ç' => 'åº', + '§È' => '庇', + '§É' => '床', + '§Ê' => 'å»·', + '§Ë' => '弄', + '§Ì' => '弟', + '§Í' => '彤', + '§Î' => 'å½¢', + '§Ï' => 'å½·', + '§Ð' => 'å½¹', + '§Ñ' => '忘', + '§Ò' => 'å¿Œ', + '§Ó' => 'å¿—', + '§Ô' => 'å¿', + '§Õ' => '忱', + '§Ö' => 'å¿«', + '§×' => '忸', + '§Ø' => '忪', + '§Ù' => '戒', + '§Ú' => '我', + '§Û' => '抄', + '§Ü' => '抗', + '§Ý' => '抖', + '§Þ' => '技', + '§ß' => '扶', + '§à' => '抉', + '§á' => '扭', + '§â' => '把', + '§ã' => '扼', + '§ä' => '找', + '§å' => '批', + '§æ' => '扳', + '§ç' => '抒', + '§è' => '扯', + '§é' => '折', + '§ê' => '扮', + '§ë' => '投', + '§ì' => '抓', + '§í' => '抑', + '§î' => '抆', + '§ï' => '改', + '§ð' => 'æ”»', + '§ñ' => '攸', + '§ò' => 'æ—±', + '§ó' => 'æ›´', + '§ô' => 'æŸ', + '§õ' => 'æŽ', + '§ö' => 'æ', + '§÷' => 'æ', + '§ø' => 'æ‘', + '§ù' => 'æœ', + '§ú' => 'æ–', + '§û' => 'æž', + '§ü' => 'æ‰', + '§ý' => 'æ†', + '§þ' => 'æ ', + '¨@' => 'æ“', + '¨A' => 'æ—', + '¨B' => 'æ­¥', + '¨C' => 'æ¯', + '¨D' => '求', + '¨E' => '汞', + '¨F' => 'æ²™', + '¨G' => 'æ²', + '¨H' => '沈', + '¨I' => '沉', + '¨J' => 'æ²…', + '¨K' => 'æ²›', + '¨L' => '汪', + '¨M' => '決', + '¨N' => 'æ²', + '¨O' => 'æ±°', + '¨P' => '沌', + '¨Q' => '汨', + '¨R' => 'æ²–', + '¨S' => 'æ²’', + '¨T' => 'æ±½', + '¨U' => '沃', + '¨V' => 'æ±²', + '¨W' => 'æ±¾', + '¨X' => 'æ±´', + '¨Y' => '沆', + '¨Z' => '汶', + '¨[' => 'æ²', + '¨\\' => 'æ²”', + '¨]' => '沘', + '¨^' => '沂', + '¨_' => 'ç¶', + '¨`' => 'ç¼', + '¨a' => 'ç½', + '¨b' => 'ç¸', + '¨c' => '牢', + '¨d' => '牡', + '¨e' => '牠', + '¨f' => 'ç‹„', + '¨g' => 'ç‹‚', + '¨h' => '玖', + '¨i' => '甬', + '¨j' => '甫', + '¨k' => 'ç”·', + '¨l' => '甸', + '¨m' => 'çš‚', + '¨n' => '盯', + '¨o' => '矣', + '¨p' => 'ç§', + '¨q' => '秀', + '¨r' => '禿', + '¨s' => '究', + '¨t' => 'ç³»', + '¨u' => '罕', + '¨v' => 'è‚–', + '¨w' => 'è‚“', + '¨x' => 'è‚', + '¨y' => '肘', + '¨z' => 'è‚›', + '¨{' => 'è‚š', + '¨|' => '育', + '¨}' => '良', + '¨~' => '芒', + '¨¡' => '芋', + '¨¢' => 'èŠ', + '¨£' => '見', + '¨¤' => '角', + '¨¥' => '言', + '¨¦' => 'è°·', + '¨§' => '豆', + '¨¨' => '豕', + '¨©' => 'è²', + '¨ª' => '赤', + '¨«' => 'èµ°', + '¨¬' => '足', + '¨­' => '身', + '¨®' => '車', + '¨¯' => 'è¾›', + '¨°' => 'è¾°', + '¨±' => 'è¿‚', + '¨²' => '迆', + '¨³' => 'è¿…', + '¨´' => 'è¿„', + '¨µ' => 'å·¡', + '¨¶' => 'é‚‘', + '¨·' => 'é‚¢', + '¨¸' => '邪', + '¨¹' => '邦', + '¨º' => 'é‚£', + '¨»' => 'é…‰', + '¨¼' => '釆', + '¨½' => '里', + '¨¾' => '防', + '¨¿' => '阮', + '¨À' => '阱', + '¨Á' => '阪', + '¨Â' => '阬', + '¨Ã' => '並', + '¨Ä' => 'ä¹–', + '¨Å' => 'ä¹³', + '¨Æ' => '事', + '¨Ç' => '些', + '¨È' => '亞', + '¨É' => '享', + '¨Ê' => '京', + '¨Ë' => '佯', + '¨Ì' => 'ä¾', + '¨Í' => 'ä¾', + '¨Î' => 'ä½³', + '¨Ï' => '使', + '¨Ð' => '佬', + '¨Ñ' => 'ä¾›', + '¨Ò' => '例', + '¨Ó' => '來', + '¨Ô' => '侃', + '¨Õ' => 'ä½°', + '¨Ö' => 'ä½µ', + '¨×' => '侈', + '¨Ø' => '佩', + '¨Ù' => 'ä½»', + '¨Ú' => 'ä¾–', + '¨Û' => 'ä½¾', + '¨Ü' => 'ä¾', + '¨Ý' => '侑', + '¨Þ' => '佺', + '¨ß' => 'å…”', + '¨à' => 'å…’', + '¨á' => 'å…•', + '¨â' => 'å…©', + '¨ã' => 'å…·', + '¨ä' => 'å…¶', + '¨å' => 'å…¸', + '¨æ' => '冽', + '¨ç' => '函', + '¨è' => '刻', + '¨é' => '券', + '¨ê' => '刷', + '¨ë' => '刺', + '¨ì' => '到', + '¨í' => '刮', + '¨î' => '制', + '¨ï' => 'å‰', + '¨ð' => '劾', + '¨ñ' => '劻', + '¨ò' => 'å’', + '¨ó' => 'å”', + '¨ô' => 'å“', + '¨õ' => 'å‘', + '¨ö' => 'å¦', + '¨÷' => 'å·', + '¨ø' => 'å¸', + '¨ù' => 'å¹', + '¨ú' => 'å–', + '¨û' => 'å”', + '¨ü' => 'å—', + '¨ý' => '味', + '¨þ' => '呵', + '©@' => 'å’–', + '©A' => '呸', + '©B' => 'å’•', + '©C' => 'å’€', + '©D' => 'å‘»', + '©E' => 'å‘·', + '©F' => 'å’„', + '©G' => 'å’’', + '©H' => 'å’†', + '©I' => '呼', + '©J' => 'å’', + '©K' => '呱', + '©L' => '呶', + '©M' => 'å’Œ', + '©N' => 'å’š', + '©O' => 'å‘¢', + '©P' => '周', + '©Q' => 'å’‹', + '©R' => '命', + '©S' => 'å’Ž', + '©T' => '固', + '©U' => '垃', + '©V' => 'å·', + '©W' => 'åª', + '©X' => 'å©', + '©Y' => 'å¡', + '©Z' => 'å¦', + '©[' => 'å¤', + '©\\' => 'å¼', + '©]' => '夜', + '©^' => '奉', + '©_' => '奇', + '©`' => '奈', + '©a' => '奄', + '©b' => '奔', + '©c' => '妾', + '©d' => '妻', + '©e' => '委', + '©f' => '妹', + '©g' => '妮', + '©h' => '姑', + '©i' => '姆', + '©j' => 'å§', + '©k' => 'å§', + '©l' => '始', + '©m' => '姓', + '©n' => '姊', + '©o' => '妯', + '©p' => '妳', + '©q' => '姒', + '©r' => '姅', + '©s' => 'å­Ÿ', + '©t' => 'å­¤', + '©u' => 'å­£', + '©v' => 'å®—', + '©w' => '定', + '©x' => '官', + '©y' => '宜', + '©z' => 'å®™', + '©{' => 'å®›', + '©|' => 'å°š', + '©}' => '屈', + '©~' => 'å±…', + '©¡' => '屆', + '©¢' => 'å²·', + '©£' => '岡', + '©¤' => '岸', + '©¥' => '岩', + '©¦' => '岫', + '©§' => 'å²±', + '©¨' => 'å²³', + '©©' => '帘', + '©ª' => '帚', + '©«' => '帖', + '©¬' => '帕', + '©­' => '帛', + '©®' => '帑', + '©¯' => '幸', + '©°' => '庚', + '©±' => '店', + '©²' => '府', + '©³' => '底', + '©´' => '庖', + '©µ' => '延', + '©¶' => '弦', + '©·' => '弧', + '©¸' => '弩', + '©¹' => 'å¾€', + '©º' => 'å¾', + '©»' => '彿', + '©¼' => 'å½¼', + '©½' => 'å¿', + '©¾' => 'å¿ ', + '©¿' => '忽', + '©À' => '念', + '©Á' => 'å¿¿', + '©Â' => 'æ€', + '©Ã' => '怔', + '©Ä' => '怯', + '©Å' => '怵', + '©Æ' => '怖', + '©Ç' => '怪', + '©È' => '怕', + '©É' => '怡', + '©Ê' => '性', + '©Ë' => '怩', + '©Ì' => '怫', + '©Í' => '怛', + '©Î' => '或', + '©Ï' => '戕', + '©Ð' => '房', + '©Ñ' => '戾', + '©Ò' => '所', + '©Ó' => '承', + '©Ô' => '拉', + '©Õ' => 'æ‹Œ', + '©Ö' => 'æ‹„', + '©×' => '抿', + '©Ø' => 'æ‹‚', + '©Ù' => '抹', + '©Ú' => 'æ‹’', + '©Û' => 'æ‹›', + '©Ü' => '披', + '©Ý' => 'æ‹“', + '©Þ' => 'æ‹”', + '©ß' => 'æ‹‹', + '©à' => '拈', + '©á' => '抨', + '©â' => '抽', + '©ã' => '押', + '©ä' => 'æ‹', + '©å' => 'æ‹™', + '©æ' => '拇', + '©ç' => 'æ‹', + '©è' => '抵', + '©é' => 'æ‹š', + '©ê' => '抱', + '©ë' => '拘', + '©ì' => 'æ‹–', + '©í' => 'æ‹—', + '©î' => '拆', + '©ï' => '抬', + '©ð' => 'æ‹Ž', + '©ñ' => '放', + '©ò' => 'æ–§', + '©ó' => 'æ–¼', + '©ô' => 'æ—º', + '©õ' => '昔', + '©ö' => '易', + '©÷' => '昌', + '©ø' => '昆', + '©ù' => '昂', + '©ú' => '明', + '©û' => '昀', + '©ü' => 'æ˜', + '©ý' => '昕', + '©þ' => '昊', + 'ª@' => '昇', + 'ªA' => 'æœ', + 'ªB' => '朋', + 'ªC' => 'æ­', + 'ªD' => 'æž‹', + 'ªE' => 'æž•', + 'ªF' => 'æ±', + 'ªG' => 'æžœ', + 'ªH' => 'æ³', + 'ªI' => 'æ·', + 'ªJ' => '枇', + 'ªK' => 'æž', + 'ªL' => 'æž—', + 'ªM' => 'æ¯', + 'ªN' => 'æ°', + 'ªO' => 'æ¿', + 'ªP' => '枉', + 'ªQ' => 'æ¾', + 'ªR' => 'æž', + 'ªS' => 'æµ', + 'ªT' => 'æžš', + 'ªU' => 'æž“', + 'ªV' => 'æ¼', + 'ªW' => 'æª', + 'ªX' => 'æ²', + 'ªY' => '欣', + 'ªZ' => 'æ­¦', + 'ª[' => 'æ­§', + 'ª\\' => 'æ­¿', + 'ª]' => 'æ°“', + 'ª^' => 'æ°›', + 'ª_' => 'æ³£', + 'ª`' => '注', + 'ªa' => 'æ³³', + 'ªb' => 'æ²±', + 'ªc' => '泌', + 'ªd' => 'æ³¥', + 'ªe' => 'æ²³', + 'ªf' => 'æ²½', + 'ªg' => 'æ²¾', + 'ªh' => 'æ²¼', + 'ªi' => 'æ³¢', + 'ªj' => '沫', + 'ªk' => '法', + 'ªl' => '泓', + 'ªm' => '沸', + 'ªn' => '泄', + 'ªo' => 'æ²¹', + 'ªp' => 'æ³', + 'ªq' => 'æ²®', + 'ªr' => 'æ³—', + 'ªs' => 'æ³…', + 'ªt' => 'æ³±', + 'ªu' => '沿', + 'ªv' => 'æ²»', + 'ªw' => '泡', + 'ªx' => 'æ³›', + 'ªy' => '泊', + 'ªz' => '沬', + 'ª{' => '泯', + 'ª|' => '泜', + 'ª}' => 'æ³–', + 'ª~' => 'æ³ ', + 'ª¡' => 'ç‚•', + 'ª¢' => 'ç‚Ž', + 'ª£' => 'ç‚’', + 'ª¤' => 'ç‚Š', + 'ª¥' => 'ç‚™', + 'ª¦' => '爬', + 'ª§' => '爭', + 'ª¨' => '爸', + 'ª©' => '版', + 'ªª' => '牧', + 'ª«' => '物', + 'ª¬' => 'ç‹€', + 'ª­' => 'ç‹Ž', + 'ª®' => 'ç‹™', + 'ª¯' => 'ç‹—', + 'ª°' => 'ç‹', + 'ª±' => '玩', + 'ª²' => '玨', + 'ª³' => '玟', + 'ª´' => '玫', + 'ªµ' => '玥', + 'ª¶' => '甽', + 'ª·' => 'ç–', + 'ª¸' => 'ç–™', + 'ª¹' => 'ç–š', + 'ªº' => 'çš„', + 'ª»' => '盂', + 'ª¼' => '盲', + 'ª½' => 'ç›´', + 'ª¾' => '知', + 'ª¿' => '矽', + 'ªÀ' => '社', + 'ªÁ' => '祀', + 'ªÂ' => 'ç¥', + 'ªÃ' => '秉', + 'ªÄ' => '秈', + 'ªÅ' => '空', + 'ªÆ' => '穹', + 'ªÇ' => '竺', + 'ªÈ' => 'ç³¾', + 'ªÉ' => 'ç½”', + 'ªÊ' => '羌', + 'ªË' => '羋', + 'ªÌ' => '者', + 'ªÍ' => '肺', + 'ªÎ' => 'è‚¥', + 'ªÏ' => 'è‚¢', + 'ªÐ' => '肱', + 'ªÑ' => 'è‚¡', + 'ªÒ' => 'è‚«', + 'ªÓ' => 'è‚©', + 'ªÔ' => 'è‚´', + 'ªÕ' => '肪', + 'ªÖ' => '肯', + 'ª×' => '臥', + 'ªØ' => '臾', + 'ªÙ' => 'èˆ', + 'ªÚ' => '芳', + 'ªÛ' => 'èŠ', + 'ªÜ' => '芙', + 'ªÝ' => '芭', + 'ªÞ' => '芽', + 'ªß' => '芟', + 'ªà' => '芹', + 'ªá' => '花', + 'ªâ' => '芬', + 'ªã' => '芥', + 'ªä' => '芯', + 'ªå' => '芸', + 'ªæ' => '芣', + 'ªç' => '芰', + 'ªè' => '芾', + 'ªé' => '芷', + 'ªê' => '虎', + 'ªë' => 'è™±', + 'ªì' => 'åˆ', + 'ªí' => '表', + 'ªî' => '軋', + 'ªï' => 'è¿Ž', + 'ªð' => 'è¿”', + 'ªñ' => 'è¿‘', + 'ªò' => '邵', + 'ªó' => '邸', + 'ªô' => '邱', + 'ªõ' => '邶', + 'ªö' => '采', + 'ª÷' => '金', + 'ªø' => 'é•·', + 'ªù' => 'é–€', + 'ªú' => '阜', + 'ªû' => '陀', + 'ªü' => '阿', + 'ªý' => '阻', + 'ªþ' => '附', + '«@' => '陂', + '«A' => 'éš¹', + '«B' => '雨', + '«C' => 'é’', + '«D' => 'éž', + '«E' => '亟', + '«F' => '亭', + '«G' => '亮', + '«H' => 'ä¿¡', + '«I' => 'ä¾µ', + '«J' => '侯', + '«K' => '便', + '«L' => 'ä¿ ', + '«M' => 'ä¿‘', + '«N' => 'ä¿', + '«O' => 'ä¿', + '«P' => '促', + '«Q' => '侶', + '«R' => '俘', + '«S' => 'ä¿Ÿ', + '«T' => 'ä¿Š', + '«U' => 'ä¿—', + '«V' => 'ä¾®', + '«W' => 'ä¿', + '«X' => 'ä¿„', + '«Y' => 'ä¿‚', + '«Z' => 'ä¿š', + '«[' => 'ä¿Ž', + '«\\' => 'ä¿ž', + '«]' => 'ä¾·', + '«^' => 'å…—', + '«_' => '冒', + '«`' => '冑', + '«a' => '冠', + '«b' => '剎', + '«c' => '剃', + '«d' => '削', + '«e' => 'å‰', + '«f' => '剌', + '«g' => '剋', + '«h' => '則', + '«i' => '勇', + '«j' => '勉', + '«k' => '勃', + '«l' => 'å‹', + '«m' => 'åŒ', + '«n' => 'å—', + '«o' => 'å»', + '«p' => '厚', + '«q' => 'å›', + '«r' => 'å’¬', + '«s' => 'å“€', + '«t' => 'å’¨', + '«u' => 'å“Ž', + '«v' => '哉', + '«w' => 'å’¸', + '«x' => 'å’¦', + '«y' => 'å’³', + '«z' => '哇', + '«{' => 'å“‚', + '«|' => 'å’½', + '«}' => 'å’ª', + '«~' => 'å“', + '«¡' => 'å“„', + '«¢' => '哈', + '«£' => 'å’¯', + '«¤' => 'å’«', + '«¥' => 'å’±', + '«¦' => 'å’»', + '«§' => 'å’©', + '«¨' => 'å’§', + '«©' => 'å’¿', + '«ª' => '囿', + '««' => 'åž‚', + '«¬' => 'åž‹', + '«­' => 'åž ', + '«®' => '垣', + '«¯' => '垢', + '«°' => '城', + '«±' => 'åž®', + '«²' => 'åž“', + '«³' => '奕', + '«´' => '契', + '«µ' => 'å¥', + '«¶' => '奎', + '«·' => 'å¥', + '«¸' => '姜', + '«¹' => '姘', + '«º' => '姿', + '«»' => '姣', + '«¼' => '姨', + '«½' => '娃', + '«¾' => '姥', + '«¿' => '姪', + '«À' => '姚', + '«Á' => '姦', + '«Â' => 'å¨', + '«Ã' => '姻', + '«Ä' => 'å­©', + '«Å' => '宣', + '«Æ' => '宦', + '«Ç' => '室', + '«È' => '客', + '«É' => '宥', + '«Ê' => 'å°', + '«Ë' => '屎', + '«Ì' => 'å±', + '«Í' => 'å±', + '«Î' => '屋', + '«Ï' => 'å³™', + '«Ð' => 'å³’', + '«Ñ' => 'å··', + '«Ò' => 'å¸', + '«Ó' => '帥', + '«Ô' => '帟', + '«Õ' => 'å¹½', + '«Ö' => '庠', + '«×' => '度', + '«Ø' => '建', + '«Ù' => '弈', + '«Ú' => 'å¼­', + '«Û' => 'å½¥', + '«Ü' => '很', + '«Ý' => 'å¾…', + '«Þ' => '徊', + '«ß' => '律', + '«à' => '徇', + '«á' => '後', + '«â' => '徉', + '«ã' => '怒', + '«ä' => 'æ€', + '«å' => '怠', + '«æ' => '急', + '«ç' => '怎', + '«è' => '怨', + '«é' => 'æ', + '«ê' => 'æ°', + '«ë' => 'æ¨', + '«ì' => 'æ¢', + '«í' => 'æ†', + '«î' => 'æƒ', + '«ï' => 'æ¬', + '«ð' => 'æ«', + '«ñ' => 'æª', + '«ò' => 'æ¤', + '«ó' => 'æ‰', + '«ô' => 'æ‹œ', + '«õ' => '挖', + '«ö' => '按', + '«÷' => '拼', + '«ø' => 'æ‹­', + '«ù' => 'æŒ', + '«ú' => 'æ‹®', + '«û' => '拽', + '«ü' => '指', + '«ý' => '拱', + '«þ' => 'æ‹·', + '¬@' => '拯', + '¬A' => '括', + '¬B' => '拾', + '¬C' => 'æ‹´', + '¬D' => '挑', + '¬E' => '挂', + '¬F' => '政', + '¬G' => 'æ•…', + '¬H' => 'æ–«', + '¬I' => 'æ–½', + '¬J' => 'æ—¢', + '¬K' => '春', + '¬L' => '昭', + '¬M' => '映', + '¬N' => '昧', + '¬O' => '是', + '¬P' => '星', + '¬Q' => '昨', + '¬R' => '昱', + '¬S' => '昤', + '¬T' => 'æ›·', + '¬U' => '柿', + '¬V' => '染', + '¬W' => '柱', + '¬X' => '柔', + '¬Y' => 'æŸ', + '¬Z' => '柬', + '¬[' => '架', + '¬\\' => '枯', + '¬]' => '柵', + '¬^' => '柩', + '¬_' => '柯', + '¬`' => '柄', + '¬a' => '柑', + '¬b' => 'æž´', + '¬c' => '柚', + '¬d' => '查', + '¬e' => '枸', + '¬f' => 'æŸ', + '¬g' => '柞', + '¬h' => '柳', + '¬i' => 'æž°', + '¬j' => '柙', + '¬k' => '柢', + '¬l' => 'æŸ', + '¬m' => '柒', + '¬n' => 'æ­ª', + '¬o' => '殃', + '¬p' => '殆', + '¬q' => '段', + '¬r' => '毒', + '¬s' => '毗', + '¬t' => 'æ°Ÿ', + '¬u' => '泉', + '¬v' => 'æ´‹', + '¬w' => 'æ´²', + '¬x' => 'æ´ª', + '¬y' => 'æµ', + '¬z' => 'æ´¥', + '¬{' => 'æ´Œ', + '¬|' => 'æ´±', + '¬}' => 'æ´ž', + '¬~' => 'æ´—', + '¬¡' => 'æ´»', + '¬¢' => 'æ´½', + '¬£' => 'æ´¾', + '¬¤' => 'æ´¶', + '¬¥' => 'æ´›', + '¬¦' => 'æ³µ', + '¬§' => 'æ´¹', + '¬¨' => 'æ´§', + '¬©' => 'æ´¸', + '¬ª' => 'æ´©', + '¬«' => 'æ´®', + '¬¬' => 'æ´µ', + '¬­' => 'æ´Ž', + '¬®' => 'æ´«', + '¬¯' => 'ç‚«', + '¬°' => '為', + '¬±' => '炳', + '¬²' => '炬', + '¬³' => '炯', + '¬´' => 'ç‚­', + '¬µ' => '炸', + '¬¶' => 'ç‚®', + '¬·' => '炤', + '¬¸' => '爰', + '¬¹' => '牲', + '¬º' => '牯', + '¬»' => '牴', + '¬¼' => 'ç‹©', + '¬½' => 'ç‹ ', + '¬¾' => 'ç‹¡', + '¬¿' => '玷', + '¬À' => 'çŠ', + '¬Á' => '玻', + '¬Â' => '玲', + '¬Ã' => 'ç', + '¬Ä' => 'ç€', + '¬Å' => '玳', + '¬Æ' => '甚', + '¬Ç' => 'ç”­', + '¬È' => 'ç•', + '¬É' => 'ç•Œ', + '¬Ê' => 'ç•Ž', + '¬Ë' => 'ç•‹', + '¬Ì' => 'ç–«', + '¬Í' => 'ç–¤', + '¬Î' => 'ç–¥', + '¬Ï' => 'ç–¢', + '¬Ð' => 'ç–£', + '¬Ñ' => '癸', + '¬Ò' => '皆', + '¬Ó' => '皇', + '¬Ô' => '皈', + '¬Õ' => '盈', + '¬Ö' => '盆', + '¬×' => '盃', + '¬Ø' => 'ç›…', + '¬Ù' => 'çœ', + '¬Ú' => '盹', + '¬Û' => '相', + '¬Ü' => '眉', + '¬Ý' => '看', + '¬Þ' => '盾', + '¬ß' => '盼', + '¬à' => '眇', + '¬á' => '矜', + '¬â' => 'ç ‚', + '¬ã' => 'ç ”', + '¬ä' => 'ç Œ', + '¬å' => 'ç ', + '¬æ' => '祆', + '¬ç' => '祉', + '¬è' => '祈', + '¬é' => '祇', + '¬ê' => '禹', + '¬ë' => '禺', + '¬ì' => '科', + '¬í' => '秒', + '¬î' => '秋', + '¬ï' => 'ç©¿', + '¬ð' => 'çª', + '¬ñ' => 'ç«¿', + '¬ò' => '竽', + '¬ó' => 'ç±½', + '¬ô' => 'ç´‚', + '¬õ' => 'ç´…', + '¬ö' => 'ç´€', + '¬÷' => 'ç´‰', + '¬ø' => 'ç´‡', + '¬ù' => 'ç´„', + '¬ú' => 'ç´†', + '¬û' => '缸', + '¬ü' => '美', + '¬ý' => '羿', + '¬þ' => '耄', + '­@' => 'è€', + '­A' => 'è€', + '­B' => '耑', + '­C' => '耶', + '­D' => '胖', + '­E' => '胥', + '­F' => '胚', + '­G' => '胃', + '­H' => '胄', + '­I' => '背', + '­J' => '胡', + '­K' => '胛', + '­L' => '胎', + '­M' => '胞', + '­N' => '胤', + '­O' => 'èƒ', + '­P' => '致', + '­Q' => '舢', + '­R' => '苧', + '­S' => '范', + '­T' => '茅', + '­U' => 'è‹£', + '­V' => 'è‹›', + '­W' => '苦', + '­X' => '茄', + '­Y' => 'è‹¥', + '­Z' => '茂', + '­[' => '茉', + '­\\' => 'è‹’', + '­]' => 'è‹—', + '­^' => '英', + '­_' => 'èŒ', + '­`' => 'è‹œ', + '­a' => 'è‹”', + '­b' => 'è‹‘', + '­c' => 'è‹ž', + '­d' => 'è‹“', + '­e' => 'è‹Ÿ', + '­f' => '苯', + '­g' => '茆', + '­h' => 'è™', + '­i' => '虹', + '­j' => 'è™»', + '­k' => '虺', + '­l' => 'è¡', + '­m' => 'è¡«', + '­n' => 'è¦', + '­o' => '觔', + '­p' => '計', + '­q' => '訂', + '­r' => '訃', + '­s' => '貞', + '­t' => 'è² ', + '­u' => 'èµ´', + '­v' => 'èµ³', + '­w' => '趴', + '­x' => 'è»', + '­y' => '軌', + '­z' => 'è¿°', + '­{' => '迦', + '­|' => 'è¿¢', + '­}' => '迪', + '­~' => 'è¿¥', + '­¡' => 'è¿­', + '­¢' => 'è¿«', + '­£' => '迤', + '­¤' => '迨', + '­¥' => '郊', + '­¦' => '郎', + '­§' => 'éƒ', + '­¨' => '郃', + '­©' => 'é…‹', + '­ª' => 'é…Š', + '­«' => 'é‡', + '­¬' => 'é–‚', + '­­' => 'é™', + '­®' => '陋', + '­¯' => '陌', + '­°' => 'é™', + '­±' => 'é¢', + '­²' => 'é©', + '­³' => '韋', + '­´' => '韭', + '­µ' => '音', + '­¶' => 'é ', + '­·' => '風', + '­¸' => '飛', + '­¹' => '食', + '­º' => '首', + '­»' => '香', + '­¼' => '乘', + '­½' => '亳', + '­¾' => '倌', + '­¿' => 'å€', + '­À' => '倣', + '­Á' => '俯', + '­Â' => '倦', + '­Ã' => '倥', + '­Ä' => '俸', + '­Å' => '倩', + '­Æ' => '倖', + '­Ç' => '倆', + '­È' => '值', + '­É' => '借', + '­Ê' => '倚', + '­Ë' => '倒', + '­Ì' => '們', + '­Í' => '俺', + '­Î' => '倀', + '­Ï' => '倔', + '­Ð' => '倨', + '­Ñ' => '俱', + '­Ò' => '倡', + '­Ó' => '個', + '­Ô' => '候', + '­Õ' => '倘', + '­Ö' => '俳', + '­×' => 'ä¿®', + '­Ø' => '倭', + '­Ù' => '倪', + '­Ú' => '俾', + '­Û' => '倫', + '­Ü' => '倉', + '­Ý' => 'å…¼', + '­Þ' => '冤', + '­ß' => '冥', + '­à' => '冢', + '­á' => 'å‡', + '­â' => '凌', + '­ã' => '准', + '­ä' => '凋', + '­å' => '剖', + '­æ' => '剜', + '­ç' => '剔', + '­è' => '剛', + '­é' => 'å‰', + '­ê' => '匪', + '­ë' => 'å¿', + '­ì' => '原', + '­í' => 'åŽ', + '­î' => 'åŸ', + '­ï' => '哨', + '­ð' => 'å”', + '­ñ' => 'å”', + '­ò' => 'å”·', + '­ó' => '哼', + '­ô' => 'å“¥', + '­õ' => '哲', + '­ö' => '唆', + '­÷' => '哺', + '­ø' => 'å””', + '­ù' => 'å“©', + '­ú' => 'å“­', + '­û' => 'å“¡', + '­ü' => '唉', + '­ý' => 'å“®', + '­þ' => '哪', + '®@' => '哦', + '®A' => '唧', + '®B' => '唇', + '®C' => '哽', + '®D' => 'å”', + '®E' => '圃', + '®F' => '圄', + '®G' => '埂', + '®H' => '埔', + '®I' => '埋', + '®J' => '埃', + '®K' => 'å ‰', + '®L' => 'å¤', + '®M' => '套', + '®N' => '奘', + '®O' => '奚', + '®P' => '娑', + '®Q' => '娘', + '®R' => '娜', + '®S' => '娟', + '®T' => '娛', + '®U' => '娓', + '®V' => '姬', + '®W' => '娠', + '®X' => '娣', + '®Y' => '娩', + '®Z' => '娥', + '®[' => '娌', + '®\\' => '娉', + '®]' => 'å­«', + '®^' => '屘', + '®_' => 'å®°', + '®`' => '害', + '®a' => '家', + '®b' => 'å®´', + '®c' => 'å®®', + '®d' => '宵', + '®e' => '容', + '®f' => '宸', + '®g' => 'å°„', + '®h' => '屑', + '®i' => '展', + '®j' => 'å±', + '®k' => 'å³­', + '®l' => 'å³½', + '®m' => 'å³»', + '®n' => '峪', + '®o' => '峨', + '®p' => 'å³°', + '®q' => '島', + '®r' => 'å´', + '®s' => 'å³´', + '®t' => 'å·®', + '®u' => '席', + '®v' => '師', + '®w' => '庫', + '®x' => '庭', + '®y' => '座', + '®z' => 'å¼±', + '®{' => 'å¾’', + '®|' => '徑', + '®}' => 'å¾', + '®~' => 'æ™', + '®¡' => 'æ£', + '®¢' => 'æ¥', + '®£' => 'æ', + '®¤' => 'æ•', + '®¥' => 'æ­', + '®¦' => 'æ©', + '®§' => 'æ¯', + '®¨' => 'æ‚„', + '®©' => 'æ‚Ÿ', + '®ª' => 'æ‚š', + '®«' => 'æ‚', + '®¬' => 'æ‚”', + '®­' => 'æ‚Œ', + '®®' => 'æ‚…', + '®¯' => 'æ‚–', + '®°' => '扇', + '®±' => '拳', + '®²' => '挈', + '®³' => 'æ‹¿', + '®´' => 'æŽ', + '®µ' => '挾', + '®¶' => '振', + '®·' => 'æ•', + '®¸' => 'æ‚', + '®¹' => 'æ†', + '®º' => 'æ', + '®»' => 'æ‰', + '®¼' => '挺', + '®½' => 'æ', + '®¾' => '挽', + '®¿' => '挪', + '®À' => '挫', + '®Á' => '挨', + '®Â' => 'æ', + '®Ã' => 'æŒ', + '®Ä' => '效', + '®Å' => '敉', + '®Æ' => 'æ–™', + '®Ç' => 'æ—', + '®È' => 'æ—…', + '®É' => '時', + '®Ê' => '晉', + '®Ë' => 'æ™', + '®Ì' => '晃', + '®Í' => 'æ™’', + '®Î' => '晌', + '®Ï' => 'æ™…', + '®Ð' => 'æ™', + '®Ñ' => '書', + '®Ò' => '朔', + '®Ó' => '朕', + '®Ô' => '朗', + '®Õ' => 'æ ¡', + '®Ö' => 'æ ¸', + '®×' => '案', + '®Ø' => '框', + '®Ù' => 'æ¡“', + '®Ú' => 'æ ¹', + '®Û' => 'æ¡‚', + '®Ü' => 'æ¡”', + '®Ý' => 'æ ©', + '®Þ' => '梳', + '®ß' => 'æ —', + '®à' => 'æ¡Œ', + '®á' => 'æ¡‘', + '®â' => 'æ ½', + '®ã' => '柴', + '®ä' => 'æ¡', + '®å' => 'æ¡€', + '®æ' => 'æ ¼', + '®ç' => '桃', + '®è' => 'æ ª', + '®é' => 'æ¡…', + '®ê' => 'æ “', + '®ë' => 'æ ˜', + '®ì' => 'æ¡', + '®í' => '殊', + '®î' => '殉', + '®ï' => 'æ®·', + '®ð' => 'æ°£', + '®ñ' => 'æ°§', + '®ò' => 'æ°¨', + '®ó' => 'æ°¦', + '®ô' => 'æ°¤', + '®õ' => 'æ³°', + '®ö' => '浪', + '®÷' => '涕', + '®ø' => '消', + '®ù' => '涇', + '®ú' => '浦', + '®û' => '浸', + '®ü' => 'æµ·', + '®ý' => 'æµ™', + '®þ' => '涓', + '¯@' => '浬', + '¯A' => '涉', + '¯B' => 'æµ®', + '¯C' => '浚', + '¯D' => 'æµ´', + '¯E' => '浩', + '¯F' => '涌', + '¯G' => '涊', + '¯H' => 'æµ¹', + '¯I' => '涅', + '¯J' => 'æµ¥', + '¯K' => '涔', + '¯L' => '烊', + '¯M' => '烘', + '¯N' => '烤', + '¯O' => '烙', + '¯P' => '烈', + '¯Q' => 'çƒ', + '¯R' => '爹', + '¯S' => '特', + '¯T' => '狼', + '¯U' => '狹', + '¯V' => '狽', + '¯W' => '狸', + '¯X' => 'ç‹·', + '¯Y' => '玆', + '¯Z' => 'ç­', + '¯[' => 'ç‰', + '¯\\' => 'ç®', + '¯]' => 'ç ', + '¯^' => 'çª', + '¯_' => 'çž', + '¯`' => 'ç•”', + '¯a' => 'ç•', + '¯b' => 'ç•œ', + '¯c' => 'ç•š', + '¯d' => 'ç•™', + '¯e' => 'ç–¾', + '¯f' => 'ç—…', + '¯g' => 'ç—‡', + '¯h' => 'ç–²', + '¯i' => 'ç–³', + '¯j' => 'ç–½', + '¯k' => 'ç–¼', + '¯l' => 'ç–¹', + '¯m' => 'ç—‚', + '¯n' => 'ç–¸', + '¯o' => 'çš‹', + '¯p' => 'çš°', + '¯q' => '益', + '¯r' => 'ç›', + '¯s' => '盎', + '¯t' => '眩', + '¯u' => '真', + '¯v' => '眠', + '¯w' => '眨', + '¯x' => '矩', + '¯y' => 'ç °', + '¯z' => 'ç §', + '¯{' => 'ç ¸', + '¯|' => 'ç ', + '¯}' => 'ç ´', + '¯~' => 'ç ·', + '¯¡' => 'ç ¥', + '¯¢' => 'ç ­', + '¯£' => 'ç  ', + '¯¤' => 'ç Ÿ', + '¯¥' => 'ç ²', + '¯¦' => '祕', + '¯§' => 'ç¥', + '¯¨' => '祠', + '¯©' => '祟', + '¯ª' => '祖', + '¯«' => '神', + '¯¬' => 'ç¥', + '¯­' => '祗', + '¯®' => '祚', + '¯¯' => '秤', + '¯°' => '秣', + '¯±' => '秧', + '¯²' => '租', + '¯³' => '秦', + '¯´' => '秩', + '¯µ' => '秘', + '¯¶' => '窄', + '¯·' => '窈', + '¯¸' => 'ç«™', + '¯¹' => '笆', + '¯º' => '笑', + '¯»' => '粉', + '¯¼' => 'ç´¡', + '¯½' => 'ç´—', + '¯¾' => 'ç´‹', + '¯¿' => 'ç´Š', + '¯À' => 'ç´ ', + '¯Á' => 'ç´¢', + '¯Â' => 'ç´”', + '¯Ã' => 'ç´', + '¯Ä' => 'ç´•', + '¯Å' => 'ç´š', + '¯Æ' => 'ç´œ', + '¯Ç' => 'ç´', + '¯È' => 'ç´™', + '¯É' => 'ç´›', + '¯Ê' => '缺', + '¯Ë' => '罟', + '¯Ì' => 'ç¾”', + '¯Í' => 'ç¿…', + '¯Î' => 'ç¿', + '¯Ï' => '耆', + '¯Ð' => '耘', + '¯Ñ' => '耕', + '¯Ò' => '耙', + '¯Ó' => '耗', + '¯Ô' => '耽', + '¯Õ' => '耿', + '¯Ö' => '胱', + '¯×' => 'è„‚', + '¯Ø' => '胰', + '¯Ù' => 'è„…', + '¯Ú' => '胭', + '¯Û' => '胴', + '¯Ü' => '脆', + '¯Ý' => '胸', + '¯Þ' => '胳', + '¯ß' => '脈', + '¯à' => '能', + '¯á' => 'è„Š', + '¯â' => '胼', + '¯ã' => '胯', + '¯ä' => '臭', + '¯å' => '臬', + '¯æ' => '舀', + '¯ç' => 'èˆ', + '¯è' => '航', + '¯é' => '舫', + '¯ê' => '舨', + '¯ë' => '般', + '¯ì' => '芻', + '¯í' => '茫', + '¯î' => 'è’', + '¯ï' => 'è”', + '¯ð' => 'èŠ', + '¯ñ' => '茸', + '¯ò' => 'è', + '¯ó' => 'è‰', + '¯ô' => '茵', + '¯õ' => '茴', + '¯ö' => 'è', + '¯÷' => '茲', + '¯ø' => '茹', + '¯ù' => '茶', + '¯ú' => '茗', + '¯û' => 'è€', + '¯ü' => '茱', + '¯ý' => '茨', + '¯þ' => 'èƒ', + '°@' => 'è™”', + '°A' => '蚊', + '°B' => '蚪', + '°C' => 'èš“', + '°D' => '蚤', + '°E' => 'èš©', + '°F' => '蚌', + '°G' => '蚣', + '°H' => 'èšœ', + '°I' => 'è¡°', + '°J' => 'è¡·', + '°K' => 'è¢', + '°L' => '袂', + '°M' => '衽', + '°N' => '衹', + '°O' => '記', + '°P' => 'è¨', + '°Q' => '討', + '°R' => '訌', + '°S' => '訕', + '°T' => '訊', + '°U' => '託', + '°V' => '訓', + '°W' => '訖', + '°X' => 'è¨', + '°Y' => '訑', + '°Z' => '豈', + '°[' => '豺', + '°\\' => 'è±¹', + '°]' => '財', + '°^' => 'è²¢', + '°_' => 'èµ·', + '°`' => '躬', + '°a' => 'è»’', + '°b' => 'è»”', + '°c' => 'è»', + '°d' => 'è¾±', + '°e' => 'é€', + '°f' => '逆', + '°g' => 'è¿·', + '°h' => '退', + '°i' => '迺', + '°j' => 'è¿´', + '°k' => '逃', + '°l' => '追', + '°m' => '逅', + '°n' => '迸', + '°o' => 'é‚•', + '°p' => '郡', + '°q' => 'éƒ', + '°r' => '郢', + '°s' => 'é…’', + '°t' => 'é…', + '°u' => 'é…Œ', + '°v' => '釘', + '°w' => 'é‡', + '°x' => '釗', + '°y' => '釜', + '°z' => '釙', + '°{' => 'é–ƒ', + '°|' => '院', + '°}' => '陣', + '°~' => '陡', + '°¡' => 'é™›', + '°¢' => 'é™', + '°£' => '除', + '°¤' => '陘', + '°¥' => '陞', + '°¦' => 'éš»', + '°§' => '飢', + '°¨' => '馬', + '°©' => '骨', + '°ª' => '高', + '°«' => '鬥', + '°¬' => '鬲', + '°­' => '鬼', + '°®' => 'ä¹¾', + '°¯' => 'åº', + '°°' => 'å½', + '°±' => 'åœ', + '°²' => 'å‡', + '°³' => 'åƒ', + '°´' => 'åŒ', + '°µ' => 'åš', + '°¶' => 'å‰', + '°·' => 'å¥', + '°¸' => 'å¶', + '°¹' => 'åŽ', + '°º' => 'å•', + '°»' => 'åµ', + '°¼' => 'å´', + '°½' => 'å·', + '°¾' => 'å', + '°¿' => 'å€', + '°À' => 'å¯', + '°Á' => 'å­', + '°Â' => 'å…œ', + '°Ã' => '冕', + '°Ä' => '凰', + '°Å' => '剪', + '°Æ' => '副', + '°Ç' => 'å‹’', + '°È' => 'å‹™', + '°É' => '勘', + '°Ê' => 'å‹•', + '°Ë' => 'åŒ', + '°Ì' => 'åŒ', + '°Í' => '匙', + '°Î' => '匿', + '°Ï' => 'å€', + '°Ð' => '匾', + '°Ñ' => 'åƒ', + '°Ò' => '曼', + '°Ó' => '商', + '°Ô' => '啪', + '°Õ' => '啦', + '°Ö' => 'å•„', + '°×' => 'å•ž', + '°Ø' => 'å•¡', + '°Ù' => '啃', + '°Ú' => 'å•Š', + '°Û' => 'å”±', + '°Ü' => 'å•–', + '°Ý' => 'å•', + '°Þ' => 'å••', + '°ß' => '唯', + '°à' => '啤', + '°á' => '唸', + '°â' => 'å”®', + '°ã' => 'å•œ', + '°ä' => '唬', + '°å' => 'å•£', + '°æ' => '唳', + '°ç' => 'å•', + '°è' => 'å•—', + '°é' => '圈', + '°ê' => '國', + '°ë' => '圉', + '°ì' => '域', + '°í' => 'å …', + '°î' => 'å Š', + '°ï' => 'å †', + '°ð' => '埠', + '°ñ' => '埤', + '°ò' => '基', + '°ó' => 'å ‚', + '°ô' => 'å µ', + '°õ' => '執', + '°ö' => '培', + '°÷' => '夠', + '°ø' => '奢', + '°ù' => '娶', + '°ú' => 'å©', + '°û' => '婉', + '°ü' => '婦', + '°ý' => '婪', + '°þ' => 'å©€', + '±@' => '娼', + '±A' => 'å©¢', + '±B' => 'å©š', + '±C' => '婆', + '±D' => 'å©Š', + '±E' => 'å­°', + '±F' => '寇', + '±G' => '寅', + '±H' => '寄', + '±I' => '寂', + '±J' => '宿', + '±K' => '密', + '±L' => 'å°‰', + '±M' => 'å°ˆ', + '±N' => 'å°‡', + '±O' => 'å± ', + '±P' => '屜', + '±Q' => 'å±', + '±R' => 'å´‡', + '±S' => 'å´†', + '±T' => 'å´Ž', + '±U' => 'å´›', + '±V' => 'å´–', + '±W' => 'å´¢', + '±X' => 'å´‘', + '±Y' => 'å´©', + '±Z' => 'å´”', + '±[' => 'å´™', + '±\\' => 'å´¤', + '±]' => 'å´§', + '±^' => 'å´—', + '±_' => 'å·¢', + '±`' => '常', + '±a' => '帶', + '±b' => '帳', + '±c' => '帷', + '±d' => '康', + '±e' => '庸', + '±f' => '庶', + '±g' => '庵', + '±h' => '庾', + '±i' => 'å¼µ', + '±j' => 'å¼·', + '±k' => 'å½—', + '±l' => '彬', + '±m' => '彩', + '±n' => '彫', + '±o' => 'å¾—', + '±p' => 'å¾™', + '±q' => '從', + '±r' => '徘', + '±s' => '御', + '±t' => 'å¾ ', + '±u' => '徜', + '±v' => 'æ¿', + '±w' => 'æ‚£', + '±x' => '悉', + '±y' => 'æ‚ ', + '±z' => '您', + '±{' => '惋', + '±|' => 'æ‚´', + '±}' => '惦', + '±~' => '悽', + '±¡' => '情', + '±¢' => 'æ‚»', + '±£' => '悵', + '±¤' => '惜', + '±¥' => '悼', + '±¦' => '惘', + '±§' => '惕', + '±¨' => '惆', + '±©' => '惟', + '±ª' => '悸', + '±«' => '惚', + '±¬' => '惇', + '±­' => '戚', + '±®' => '戛', + '±¯' => '扈', + '±°' => '掠', + '±±' => '控', + '±²' => 'æ²', + '±³' => '掖', + '±´' => '探', + '±µ' => '接', + '±¶' => 'æ·', + '±·' => 'æ§', + '±¸' => '掘', + '±¹' => '措', + '±º' => 'æ±', + '±»' => '掩', + '±¼' => '掉', + '±½' => '掃', + '±¾' => '掛', + '±¿' => 'æ«', + '±À' => '推', + '±Á' => '掄', + '±Â' => '授', + '±Ã' => '掙', + '±Ä' => '採', + '±Å' => '掬', + '±Æ' => '排', + '±Ç' => 'æŽ', + '±È' => '掀', + '±É' => 'æ»', + '±Ê' => 'æ©', + '±Ë' => 'æ¨', + '±Ì' => 'æº', + '±Í' => 'æ•', + '±Î' => 'æ•–', + '±Ï' => 'æ•‘', + '±Ð' => 'æ•™', + '±Ñ' => 'æ•—', + '±Ò' => 'å•Ÿ', + '±Ó' => 'æ•', + '±Ô' => '敘', + '±Õ' => 'æ••', + '±Ö' => 'æ•”', + '±×' => 'æ–œ', + '±Ø' => 'æ–›', + '±Ù' => 'æ–¬', + '±Ú' => 'æ—', + '±Û' => 'æ—‹', + '±Ü' => 'æ—Œ', + '±Ý' => 'æ—Ž', + '±Þ' => 'æ™', + '±ß' => '晚', + '±à' => '晤', + '±á' => '晨', + '±â' => '晦', + '±ã' => '晞', + '±ä' => '曹', + '±å' => 'å‹—', + '±æ' => '望', + '±ç' => 'æ¢', + '±è' => '梯', + '±é' => '梢', + '±ê' => '梓', + '±ë' => '梵', + '±ì' => 'æ¡¿', + '±í' => '桶', + '±î' => '梱', + '±ï' => '梧', + '±ð' => '梗', + '±ñ' => '械', + '±ò' => '梃', + '±ó' => '棄', + '±ô' => '梭', + '±õ' => '梆', + '±ö' => '梅', + '±÷' => '梔', + '±ø' => 'æ¢', + '±ù' => '梨', + '±ú' => '梟', + '±û' => '梡', + '±ü' => '梂', + '±ý' => '欲', + '±þ' => '殺', + '²@' => '毫', + '²A' => '毬', + '²B' => 'æ°«', + '²C' => '涎', + '²D' => '涼', + '²E' => 'æ·³', + '²F' => 'æ·™', + '²G' => '液', + '²H' => 'æ·¡', + '²I' => 'æ·Œ', + '²J' => 'æ·¤', + '²K' => 'æ·»', + '²L' => 'æ·º', + '²M' => '清', + '²N' => 'æ·‡', + '²O' => 'æ·‹', + '²P' => '涯', + '²Q' => 'æ·‘', + '²R' => '涮', + '²S' => 'æ·ž', + '²T' => 'æ·¹', + '²U' => '涸', + '²V' => 'æ··', + '²W' => 'æ·µ', + '²X' => 'æ·…', + '²Y' => 'æ·’', + '²Z' => '渚', + '²[' => '涵', + '²\\' => 'æ·š', + '²]' => 'æ·«', + '²^' => 'æ·˜', + '²_' => 'æ·ª', + '²`' => 'æ·±', + '²a' => 'æ·®', + '²b' => 'æ·¨', + '²c' => 'æ·†', + '²d' => 'æ·„', + '²e' => '涪', + '²f' => 'æ·¬', + '²g' => '涿', + '²h' => 'æ·¦', + '²i' => '烹', + '²j' => '焉', + '²k' => 'ç„Š', + '²l' => '烽', + '²m' => '烯', + '²n' => '爽', + '²o' => '牽', + '²p' => 'çŠ', + '²q' => '猜', + '²r' => '猛', + '²s' => '猖', + '²t' => '猓', + '²u' => '猙', + '²v' => '率', + '²w' => 'ç…', + '²x' => 'çŠ', + '²y' => 'çƒ', + '²z' => 'ç†', + '²{' => 'ç¾', + '²|' => 'ç', + '²}' => 'ç“ ', + '²~' => '瓶', + '²¡' => 'ç“·', + '²¢' => '甜', + '²£' => '產', + '²¤' => 'ç•¥', + '²¥' => '畦', + '²¦' => 'ç•¢', + '²§' => 'ç•°', + '²¨' => 'ç–', + '²©' => 'ç—”', + '²ª' => 'ç—•', + '²«' => 'ç–µ', + '²¬' => 'ç—Š', + '²­' => 'ç—', + '²®' => '皎', + '²¯' => 'ç›”', + '²°' => 'ç›’', + '²±' => 'ç››', + '²²' => '眷', + '²³' => '眾', + '²´' => '眼', + '²µ' => '眶', + '²¶' => '眸', + '²·' => '眺', + '²¸' => 'ç¡«', + '²¹' => '硃', + '²º' => 'ç¡Ž', + '²»' => '祥', + '²¼' => '票', + '²½' => '祭', + '²¾' => '移', + '²¿' => '窒', + '²À' => '窕', + '²Á' => '笠', + '²Â' => '笨', + '²Ã' => '笛', + '²Ä' => '第', + '²Å' => '符', + '²Æ' => '笙', + '²Ç' => '笞', + '²È' => '笮', + '²É' => 'ç²’', + '²Ê' => 'ç²—', + '²Ë' => '粕', + '²Ì' => '絆', + '²Í' => '絃', + '²Î' => 'çµ±', + '²Ï' => 'ç´®', + '²Ð' => 'ç´¹', + '²Ñ' => 'ç´¼', + '²Ò' => 'çµ€', + '²Ó' => 'ç´°', + '²Ô' => 'ç´³', + '²Õ' => '組', + '²Ö' => 'ç´¯', + '²×' => '終', + '²Ø' => 'ç´²', + '²Ù' => 'ç´±', + '²Ú' => 'ç¼½', + '²Û' => '羞', + '²Ü' => '羚', + '²Ý' => 'ç¿Œ', + '²Þ' => 'ç¿Ž', + '²ß' => 'ç¿’', + '²à' => '耜', + '²á' => 'èŠ', + '²â' => 'è†', + '²ã' => '脯', + '²ä' => 'è„–', + '²å' => 'è„£', + '²æ' => 'è„«', + '²ç' => 'è„©', + '²è' => 'è„°', + '²é' => '脤', + '²ê' => '舂', + '²ë' => '舵', + '²ì' => '舷', + '²í' => '舶', + '²î' => '船', + '²ï' => '莎', + '²ð' => '莞', + '²ñ' => '莘', + '²ò' => 'è¸', + '²ó' => '莢', + '²ô' => '莖', + '²õ' => '莽', + '²ö' => '莫', + '²÷' => '莒', + '²ø' => '莊', + '²ù' => '莓', + '²ú' => '莉', + '²û' => '莠', + '²ü' => 'è·', + '²ý' => 'è»', + '²þ' => 'è¼', + '³@' => '莆', + '³A' => '莧', + '³B' => '處', + '³C' => '彪', + '³D' => '蛇', + '³E' => '蛀', + '³F' => '蚶', + '³G' => '蛄', + '³H' => 'èšµ', + '³I' => '蛆', + '³J' => '蛋', + '³K' => 'èš±', + '³L' => '蚯', + '³M' => '蛉', + '³N' => 'è¡“', + '³O' => '袞', + '³P' => '袈', + '³Q' => '被', + '³R' => '袒', + '³S' => '袖', + '³T' => 'è¢', + '³U' => '袋', + '³V' => '覓', + '³W' => 'è¦', + '³X' => '訪', + '³Y' => 'è¨', + '³Z' => '訣', + '³[' => '訥', + '³\\' => '許', + '³]' => '設', + '³^' => '訟', + '³_' => '訛', + '³`' => '訢', + '³a' => '豉', + '³b' => '豚', + '³c' => '販', + '³d' => '責', + '³e' => '貫', + '³f' => '貨', + '³g' => '貪', + '³h' => '貧', + '³i' => '赧', + '³j' => '赦', + '³k' => '趾', + '³l' => '趺', + '³m' => 'è»›', + '³n' => '軟', + '³o' => '這', + '³p' => 'é€', + '³q' => '通', + '³r' => '逗', + '³s' => '連', + '³t' => '速', + '³u' => 'é€', + '³v' => 'é€', + '³w' => '逕', + '³x' => '逞', + '³y' => '造', + '³z' => 'é€', + '³{' => '逢', + '³|' => '逖', + '³}' => '逛', + '³~' => '途', + '³¡' => '部', + '³¢' => '郭', + '³£' => '都', + '³¤' => 'é…—', + '³¥' => '野', + '³¦' => '釵', + '³§' => '釦', + '³¨' => '釣', + '³©' => '釧', + '³ª' => '釭', + '³«' => '釩', + '³¬' => 'é–‰', + '³­' => '陪', + '³®' => '陵', + '³¯' => '陳', + '³°' => '陸', + '³±' => 'é™°', + '³²' => 'é™´', + '³³' => '陶', + '³´' => 'é™·', + '³µ' => '陬', + '³¶' => '雀', + '³·' => '雪', + '³¸' => '雩', + '³¹' => 'ç« ', + '³º' => 'ç«Ÿ', + '³»' => 'é ‚', + '³¼' => 'é ƒ', + '³½' => 'é­š', + '³¾' => 'é³¥', + '³¿' => 'é¹µ', + '³À' => '鹿', + '³Á' => '麥', + '³Â' => '麻', + '³Ã' => 'å‚¢', + '³Ä' => 'å‚', + '³Å' => 'å‚…', + '³Æ' => 'å‚™', + '³Ç' => 'å‚‘', + '³È' => 'å‚€', + '³É' => 'å‚–', + '³Ê' => '傘', + '³Ë' => 'å‚š', + '³Ì' => '最', + '³Í' => '凱', + '³Î' => '割', + '³Ï' => '剴', + '³Ð' => '創', + '³Ñ' => '剩', + '³Ò' => 'å‹ž', + '³Ó' => 'å‹', + '³Ô' => 'å‹›', + '³Õ' => 'åš', + '³Ö' => '厥', + '³×' => 'å•»', + '³Ø' => 'å–€', + '³Ù' => 'å–§', + '³Ú' => '啼', + '³Û' => 'å–Š', + '³Ü' => 'å–', + '³Ý' => 'å–˜', + '³Þ' => 'å–‚', + '³ß' => 'å–œ', + '³à' => 'å–ª', + '³á' => 'å–”', + '³â' => 'å–‡', + '³ã' => 'å–‹', + '³ä' => 'å–ƒ', + '³å' => 'å–³', + '³æ' => 'å–®', + '³ç' => 'å–Ÿ', + '³è' => '唾', + '³é' => 'å–²', + '³ê' => 'å–š', + '³ë' => 'å–»', + '³ì' => 'å–¬', + '³í' => 'å–±', + '³î' => '啾', + '³ï' => 'å–‰', + '³ð' => 'å–«', + '³ñ' => 'å–™', + '³ò' => 'åœ', + '³ó' => 'å ¯', + '³ô' => 'å ª', + '³õ' => 'å ´', + '³ö' => 'å ¤', + '³÷' => 'å °', + '³ø' => 'å ±', + '³ù' => 'å ¡', + '³ú' => 'å ', + '³û' => 'å  ', + '³ü' => '壹', + '³ý' => '壺', + '³þ' => '奠', + '´@' => 'å©·', + '´A' => '媚', + '´B' => 'å©¿', + '´C' => '媒', + '´D' => '媛', + '´E' => '媧', + '´F' => 'å­³', + '´G' => 'å­±', + '´H' => '寒', + '´I' => '富', + '´J' => '寓', + '´K' => 'å¯', + '´L' => 'å°Š', + '´M' => 'å°‹', + '´N' => 'å°±', + '´O' => '嵌', + '´P' => 'åµ', + '´Q' => 'å´´', + '´R' => '嵇', + '´S' => 'å·½', + '´T' => 'å¹…', + '´U' => '帽', + '´V' => 'å¹€', + '´W' => '幃', + '´X' => 'å¹¾', + '´Y' => '廊', + '´Z' => 'å»', + '´[' => '廂', + '´\\' => '廄', + '´]' => 'å¼¼', + '´^' => 'å½­', + '´_' => '復', + '´`' => '循', + '´a' => '徨', + '´b' => '惑', + '´c' => '惡', + '´d' => '悲', + '´e' => '悶', + '´f' => '惠', + '´g' => 'æ„œ', + '´h' => 'æ„£', + '´i' => '惺', + '´j' => 'æ„•', + '´k' => '惰', + '´l' => '惻', + '´m' => '惴', + '´n' => 'æ…¨', + '´o' => '惱', + '´p' => 'æ„Ž', + '´q' => '惶', + '´r' => '愉', + '´s' => 'æ„€', + '´t' => 'æ„’', + '´u' => '戟', + '´v' => '扉', + '´w' => '掣', + '´x' => '掌', + '´y' => 'æ', + '´z' => 'æ€', + '´{' => 'æ©', + '´|' => 'æ‰', + '´}' => 'æ†', + '´~' => 'æ', + '´¡' => 'æ’', + '´¢' => 'æ£', + '´£' => 'æ', + '´¤' => 'æ¡', + '´¥' => 'æ–', + '´¦' => 'æ­', + '´§' => 'æ®', + '´¨' => 'æ¶', + '´©' => 'æ´', + '´ª' => 'æª', + '´«' => 'æ›', + '´¬' => 'æ‘’', + '´­' => 'æš', + '´®' => 'æ¹', + '´¯' => 'æ•ž', + '´°' => '敦', + '´±' => 'æ•¢', + '´²' => 'æ•£', + '´³' => 'æ–‘', + '´´' => 'æ–', + '´µ' => 'æ–¯', + '´¶' => 'æ™®', + '´·' => 'æ™°', + '´¸' => 'æ™´', + '´¹' => '晶', + '´º' => '景', + '´»' => 'æš‘', + '´¼' => '智', + '´½' => '晾', + '´¾' => 'æ™·', + '´¿' => '曾', + '´À' => '替', + '´Á' => '期', + '´Â' => 'æœ', + '´Ã' => '棺', + '´Ä' => '棕', + '´Å' => '棠', + '´Æ' => '棘', + '´Ç' => '棗', + '´È' => '椅', + '´É' => '棟', + '´Ê' => '棵', + '´Ë' => '森', + '´Ì' => '棧', + '´Í' => '棹', + '´Î' => '棒', + '´Ï' => '棲', + '´Ð' => '棣', + '´Ñ' => '棋', + '´Ò' => 'æ£', + '´Ó' => 'æ¤', + '´Ô' => '椒', + '´Õ' => '椎', + '´Ö' => '棉', + '´×' => '棚', + '´Ø' => '楮', + '´Ù' => '棻', + '´Ú' => '款', + '´Û' => '欺', + '´Ü' => '欽', + '´Ý' => '殘', + '´Þ' => 'æ®–', + '´ß' => '殼', + '´à' => '毯', + '´á' => 'æ°®', + '´â' => 'æ°¯', + '´ã' => 'æ°¬', + '´ä' => '港', + '´å' => '游', + '´æ' => 'æ¹”', + '´ç' => '渡', + '´è' => '渲', + '´é' => '湧', + '´ê' => '湊', + '´ë' => '渠', + '´ì' => '渥', + '´í' => '渣', + '´î' => '減', + '´ï' => 'æ¹›', + '´ð' => '湘', + '´ñ' => '渤', + '´ò' => 'æ¹–', + '´ó' => 'æ¹®', + '´ô' => '渭', + '´õ' => '渦', + '´ö' => '湯', + '´÷' => '渴', + '´ø' => 'æ¹', + '´ù' => '渺', + '´ú' => '測', + '´û' => '湃', + '´ü' => 'æ¸', + '´ý' => '渾', + '´þ' => '滋', + 'µ@' => '溉', + 'µA' => '渙', + 'µB' => '湎', + 'µC' => 'æ¹£', + 'µD' => '湄', + 'µE' => 'æ¹²', + 'µF' => '湩', + 'µG' => '湟', + 'µH' => 'ç„™', + 'µI' => 'ç„š', + 'µJ' => '焦', + 'µK' => 'ç„°', + 'µL' => 'ç„¡', + 'µM' => '然', + 'µN' => 'ç…®', + 'µO' => 'ç„œ', + 'µP' => '牌', + 'µQ' => '犄', + 'µR' => '犀', + 'µS' => '猶', + 'µT' => '猥', + 'µU' => '猴', + 'µV' => '猩', + 'µW' => 'çº', + 'µX' => 'çª', + 'µY' => 'ç³', + 'µZ' => 'ç¢', + 'µ[' => 'ç¥', + 'µ\\' => 'çµ', + 'µ]' => 'ç¶', + 'µ^' => 'ç´', + 'µ_' => 'ç¯', + 'µ`' => 'ç›', + 'µa' => 'ç¦', + 'µb' => 'ç¨', + 'µc' => '甥', + 'µd' => '甦', + 'µe' => 'ç•«', + 'µf' => '番', + 'µg' => 'ç—¢', + 'µh' => 'ç—›', + 'µi' => 'ç—£', + 'µj' => 'ç—™', + 'µk' => 'ç—˜', + 'µl' => 'ç—ž', + 'µm' => 'ç— ', + 'µn' => 'ç™»', + 'µo' => '發', + 'µp' => 'çš–', + 'µq' => 'çš“', + 'µr' => 'çš´', + 'µs' => '盜', + 'µt' => 'ç', + 'µu' => '短', + 'µv' => 'ç¡', + 'µw' => '硬', + 'µx' => '硯', + 'µy' => 'ç¨', + 'µz' => '稈', + 'µ{' => '程', + 'µ|' => '稅', + 'µ}' => '稀', + 'µ~' => '窘', + 'µ¡' => '窗', + 'µ¢' => '窖', + 'µ£' => 'ç«¥', + 'µ¤' => 'ç«£', + 'µ¥' => 'ç­‰', + 'µ¦' => 'ç­–', + 'µ§' => 'ç­†', + 'µ¨' => 'ç­', + 'µ©' => 'ç­’', + 'µª' => 'ç­”', + 'µ«' => 'ç­', + 'µ¬' => 'ç­‹', + 'µ­' => 'ç­', + 'µ®' => 'ç­‘', + 'µ¯' => '粟', + 'µ°' => 'ç²¥', + 'µ±' => '絞', + 'µ²' => 'çµ', + 'µ³' => '絨', + 'µ´' => '絕', + 'µµ' => 'ç´«', + 'µ¶' => 'çµ®', + 'µ·' => 'çµ²', + 'µ¸' => '絡', + 'µ¹' => '給', + 'µº' => 'çµ¢', + 'µ»' => 'çµ°', + 'µ¼' => 'çµ³', + 'µ½' => 'å–„', + 'µ¾' => 'ç¿”', + 'µ¿' => 'ç¿•', + 'µÀ' => '耋', + 'µÁ' => 'è’', + 'µÂ' => 'è‚…', + 'µÃ' => 'è…•', + 'µÄ' => 'è…”', + 'µÅ' => 'è…‹', + 'µÆ' => 'è…‘', + 'µÇ' => 'è…Ž', + 'µÈ' => '脹', + 'µÉ' => 'è…†', + 'µÊ' => '脾', + 'µË' => 'è…Œ', + 'µÌ' => 'è…“', + 'µÍ' => 'è…´', + 'µÎ' => '舒', + 'µÏ' => '舜', + 'µÐ' => 'è©', + 'µÑ' => 'èƒ', + 'µÒ' => 'è¸', + 'µÓ' => 'è', + 'µÔ' => 'è ', + 'µÕ' => 'è…', + 'µÖ' => 'è‹', + 'µ×' => 'è', + 'µØ' => 'è¯', + 'µÙ' => 'è±', + 'µÚ' => 'è´', + 'µÛ' => 'è‘—', + 'µÜ' => 'èŠ', + 'µÝ' => 'è°', + 'µÞ' => 'èŒ', + 'µß' => 'èŒ', + 'µà' => 'è½', + 'µá' => 'è²', + 'µâ' => 'èŠ', + 'µã' => 'è¸', + 'µä' => 'èŽ', + 'µå' => 'è„', + 'µæ' => 'èœ', + 'µç' => 'è‡', + 'µè' => 'è”', + 'µé' => 'èŸ', + 'µê' => 'è™›', + 'µë' => '蛟', + 'µì' => 'è›™', + 'µí' => 'è›­', + 'µî' => 'è›”', + 'µï' => 'è››', + 'µð' => '蛤', + 'µñ' => 'è›', + 'µò' => '蛞', + 'µó' => 'è¡—', + 'µô' => 'è£', + 'µõ' => '裂', + 'µö' => '袱', + 'µ÷' => '覃', + 'µø' => '視', + 'µù' => '註', + 'µú' => 'è© ', + 'µû' => 'è©•', + 'µü' => 'è©ž', + 'µý' => '証', + 'µþ' => 'è©', + '¶@' => 'è©”', + '¶A' => 'è©›', + '¶B' => 'è©', + '¶C' => '詆', + '¶D' => '訴', + '¶E' => '診', + '¶F' => '訶', + '¶G' => 'è©–', + '¶H' => '象', + '¶I' => '貂', + '¶J' => '貯', + '¶K' => 'è²¼', + '¶L' => 'è²³', + '¶M' => 'è²½', + '¶N' => 'è³', + '¶O' => 'è²»', + '¶P' => 'è³€', + '¶Q' => 'è²´', + '¶R' => 'è²·', + '¶S' => '貶', + '¶T' => '貿', + '¶U' => '貸', + '¶V' => '越', + '¶W' => '超', + '¶X' => 'è¶', + '¶Y' => 'è·Ž', + '¶Z' => 'è·', + '¶[' => 'è·‹', + '¶\\' => 'è·š', + '¶]' => 'è·‘', + '¶^' => 'è·Œ', + '¶_' => 'è·›', + '¶`' => 'è·†', + '¶a' => 'è»»', + '¶b' => '軸', + '¶c' => '軼', + '¶d' => '辜', + '¶e' => '逮', + '¶f' => '逵', + '¶g' => '週', + '¶h' => '逸', + '¶i' => '進', + '¶j' => '逶', + '¶k' => 'é„‚', + '¶l' => '郵', + '¶m' => '鄉', + '¶n' => '郾', + '¶o' => 'é…£', + '¶p' => 'é…¥', + '¶q' => 'é‡', + '¶r' => '鈔', + '¶s' => '鈕', + '¶t' => '鈣', + '¶u' => '鈉', + '¶v' => '鈞', + '¶w' => 'éˆ', + '¶x' => 'éˆ', + '¶y' => '鈇', + '¶z' => '鈑', + '¶{' => 'é–”', + '¶|' => 'é–', + '¶}' => 'é–‹', + '¶~' => 'é–‘', + '¶¡' => 'é–“', + '¶¢' => 'é–’', + '¶£' => 'é–Ž', + '¶¤' => '隊', + '¶¥' => '階', + '¶¦' => 'éš‹', + '¶§' => '陽', + '¶¨' => 'éš…', + '¶©' => '隆', + '¶ª' => 'éš', + '¶«' => '陲', + '¶¬' => 'éš„', + '¶­' => 'é›', + '¶®' => 'é›…', + '¶¯' => '雄', + '¶°' => '集', + '¶±' => '雇', + '¶²' => '雯', + '¶³' => '雲', + '¶´' => '韌', + '¶µ' => 'é …', + '¶¶' => 'é †', + '¶·' => 'é ˆ', + '¶¸' => '飧', + '¶¹' => '飪', + '¶º' => '飯', + '¶»' => '飩', + '¶¼' => '飲', + '¶½' => '飭', + '¶¾' => '馮', + '¶¿' => '馭', + '¶À' => '黃', + '¶Á' => 'é»', + '¶Â' => '黑', + '¶Ã' => '亂', + '¶Ä' => 'å‚­', + '¶Å' => '債', + '¶Æ' => '傲', + '¶Ç' => '傳', + '¶È' => '僅', + '¶É' => '傾', + '¶Ê' => '催', + '¶Ë' => 'å‚·', + '¶Ì' => 'å‚»', + '¶Í' => '傯', + '¶Î' => '僇', + '¶Ï' => '剿', + '¶Ð' => '剷', + '¶Ñ' => '剽', + '¶Ò' => 'å‹Ÿ', + '¶Ó' => '勦', + '¶Ô' => '勤', + '¶Õ' => 'å‹¢', + '¶Ö' => 'å‹£', + '¶×' => '匯', + '¶Ø' => 'å—Ÿ', + '¶Ù' => 'å—¨', + '¶Ú' => 'å—“', + '¶Û' => 'å—¦', + '¶Ü' => 'å—Ž', + '¶Ý' => 'å—œ', + '¶Þ' => 'å—‡', + '¶ß' => 'å—‘', + '¶à' => 'å—£', + '¶á' => 'å—¤', + '¶â' => 'å—¯', + '¶ã' => 'å—š', + '¶ä' => 'å—¡', + '¶å' => 'å—…', + '¶æ' => 'å—†', + '¶ç' => 'å—¥', + '¶è' => 'å—‰', + '¶é' => '園', + '¶ê' => '圓', + '¶ë' => 'å¡ž', + '¶ì' => 'å¡‘', + '¶í' => '塘', + '¶î' => 'å¡—', + '¶ï' => 'å¡š', + '¶ð' => 'å¡”', + '¶ñ' => 'å¡«', + '¶ò' => 'å¡Œ', + '¶ó' => 'å¡­', + '¶ô' => 'å¡Š', + '¶õ' => 'å¡¢', + '¶ö' => 'å¡’', + '¶÷' => 'å¡‹', + '¶ø' => '奧', + '¶ù' => 'å«', + '¶ú' => '嫉', + '¶û' => 'å«Œ', + '¶ü' => '媾', + '¶ý' => '媽', + '¶þ' => '媼', + '·@' => '媳', + '·A' => 'å«‚', + '·B' => '媲', + '·C' => '嵩', + '·D' => '嵯', + '·E' => '幌', + '·F' => 'å¹¹', + '·G' => '廉', + '·H' => '廈', + '·I' => 'å¼’', + '·J' => 'å½™', + '·K' => '徬', + '·L' => 'å¾®', + '·M' => 'æ„š', + '·N' => 'æ„', + '·O' => 'æ…ˆ', + '·P' => 'æ„Ÿ', + '·Q' => '想', + '·R' => 'æ„›', + '·S' => '惹', + '·T' => 'æ„', + '·U' => '愈', + '·V' => 'æ…Ž', + '·W' => 'æ…Œ', + '·X' => 'æ…„', + '·Y' => 'æ…', + '·Z' => '愾', + '·[' => 'æ„´', + '·\\' => '愧', + '·]' => 'æ„', + '·^' => '愆', + '·_' => 'æ„·', + '·`' => '戡', + '·a' => '戢', + '·b' => 'æ“', + '·c' => 'æ¾', + '·d' => 'æž', + '·e' => 'æª', + '·f' => 'æ­', + '·g' => 'æ½', + '·h' => 'æ¬', + '·i' => 'æ', + '·j' => 'æœ', + '·k' => 'æ”', + '·l' => 'æ', + '·m' => 'æ¶', + '·n' => 'æ–', + '·o' => 'æ—', + '·p' => 'æ†', + '·q' => '敬', + '·r' => 'æ–Ÿ', + '·s' => 'æ–°', + '·t' => 'æš—', + '·u' => '暉', + '·v' => '暇', + '·w' => '暈', + '·x' => 'æš–', + '·y' => 'æš„', + '·z' => '暘', + '·{' => 'æš', + '·|' => '會', + '·}' => '榔', + '·~' => '業', + '·¡' => '楚', + '·¢' => '楷', + '·£' => '楠', + '·¤' => '楔', + '·¥' => '極', + '·¦' => '椰', + '·§' => '概', + '·¨' => '楊', + '·©' => '楨', + '·ª' => '楫', + '·«' => '楞', + '·¬' => '楓', + '·­' => '楹', + '·®' => '榆', + '·¯' => 'æ¥', + '·°' => '楣', + '·±' => '楛', + '·²' => 'æ­‡', + '·³' => 'æ­²', + '·´' => '毀', + '·µ' => '殿', + '·¶' => '毓', + '··' => '毽', + '·¸' => '溢', + '·¹' => '溯', + '·º' => '滓', + '·»' => '溶', + '·¼' => '滂', + '·½' => 'æº', + '·¾' => 'æº', + '·¿' => '滇', + '·À' => 'æ»…', + '·Á' => '溥', + '·Â' => '溘', + '·Ã' => '溼', + '·Ä' => '溺', + '·Å' => '溫', + '·Æ' => '滑', + '·Ç' => '準', + '·È' => '溜', + '·É' => '滄', + '·Ê' => 'æ»”', + '·Ë' => '溪', + '·Ì' => '溧', + '·Í' => '溴', + '·Î' => 'ç…Ž', + '·Ï' => 'ç…™', + '·Ð' => 'ç…©', + '·Ñ' => 'ç…¤', + '·Ò' => 'ç…‰', + '·Ó' => 'ç…§', + '·Ô' => 'ç…œ', + '·Õ' => 'ç…¬', + '·Ö' => 'ç…¦', + '·×' => 'ç…Œ', + '·Ø' => 'ç…¥', + '·Ù' => 'ç…ž', + '·Ú' => 'ç…†', + '·Û' => 'ç…¨', + '·Ü' => 'ç…–', + '·Ý' => '爺', + '·Þ' => '牒', + '·ß' => '猷', + '·à' => 'ç…', + '·á' => '猿', + '·â' => '猾', + '·ã' => '瑯', + '·ä' => 'ç‘š', + '·å' => 'ç‘•', + '·æ' => 'ç‘Ÿ', + '·ç' => 'ç‘ž', + '·è' => 'ç‘', + '·é' => 'ç¿', + '·ê' => 'ç‘™', + '·ë' => 'ç‘›', + '·ì' => 'ç‘œ', + '·í' => '當', + '·î' => '畸', + '·ï' => '瘀', + '·ð' => 'ç—°', + '·ñ' => 'ç˜', + '·ò' => 'ç—²', + '·ó' => 'ç—±', + '·ô' => 'ç—º', + '·õ' => 'ç—¿', + '·ö' => 'ç—´', + '·÷' => 'ç—³', + '·ø' => '盞', + '·ù' => '盟', + '·ú' => 'ç›', + '·û' => 'ç«', + '·ü' => 'ç¦', + '·ý' => 'çž', + '·þ' => 'ç£', + '¸@' => 'ç¹', + '¸A' => 'çª', + '¸B' => 'ç¬', + '¸C' => 'çœ', + '¸D' => 'ç¥', + '¸E' => 'ç¨', + '¸F' => 'ç¢', + '¸G' => '矮', + '¸H' => '碎', + '¸I' => '碰', + '¸J' => '碗', + '¸K' => '碘', + '¸L' => '碌', + '¸M' => '碉', + '¸N' => '硼', + '¸O' => '碑', + '¸P' => '碓', + '¸Q' => 'ç¡¿', + '¸R' => '祺', + '¸S' => '祿', + '¸T' => 'ç¦', + '¸U' => 'è¬', + '¸V' => '禽', + '¸W' => '稜', + '¸X' => '稚', + '¸Y' => '稠', + '¸Z' => '稔', + '¸[' => '稟', + '¸\\' => '稞', + '¸]' => '窟', + '¸^' => '窠', + '¸_' => 'ç­·', + '¸`' => '節', + '¸a' => 'ç­ ', + '¸b' => 'ç­®', + '¸c' => 'ç­§', + '¸d' => 'ç²±', + '¸e' => 'ç²³', + '¸f' => 'ç²µ', + '¸g' => '經', + '¸h' => 'çµ¹', + '¸i' => '綑', + '¸j' => 'ç¶', + '¸k' => 'ç¶', + '¸l' => 'çµ›', + '¸m' => 'ç½®', + '¸n' => '罩', + '¸o' => '罪', + '¸p' => 'ç½²', + '¸q' => '義', + '¸r' => '羨', + '¸s' => '群', + '¸t' => 'è–', + '¸u' => 'è˜', + '¸v' => '肆', + '¸w' => 'è‚„', + '¸x' => 'è…±', + '¸y' => 'è…°', + '¸z' => 'è…¸', + '¸{' => 'è…¥', + '¸|' => 'è…®', + '¸}' => 'è…³', + '¸~' => 'è…«', + '¸¡' => 'è…¹', + '¸¢' => 'è…º', + '¸£' => 'è…¦', + '¸¤' => '舅', + '¸¥' => '艇', + '¸¦' => 'è’‚', + '¸§' => 'è‘·', + '¸¨' => 'è½', + '¸©' => 'è±', + '¸ª' => '葵', + '¸«' => '葦', + '¸¬' => 'è‘«', + '¸­' => '葉', + '¸®' => '葬', + '¸¯' => 'è‘›', + '¸°' => 'è¼', + '¸±' => 'èµ', + '¸²' => 'è‘¡', + '¸³' => 'è‘£', + '¸´' => 'è‘©', + '¸µ' => 'è‘­', + '¸¶' => '葆', + '¸·' => '虞', + '¸¸' => '虜', + '¸¹' => '號', + '¸º' => '蛹', + '¸»' => '蜓', + '¸¼' => '蜈', + '¸½' => '蜇', + '¸¾' => '蜀', + '¸¿' => '蛾', + '¸À' => 'è›»', + '¸Á' => '蜂', + '¸Â' => '蜃', + '¸Ã' => '蜆', + '¸Ä' => '蜊', + '¸Å' => 'è¡™', + '¸Æ' => '裟', + '¸Ç' => '裔', + '¸È' => '裙', + '¸É' => '補', + '¸Ê' => '裘', + '¸Ë' => 'è£', + '¸Ì' => '裡', + '¸Í' => '裊', + '¸Î' => '裕', + '¸Ï' => '裒', + '¸Ð' => '覜', + '¸Ñ' => '解', + '¸Ò' => 'è©«', + '¸Ó' => '該', + '¸Ô' => '詳', + '¸Õ' => '試', + '¸Ö' => 'è©©', + '¸×' => 'è©°', + '¸Ø' => '誇', + '¸Ù' => '詼', + '¸Ú' => 'è©£', + '¸Û' => '誠', + '¸Ü' => '話', + '¸Ý' => '誅', + '¸Þ' => 'è©­', + '¸ß' => 'è©¢', + '¸à' => 'è©®', + '¸á' => '詬', + '¸â' => '詹', + '¸ã' => 'è©»', + '¸ä' => '訾', + '¸å' => '詨', + '¸æ' => 'è±¢', + '¸ç' => '貊', + '¸è' => '貉', + '¸é' => '賊', + '¸ê' => '資', + '¸ë' => '賈', + '¸ì' => '賄', + '¸í' => 'è²²', + '¸î' => '賃', + '¸ï' => '賂', + '¸ð' => 'è³…', + '¸ñ' => 'è·¡', + '¸ò' => 'è·Ÿ', + '¸ó' => 'è·¨', + '¸ô' => 'è·¯', + '¸õ' => 'è·³', + '¸ö' => 'è·º', + '¸÷' => 'è·ª', + '¸ø' => 'è·¤', + '¸ù' => 'è·¦', + '¸ú' => '躲', + '¸û' => '較', + '¸ü' => '載', + '¸ý' => '軾', + '¸þ' => '輊', + '¹@' => '辟', + '¹A' => 'è¾²', + '¹B' => 'é‹', + '¹C' => 'éŠ', + '¹D' => 'é“', + '¹E' => 'é‚', + '¹F' => 'é”', + '¹G' => '逼', + '¹H' => 'é•', + '¹I' => 'é', + '¹J' => 'é‡', + '¹K' => 'é', + '¹L' => 'éŽ', + '¹M' => 'é', + '¹N' => 'é‘', + '¹O' => '逾', + '¹P' => 'é', + '¹Q' => 'é„’', + '¹R' => 'é„—', + '¹S' => 'é…¬', + '¹T' => 'é…ª', + '¹U' => 'é…©', + '¹V' => '釉', + '¹W' => '鈷', + '¹X' => '鉗', + '¹Y' => '鈸', + '¹Z' => '鈽', + '¹[' => '鉀', + '¹\\' => '鈾', + '¹]' => '鉛', + '¹^' => '鉋', + '¹_' => '鉤', + '¹`' => '鉑', + '¹a' => '鈴', + '¹b' => '鉉', + '¹c' => 'é‰', + '¹d' => '鉅', + '¹e' => '鈹', + '¹f' => '鈿', + '¹g' => '鉚', + '¹h' => 'é–˜', + '¹i' => '隘', + '¹j' => 'éš”', + '¹k' => 'éš•', + '¹l' => 'é›', + '¹m' => '雋', + '¹n' => '雉', + '¹o' => '雊', + '¹p' => 'é›·', + '¹q' => 'é›»', + '¹r' => '雹', + '¹s' => '零', + '¹t' => 'é–', + '¹u' => 'é´', + '¹v' => 'é¶', + '¹w' => 'é ', + '¹x' => 'é ‘', + '¹y' => 'é “', + '¹z' => 'é Š', + '¹{' => 'é ’', + '¹|' => 'é Œ', + '¹}' => '飼', + '¹~' => '飴', + '¹¡' => '飽', + '¹¢' => '飾', + '¹£' => '馳', + '¹¤' => '馱', + '¹¥' => '馴', + '¹¦' => 'é«¡', + '¹§' => '鳩', + '¹¨' => '麂', + '¹©' => '鼎', + '¹ª' => '鼓', + '¹«' => 'é¼ ', + '¹¬' => '僧', + '¹­' => '僮', + '¹®' => '僥', + '¹¯' => '僖', + '¹°' => '僭', + '¹±' => '僚', + '¹²' => '僕', + '¹³' => 'åƒ', + '¹´' => '僑', + '¹µ' => '僱', + '¹¶' => '僎', + '¹·' => '僩', + '¹¸' => 'å…¢', + '¹¹' => '凳', + '¹º' => '劃', + '¹»' => '劂', + '¹¼' => '匱', + '¹½' => '厭', + '¹¾' => 'å—¾', + '¹¿' => '嘀', + '¹À' => '嘛', + '¹Á' => '嘗', + '¹Â' => 'å—½', + '¹Ã' => '嘔', + '¹Ä' => '嘆', + '¹Å' => '嘉', + '¹Æ' => 'å˜', + '¹Ç' => '嘎', + '¹È' => 'å—·', + '¹É' => '嘖', + '¹Ê' => '嘟', + '¹Ë' => '嘈', + '¹Ì' => 'å˜', + '¹Í' => 'å—¶', + '¹Î' => '團', + '¹Ï' => '圖', + '¹Ð' => '塵', + '¹Ñ' => '塾', + '¹Ò' => '境', + '¹Ó' => '墓', + '¹Ô' => '墊', + '¹Õ' => '塹', + '¹Ö' => '墅', + '¹×' => '塽', + '¹Ø' => '壽', + '¹Ù' => '夥', + '¹Ú' => '夢', + '¹Û' => '夤', + '¹Ü' => '奪', + '¹Ý' => '奩', + '¹Þ' => 'å«¡', + '¹ß' => '嫦', + '¹à' => 'å«©', + '¹á' => 'å«—', + '¹â' => 'å«–', + '¹ã' => '嫘', + '¹ä' => 'å«£', + '¹å' => 'å­µ', + '¹æ' => '寞', + '¹ç' => '寧', + '¹è' => '寡', + '¹é' => '寥', + '¹ê' => '實', + '¹ë' => '寨', + '¹ì' => '寢', + '¹í' => '寤', + '¹î' => '察', + '¹ï' => 'å°', + '¹ð' => 'å±¢', + '¹ñ' => '嶄', + '¹ò' => '嶇', + '¹ó' => 'å¹›', + '¹ô' => 'å¹£', + '¹õ' => '幕', + '¹ö' => 'å¹—', + '¹÷' => 'å¹”', + '¹ø' => '廓', + '¹ù' => 'å»–', + '¹ú' => '弊', + '¹û' => '彆', + '¹ü' => 'å½°', + '¹ý' => 'å¾¹', + '¹þ' => 'æ…‡', + 'º@' => 'æ„¿', + 'ºA' => 'æ…‹', + 'ºB' => 'æ…·', + 'ºC' => 'æ…¢', + 'ºD' => 'æ…£', + 'ºE' => 'æ…Ÿ', + 'ºF' => 'æ…š', + 'ºG' => 'æ…˜', + 'ºH' => 'æ…µ', + 'ºI' => '截', + 'ºJ' => 'æ’‡', + 'ºK' => '摘', + 'ºL' => 'æ‘”', + 'ºM' => 'æ’¤', + 'ºN' => '摸', + 'ºO' => 'æ‘Ÿ', + 'ºP' => '摺', + 'ºQ' => 'æ‘‘', + 'ºR' => '摧', + 'ºS' => 'æ´', + 'ºT' => 'æ‘­', + 'ºU' => 'æ‘»', + 'ºV' => '敲', + 'ºW' => 'æ–¡', + 'ºX' => 'æ——', + 'ºY' => 'æ—–', + 'ºZ' => '暢', + 'º[' => '暨', + 'º\\' => 'æš', + 'º]' => '榜', + 'º^' => '榨', + 'º_' => '榕', + 'º`' => 'æ§', + 'ºa' => '榮', + 'ºb' => '槓', + 'ºc' => '構', + 'ºd' => '榛', + 'ºe' => '榷', + 'ºf' => '榻', + 'ºg' => '榫', + 'ºh' => '榴', + 'ºi' => 'æ§', + 'ºj' => 'æ§', + 'ºk' => '榭', + 'ºl' => '槌', + 'ºm' => '榦', + 'ºn' => '槃', + 'ºo' => '榣', + 'ºp' => 'æ­‰', + 'ºq' => 'æ­Œ', + 'ºr' => 'æ°³', + 'ºs' => 'æ¼³', + 'ºt' => 'æ¼”', + 'ºu' => '滾', + 'ºv' => '漓', + 'ºw' => 'æ»´', + 'ºx' => '漩', + 'ºy' => 'æ¼¾', + 'ºz' => 'æ¼ ', + 'º{' => '漬', + 'º|' => 'æ¼', + 'º}' => '漂', + 'º~' => 'æ¼¢', + 'º¡' => '滿', + 'º¢' => '滯', + 'º£' => '漆', + 'º¤' => 'æ¼±', + 'º¥' => '漸', + 'º¦' => 'æ¼²', + 'º§' => 'æ¼£', + 'º¨' => '漕', + 'º©' => '漫', + 'ºª' => '漯', + 'º«' => '澈', + 'º¬' => '漪', + 'º­' => '滬', + 'º®' => 'æ¼', + 'º¯' => '滲', + 'º°' => '滌', + 'º±' => 'æ»·', + 'º²' => '熔', + 'º³' => '熙', + 'º´' => 'ç…½', + 'ºµ' => '熊', + 'º¶' => '熄', + 'º·' => '熒', + 'º¸' => '爾', + 'º¹' => '犒', + 'ºº' => '犖', + 'º»' => 'ç„', + 'º¼' => 'ç', + 'º½' => '瑤', + 'º¾' => 'ç‘£', + 'º¿' => '瑪', + 'ºÀ' => 'ç‘°', + 'ºÁ' => 'ç‘­', + 'ºÂ' => '甄', + 'ºÃ' => 'ç–‘', + 'ºÄ' => '瘧', + 'ºÅ' => 'ç˜', + 'ºÆ' => '瘋', + 'ºÇ' => '瘉', + 'ºÈ' => '瘓', + 'ºÉ' => '盡', + 'ºÊ' => '監', + 'ºË' => 'çž„', + 'ºÌ' => 'ç½', + 'ºÍ' => 'ç¿', + 'ºÎ' => 'ç¡', + 'ºÏ' => 'ç£', + 'ºÐ' => '碟', + 'ºÑ' => '碧', + 'ºÒ' => '碳', + 'ºÓ' => '碩', + 'ºÔ' => '碣', + 'ºÕ' => '禎', + 'ºÖ' => 'ç¦', + 'º×' => 'ç¦', + 'ºØ' => '種', + 'ºÙ' => '稱', + 'ºÚ' => '窪', + 'ºÛ' => '窩', + 'ºÜ' => 'ç«­', + 'ºÝ' => '端', + 'ºÞ' => '管', + 'ºß' => '箕', + 'ºà' => '箋', + 'ºá' => 'ç­µ', + 'ºâ' => 'ç®—', + 'ºã' => 'ç®', + 'ºä' => 'ç®”', + 'ºå' => 'ç®', + 'ºæ' => '箸', + 'ºç' => '箇', + 'ºè' => '箄', + 'ºé' => 'ç²¹', + 'ºê' => 'ç²½', + 'ºë' => 'ç²¾', + 'ºì' => '綻', + 'ºí' => '綰', + 'ºî' => '綜', + 'ºï' => '綽', + 'ºð' => '綾', + 'ºñ' => '綠', + 'ºò' => 'ç·Š', + 'ºó' => '綴', + 'ºô' => '網', + 'ºõ' => '綱', + 'ºö' => '綺', + 'º÷' => '綢', + 'ºø' => '綿', + 'ºù' => '綵', + 'ºú' => '綸', + 'ºû' => '維', + 'ºü' => 'ç·’', + 'ºý' => 'ç·‡', + 'ºþ' => '綬', + '»@' => 'ç½°', + '»A' => 'ç¿ ', + '»B' => 'ç¿¡', + '»C' => 'ç¿Ÿ', + '»D' => 'èž', + '»E' => 'èš', + '»F' => '肇', + '»G' => 'è…', + '»H' => '膀', + '»I' => 'è†', + '»J' => '膈', + '»K' => '膊', + '»L' => 'è…¿', + '»M' => '膂', + '»N' => '臧', + '»O' => '臺', + '»P' => '與', + '»Q' => '舔', + '»R' => '舞', + '»S' => '艋', + '»T' => '蓉', + '»U' => 'è’¿', + '»V' => '蓆', + '»W' => 'è“„', + '»X' => 'è’™', + '»Y' => 'è’ž', + '»Z' => 'è’²', + '»[' => 'è’œ', + '»\\' => 'è“‹', + '»]' => 'è’¸', + '»^' => 'è“€', + '»_' => 'è““', + '»`' => 'è’', + '»a' => 'è’¼', + '»b' => 'è“‘', + '»c' => 'è“Š', + '»d' => '蜿', + '»e' => '蜜', + '»f' => '蜻', + '»g' => '蜢', + '»h' => '蜥', + '»i' => '蜴', + '»j' => '蜘', + '»k' => 'è•', + '»l' => '蜷', + '»m' => '蜩', + '»n' => '裳', + '»o' => '褂', + '»p' => '裴', + '»q' => '裹', + '»r' => '裸', + '»s' => '製', + '»t' => '裨', + '»u' => '褚', + '»v' => '裯', + '»w' => '誦', + '»x' => '誌', + '»y' => '語', + '»z' => '誣', + '»{' => 'èª', + '»|' => '誡', + '»}' => '誓', + '»~' => '誤', + '»¡' => '說', + '»¢' => '誥', + '»£' => '誨', + '»¤' => '誘', + '»¥' => '誑', + '»¦' => '誚', + '»§' => '誧', + '»¨' => '豪', + '»©' => 'è²', + '»ª' => '貌', + '»«' => '賓', + '»¬' => '賑', + '»­' => 'è³’', + '»®' => '赫', + '»¯' => '趙', + '»°' => '趕', + '»±' => 'è·¼', + '»²' => 'è¼”', + '»³' => 'è¼’', + '»´' => '輕', + '»µ' => '輓', + '»¶' => 'è¾£', + '»·' => 'é ', + '»¸' => 'é˜', + '»¹' => 'éœ', + '»º' => 'é£', + '»»' => 'é™', + '»¼' => 'éž', + '»½' => 'é¢', + '»¾' => 'é', + '»¿' => 'é›', + '»À' => 'é„™', + '»Á' => '鄘', + '»Â' => 'é„ž', + '»Ã' => 'é…µ', + '»Ä' => 'é…¸', + '»Å' => 'é…·', + '»Æ' => 'é…´', + '»Ç' => '鉸', + '»È' => '銀', + '»É' => '銅', + '»Ê' => '銘', + '»Ë' => '銖', + '»Ì' => '鉻', + '»Í' => '銓', + '»Î' => '銜', + '»Ï' => '銨', + '»Ð' => '鉼', + '»Ñ' => '銑', + '»Ò' => 'é–¡', + '»Ó' => 'é–¨', + '»Ô' => 'é–©', + '»Õ' => 'é–£', + '»Ö' => 'é–¥', + '»×' => 'é–¤', + '»Ø' => 'éš™', + '»Ù' => 'éšœ', + '»Ú' => 'éš›', + '»Û' => '雌', + '»Ü' => 'é›’', + '»Ý' => '需', + '»Þ' => 'é¼', + '»ß' => 'éž…', + '»à' => '韶', + '»á' => 'é —', + '»â' => 'é ˜', + '»ã' => '颯', + '»ä' => '颱', + '»å' => '餃', + '»æ' => '餅', + '»ç' => '餌', + '»è' => '餉', + '»é' => 'é§', + '»ê' => '骯', + '»ë' => '骰', + '»ì' => '髦', + '»í' => 'é­', + '»î' => 'é­‚', + '»ï' => 'é³´', + '»ð' => '鳶', + '»ñ' => 'é³³', + '»ò' => '麼', + '»ó' => 'é¼»', + '»ô' => '齊', + '»õ' => 'å„„', + '»ö' => 'å„€', + '»÷' => '僻', + '»ø' => '僵', + '»ù' => '價', + '»ú' => 'å„‚', + '»û' => '儈', + '»ü' => '儉', + '»ý' => 'å„…', + '»þ' => '凜', + '¼@' => '劇', + '¼A' => '劈', + '¼B' => '劉', + '¼C' => 'åŠ', + '¼D' => '劊', + '¼E' => 'å‹°', + '¼F' => '厲', + '¼G' => '嘮', + '¼H' => '嘻', + '¼I' => '嘹', + '¼J' => '嘲', + '¼K' => '嘿', + '¼L' => '嘴', + '¼M' => '嘩', + '¼N' => '噓', + '¼O' => '噎', + '¼P' => 'å™—', + '¼Q' => 'å™´', + '¼R' => '嘶', + '¼S' => '嘯', + '¼T' => '嘰', + '¼U' => '墀', + '¼V' => '墟', + '¼W' => '增', + '¼X' => '墳', + '¼Y' => '墜', + '¼Z' => '墮', + '¼[' => '墩', + '¼\\' => '墦', + '¼]' => '奭', + '¼^' => '嬉', + '¼_' => 'å«»', + '¼`' => '嬋', + '¼a' => '嫵', + '¼b' => '嬌', + '¼c' => '嬈', + '¼d' => '寮', + '¼e' => '寬', + '¼f' => '審', + '¼g' => '寫', + '¼h' => '層', + '¼i' => 'å±¥', + '¼j' => 'å¶', + '¼k' => '嶔', + '¼l' => 'å¹¢', + '¼m' => '幟', + '¼n' => '幡', + '¼o' => '廢', + '¼p' => '廚', + '¼q' => '廟', + '¼r' => 'å»', + '¼s' => '廣', + '¼t' => 'å» ', + '¼u' => '彈', + '¼v' => 'å½±', + '¼w' => 'å¾·', + '¼x' => 'å¾µ', + '¼y' => 'æ…¶', + '¼z' => 'æ…§', + '¼{' => 'æ…®', + '¼|' => 'æ…', + '¼}' => 'æ…•', + '¼~' => '憂', + '¼¡' => 'æ…¼', + '¼¢' => 'æ…°', + '¼£' => 'æ…«', + '¼¤' => 'æ…¾', + '¼¥' => '憧', + '¼¦' => 'æ†', + '¼§' => '憫', + '¼¨' => '憎', + '¼©' => '憬', + '¼ª' => '憚', + '¼«' => '憤', + '¼¬' => '憔', + '¼­' => '憮', + '¼®' => '戮', + '¼¯' => 'æ‘©', + '¼°' => '摯', + '¼±' => '摹', + '¼²' => 'æ’ž', + '¼³' => 'æ’²', + '¼´' => 'æ’ˆ', + '¼µ' => 'æ’', + '¼¶' => 'æ’°', + '¼·' => 'æ’¥', + '¼¸' => 'æ’“', + '¼¹' => 'æ’•', + '¼º' => 'æ’©', + '¼»' => 'æ’’', + '¼¼' => 'æ’®', + '¼½' => 'æ’­', + '¼¾' => 'æ’«', + '¼¿' => 'æ’š', + '¼À' => 'æ’¬', + '¼Á' => 'æ’™', + '¼Â' => 'æ’¢', + '¼Ã' => 'æ’³', + '¼Ä' => '敵', + '¼Å' => 'æ•·', + '¼Æ' => '數', + '¼Ç' => 'æš®', + '¼È' => 'æš«', + '¼É' => 'æš´', + '¼Ê' => 'æš±', + '¼Ë' => '樣', + '¼Ì' => '樟', + '¼Í' => '槨', + '¼Î' => 'æ¨', + '¼Ï' => '樞', + '¼Ð' => '標', + '¼Ñ' => '槽', + '¼Ò' => '模', + '¼Ó' => '樓', + '¼Ô' => '樊', + '¼Õ' => '槳', + '¼Ö' => '樂', + '¼×' => '樅', + '¼Ø' => '槭', + '¼Ù' => '樑', + '¼Ú' => 'æ­', + '¼Û' => 'æ­Ž', + '¼Ü' => '殤', + '¼Ý' => '毅', + '¼Þ' => '毆', + '¼ß' => '漿', + '¼à' => 'æ½¼', + '¼á' => '澄', + '¼â' => '潑', + '¼ã' => '潦', + '¼ä' => 'æ½”', + '¼å' => '澆', + '¼æ' => 'æ½­', + '¼ç' => 'æ½›', + '¼è' => '潸', + '¼é' => 'æ½®', + '¼ê' => '澎', + '¼ë' => '潺', + '¼ì' => 'æ½°', + '¼í' => '潤', + '¼î' => 'æ¾—', + '¼ï' => '潘', + '¼ð' => '滕', + '¼ñ' => '潯', + '¼ò' => 'æ½ ', + '¼ó' => '潟', + '¼ô' => '熟', + '¼õ' => '熬', + '¼ö' => '熱', + '¼÷' => '熨', + '¼ø' => '牖', + '¼ù' => '犛', + '¼ú' => 'çŽ', + '¼û' => 'ç—', + '¼ü' => 'ç‘©', + '¼ý' => 'ç’‹', + '¼þ' => 'ç’ƒ', + '½@' => '瑾', + '½A' => 'ç’€', + '½B' => 'ç•¿', + '½C' => '瘠', + '½D' => '瘩', + '½E' => '瘟', + '½F' => '瘤', + '½G' => '瘦', + '½H' => '瘡', + '½I' => '瘢', + '½J' => 'çšš', + '½K' => '皺', + '½L' => '盤', + '½M' => '瞎', + '½N' => '瞇', + '½O' => '瞌', + '½P' => 'çž‘', + '½Q' => 'çž‹', + '½R' => '磋', + '½S' => '磅', + '½T' => '確', + '½U' => '磊', + '½V' => '碾', + '½W' => '磕', + '½X' => '碼', + '½Y' => 'ç£', + '½Z' => '稿', + '½[' => '稼', + '½\\' => 'ç©€', + '½]' => '稽', + '½^' => '稷', + '½_' => '稻', + '½`' => '窯', + '½a' => '窮', + '½b' => 'ç®­', + '½c' => 'ç®±', + '½d' => '範', + '½e' => 'ç®´', + '½f' => '篆', + '½g' => '篇', + '½h' => 'ç¯', + '½i' => 'ç® ', + '½j' => '篌', + '½k' => '糊', + '½l' => 'ç· ', + '½m' => 'ç·´', + '½n' => 'ç·¯', + '½o' => 'ç·»', + '½p' => 'ç·˜', + '½q' => 'ç·¬', + '½r' => 'ç·', + '½s' => 'ç·¨', + '½t' => 'ç·£', + '½u' => 'ç·š', + '½v' => 'ç·ž', + '½w' => 'ç·©', + '½x' => '綞', + '½y' => 'ç·™', + '½z' => 'ç·²', + '½{' => 'ç·¹', + '½|' => 'ç½µ', + '½}' => 'ç½·', + '½~' => '羯', + '½¡' => 'ç¿©', + '½¢' => '耦', + '½£' => '膛', + '½¤' => '膜', + '½¥' => 'è†', + '½¦' => '膠', + '½§' => '膚', + '½¨' => '膘', + '½©' => 'è”—', + '½ª' => '蔽', + '½«' => '蔚', + '½¬' => 'è“®', + '½­' => '蔬', + '½®' => 'è”­', + '½¯' => '蔓', + '½°' => '蔑', + '½±' => '蔣', + '½²' => '蔡', + '½³' => 'è””', + '½´' => '蓬', + '½µ' => '蔥', + '½¶' => 'è“¿', + '½·' => '蔆', + '½¸' => 'èž‚', + '½¹' => 'è´', + '½º' => 'è¶', + '½»' => 'è ', + '½¼' => 'è¦', + '½½' => 'è¸', + '½¾' => 'è¨', + '½¿' => 'è™', + '½À' => 'è—', + '½Á' => 'èŒ', + '½Â' => 'è“', + '½Ã' => 'è¡›', + '½Ä' => 'è¡', + '½Å' => 'è¤', + '½Æ' => '複', + '½Ç' => '褒', + '½È' => '褓', + '½É' => '褕', + '½Ê' => '褊', + '½Ë' => '誼', + '½Ì' => 'è«’', + '½Í' => '談', + '½Î' => 'è«„', + '½Ï' => '誕', + '½Ð' => 'è«‹', + '½Ñ' => '諸', + '½Ò' => '課', + '½Ó' => '諉', + '½Ô' => 'è«‚', + '½Õ' => '調', + '½Ö' => '誰', + '½×' => 'è«–', + '½Ø' => 'è«', + '½Ù' => '誶', + '½Ú' => '誹', + '½Û' => 'è«›', + '½Ü' => '豌', + '½Ý' => '豎', + '½Þ' => '豬', + '½ß' => 'è³ ', + '½à' => '賞', + '½á' => '賦', + '½â' => '賤', + '½ã' => '賬', + '½ä' => 'è³­', + '½å' => 'è³¢', + '½æ' => 'è³£', + '½ç' => '賜', + '½è' => '質', + '½é' => '賡', + '½ê' => 'èµ­', + '½ë' => '趟', + '½ì' => '趣', + '½í' => '踫', + '½î' => 'è¸', + '½ï' => 'è¸', + '½ð' => '踢', + '½ñ' => 'è¸', + '½ò' => '踩', + '½ó' => '踟', + '½ô' => '踡', + '½õ' => '踞', + '½ö' => '躺', + '½÷' => 'è¼', + '½ø' => 'è¼›', + '½ù' => '輟', + '½ú' => '輩', + '½û' => '輦', + '½ü' => '輪', + '½ý' => '輜', + '½þ' => '輞', + '¾@' => 'è¼¥', + '¾A' => 'é©', + '¾B' => 'é®', + '¾C' => 'é¨', + '¾D' => 'é­', + '¾E' => 'é·', + '¾F' => 'é„°', + '¾G' => 'é„­', + '¾H' => '鄧', + '¾I' => '鄱', + '¾J' => '醇', + '¾K' => '醉', + '¾L' => '醋', + '¾M' => '醃', + '¾N' => 'é‹…', + '¾O' => '銻', + '¾P' => '銷', + '¾Q' => '鋪', + '¾R' => '銬', + '¾S' => '鋤', + '¾T' => 'é‹', + '¾U' => '銳', + '¾V' => '銼', + '¾W' => 'é‹’', + '¾X' => '鋇', + '¾Y' => 'é‹°', + '¾Z' => '銲', + '¾[' => 'é–­', + '¾\\' => 'é–±', + '¾]' => '霄', + '¾^' => '霆', + '¾_' => '震', + '¾`' => '霉', + '¾a' => 'é ', + '¾b' => 'éž', + '¾c' => 'éž‹', + '¾d' => 'éž', + '¾e' => 'é ¡', + '¾f' => 'é «', + '¾g' => 'é œ', + '¾h' => '颳', + '¾i' => '養', + '¾j' => '餓', + '¾k' => '餒', + '¾l' => '餘', + '¾m' => 'é§', + '¾n' => 'é§', + '¾o' => '駟', + '¾p' => '駛', + '¾q' => '駑', + '¾r' => '駕', + '¾s' => '駒', + '¾t' => '駙', + '¾u' => '骷', + '¾v' => 'é«®', + '¾w' => '髯', + '¾x' => '鬧', + '¾y' => 'é­…', + '¾z' => 'é­„', + '¾{' => 'é­·', + '¾|' => 'é­¯', + '¾}' => 'é´†', + '¾~' => 'é´‰', + '¾¡' => 'é´ƒ', + '¾¢' => '麩', + '¾£' => '麾', + '¾¤' => '黎', + '¾¥' => '墨', + '¾¦' => 'é½’', + '¾§' => 'å„’', + '¾¨' => '儘', + '¾©' => 'å„”', + '¾ª' => 'å„', + '¾«' => 'å„•', + '¾¬' => '冀', + '¾­' => '冪', + '¾®' => 'å‡', + '¾¯' => '劑', + '¾°' => '劓', + '¾±' => '勳', + '¾²' => 'å™™', + '¾³' => '噫', + '¾´' => '噹', + '¾µ' => '噩', + '¾¶' => '噤', + '¾·' => '噸', + '¾¸' => '噪', + '¾¹' => '器', + '¾º' => '噥', + '¾»' => 'å™±', + '¾¼' => '噯', + '¾½' => '噬', + '¾¾' => '噢', + '¾¿' => '噶', + '¾À' => 'å£', + '¾Á' => '墾', + '¾Â' => '壇', + '¾Ã' => '壅', + '¾Ä' => '奮', + '¾Å' => 'å¬', + '¾Æ' => '嬴', + '¾Ç' => 'å­¸', + '¾È' => '寰', + '¾É' => 'å°Ž', + '¾Ê' => '彊', + '¾Ë' => '憲', + '¾Ì' => '憑', + '¾Í' => '憩', + '¾Î' => '憊', + '¾Ï' => 'æ‡', + '¾Ð' => '憶', + '¾Ñ' => '憾', + '¾Ò' => '懊', + '¾Ó' => '懈', + '¾Ô' => '戰', + '¾Õ' => 'æ“…', + '¾Ö' => 'æ“', + '¾×' => 'æ“‹', + '¾Ø' => 'æ’»', + '¾Ù' => 'æ’¼', + '¾Ú' => 'æ“š', + '¾Û' => 'æ“„', + '¾Ü' => '擇', + '¾Ý' => 'æ“‚', + '¾Þ' => 'æ“', + '¾ß' => 'æ’¿', + '¾à' => 'æ“’', + '¾á' => 'æ“”', + '¾â' => 'æ’¾', + '¾ã' => 'æ•´', + '¾ä' => '曆', + '¾å' => '曉', + '¾æ' => 'æš¹', + '¾ç' => '曄', + '¾è' => '曇', + '¾é' => '暸', + '¾ê' => '樽', + '¾ë' => '樸', + '¾ì' => '樺', + '¾í' => 'æ©™', + '¾î' => 'æ©«', + '¾ï' => '橘', + '¾ð' => '樹', + '¾ñ' => 'æ©„', + '¾ò' => 'æ©¢', + '¾ó' => 'æ©¡', + '¾ô' => 'æ©‹', + '¾õ' => '橇', + '¾ö' => '樵', + '¾÷' => 'æ©Ÿ', + '¾ø' => '橈', + '¾ù' => 'æ­™', + '¾ú' => 'æ­·', + '¾û' => 'æ°…', + '¾ü' => 'æ¿‚', + '¾ý' => 'æ¾±', + '¾þ' => '澡', + '¿@' => '濃', + '¿A' => '澤', + '¿B' => 'æ¿', + '¿C' => '澧', + '¿D' => 'æ¾³', + '¿E' => 'æ¿€', + '¿F' => 'æ¾¹', + '¿G' => '澶', + '¿H' => '澦', + '¿I' => 'æ¾ ', + '¿J' => 'æ¾´', + '¿K' => '熾', + '¿L' => '燉', + '¿M' => 'ç‡', + '¿N' => '燒', + '¿O' => '燈', + '¿P' => '燕', + '¿Q' => '熹', + '¿R' => '燎', + '¿S' => '燙', + '¿T' => '燜', + '¿U' => '燃', + '¿V' => '燄', + '¿W' => 'ç¨', + '¿X' => 'ç’œ', + '¿Y' => 'ç’£', + '¿Z' => 'ç’˜', + '¿[' => 'ç’Ÿ', + '¿\\' => 'ç’ž', + '¿]' => 'ç“¢', + '¿^' => '甌', + '¿_' => 'ç”', + '¿`' => '瘴', + '¿a' => '瘸', + '¿b' => '瘺', + '¿c' => '盧', + '¿d' => '盥', + '¿e' => 'çž ', + '¿f' => 'çžž', + '¿g' => '瞟', + '¿h' => '瞥', + '¿i' => '磨', + '¿j' => '磚', + '¿k' => '磬', + '¿l' => '磧', + '¿m' => '禦', + '¿n' => 'ç©', + '¿o' => 'ç©Ž', + '¿p' => '穆', + '¿q' => 'ç©Œ', + '¿r' => 'ç©‹', + '¿s' => '窺', + '¿t' => '篙', + '¿u' => 'ç°‘', + '¿v' => '築', + '¿w' => '篤', + '¿x' => '篛', + '¿y' => '篡', + '¿z' => '篩', + '¿{' => '篦', + '¿|' => '糕', + '¿}' => 'ç³–', + '¿~' => '縊', + '¿¡' => '縑', + '¿¢' => '縈', + '¿£' => '縛', + '¿¤' => '縣', + '¿¥' => '縞', + '¿¦' => 'ç¸', + '¿§' => '縉', + '¿¨' => 'ç¸', + '¿©' => 'ç½¹', + '¿ª' => 'ç¾²', + '¿«' => 'ç¿°', + '¿¬' => '翱', + '¿­' => 'ç¿®', + '¿®' => '耨', + '¿¯' => '膳', + '¿°' => '膩', + '¿±' => '膨', + '¿²' => '臻', + '¿³' => '興', + '¿´' => '艘', + '¿µ' => '艙', + '¿¶' => 'è•Š', + '¿·' => 'è•™', + '¿¸' => '蕈', + '¿¹' => '蕨', + '¿º' => 'è•©', + '¿»' => '蕃', + '¿¼' => '蕉', + '¿½' => 'è•­', + '¿¾' => '蕪', + '¿¿' => 'è•ž', + '¿À' => '螃', + '¿Á' => '螟', + '¿Â' => 'èžž', + '¿Ã' => '螢', + '¿Ä' => 'èž', + '¿Å' => 'è¡¡', + '¿Æ' => '褪', + '¿Ç' => '褲', + '¿È' => '褥', + '¿É' => '褫', + '¿Ê' => '褡', + '¿Ë' => '親', + '¿Ì' => '覦', + '¿Í' => '諦', + '¿Î' => '諺', + '¿Ï' => 'è««', + '¿Ð' => '諱', + '¿Ñ' => '謀', + '¿Ò' => 'è«œ', + '¿Ó' => '諧', + '¿Ô' => 'è«®', + '¿Õ' => '諾', + '¿Ö' => 'è¬', + '¿×' => '謂', + '¿Ø' => 'è«·', + '¿Ù' => 'è«­', + '¿Ú' => '諳', + '¿Û' => '諶', + '¿Ü' => '諼', + '¿Ý' => '豫', + '¿Þ' => 'è±­', + '¿ß' => '貓', + '¿à' => 'è³´', + '¿á' => '蹄', + '¿â' => '踱', + '¿ã' => '踴', + '¿ä' => '蹂', + '¿å' => '踹', + '¿æ' => '踵', + '¿ç' => 'è¼»', + '¿è' => '輯', + '¿é' => '輸', + '¿ê' => 'è¼³', + '¿ë' => '辨', + '¿ì' => '辦', + '¿í' => 'éµ', + '¿î' => 'é´', + '¿ï' => 'é¸', + '¿ð' => 'é²', + '¿ñ' => 'é¼', + '¿ò' => 'éº', + '¿ó' => 'é„´', + '¿ô' => '醒', + '¿õ' => '錠', + '¿ö' => '錶', + '¿÷' => '鋸', + '¿ø' => '錳', + '¿ù' => '錯', + '¿ú' => '錢', + '¿û' => '鋼', + '¿ü' => '錫', + '¿ý' => '錄', + '¿þ' => '錚', + 'À@' => 'éŒ', + 'ÀA' => '錦', + 'ÀB' => '錡', + 'ÀC' => '錕', + 'ÀD' => '錮', + 'ÀE' => '錙', + 'ÀF' => 'é–»', + 'ÀG' => '隧', + 'ÀH' => '隨', + 'ÀI' => '險', + 'ÀJ' => '雕', + 'ÀK' => '霎', + 'ÀL' => '霑', + 'ÀM' => '霖', + 'ÀN' => 'éœ', + 'ÀO' => '霓', + 'ÀP' => 'éœ', + 'ÀQ' => 'é›', + 'ÀR' => 'éœ', + 'ÀS' => 'é¦', + 'ÀT' => '鞘', + 'ÀU' => 'é °', + 'ÀV' => 'é ¸', + 'ÀW' => 'é »', + 'ÀX' => 'é ·', + 'ÀY' => 'é ­', + 'ÀZ' => 'é ¹', + 'À[' => 'é ¤', + 'À\\' => 'é¤', + 'À]' => '館', + 'À^' => '餞', + 'À_' => '餛', + 'À`' => '餡', + 'Àa' => '餚', + 'Àb' => '駭', + 'Àc' => '駢', + 'Àd' => '駱', + 'Àe' => '骸', + 'Àf' => '骼', + 'Àg' => 'é«»', + 'Àh' => 'é«­', + 'Ài' => '鬨', + 'Àj' => '鮑', + 'Àk' => 'é´•', + 'Àl' => 'é´£', + 'Àm' => 'é´¦', + 'Àn' => 'é´¨', + 'Ào' => 'é´’', + 'Àp' => 'é´›', + 'Àq' => '默', + 'Àr' => 'é»”', + 'Às' => 'é¾', + 'Àt' => '龜', + 'Àu' => '優', + 'Àv' => 'å„Ÿ', + 'Àw' => 'å„¡', + 'Àx' => '儲', + 'Ày' => '勵', + 'Àz' => '嚎', + 'À{' => '嚀', + 'À|' => 'åš', + 'À}' => 'åš…', + 'À~' => '嚇', + 'À¡' => 'åš', + 'À¢' => '壕', + 'À£' => '壓', + 'À¤' => '壑', + 'À¥' => '壎', + 'À¦' => '嬰', + 'À§' => '嬪', + 'À¨' => '嬤', + 'À©' => 'å­º', + 'Àª' => 'å°·', + 'À«' => '屨', + 'À¬' => '嶼', + 'À­' => '嶺', + 'À®' => '嶽', + 'À¯' => '嶸', + 'À°' => '幫', + 'À±' => '彌', + 'À²' => 'å¾½', + 'À³' => '應', + 'À´' => '懂', + 'Àµ' => '懇', + 'À¶' => '懦', + 'À·' => '懋', + 'À¸' => '戲', + 'À¹' => '戴', + 'Àº' => 'æ“Ž', + 'À»' => 'æ“Š', + 'À¼' => '擘', + 'À½' => 'æ“ ', + 'À¾' => 'æ“°', + 'À¿' => '擦', + 'ÀÀ' => '擬', + 'ÀÁ' => '擱', + 'ÀÂ' => 'æ“¢', + 'ÀÃ' => 'æ“­', + 'ÀÄ' => 'æ–‚', + 'ÀÅ' => 'æ–ƒ', + 'ÀÆ' => 'æ›™', + 'ÀÇ' => 'æ›–', + 'ÀÈ' => '檀', + 'ÀÉ' => '檔', + 'ÀÊ' => '檄', + 'ÀË' => '檢', + 'ÀÌ' => '檜', + 'ÀÍ' => 'æ«›', + 'ÀÎ' => '檣', + 'ÀÏ' => '橾', + 'ÀÐ' => '檗', + 'ÀÑ' => 'æª', + 'ÀÒ' => '檠', + 'ÀÓ' => 'æ­œ', + 'ÀÔ' => 'æ®®', + 'ÀÕ' => '毚', + 'ÀÖ' => 'æ°ˆ', + 'À×' => '濘', + 'ÀØ' => '濱', + 'ÀÙ' => 'æ¿Ÿ', + 'ÀÚ' => 'æ¿ ', + 'ÀÛ' => 'æ¿›', + 'ÀÜ' => '濤', + 'ÀÝ' => 'æ¿«', + 'ÀÞ' => '濯', + 'Àß' => 'æ¾€', + 'Àà' => '濬', + 'Àá' => 'æ¿¡', + 'Àâ' => 'æ¿©', + 'Àã' => 'æ¿•', + 'Àä' => 'æ¿®', + 'Àå' => 'æ¿°', + 'Àæ' => '燧', + 'Àç' => '營', + 'Àè' => '燮', + 'Àé' => '燦', + 'Àê' => '燥', + 'Àë' => '燭', + 'Àì' => '燬', + 'Àí' => '燴', + 'Àî' => '燠', + 'Àï' => '爵', + 'Àð' => '牆', + 'Àñ' => 'ç°', + 'Àò' => 'ç²', + 'Àó' => 'ç’©', + 'Àô' => 'ç’°', + 'Àõ' => 'ç’¦', + 'Àö' => 'ç’¨', + 'À÷' => '癆', + 'Àø' => '療', + 'Àù' => '癌', + 'Àú' => '盪', + 'Àû' => 'çž³', + 'Àü' => '瞪', + 'Àý' => 'çž°', + 'Àþ' => '瞬', + 'Á@' => '瞧', + 'ÁA' => 'çž­', + 'ÁB' => '矯', + 'ÁC' => '磷', + 'ÁD' => '磺', + 'ÁE' => '磴', + 'ÁF' => '磯', + 'ÁG' => 'ç¤', + 'ÁH' => '禧', + 'ÁI' => '禪', + 'ÁJ' => 'ç©—', + 'ÁK' => '窿', + 'ÁL' => 'ç°‡', + 'ÁM' => 'ç°', + 'ÁN' => '篾', + 'ÁO' => '篷', + 'ÁP' => 'ç°Œ', + 'ÁQ' => '篠', + 'ÁR' => 'ç³ ', + 'ÁS' => '糜', + 'ÁT' => '糞', + 'ÁU' => 'ç³¢', + 'ÁV' => '糟', + 'ÁW' => 'ç³™', + 'ÁX' => 'ç³', + 'ÁY' => '縮', + 'ÁZ' => '績', + 'Á[' => '繆', + 'Á\\' => '縷', + 'Á]' => '縲', + 'Á^' => '繃', + 'Á_' => '縫', + 'Á`' => '總', + 'Áa' => '縱', + 'Áb' => 'ç¹…', + 'Ác' => 'ç¹', + 'Ád' => '縴', + 'Áe' => '縹', + 'Áf' => '繈', + 'Ág' => '縵', + 'Áh' => '縿', + 'Ái' => '縯', + 'Áj' => '罄', + 'Ák' => '翳', + 'Ál' => '翼', + 'Ám' => 'è±', + 'Án' => 'è²', + 'Áo' => 'è°', + 'Áp' => 'è¯', + 'Áq' => 'è³', + 'Ár' => '臆', + 'Ás' => '臃', + 'Át' => '膺', + 'Áu' => '臂', + 'Áv' => '臀', + 'Áw' => '膿', + 'Áx' => '膽', + 'Áy' => '臉', + 'Áz' => '膾', + 'Á{' => '臨', + 'Á|' => '舉', + 'Á}' => '艱', + 'Á~' => 'è–ª', + 'Á¡' => 'è–„', + 'Á¢' => '蕾', + 'Á£' => 'è–œ', + 'Á¤' => 'è–‘', + 'Á¥' => 'è–”', + 'Á¦' => 'è–¯', + 'Á§' => 'è–›', + 'Á¨' => 'è–‡', + 'Á©' => 'è–¨', + 'Áª' => 'è–Š', + 'Á«' => '虧', + 'Á¬' => '蟀', + 'Á­' => '蟑', + 'Á®' => 'èž³', + 'Á¯' => '蟒', + 'Á°' => '蟆', + 'Á±' => 'èž«', + 'Á²' => 'èž»', + 'Á³' => '螺', + 'Á´' => '蟈', + 'Áµ' => '蟋', + 'Á¶' => '褻', + 'Á·' => '褶', + 'Á¸' => '襄', + 'Á¹' => '褸', + 'Áº' => '褽', + 'Á»' => '覬', + 'Á¼' => '謎', + 'Á½' => '謗', + 'Á¾' => '謙', + 'Á¿' => '講', + 'ÁÀ' => '謊', + 'ÁÁ' => '謠', + 'ÁÂ' => 'è¬', + 'ÁÃ' => '謄', + 'ÁÄ' => 'è¬', + 'ÁÅ' => 'è±', + 'ÁÆ' => 'è°¿', + 'ÁÇ' => 'è±³', + 'ÁÈ' => '賺', + 'ÁÉ' => 'è³½', + 'ÁÊ' => 'è³¼', + 'ÁË' => '賸', + 'ÁÌ' => 'è³»', + 'ÁÍ' => '趨', + 'ÁÎ' => '蹉', + 'ÁÏ' => '蹋', + 'ÁÐ' => '蹈', + 'ÁÑ' => '蹊', + 'ÁÒ' => '轄', + 'ÁÓ' => 'è¼¾', + 'ÁÔ' => '轂', + 'ÁÕ' => 'è½…', + 'ÁÖ' => '輿', + 'Á×' => 'é¿', + 'ÁØ' => 'é½', + 'ÁÙ' => 'é‚„', + 'ÁÚ' => 'é‚', + 'ÁÛ' => 'é‚‚', + 'ÁÜ' => 'é‚€', + 'ÁÝ' => '鄹', + 'ÁÞ' => '醣', + 'Áß' => '醞', + 'Áà' => '醜', + 'Áá' => 'é', + 'Áâ' => '鎂', + 'Áã' => '錨', + 'Áä' => 'éµ', + 'Áå' => 'éŠ', + 'Áæ' => 'é¥', + 'Áç' => 'é‹', + 'Áè' => '錘', + 'Áé' => 'é¾', + 'Áê' => 'é¬', + 'Áë' => 'é›', + 'Áì' => 'é°', + 'Áí' => 'éš', + 'Áî' => 'é”', + 'Áï' => 'é—Š', + 'Áð' => 'é—‹', + 'Áñ' => 'é—Œ', + 'Áò' => 'é—ˆ', + 'Áó' => 'é—†', + 'Áô' => 'éš±', + 'Áõ' => '隸', + 'Áö' => 'é›–', + 'Á÷' => '霜', + 'Áø' => '霞', + 'Áù' => 'éž ', + 'Áú' => '韓', + 'Áû' => '顆', + 'Áü' => '颶', + 'Áý' => '餵', + 'Áþ' => 'é¨', + 'Â@' => '駿', + 'ÂA' => 'é®®', + 'ÂB' => '鮫', + 'ÂC' => '鮪', + 'ÂD' => 'é®­', + 'ÂE' => 'é´»', + 'ÂF' => 'é´¿', + 'ÂG' => '麋', + 'ÂH' => 'é»', + 'ÂI' => '點', + 'ÂJ' => '黜', + 'ÂK' => 'é»', + 'ÂL' => 'é»›', + 'ÂM' => 'é¼¾', + 'ÂN' => '齋', + 'ÂO' => 'å¢', + 'ÂP' => 'åš•', + 'ÂQ' => 'åš®', + 'ÂR' => '壙', + 'ÂS' => '壘', + 'ÂT' => '嬸', + 'ÂU' => 'å½', + 'ÂV' => '懣', + 'ÂW' => '戳', + 'ÂX' => 'æ“´', + 'ÂY' => '擲', + 'ÂZ' => '擾', + 'Â[' => '攆', + 'Â\\' => '擺', + 'Â]' => 'æ“»', + 'Â^' => 'æ“·', + 'Â_' => 'æ–·', + 'Â`' => '曜', + 'Âa' => '朦', + 'Âb' => '檳', + 'Âc' => '檬', + 'Âd' => '櫃', + 'Âe' => '檻', + 'Âf' => '檸', + 'Âg' => 'æ«‚', + 'Âh' => '檮', + 'Âi' => '檯', + 'Âj' => 'æ­Ÿ', + 'Âk' => 'æ­¸', + 'Âl' => '殯', + 'Âm' => '瀉', + 'Ân' => '瀋', + 'Âo' => '濾', + 'Âp' => '瀆', + 'Âq' => '濺', + 'Âr' => '瀑', + 'Âs' => 'ç€', + 'Ât' => '燻', + 'Âu' => '燼', + 'Âv' => '燾', + 'Âw' => '燸', + 'Âx' => 'ç·', + 'Ây' => 'çµ', + 'Âz' => 'ç’§', + 'Â{' => 'ç’¿', + 'Â|' => '甕', + 'Â}' => 'ç™–', + 'Â~' => '癘', + '¡' => 'ç™’', + '¢' => 'çž½', + '£' => 'çž¿', + '¤' => 'çž»', + 'Â¥' => 'çž¼', + '¦' => '礎', + '§' => '禮', + '¨' => 'ç©¡', + '©' => 'ç©¢', + 'ª' => 'ç© ', + '«' => 'ç«„', + '¬' => 'ç«…', + '­' => 'ç°«', + '®' => 'ç°§', + '¯' => 'ç°ª', + '°' => 'ç°ž', + '±' => 'ç°£', + '²' => 'ç°¡', + '³' => '糧', + '´' => 'ç¹”', + 'µ' => '繕', + '¶' => '繞', + '·' => '繚', + '¸' => '繡', + '¹' => 'ç¹’', + 'º' => 'ç¹™', + '»' => '罈', + '¼' => '翹', + '½' => 'ç¿»', + '¾' => 'è·', + '¿' => 'è¶', + 'ÂÀ' => 'è‡', + 'ÂÁ' => 'è‡', + 'ÂÂ' => '舊', + 'ÂÃ' => 'è—', + 'ÂÄ' => 'è–©', + 'ÂÅ' => 'è—', + 'ÂÆ' => 'è—', + 'ÂÇ' => 'è—‰', + 'ÂÈ' => 'è–°', + 'ÂÉ' => 'è–º', + 'ÂÊ' => 'è–¹', + 'ÂË' => 'è–¦', + 'ÂÌ' => '蟯', + 'ÂÍ' => '蟬', + 'ÂÎ' => '蟲', + 'ÂÏ' => '蟠', + 'ÂÐ' => '覆', + 'ÂÑ' => '覲', + 'ÂÒ' => '觴', + 'ÂÓ' => '謨', + 'ÂÔ' => '謹', + 'ÂÕ' => '謬', + 'ÂÖ' => '謫', + 'Â×' => 'è±', + 'ÂØ' => 'è´…', + 'ÂÙ' => 'è¹™', + 'ÂÚ' => 'è¹£', + 'ÂÛ' => '蹦', + 'ÂÜ' => '蹤', + 'ÂÝ' => '蹟', + 'ÂÞ' => '蹕', + 'Âß' => '軀', + 'Âà' => '轉', + 'Âá' => 'è½', + 'Ââ' => '邇', + 'Âã' => '邃', + 'Âä' => '邈', + 'Âå' => '醫', + 'Âæ' => '醬', + 'Âç' => 'é‡', + 'Âè' => '鎔', + 'Âé' => '鎊', + 'Âê' => '鎖', + 'Âë' => '鎢', + 'Âì' => '鎳', + 'Âí' => '鎮', + 'Âî' => '鎬', + 'Âï' => '鎰', + 'Âð' => '鎘', + 'Âñ' => '鎚', + 'Âò' => '鎗', + 'Âó' => 'é—”', + 'Âô' => 'é—–', + 'Âõ' => 'é—', + 'Âö' => 'é—•', + 'Â÷' => '離', + 'Âø' => '雜', + 'Âù' => 'é›™', + 'Âú' => 'é››', + 'Âû' => '雞', + 'Âü' => '霤', + 'Âý' => '鞣', + 'Âþ' => '鞦', + 'Ã@' => 'éž­', + 'ÃA' => '韹', + 'ÃB' => 'é¡', + 'ÃC' => 'é¡', + 'ÃD' => 'é¡Œ', + 'ÃE' => 'é¡Ž', + 'ÃF' => 'é¡“', + 'ÃG' => '颺', + 'ÃH' => '餾', + 'ÃI' => '餿', + 'ÃJ' => '餽', + 'ÃK' => '餮', + 'ÃL' => '馥', + 'ÃM' => '騎', + 'ÃN' => 'é«', + 'ÃO' => '鬃', + 'ÃP' => '鬆', + 'ÃQ' => 'é­', + 'ÃR' => 'é­Ž', + 'ÃS' => 'é­', + 'ÃT' => '鯊', + 'ÃU' => '鯉', + 'ÃV' => '鯽', + 'ÃW' => '鯈', + 'ÃX' => '鯀', + 'ÃY' => '鵑', + 'ÃZ' => 'éµ', + 'Ã[' => 'éµ ', + 'Ã\\' => 'é» ', + 'Ã]' => '鼕', + 'Ã^' => '鼬', + 'Ã_' => '儳', + 'Ã`' => '嚥', + 'Ãa' => '壞', + 'Ãb' => '壟', + 'Ãc' => '壢', + 'Ãd' => '寵', + 'Ãe' => 'é¾', + 'Ãf' => '廬', + 'Ãg' => '懲', + 'Ãh' => '懷', + 'Ãi' => '懶', + 'Ãj' => '懵', + 'Ãk' => '攀', + 'Ãl' => 'æ”', + 'Ãm' => 'æ› ', + 'Ãn' => 'æ›', + 'Ão' => 'æ«¥', + 'Ãp' => 'æ«', + 'Ãq' => 'æ«š', + 'Ãr' => 'æ«“', + 'Ãs' => '瀛', + 'Ãt' => '瀟', + 'Ãu' => '瀨', + 'Ãv' => '瀚', + 'Ãw' => 'ç€', + 'Ãx' => '瀕', + 'Ãy' => '瀘', + 'Ãz' => '爆', + 'Ã{' => 'çˆ', + 'Ã|' => '牘', + 'Ã}' => '犢', + 'Ã~' => 'ç¸', + 'á' => 'çº', + 'â' => 'ç’½', + 'ã' => 'ç“Š', + 'ä' => 'ç“£', + 'Ã¥' => 'ç–‡', + 'æ' => 'ç–†', + 'ç' => '癟', + 'è' => '癡', + 'é' => '矇', + 'ê' => '礙', + 'ë' => '禱', + 'ì' => 'ç©«', + 'í' => 'ç©©', + 'î' => 'ç°¾', + 'ï' => 'ç°¿', + 'ð' => 'ç°¸', + 'ñ' => 'ç°½', + 'ò' => 'ç°·', + 'ó' => 'ç±€', + 'ô' => '繫', + 'õ' => 'ç¹­', + 'ö' => 'ç¹¹', + '÷' => '繩', + 'ø' => '繪', + 'ù' => 'ç¾…', + 'ú' => 'ç¹³', + 'û' => '羶', + 'ü' => 'ç¾¹', + 'ý' => '羸', + 'þ' => '臘', + 'ÿ' => 'è—©', + 'ÃÀ' => 'è—', + 'ÃÁ' => 'è—ª', + 'ÃÂ' => 'è—•', + 'ÃÃ' => 'è—¤', + 'ÃÄ' => 'è—¥', + 'ÃÅ' => 'è—·', + 'ÃÆ' => '蟻', + 'ÃÇ' => 'è …', + 'ÃÈ' => 'è ', + 'ÃÉ' => '蟹', + 'ÃÊ' => '蟾', + 'ÃË' => '襠', + 'ÃÌ' => '襟', + 'ÃÍ' => '襖', + 'ÃÎ' => '襞', + 'ÃÏ' => 'è­', + 'ÃÐ' => 'è­œ', + 'ÃÑ' => 'è­˜', + 'ÃÒ' => 'è­‰', + 'ÃÓ' => 'è­š', + 'ÃÔ' => 'è­Ž', + 'ÃÕ' => 'è­', + 'ÃÖ' => 'è­†', + 'Ã×' => 'è­™', + 'ÃØ' => 'è´ˆ', + 'ÃÙ' => 'è´Š', + 'ÃÚ' => 'è¹¼', + 'ÃÛ' => 'è¹²', + 'ÃÜ' => '躇', + 'ÃÝ' => '蹶', + 'ÃÞ' => '蹬', + 'Ãß' => '蹺', + 'Ãà' => 'è¹´', + 'Ãá' => 'è½”', + 'Ãâ' => '轎', + 'Ãã' => 'è¾­', + 'Ãä' => 'é‚Š', + 'Ãå' => 'é‚‹', + 'Ãæ' => '醱', + 'Ãç' => '醮', + 'Ãè' => 'é¡', + 'Ãé' => 'é‘', + 'Ãê' => 'éŸ', + 'Ãë' => 'éƒ', + 'Ãì' => 'éˆ', + 'Ãí' => 'éœ', + 'Ãî' => 'é', + 'Ãï' => 'é–', + 'Ãð' => 'é¢', + 'Ãñ' => 'é', + 'Ãò' => 'é˜', + 'Ãó' => 'é¤', + 'Ãô' => 'é—', + 'Ãõ' => 'é¨', + 'Ãö' => 'é—œ', + 'Ã÷' => 'éš´', + 'Ãø' => '難', + 'Ãù' => '霪', + 'Ãú' => '霧', + 'Ãû' => 'é¡', + 'Ãü' => '韜', + 'Ãý' => '韻', + 'Ãþ' => 'é¡ž', + 'Ä@' => '願', + 'ÄA' => 'é¡›', + 'ÄB' => '颼', + 'ÄC' => '饅', + 'ÄD' => '饉', + 'ÄE' => '騖', + 'ÄF' => '騙', + 'ÄG' => 'é¬', + 'ÄH' => '鯨', + 'ÄI' => '鯧', + 'ÄJ' => '鯖', + 'ÄK' => '鯛', + 'ÄL' => '鶉', + 'ÄM' => '鵡', + 'ÄN' => 'éµ²', + 'ÄO' => '鵪', + 'ÄP' => '鵬', + 'ÄQ' => '麒', + 'ÄR' => '麗', + 'ÄS' => '麓', + 'ÄT' => '麴', + 'ÄU' => '勸', + 'ÄV' => '嚨', + 'ÄW' => 'åš·', + 'ÄX' => '嚶', + 'ÄY' => 'åš´', + 'ÄZ' => 'åš¼', + 'Ä[' => '壤', + 'Ä\\' => 'å­€', + 'Ä]' => 'å­ƒ', + 'Ä^' => 'å­½', + 'Ä_' => '寶', + 'Ä`' => 'å·‰', + 'Äa' => '懸', + 'Äb' => '懺', + 'Äc' => '攘', + 'Äd' => 'æ””', + 'Äe' => 'æ”™', + 'Äf' => '曦', + 'Äg' => '朧', + 'Äh' => '櫬', + 'Äi' => '瀾', + 'Äj' => '瀰', + 'Äk' => '瀲', + 'Äl' => 'çˆ', + 'Äm' => 'ç»', + 'Än' => 'ç“', + 'Äo' => '癢', + 'Äp' => '癥', + 'Äq' => '礦', + 'Är' => '礪', + 'Äs' => '礬', + 'Ät' => '礫', + 'Äu' => '竇', + 'Äv' => '競', + 'Äw' => '籌', + 'Äx' => '籃', + 'Äy' => 'ç±', + 'Äz' => '糯', + 'Ä{' => 'ç³°', + 'Ä|' => 'è¾®', + 'Ä}' => 'ç¹½', + 'Ä~' => 'ç¹¼', + 'Ä¡' => '纂', + 'Ä¢' => '罌', + 'Ä£' => '耀', + 'Ĥ' => '臚', + 'Ä¥' => '艦', + 'Ħ' => 'è—»', + 'ħ' => 'è—¹', + 'Ĩ' => '蘑', + 'Ä©' => 'è—º', + 'Ī' => '蘆', + 'Ä«' => '蘋', + 'Ĭ' => '蘇', + 'Ä­' => '蘊', + 'Ä®' => 'è ”', + 'į' => 'è •', + 'Ä°' => '襤', + 'ı' => '覺', + 'IJ' => '觸', + 'ij' => 'è­°', + 'Ä´' => 'è­¬', + 'ĵ' => 'è­¦', + 'Ķ' => 'è­¯', + 'Ä·' => 'è­Ÿ', + 'ĸ' => 'è­«', + 'Ĺ' => 'è´', + 'ĺ' => 'è´', + 'Ä»' => '躉', + 'ļ' => 'èº', + 'Ľ' => '躅', + 'ľ' => '躂', + 'Ä¿' => '醴', + 'ÄÀ' => '釋', + 'ÄÁ' => 'é˜', + 'ÄÂ' => 'éƒ', + 'ÄÃ' => 'é½', + 'ÄÄ' => 'é—¡', + 'ÄÅ' => '霰', + 'ÄÆ' => '飄', + 'ÄÇ' => '饒', + 'ÄÈ' => '饑', + 'ÄÉ' => '馨', + 'ÄÊ' => '騫', + 'ÄË' => '騰', + 'ÄÌ' => '騷', + 'ÄÍ' => '騵', + 'ÄÎ' => 'é°“', + 'ÄÏ' => 'é°', + 'ÄÐ' => 'é¹¹', + 'ÄÑ' => '麵', + 'ÄÒ' => '黨', + 'ÄÓ' => '鼯', + 'ÄÔ' => '齟', + 'ÄÕ' => 'é½£', + 'ÄÖ' => '齡', + 'Ä×' => 'å„·', + 'ÄØ' => '儸', + 'ÄÙ' => 'å›', + 'ÄÚ' => '囀', + 'ÄÛ' => '囂', + 'ÄÜ' => '夔', + 'ÄÝ' => '屬', + 'ÄÞ' => 'å·', + 'Äß' => '懼', + 'Äà' => '懾', + 'Äá' => 'æ”', + 'Äâ' => '攜', + 'Äã' => 'æ–•', + 'Ää' => '曩', + 'Äå' => 'æ«»', + 'Äæ' => '欄', + 'Äç' => '櫺', + 'Äè' => '殲', + 'Äé' => 'çŒ', + 'Äê' => '爛', + 'Äë' => '犧', + 'Äì' => 'ç“–', + 'Äí' => 'ç“”', + 'Äî' => '癩', + 'Äï' => '矓', + 'Äð' => 'ç±', + 'Äñ' => 'çº', + 'Äò' => '續', + 'Äó' => 'ç¾¼', + 'Äô' => '蘗', + 'Äõ' => '蘭', + 'Äö' => '蘚', + 'Ä÷' => 'è £', + 'Äø' => 'è ¢', + 'Äù' => 'è ¡', + 'Äú' => 'è Ÿ', + 'Äû' => '襪', + 'Äü' => '襬', + 'Äý' => '覽', + 'Äþ' => 'è­´', + 'Å@' => 'è­·', + 'ÅA' => 'è­½', + 'ÅB' => 'è´“', + 'ÅC' => '躊', + 'ÅD' => 'èº', + 'ÅE' => '躋', + 'ÅF' => '轟', + 'ÅG' => '辯', + 'ÅH' => '醺', + 'ÅI' => 'é®', + 'ÅJ' => 'é³', + 'ÅK' => 'éµ', + 'ÅL' => 'éº', + 'ÅM' => 'é¸', + 'ÅN' => 'é²', + 'ÅO' => 'é«', + 'ÅP' => 'é—¢', + 'ÅQ' => '霸', + 'ÅR' => '霹', + 'ÅS' => '露', + 'ÅT' => '響', + 'ÅU' => '顧', + 'ÅV' => 'é¡¥', + 'ÅW' => '饗', + 'ÅX' => 'é©…', + 'ÅY' => '驃', + 'ÅZ' => 'é©€', + 'Å[' => '騾', + 'Å\\' => 'é«', + 'Å]' => 'é­”', + 'Å^' => 'é­‘', + 'Å_' => 'é°­', + 'Å`' => 'é°¥', + 'Åa' => '鶯', + 'Åb' => '鶴', + 'Åc' => 'é·‚', + 'Åd' => '鶸', + 'Åe' => 'éº', + 'Åf' => '黯', + 'Åg' => 'é¼™', + 'Åh' => '齜', + 'Åi' => '齦', + 'Åj' => '齧', + 'Åk' => '儼', + 'Ål' => 'å„»', + 'Åm' => '囈', + 'Ån' => '囊', + 'Åo' => '囉', + 'Åp' => 'å­¿', + 'Åq' => 'å·”', + 'År' => 'å·’', + 'Ås' => '彎', + 'Åt' => '懿', + 'Åu' => '攤', + 'Åv' => '權', + 'Åw' => 'æ­¡', + 'Åx' => 'ç‘', + 'Åy' => 'ç˜', + 'Åz' => '玀', + 'Å{' => '瓤', + 'Å|' => 'ç–Š', + 'Å}' => 'ç™®', + 'Å~' => '癬', + 'Å¡' => '禳', + 'Å¢' => 'ç± ', + 'Å£' => '籟', + 'Ť' => 'è¾', + 'Å¥' => 'è½', + 'Ŧ' => '臟', + 'ŧ' => '襲', + 'Ũ' => '襯', + 'Å©' => '觼', + 'Ū' => '讀', + 'Å«' => 'è´–', + 'Ŭ' => 'è´—', + 'Å­' => '躑', + 'Å®' => '躓', + 'ů' => '轡', + 'Å°' => 'é…ˆ', + 'ű' => 'é‘„', + 'Ų' => 'é‘‘', + 'ų' => 'é‘’', + 'Å´' => '霽', + 'ŵ' => '霾', + 'Ŷ' => '韃', + 'Å·' => 'éŸ', + 'Ÿ' => 'é¡«', + 'Ź' => '饕', + 'ź' => 'é©•', + 'Å»' => 'é©', + 'ż' => 'é«’', + 'Ž' => '鬚', + 'ž' => '鱉', + 'Å¿' => 'é°±', + 'ÅÀ' => 'é°¾', + 'ÅÁ' => 'é°»', + 'ÅÂ' => 'é·“', + 'ÅÃ' => 'é·—', + 'ÅÄ' => 'é¼´', + 'ÅÅ' => '齬', + 'ÅÆ' => '齪', + 'ÅÇ' => 'é¾”', + 'ÅÈ' => '囌', + 'ÅÉ' => 'å·–', + 'ÅÊ' => '戀', + 'ÅË' => '攣', + 'ÅÌ' => '攫', + 'ÅÍ' => '攪', + 'ÅÎ' => '曬', + 'ÅÏ' => 'æ¬', + 'ÅÐ' => 'ç“š', + 'ÅÑ' => 'ç«Š', + 'ÅÒ' => '籤', + 'ÅÓ' => 'ç±£', + 'ÅÔ' => 'ç±¥', + 'ÅÕ' => '纓', + 'ÅÖ' => '纖', + 'Å×' => '纔', + 'ÅØ' => '臢', + 'ÅÙ' => '蘸', + 'ÅÚ' => '蘿', + 'ÅÛ' => 'è ±', + 'ÅÜ' => '變', + 'ÅÝ' => 'é‚', + 'ÅÞ' => 'é‚', + 'Åß' => 'é‘£', + 'Åà' => 'é‘ ', + 'Åá' => '鑤', + 'Åâ' => 'é¨', + 'Åã' => '顯', + 'Åä' => '饜', + 'Åå' => 'é©š', + 'Åæ' => 'é©›', + 'Åç' => 'é©—', + 'Åè' => 'é«“', + 'Åé' => 'é«”', + 'Åê' => 'é«‘', + 'Åë' => 'é±”', + 'Åì' => 'é±—', + 'Åí' => 'é±–', + 'Åî' => 'é·¥', + 'Åï' => '麟', + 'Åð' => 'é»´', + 'Åñ' => '囑', + 'Åò' => '壩', + 'Åó' => '攬', + 'Åô' => 'çž', + 'Åõ' => 'ç™±', + 'Åö' => '癲', + 'Å÷' => '矗', + 'Åø' => 'ç½', + 'Åù' => '羈', + 'Åú' => 'è ¶', + 'Åû' => 'è ¹', + 'Åü' => 'è¡¢', + 'Åý' => '讓', + 'Åþ' => 'è®’', + 'Æ@' => 'è®–', + 'ÆA' => '艷', + 'ÆB' => 'è´›', + 'ÆC' => '釀', + 'ÆD' => '鑪', + 'ÆE' => 'é‚', + 'ÆF' => 'éˆ', + 'ÆG' => 'é„', + 'ÆH' => '韆', + 'ÆI' => 'é¡°', + 'ÆJ' => 'é©Ÿ', + 'ÆK' => '鬢', + 'ÆL' => 'é­˜', + 'ÆM' => '鱟', + 'ÆN' => 'é·¹', + 'ÆO' => 'é·º', + 'ÆP' => 'é¹¼', + 'ÆQ' => 'é¹½', + 'ÆR' => '鼇', + 'ÆS' => 'é½·', + 'ÆT' => 'é½²', + 'ÆU' => '廳', + 'ÆV' => '欖', + 'ÆW' => 'ç£', + 'ÆX' => '籬', + 'ÆY' => 'ç±®', + 'ÆZ' => 'è »', + 'Æ[' => '觀', + 'Æ\\' => '躡', + 'Æ]' => 'é‡', + 'Æ^' => '鑲', + 'Æ_' => 'é‘°', + 'Æ`' => '顱', + 'Æa' => '饞', + 'Æb' => 'é«–', + 'Æc' => '鬣', + 'Æd' => '黌', + 'Æe' => 'ç¤', + 'Æf' => '矚', + 'Æg' => '讚', + 'Æh' => 'é‘·', + 'Æi' => '韉', + 'Æj' => 'é©¢', + 'Æk' => 'é©¥', + 'Æl' => '纜', + 'Æm' => '讜', + 'Æn' => '躪', + 'Æo' => '釅', + 'Æp' => '鑽', + 'Æq' => '鑾', + 'Ær' => '鑼', + 'Æs' => 'é±·', + 'Æt' => '鱸', + 'Æu' => 'é»·', + 'Æv' => 'è±”', + 'Æw' => 'é‘¿', + 'Æx' => '鸚', + 'Æy' => '爨', + 'Æz' => '驪', + 'Æ{' => '鬱', + 'Æ|' => '鸛', + 'Æ}' => '鸞', + 'Æ~' => 'ç±²', + 'Æ¡' => 'ヾ', + 'Æ¢' => 'ã‚', + 'Æ£' => 'ã‚ž', + 'Ƥ' => '々', + 'Æ¥' => 'ã', + 'Ʀ' => 'ã‚', + 'Ƨ' => 'ãƒ', + 'ƨ' => 'ã„', + 'Æ©' => 'ã…', + 'ƪ' => 'ã†', + 'Æ«' => 'ã‡', + 'Ƭ' => 'ãˆ', + 'Æ­' => 'ã‰', + 'Æ®' => 'ãŠ', + 'Ư' => 'ã‹', + 'Æ°' => 'ãŒ', + 'Ʊ' => 'ã', + 'Ʋ' => 'ãŽ', + 'Ƴ' => 'ã', + 'Æ´' => 'ã', + 'Ƶ' => 'ã‘', + 'ƶ' => 'ã’', + 'Æ·' => 'ã“', + 'Ƹ' => 'ã”', + 'ƹ' => 'ã•', + 'ƺ' => 'ã–', + 'Æ»' => 'ã—', + 'Ƽ' => 'ã˜', + 'ƽ' => 'ã™', + 'ƾ' => 'ãš', + 'Æ¿' => 'ã›', + 'ÆÀ' => 'ãœ', + 'ÆÁ' => 'ã', + 'ÆÂ' => 'ãž', + 'ÆÃ' => 'ãŸ', + 'ÆÄ' => 'ã ', + 'ÆÅ' => 'ã¡', + 'ÆÆ' => 'ã¢', + 'ÆÇ' => 'ã£', + 'ÆÈ' => 'ã¤', + 'ÆÉ' => 'ã¥', + 'ÆÊ' => 'ã¦', + 'ÆË' => 'ã§', + 'ÆÌ' => 'ã¨', + 'ÆÍ' => 'ã©', + 'ÆÎ' => 'ãª', + 'ÆÏ' => 'ã«', + 'ÆÐ' => 'ã¬', + 'ÆÑ' => 'ã­', + 'ÆÒ' => 'ã®', + 'ÆÓ' => 'ã¯', + 'ÆÔ' => 'ã°', + 'ÆÕ' => 'ã±', + 'ÆÖ' => 'ã²', + 'Æ×' => 'ã³', + 'ÆØ' => 'ã´', + 'ÆÙ' => 'ãµ', + 'ÆÚ' => 'ã¶', + 'ÆÛ' => 'ã·', + 'ÆÜ' => 'ã¸', + 'ÆÝ' => 'ã¹', + 'ÆÞ' => 'ãº', + 'Æß' => 'ã»', + 'Æà' => 'ã¼', + 'Æá' => 'ã½', + 'Æâ' => 'ã¾', + 'Æã' => 'ã¿', + 'Æä' => 'ã‚€', + 'Æå' => 'ã‚', + 'Ææ' => 'ã‚‚', + 'Æç' => 'ゃ', + 'Æè' => 'ã‚„', + 'Æé' => 'ã‚…', + 'Æê' => 'ゆ', + 'Æë' => 'ょ', + 'Æì' => 'よ', + 'Æí' => 'ら', + 'Æî' => 'ã‚Š', + 'Æï' => 'ã‚‹', + 'Æð' => 'ã‚Œ', + 'Æñ' => 'ã‚', + 'Æò' => 'ã‚Ž', + 'Æó' => 'ã‚', + 'Æô' => 'ã‚', + 'Æõ' => 'ã‚‘', + 'Æö' => 'ã‚’', + 'Æ÷' => 'ã‚“', + 'Æø' => 'ã‚¡', + 'Æù' => 'ã‚¢', + 'Æú' => 'ã‚£', + 'Æû' => 'イ', + 'Æü' => 'ã‚¥', + 'Æý' => 'ウ', + 'Æþ' => 'ェ', + 'Ç@' => 'エ', + 'ÇA' => 'ã‚©', + 'ÇB' => 'オ', + 'ÇC' => 'ã‚«', + 'ÇD' => 'ガ', + 'ÇE' => 'ã‚­', + 'ÇF' => 'ã‚®', + 'ÇG' => 'ク', + 'ÇH' => 'ã‚°', + 'ÇI' => 'ケ', + 'ÇJ' => 'ゲ', + 'ÇK' => 'コ', + 'ÇL' => 'ã‚´', + 'ÇM' => 'サ', + 'ÇN' => 'ザ', + 'ÇO' => 'ã‚·', + 'ÇP' => 'ジ', + 'ÇQ' => 'ス', + 'ÇR' => 'ズ', + 'ÇS' => 'ã‚»', + 'ÇT' => 'ゼ', + 'ÇU' => 'ソ', + 'ÇV' => 'ゾ', + 'ÇW' => 'ã‚¿', + 'ÇX' => 'ダ', + 'ÇY' => 'ãƒ', + 'ÇZ' => 'ヂ', + 'Ç[' => 'ッ', + 'Ç\\' => 'ツ', + 'Ç]' => 'ヅ', + 'Ç^' => 'テ', + 'Ç_' => 'デ', + 'Ç`' => 'ト', + 'Ça' => 'ド', + 'Çb' => 'ナ', + 'Çc' => 'ニ', + 'Çd' => 'ヌ', + 'Çe' => 'ãƒ', + 'Çf' => 'ノ', + 'Çg' => 'ãƒ', + 'Çh' => 'ãƒ', + 'Çi' => 'パ', + 'Çj' => 'ヒ', + 'Çk' => 'ビ', + 'Çl' => 'ピ', + 'Çm' => 'フ', + 'Çn' => 'ブ', + 'Ço' => 'プ', + 'Çp' => 'ヘ', + 'Çq' => 'ベ', + 'Çr' => 'ペ', + 'Çs' => 'ホ', + 'Çt' => 'ボ', + 'Çu' => 'ãƒ', + 'Çv' => 'マ', + 'Çw' => 'ミ', + 'Çx' => 'ム', + 'Çy' => 'メ', + 'Çz' => 'モ', + 'Ç{' => 'ャ', + 'Ç|' => 'ヤ', + 'Ç}' => 'ュ', + 'Ç~' => 'ユ', + 'Ç¡' => 'ョ', + 'Ç¢' => 'ヨ', + 'Ç£' => 'ラ', + 'Ǥ' => 'リ', + 'Ç¥' => 'ル', + 'Ǧ' => 'レ', + 'ǧ' => 'ロ', + 'Ǩ' => 'ヮ', + 'Ç©' => 'ワ', + 'Ǫ' => 'ヰ', + 'Ç«' => 'ヱ', + 'Ǭ' => 'ヲ', + 'Ç­' => 'ン', + 'Ç®' => 'ヴ', + 'ǯ' => 'ヵ', + 'Ç°' => 'ヶ', + 'DZ' => 'Д', + 'Dz' => 'Е', + 'dz' => 'Ð', + 'Ç´' => 'Ж', + 'ǵ' => 'З', + 'Ƕ' => 'И', + 'Ç·' => 'Й', + 'Ǹ' => 'К', + 'ǹ' => 'Л', + 'Ǻ' => 'Ðœ', + 'Ç»' => 'У', + 'Ǽ' => 'Ф', + 'ǽ' => 'Ð¥', + 'Ǿ' => 'Ц', + 'Ç¿' => 'Ч', + 'ÇÀ' => 'Ш', + 'ÇÁ' => 'Щ', + 'ÇÂ' => 'Ъ', + 'ÇÃ' => 'Ы', + 'ÇÄ' => 'Ь', + 'ÇÅ' => 'Э', + 'ÇÆ' => 'Ю', + 'ÇÇ' => 'Я', + 'ÇÈ' => 'а', + 'ÇÉ' => 'б', + 'ÇÊ' => 'в', + 'ÇË' => 'г', + 'ÇÌ' => 'д', + 'ÇÍ' => 'е', + 'ÇÎ' => 'Ñ‘', + 'ÇÏ' => 'ж', + 'ÇÐ' => 'з', + 'ÇÑ' => 'и', + 'ÇÒ' => 'й', + 'ÇÓ' => 'к', + 'ÇÔ' => 'л', + 'ÇÕ' => 'м', + 'ÇÖ' => 'н', + 'Ç×' => 'о', + 'ÇØ' => 'п', + 'ÇÙ' => 'Ñ€', + 'ÇÚ' => 'Ñ', + 'ÇÛ' => 'Ñ‚', + 'ÇÜ' => 'у', + 'ÇÝ' => 'Ñ„', + 'ÇÞ' => 'Ñ…', + 'Çß' => 'ц', + 'Çà' => 'ч', + 'Çá' => 'ш', + 'Çâ' => 'щ', + 'Çã' => 'ÑŠ', + 'Çä' => 'Ñ‹', + 'Çå' => 'ÑŒ', + 'Çæ' => 'Ñ', + 'Çç' => 'ÑŽ', + 'Çè' => 'Ñ', + 'Çé' => 'â‘ ', + 'Çê' => 'â‘¡', + 'Çë' => 'â‘¢', + 'Çì' => 'â‘£', + 'Çí' => '⑤', + 'Çî' => 'â‘¥', + 'Çï' => '⑦', + 'Çð' => '⑧', + 'Çñ' => '⑨', + 'Çò' => 'â‘©', + 'Çó' => 'â‘´', + 'Çô' => '⑵', + 'Çõ' => '⑶', + 'Çö' => 'â‘·', + 'Ç÷' => '⑸', + 'Çø' => '⑹', + 'Çù' => '⑺', + 'Çú' => 'â‘»', + 'Çû' => '⑼', + 'Çü' => '⑽', + 'É@' => '乂', + 'ÉA' => '乜', + 'ÉB' => '凵', + 'ÉC' => '匚', + 'ÉD' => '厂', + 'ÉE' => '万', + 'ÉF' => '丌', + 'ÉG' => '乇', + 'ÉH' => 'äº', + 'ÉI' => 'å›—', + 'ÉJ' => '兀', + 'ÉK' => 'å±®', + 'ÉL' => 'å½³', + 'ÉM' => 'ä¸', + 'ÉN' => '冇', + 'ÉO' => '与', + 'ÉP' => '丮', + 'ÉQ' => '亓', + 'ÉR' => '仂', + 'ÉS' => '仉', + 'ÉT' => '仈', + 'ÉU' => '冘', + 'ÉV' => '勼', + 'ÉW' => 'å¬', + 'ÉX' => '厹', + 'ÉY' => '圠', + 'ÉZ' => '夃', + 'É[' => '夬', + 'É\\' => 'å°', + 'É]' => 'å·¿', + 'É^' => 'æ—¡', + 'É_' => '殳', + 'É`' => '毌', + 'Éa' => 'æ°”', + 'Éb' => '爿', + 'Éc' => '丱', + 'Éd' => '丼', + 'Ée' => '仨', + 'Éf' => '仜', + 'Ég' => '仩', + 'Éh' => '仡', + 'Éi' => 'ä»', + 'Éj' => '仚', + 'Ék' => '刌', + 'Él' => '匜', + 'Ém' => 'åŒ', + 'Én' => '圢', + 'Éo' => '圣', + 'Ép' => '夗', + 'Éq' => '夯', + 'Ér' => 'å®', + 'És' => '宄', + 'Ét' => 'å°’', + 'Éu' => 'å°»', + 'Év' => 'å±´', + 'Éw' => 'å±³', + 'Éx' => '帄', + 'Éy' => '庀', + 'Éz' => '庂', + 'É{' => '忉', + 'É|' => '戉', + 'É}' => 'æ‰', + 'É~' => 'æ°•', + 'É¡' => 'æ°¶', + 'É¢' => '汃', + 'É£' => 'æ°¿', + 'ɤ' => 'æ°»', + 'É¥' => '犮', + 'ɦ' => '犰', + 'ɧ' => '玊', + 'ɨ' => '禸', + 'É©' => 'è‚Š', + 'ɪ' => '阞', + 'É«' => '伎', + 'ɬ' => '优', + 'É­' => '伬', + 'É®' => '仵', + 'ɯ' => 'ä¼”', + 'É°' => 'ä»±', + 'ɱ' => 'ä¼€', + 'ɲ' => 'ä»·', + 'ɳ' => '伈', + 'É´' => 'ä¼', + 'ɵ' => '伂', + 'ɶ' => 'ä¼…', + 'É·' => 'ä¼¢', + 'ɸ' => '伓', + 'ɹ' => '伄', + 'ɺ' => 'ä»´', + 'É»' => 'ä¼’', + 'ɼ' => '冱', + 'ɽ' => '刓', + 'ɾ' => '刉', + 'É¿' => 'åˆ', + 'ÉÀ' => '劦', + 'ÉÁ' => '匢', + 'ÉÂ' => '匟', + 'ÉÃ' => 'å', + 'ÉÄ' => '厊', + 'ÉÅ' => 'å‡', + 'ÉÆ' => '囡', + 'ÉÇ' => '囟', + 'ÉÈ' => '圮', + 'ÉÉ' => '圪', + 'ÉÊ' => '圴', + 'ÉË' => '夼', + 'ÉÌ' => '妀', + 'ÉÍ' => '奼', + 'ÉÎ' => '妅', + 'ÉÏ' => '奻', + 'ÉÐ' => '奾', + 'ÉÑ' => '奷', + 'ÉÒ' => '奿', + 'ÉÓ' => 'å­–', + 'ÉÔ' => 'å°•', + 'ÉÕ' => 'å°¥', + 'ÉÖ' => 'å±¼', + 'É×' => '屺', + 'ÉØ' => 'å±»', + 'ÉÙ' => 'å±¾', + 'ÉÚ' => 'å·Ÿ', + 'ÉÛ' => 'å¹µ', + 'ÉÜ' => '庄', + 'ÉÝ' => '异', + 'ÉÞ' => '弚', + 'Éß' => 'å½´', + 'Éà' => 'å¿•', + 'Éá' => 'å¿”', + 'Éâ' => 'å¿', + 'Éã' => '扜', + 'Éä' => '扞', + 'Éå' => '扤', + 'Éæ' => '扡', + 'Éç' => '扦', + 'Éè' => '扢', + 'Éé' => '扙', + 'Éê' => '扠', + 'Éë' => '扚', + 'Éì' => '扥', + 'Éí' => 'æ—¯', + 'Éî' => 'æ—®', + 'Éï' => '朾', + 'Éð' => '朹', + 'Éñ' => '朸', + 'Éò' => '朻', + 'Éó' => '机', + 'Éô' => '朿', + 'Éõ' => '朼', + 'Éö' => '朳', + 'É÷' => 'æ°˜', + 'Éø' => '汆', + 'Éù' => 'æ±’', + 'Éú' => '汜', + 'Éû' => 'æ±', + 'Éü' => '汊', + 'Éý' => 'æ±”', + 'Éþ' => '汋', + 'Ê@' => '汌', + 'ÊA' => 'ç±', + 'ÊB' => '牞', + 'ÊC' => '犴', + 'ÊD' => '犵', + 'ÊE' => '玎', + 'ÊF' => '甪', + 'ÊG' => '癿', + 'ÊH' => '穵', + 'ÊI' => '网', + 'ÊJ' => '艸', + 'ÊK' => '艼', + 'ÊL' => '芀', + 'ÊM' => '艽', + 'ÊN' => '艿', + 'ÊO' => 'è™', + 'ÊP' => '襾', + 'ÊQ' => 'é‚™', + 'ÊR' => 'é‚—', + 'ÊS' => '邘', + 'ÊT' => 'é‚›', + 'ÊU' => 'é‚”', + 'ÊV' => '阢', + 'ÊW' => '阤', + 'ÊX' => '阠', + 'ÊY' => '阣', + 'ÊZ' => 'ä½–', + 'Ê[' => 'ä¼»', + 'Ê\\' => 'ä½¢', + 'Ê]' => '佉', + 'Ê^' => '体', + 'Ê_' => '佤', + 'Ê`' => 'ä¼¾', + 'Êa' => '佧', + 'Êb' => 'ä½’', + 'Êc' => '佟', + 'Êd' => 'ä½', + 'Êe' => '佘', + 'Êf' => 'ä¼­', + 'Êg' => 'ä¼³', + 'Êh' => '伿', + 'Êi' => '佡', + 'Êj' => 'å†', + 'Êk' => '冹', + 'Êl' => '刜', + 'Êm' => '刞', + 'Ên' => '刡', + 'Êo' => '劭', + 'Êp' => '劮', + 'Êq' => '匉', + 'Êr' => 'å£', + 'Ês' => 'å²', + 'Êt' => '厎', + 'Êu' => 'åŽ', + 'Êv' => 'å°', + 'Êw' => 'å·', + 'Êx' => 'åª', + 'Êy' => 'å‘”', + 'Êz' => 'å‘…', + 'Ê{' => 'å™', + 'Ê|' => 'åœ', + 'Ê}' => 'å¥', + 'Ê~' => 'å˜', + 'Ê¡' => 'å½', + 'Ê¢' => 'å‘', + 'Ê£' => 'å‘', + 'ʤ' => 'å¨', + 'Ê¥' => 'å¤', + 'ʦ' => '呇', + 'ʧ' => 'å›®', + 'ʨ' => '囧', + 'Ê©' => '囥', + 'ʪ' => 'å', + 'Ê«' => 'å…', + 'ʬ' => 'åŒ', + 'Ê­' => 'å‰', + 'Ê®' => 'å‹', + 'ʯ' => 'å’', + 'Ê°' => '夆', + 'ʱ' => '奀', + 'ʲ' => '妦', + 'ʳ' => '妘', + 'Ê´' => '妠', + 'ʵ' => '妗', + 'ʶ' => '妎', + 'Ê·' => '妢', + 'ʸ' => 'å¦', + 'ʹ' => 'å¦', + 'ʺ' => '妧', + 'Ê»' => '妡', + 'ʼ' => '宎', + 'ʽ' => 'å®’', + 'ʾ' => 'å°¨', + 'Ê¿' => 'å°ª', + 'ÊÀ' => 'å²', + 'ÊÁ' => 'å²', + 'ÊÂ' => '岈', + 'ÊÃ' => '岋', + 'ÊÄ' => '岉', + 'ÊÅ' => 'å²’', + 'ÊÆ' => '岊', + 'ÊÇ' => '岆', + 'ÊÈ' => '岓', + 'ÊÉ' => '岕', + 'ÊÊ' => 'å· ', + 'ÊË' => '帊', + 'ÊÌ' => '帎', + 'ÊÍ' => '庋', + 'ÊÎ' => '庉', + 'ÊÏ' => '庌', + 'ÊÐ' => '庈', + 'ÊÑ' => 'åº', + 'ÊÒ' => 'å¼…', + 'ÊÓ' => 'å¼', + 'ÊÔ' => '彸', + 'ÊÕ' => '彶', + 'ÊÖ' => 'å¿’', + 'Ê×' => 'å¿‘', + 'ÊØ' => 'å¿', + 'ÊÙ' => 'å¿­', + 'ÊÚ' => '忨', + 'ÊÛ' => 'å¿®', + 'ÊÜ' => '忳', + 'ÊÝ' => 'å¿¡', + 'ÊÞ' => '忤', + 'Êß' => 'å¿£', + 'Êà' => '忺', + 'Êá' => '忯', + 'Êâ' => 'å¿·', + 'Êã' => 'å¿»', + 'Êä' => '怀', + 'Êå' => 'å¿´', + 'Êæ' => '戺', + 'Êç' => '抃', + 'Êè' => '抌', + 'Êé' => '抎', + 'Êê' => 'æŠ', + 'Êë' => '抔', + 'Êì' => '抇', + 'Êí' => '扱', + 'Êî' => '扻', + 'Êï' => '扺', + 'Êð' => '扰', + 'Êñ' => 'æŠ', + 'Êò' => '抈', + 'Êó' => '扷', + 'Êô' => '扽', + 'Êõ' => '扲', + 'Êö' => '扴', + 'Ê÷' => 'æ”·', + 'Êø' => 'æ—°', + 'Êù' => 'æ—´', + 'Êú' => 'æ—³', + 'Êû' => 'æ—²', + 'Êü' => 'æ—µ', + 'Êý' => 'æ…', + 'Êþ' => 'æ‡', + 'Ë@' => 'æ™', + 'ËA' => 'æ•', + 'ËB' => 'æŒ', + 'ËC' => 'æˆ', + 'ËD' => 'æ', + 'ËE' => 'æ', + 'ËF' => 'æš', + 'ËG' => 'æ‹', + 'ËH' => 'æ¯', + 'ËI' => 'æ°™', + 'ËJ' => 'æ°š', + 'ËK' => '汸', + 'ËL' => '汧', + 'ËM' => '汫', + 'ËN' => '沄', + 'ËO' => '沋', + 'ËP' => 'æ²', + 'ËQ' => 'æ±±', + 'ËR' => '汯', + 'ËS' => '汩', + 'ËT' => '沚', + 'ËU' => 'æ±­', + 'ËV' => '沇', + 'ËW' => '沕', + 'ËX' => '沜', + 'ËY' => '汦', + 'ËZ' => 'æ±³', + 'Ë[' => 'æ±¥', + 'Ë\\' => 'æ±»', + 'Ë]' => '沎', + 'Ë^' => 'ç´', + 'Ë_' => 'çº', + 'Ë`' => '牣', + 'Ëa' => '犿', + 'Ëb' => '犽', + 'Ëc' => '狃', + 'Ëd' => '狆', + 'Ëe' => 'ç‹', + 'Ëf' => '犺', + 'Ëg' => 'ç‹…', + 'Ëh' => '玕', + 'Ëi' => '玗', + 'Ëj' => '玓', + 'Ëk' => '玔', + 'Ël' => '玒', + 'Ëm' => '町', + 'Ën' => '甹', + 'Ëo' => 'ç–”', + 'Ëp' => 'ç–•', + 'Ëq' => 'çš', + 'Ër' => '礽', + 'Ës' => '耴', + 'Ët' => 'è‚•', + 'Ëu' => 'è‚™', + 'Ëv' => 'è‚', + 'Ëw' => 'è‚’', + 'Ëx' => 'è‚œ', + 'Ëy' => 'èŠ', + 'Ëz' => 'èŠ', + 'Ë{' => '芅', + 'Ë|' => '芎', + 'Ë}' => '芑', + 'Ë~' => '芓', + 'Ë¡' => '芊', + 'Ë¢' => '芃', + 'Ë£' => '芄', + 'ˤ' => '豸', + 'Ë¥' => '迉', + '˦' => '辿', + '˧' => 'é‚Ÿ', + '˨' => 'é‚¡', + 'Ë©' => 'é‚¥', + '˪' => 'é‚ž', + 'Ë«' => '邧', + 'ˬ' => 'é‚ ', + 'Ë­' => '阰', + 'Ë®' => '阨', + '˯' => '阯', + 'Ë°' => '阭', + '˱' => '丳', + '˲' => '侘', + '˳' => 'ä½¼', + 'Ë´' => 'ä¾…', + '˵' => 'ä½½', + '˶' => 'ä¾€', + 'Ë·' => '侇', + '˸' => '佶', + '˹' => 'ä½´', + '˺' => '侉', + 'Ë»' => '侄', + '˼' => 'ä½·', + '˽' => '佌', + '˾' => 'ä¾—', + 'Ë¿' => '佪', + 'ËÀ' => '侚', + 'ËÁ' => 'ä½¹', + 'ËÂ' => 'ä¾', + 'ËÃ' => '佸', + 'ËÄ' => 'ä¾', + 'ËÅ' => '侜', + 'ËÆ' => 'ä¾”', + 'ËÇ' => '侞', + 'ËÈ' => 'ä¾’', + 'ËÉ' => '侂', + 'ËÊ' => '侕', + 'ËË' => '佫', + 'ËÌ' => 'ä½®', + 'ËÍ' => '冞', + 'ËÎ' => '冼', + 'ËÏ' => '冾', + 'ËÐ' => '刵', + 'ËÑ' => '刲', + 'ËÒ' => '刳', + 'ËÓ' => '剆', + 'ËÔ' => '刱', + 'ËÕ' => '劼', + 'ËÖ' => '匊', + 'Ë×' => '匋', + 'ËØ' => '匼', + 'ËÙ' => '厒', + 'ËÚ' => '厔', + 'ËÛ' => 'å’‡', + 'ËÜ' => 'å‘¿', + 'ËÝ' => 'å’', + 'ËÞ' => 'å’‘', + 'Ëß' => 'å’‚', + 'Ëà' => 'å’ˆ', + 'Ëá' => 'å‘«', + 'Ëâ' => '呺', + 'Ëã' => '呾', + 'Ëä' => 'å‘¥', + 'Ëå' => '呬', + 'Ëæ' => 'å‘´', + 'Ëç' => '呦', + 'Ëè' => 'å’', + 'Ëé' => '呯', + 'Ëê' => 'å‘¡', + 'Ëë' => 'å‘ ', + 'Ëì' => 'å’˜', + 'Ëí' => 'å‘£', + 'Ëî' => '呧', + 'Ëï' => '呤', + 'Ëð' => 'å›·', + 'Ëñ' => '囹', + 'Ëò' => 'å¯', + 'Ëó' => 'å²', + 'Ëô' => 'å­', + 'Ëõ' => 'å«', + 'Ëö' => 'å±', + 'Ë÷' => 'å°', + 'Ëø' => 'å¶', + 'Ëù' => '垀', + 'Ëú' => 'åµ', + 'Ëû' => 'å»', + 'Ëü' => 'å³', + 'Ëý' => 'å´', + 'Ëþ' => 'å¢', + 'Ì@' => 'å¨', + 'ÌA' => 'å½', + 'ÌB' => '夌', + 'ÌC' => '奅', + 'ÌD' => '妵', + 'ÌE' => '妺', + 'ÌF' => 'å§', + 'ÌG' => '姎', + 'ÌH' => '妲', + 'ÌI' => '姌', + 'ÌJ' => 'å§', + 'ÌK' => '妶', + 'ÌL' => '妼', + 'ÌM' => '姃', + 'ÌN' => '姖', + 'ÌO' => '妱', + 'ÌP' => '妽', + 'ÌQ' => '姀', + 'ÌR' => '姈', + 'ÌS' => '妴', + 'ÌT' => '姇', + 'ÌU' => 'å­¢', + 'ÌV' => 'å­¥', + 'ÌW' => '宓', + 'ÌX' => '宕', + 'ÌY' => '屄', + 'ÌZ' => '屇', + 'Ì[' => 'å²®', + 'Ì\\' => '岤', + 'Ì]' => 'å² ', + 'Ì^' => 'å²µ', + 'Ì_' => '岯', + 'Ì`' => '岨', + 'Ìa' => '岬', + 'Ìb' => '岟', + 'Ìc' => 'å²£', + 'Ìd' => 'å²­', + 'Ìe' => 'å²¢', + 'Ìf' => '岪', + 'Ìg' => '岧', + 'Ìh' => 'å²', + 'Ìi' => 'å²¥', + 'Ìj' => '岶', + 'Ìk' => 'å²°', + 'Ìl' => '岦', + 'Ìm' => '帗', + 'Ìn' => '帔', + 'Ìo' => '帙', + 'Ìp' => '弨', + 'Ìq' => 'å¼¢', + 'Ìr' => 'å¼£', + 'Ìs' => '弤', + 'Ìt' => 'å½”', + 'Ìu' => '徂', + 'Ìv' => 'å½¾', + 'Ìw' => 'å½½', + 'Ìx' => 'å¿ž', + 'Ìy' => 'å¿¥', + 'Ìz' => '怭', + 'Ì{' => '怦', + 'Ì|' => '怙', + 'Ì}' => '怲', + 'Ì~' => '怋', + 'Ì¡' => '怴', + 'Ì¢' => '怊', + 'Ì£' => '怗', + '̤' => '怳', + 'Ì¥' => '怚', + '̦' => '怞', + '̧' => '怬', + '̨' => '怢', + 'Ì©' => 'æ€', + '̪' => 'æ€', + 'Ì«' => '怮', + '̬' => '怓', + 'Ì­' => '怑', + 'Ì®' => '怌', + '̯' => '怉', + 'Ì°' => '怜', + '̱' => '戔', + '̲' => '戽', + '̳' => '抭', + 'Ì´' => '抴', + '̵' => 'æ‹‘', + '̶' => '抾', + 'Ì·' => '抪', + '̸' => '抶', + '̹' => 'æ‹Š', + '̺' => '抮', + 'Ì»' => '抳', + '̼' => '抯', + '̽' => '抻', + '̾' => '抩', + 'Ì¿' => '抰', + 'ÌÀ' => '抸', + 'ÌÁ' => '攽', + 'ÌÂ' => 'æ–¨', + 'ÌÃ' => 'æ–»', + 'ÌÄ' => '昉', + 'ÌÅ' => 'æ—¼', + 'ÌÆ' => '昄', + 'ÌÇ' => '昒', + 'ÌÈ' => '昈', + 'ÌÉ' => 'æ—»', + 'ÌÊ' => '昃', + 'ÌË' => '昋', + 'ÌÌ' => 'æ˜', + 'ÌÍ' => '昅', + 'ÌÎ' => 'æ—½', + 'ÌÏ' => '昑', + 'ÌÐ' => 'æ˜', + 'ÌÑ' => '曶', + 'ÌÒ' => '朊', + 'ÌÓ' => 'æž…', + 'ÌÔ' => 'æ¬', + 'ÌÕ' => '枎', + 'ÌÖ' => 'æž’', + 'Ì×' => 'æ¶', + 'ÌØ' => 'æ»', + 'ÌÙ' => '枘', + 'ÌÚ' => '枆', + 'ÌÛ' => 'æž„', + 'ÌÜ' => 'æ´', + 'ÌÝ' => 'æž', + 'ÌÞ' => '枌', + 'Ìß' => 'æº', + 'Ìà' => '枟', + 'Ìá' => 'æž‘', + 'Ìâ' => 'æž™', + 'Ìã' => '枃', + 'Ìä' => 'æ½', + 'Ìå' => 'æž', + 'Ìæ' => 'æ¸', + 'Ìç' => 'æ¹', + 'Ìè' => 'æž”', + 'Ìé' => '欥', + 'Ìê' => '殀', + 'Ìë' => 'æ­¾', + 'Ìì' => '毞', + 'Ìí' => 'æ°', + 'Ìî' => '沓', + 'Ìï' => '泬', + 'Ìð' => '泫', + 'Ìñ' => 'æ³®', + 'Ìò' => 'æ³™', + 'Ìó' => '沶', + 'Ìô' => 'æ³”', + 'Ìõ' => 'æ²­', + 'Ìö' => '泧', + 'Ì÷' => 'æ²·', + 'Ìø' => 'æ³', + 'Ìù' => '泂', + 'Ìú' => '沺', + 'Ìû' => '泃', + 'Ìü' => '泆', + 'Ìý' => 'æ³­', + 'Ìþ' => 'æ³²', + 'Í@' => 'æ³’', + 'ÍA' => 'æ³', + 'ÍB' => 'æ²´', + 'ÍC' => '沊', + 'ÍD' => 'æ²', + 'ÍE' => 'æ²€', + 'ÍF' => '泞', + 'ÍG' => 'æ³€', + 'ÍH' => 'æ´°', + 'ÍI' => 'æ³', + 'ÍJ' => '泇', + 'ÍK' => 'æ²°', + 'ÍL' => 'æ³¹', + 'ÍM' => 'æ³', + 'ÍN' => '泩', + 'ÍO' => '泑', + 'ÍP' => 'ç‚”', + 'ÍQ' => '炘', + 'ÍR' => 'ç‚…', + 'ÍS' => 'ç‚“', + 'ÍT' => '炆', + 'ÍU' => 'ç‚„', + 'ÍV' => 'ç‚‘', + 'ÍW' => 'ç‚–', + 'ÍX' => 'ç‚‚', + 'ÍY' => 'ç‚š', + 'ÍZ' => '炃', + 'Í[' => '牪', + 'Í\\' => 'ç‹–', + 'Í]' => 'ç‹‹', + 'Í^' => '狘', + 'Í_' => '狉', + 'Í`' => 'ç‹œ', + 'Ía' => 'ç‹’', + 'Íb' => 'ç‹”', + 'Íc' => 'ç‹š', + 'Íd' => 'ç‹Œ', + 'Íe' => 'ç‹‘', + 'Íf' => '玤', + 'Íg' => '玡', + 'Íh' => '玭', + 'Íi' => '玦', + 'Íj' => '玢', + 'Ík' => '玠', + 'Íl' => '玬', + 'Ím' => 'çŽ', + 'Ín' => 'ç“', + 'Ío' => '瓨', + 'Íp' => '甿', + 'Íq' => 'ç•€', + 'Ír' => '甾', + 'Ís' => 'ç–Œ', + 'Ít' => 'ç–˜', + 'Íu' => '皯', + 'Ív' => '盳', + 'Íw' => 'ç›±', + 'Íx' => 'ç›°', + 'Íy' => '盵', + 'Íz' => '矸', + 'Í{' => '矼', + 'Í|' => '矹', + 'Í}' => '矻', + 'Í~' => '矺', + 'Í¡' => '矷', + 'Í¢' => '祂', + 'Í£' => '礿', + 'ͤ' => '秅', + 'Í¥' => '穸', + 'ͦ' => 'ç©»', + 'ͧ' => 'ç«»', + 'ͨ' => 'ç±µ', + 'Í©' => 'ç³½', + 'ͪ' => '耵', + 'Í«' => 'è‚', + 'ͬ' => 'è‚®', + 'Í­' => 'è‚£', + 'Í®' => '肸', + 'ͯ' => '肵', + 'Í°' => 'è‚­', + 'ͱ' => '舠', + 'Ͳ' => '芠', + 'ͳ' => 'è‹€', + 'Í´' => '芫', + '͵' => '芚', + 'Ͷ' => '芘', + 'Í·' => '芛', + '͸' => '芵', + '͹' => '芧', + 'ͺ' => '芮', + 'Í»' => '芼', + 'ͼ' => '芞', + 'ͽ' => '芺', + ';' => '芴', + 'Í¿' => '芨', + 'ÍÀ' => '芡', + 'ÍÁ' => '芩', + 'ÍÂ' => 'è‹‚', + 'ÍÃ' => '芤', + 'ÍÄ' => '苃', + 'ÍÅ' => '芶', + 'ÍÆ' => '芢', + 'ÍÇ' => 'è™°', + 'ÍÈ' => '虯', + 'ÍÉ' => 'è™­', + 'ÍÊ' => 'è™®', + 'ÍË' => 'è±–', + 'ÍÌ' => 'è¿’', + 'ÍÍ' => 'è¿‹', + 'ÍÎ' => 'è¿“', + 'ÍÏ' => 'è¿', + 'ÍÐ' => 'è¿–', + 'ÍÑ' => 'è¿•', + 'ÍÒ' => 'è¿—', + 'ÍÓ' => '邲', + 'ÍÔ' => 'é‚´', + 'ÍÕ' => '邯', + 'ÍÖ' => '邳', + 'Í×' => 'é‚°', + 'ÍØ' => '阹', + 'ÍÙ' => '阽', + 'ÍÚ' => '阼', + 'ÍÛ' => '阺', + 'ÍÜ' => '陃', + 'ÍÝ' => 'ä¿', + 'ÍÞ' => 'ä¿…', + 'Íß' => 'ä¿“', + 'Íà' => 'ä¾²', + 'Íá' => '俉', + 'Íâ' => 'ä¿‹', + 'Íã' => 'ä¿', + 'Íä' => 'ä¿”', + 'Íå' => 'ä¿œ', + 'Íæ' => 'ä¿™', + 'Íç' => 'ä¾»', + 'Íè' => 'ä¾³', + 'Íé' => 'ä¿›', + 'Íê' => '俇', + 'Íë' => 'ä¿–', + 'Íì' => '侺', + 'Íí' => 'ä¿€', + 'Íî' => 'ä¾¹', + 'Íï' => '俬', + 'Íð' => '剄', + 'Íñ' => '剉', + 'Íò' => 'å‹€', + 'Íó' => 'å‹‚', + 'Íô' => '匽', + 'Íõ' => 'å¼', + 'Íö' => '厗', + 'Í÷' => '厖', + 'Íø' => '厙', + 'Íù' => '厘', + 'Íú' => 'å’º', + 'Íû' => 'å’¡', + 'Íü' => 'å’­', + 'Íý' => 'å’¥', + 'Íþ' => 'å“', + 'Î@' => '哃', + 'ÎA' => 'èŒ', + 'ÎB' => 'å’·', + 'ÎC' => 'å’®', + 'ÎD' => 'å“–', + 'ÎE' => 'å’¶', + 'ÎF' => 'å“…', + 'ÎG' => '哆', + 'ÎH' => 'å’ ', + 'ÎI' => 'å‘°', + 'ÎJ' => 'å’¼', + 'ÎK' => 'å’¢', + 'ÎL' => 'å’¾', + 'ÎM' => '呲', + 'ÎN' => 'å“ž', + 'ÎO' => 'å’°', + 'ÎP' => 'åžµ', + 'ÎQ' => 'åžž', + 'ÎR' => '垟', + 'ÎS' => '垤', + 'ÎT' => '垌', + 'ÎU' => 'åž—', + 'ÎV' => 'åž', + 'ÎW' => 'åž›', + 'ÎX' => 'åž”', + 'ÎY' => '垘', + 'ÎZ' => 'åž', + 'Î[' => 'åž™', + 'Î\\' => '垥', + 'Î]' => 'åžš', + 'Î^' => 'åž•', + 'Î_' => '壴', + 'Î`' => 'å¤', + 'Îa' => '奓', + 'Îb' => '姡', + 'Îc' => '姞', + 'Îd' => '姮', + 'Îe' => '娀', + 'Îf' => '姱', + 'Îg' => 'å§', + 'Îh' => '姺', + 'Îi' => '姽', + 'Îj' => '姼', + 'Îk' => '姶', + 'Îl' => '姤', + 'Îm' => '姲', + 'În' => '姷', + 'Îo' => '姛', + 'Îp' => '姩', + 'Îq' => '姳', + 'Îr' => '姵', + 'Îs' => '姠', + 'Ît' => '姾', + 'Îu' => '姴', + 'Îv' => '姭', + 'Îw' => '宨', + 'Îx' => '屌', + 'Îy' => 'å³', + 'Îz' => '峘', + 'Î{' => '峌', + 'Î|' => 'å³—', + 'Î}' => '峋', + 'Î~' => 'å³›', + 'Ρ' => '峞', + '΢' => '峚', + 'Σ' => '峉', + 'Τ' => '峇', + 'Î¥' => '峊', + 'Φ' => 'å³–', + 'Χ' => '峓', + 'Ψ' => 'å³”', + 'Ω' => 'å³', + 'Ϊ' => '峈', + 'Ϋ' => '峆', + 'ά' => '峎', + 'έ' => '峟', + 'ή' => '峸', + 'ί' => 'å·¹', + 'ΰ' => '帡', + 'α' => '帢', + 'β' => '帣', + 'γ' => '帠', + 'δ' => '帤', + 'ε' => '庰', + 'ζ' => '庤', + 'η' => '庢', + 'θ' => '庛', + 'ι' => '庣', + 'κ' => '庥', + 'λ' => '弇', + 'μ' => 'å¼®', + 'ν' => 'å½–', + 'ξ' => '徆', + 'ο' => '怷', + 'ÎÀ' => '怹', + 'ÎÁ' => 'æ”', + 'ÎÂ' => 'æ²', + 'ÎÃ' => 'æž', + 'ÎÄ' => 'æ…', + 'ÎÅ' => 'æ“', + 'ÎÆ' => 'æ‡', + 'ÎÇ' => 'æ‰', + 'ÎÈ' => 'æ›', + 'ÎÉ' => 'æŒ', + 'ÎÊ' => 'æ€', + 'ÎË' => 'æ‚', + 'ÎÌ' => 'æŸ', + 'ÎÍ' => '怤', + 'ÎÎ' => 'æ„', + 'ÎÏ' => 'æ˜', + 'ÎÐ' => 'æ¦', + 'ÎÑ' => 'æ®', + 'ÎÒ' => '扂', + 'ÎÓ' => '扃', + 'ÎÔ' => 'æ‹', + 'ÎÕ' => 'æŒ', + 'ÎÖ' => '挋', + 'Î×' => '拵', + 'ÎØ' => '挎', + 'ÎÙ' => '挃', + 'ÎÚ' => 'æ‹«', + 'ÎÛ' => '拹', + 'ÎÜ' => 'æŒ', + 'ÎÝ' => '挌', + 'ÎÞ' => '拸', + 'Îß' => '拶', + 'Îà' => '挀', + 'Îá' => '挓', + 'Îâ' => '挔', + 'Îã' => '拺', + 'Îä' => '挕', + 'Îå' => 'æ‹»', + 'Îæ' => 'æ‹°', + 'Îç' => 'æ•', + 'Îè' => '敃', + 'Îé' => 'æ–ª', + 'Îê' => 'æ–¿', + 'Îë' => '昶', + 'Îì' => '昡', + 'Îí' => '昲', + 'Îî' => '昵', + 'Îï' => '昜', + 'Îð' => '昦', + 'Îñ' => '昢', + 'Îò' => '昳', + 'Îó' => '昫', + 'Îô' => '昺', + 'Îõ' => 'æ˜', + 'Îö' => '昴', + 'Î÷' => '昹', + 'Îø' => '昮', + 'Îù' => 'æœ', + 'Îú' => 'æœ', + 'Îû' => 'æŸ', + 'Îü' => '柲', + 'Îý' => '柈', + 'Îþ' => '枺', + 'Ï@' => '柜', + 'ÏA' => 'æž»', + 'ÏB' => '柸', + 'ÏC' => '柘', + 'ÏD' => '柀', + 'ÏE' => 'æž·', + 'ÏF' => '柅', + 'ÏG' => '柫', + 'ÏH' => '柤', + 'ÏI' => '柟', + 'ÏJ' => 'æžµ', + 'ÏK' => 'æŸ', + 'ÏL' => 'æž³', + 'ÏM' => '柷', + 'ÏN' => '柶', + 'ÏO' => '柮', + 'ÏP' => '柣', + 'ÏQ' => '柂', + 'ÏR' => 'æž¹', + 'ÏS' => '柎', + 'ÏT' => '柧', + 'ÏU' => '柰', + 'ÏV' => 'æž²', + 'ÏW' => '柼', + 'ÏX' => '柆', + 'ÏY' => '柭', + 'ÏZ' => '柌', + 'Ï[' => 'æž®', + 'Ï\\' => '柦', + 'Ï]' => '柛', + 'Ï^' => '柺', + 'Ï_' => '柉', + 'Ï`' => '柊', + 'Ïa' => '柃', + 'Ïb' => '柪', + 'Ïc' => '柋', + 'Ïd' => '欨', + 'Ïe' => '殂', + 'Ïf' => '殄', + 'Ïg' => '殶', + 'Ïh' => '毖', + 'Ïi' => '毘', + 'Ïj' => '毠', + 'Ïk' => 'æ° ', + 'Ïl' => 'æ°¡', + 'Ïm' => 'æ´¨', + 'Ïn' => 'æ´´', + 'Ïo' => 'æ´­', + 'Ïp' => 'æ´Ÿ', + 'Ïq' => 'æ´¼', + 'Ïr' => 'æ´¿', + 'Ïs' => 'æ´’', + 'Ït' => 'æ´Š', + 'Ïu' => '泚', + 'Ïv' => 'æ´³', + 'Ïw' => 'æ´„', + 'Ïx' => 'æ´™', + 'Ïy' => 'æ´º', + 'Ïz' => 'æ´š', + 'Ï{' => 'æ´‘', + 'Ï|' => 'æ´€', + 'Ï}' => 'æ´', + 'Ï~' => '浂', + 'Ï¡' => 'æ´', + 'Ï¢' => 'æ´˜', + 'Ï£' => 'æ´·', + 'Ϥ' => 'æ´ƒ', + 'Ï¥' => 'æ´', + 'Ϧ' => 'æµ€', + 'ϧ' => 'æ´‡', + 'Ϩ' => 'æ´ ', + 'Ï©' => 'æ´¬', + 'Ϫ' => 'æ´ˆ', + 'Ï«' => 'æ´¢', + 'Ϭ' => 'æ´‰', + 'Ï­' => 'æ´', + 'Ï®' => 'ç‚·', + 'ϯ' => 'ç‚Ÿ', + 'Ï°' => '炾', + 'ϱ' => '炱', + 'ϲ' => 'ç‚°', + 'ϳ' => 'ç‚¡', + 'Ï´' => 'ç‚´', + 'ϵ' => '炵', + '϶' => 'ç‚©', + 'Ï·' => 'ç‰', + 'ϸ' => '牉', + 'Ϲ' => '牊', + 'Ϻ' => '牬', + 'Ï»' => '牰', + 'ϼ' => '牳', + 'Ͻ' => '牮', + 'Ͼ' => 'ç‹Š', + 'Ï¿' => '狤', + 'ÏÀ' => '狨', + 'ÏÁ' => 'ç‹«', + 'ÏÂ' => 'ç‹Ÿ', + 'ÏÃ' => '狪', + 'ÏÄ' => '狦', + 'ÏÅ' => 'ç‹£', + 'ÏÆ' => '玅', + 'ÏÇ' => 'çŒ', + 'ÏÈ' => 'ç‚', + 'ÏÉ' => 'çˆ', + 'ÏÊ' => 'ç…', + 'ÏË' => '玹', + 'ÏÌ' => '玶', + 'ÏÍ' => '玵', + 'ÏÎ' => '玴', + 'ÏÏ' => 'ç«', + 'ÏÐ' => '玿', + 'ÏÑ' => 'ç‡', + 'ÏÒ' => '玾', + 'ÏÓ' => 'çƒ', + 'ÏÔ' => 'ç†', + 'ÏÕ' => '玸', + 'ÏÖ' => 'ç‹', + 'Ï×' => '瓬', + 'ÏØ' => 'ç“®', + 'ÏÙ' => 'ç”®', + 'ÏÚ' => '畇', + 'ÏÛ' => '畈', + 'ÏÜ' => 'ç–§', + 'ÏÝ' => 'ç–ª', + 'ÏÞ' => '癹', + 'Ïß' => '盄', + 'Ïà' => '眈', + 'Ïá' => '眃', + 'Ïâ' => '眄', + 'Ïã' => '眅', + 'Ïä' => '眊', + 'Ïå' => 'ç›·', + 'Ïæ' => 'ç›»', + 'Ïç' => '盺', + 'Ïè' => '矧', + 'Ïé' => '矨', + 'Ïê' => 'ç †', + 'Ïë' => 'ç ‘', + 'Ïì' => 'ç ’', + 'Ïí' => 'ç …', + 'Ïî' => 'ç ', + 'Ïï' => 'ç ', + 'Ïð' => 'ç Ž', + 'Ïñ' => 'ç ‰', + 'Ïò' => 'ç ƒ', + 'Ïó' => 'ç “', + 'Ïô' => '祊', + 'Ïõ' => '祌', + 'Ïö' => '祋', + 'Ï÷' => '祅', + 'Ïø' => '祄', + 'Ïù' => '秕', + 'Ïú' => 'ç§', + 'Ïû' => 'ç§', + 'Ïü' => '秖', + 'Ïý' => '秎', + 'Ïþ' => '窀', + 'Ð@' => '穾', + 'ÐA' => 'ç«‘', + 'ÐB' => '笀', + 'ÐC' => 'ç¬', + 'ÐD' => '籺', + 'ÐE' => '籸', + 'ÐF' => 'ç±¹', + 'ÐG' => '籿', + 'ÐH' => 'ç²€', + 'ÐI' => 'ç²', + 'ÐJ' => 'ç´ƒ', + 'ÐK' => 'ç´ˆ', + 'ÐL' => 'ç´', + 'ÐM' => '罘', + 'ÐN' => '羑', + 'ÐO' => 'ç¾', + 'ÐP' => 'ç¾¾', + 'ÐQ' => '耇', + 'ÐR' => '耎', + 'ÐS' => 'è€', + 'ÐT' => '耔', + 'ÐU' => '耷', + 'ÐV' => '胘', + 'ÐW' => '胇', + 'ÐX' => '胠', + 'ÐY' => '胑', + 'ÐZ' => '胈', + 'Ð[' => '胂', + 'Ð\\' => 'èƒ', + 'Ð]' => '胅', + 'Ð^' => '胣', + 'Ð_' => '胙', + 'Ð`' => '胜', + 'Ða' => '胊', + 'Ðb' => '胕', + 'Ðc' => '胉', + 'Ðd' => 'èƒ', + 'Ðe' => '胗', + 'Ðf' => '胦', + 'Ðg' => 'èƒ', + 'Ðh' => '臿', + 'Ði' => '舡', + 'Ðj' => '芔', + 'Ðk' => 'è‹™', + 'Ðl' => '苾', + 'Ðm' => '苹', + 'Ðn' => '茇', + 'Ðo' => '苨', + 'Ðp' => '茀', + 'Ðq' => 'è‹•', + 'Ðr' => '茺', + 'Ðs' => 'è‹«', + 'Ðt' => 'è‹–', + 'Ðu' => 'è‹´', + 'Ðv' => '苬', + 'Ðw' => 'è‹¡', + 'Ðx' => '苲', + 'Ðy' => '苵', + 'Ðz' => '茌', + 'Ð{' => 'è‹»', + 'Ð|' => '苶', + 'Ð}' => 'è‹°', + 'Ð~' => '苪', + 'С' => '苤', + 'Т' => 'è‹ ', + 'У' => '苺', + 'Ф' => '苳', + 'Ð¥' => 'è‹­', + 'Ц' => 'è™·', + 'Ч' => 'è™´', + 'Ш' => '虼', + 'Щ' => '虳', + 'Ъ' => 'è¡', + 'Ы' => 'è¡Ž', + 'Ь' => '衧', + 'Э' => '衪', + 'Ю' => 'è¡©', + 'Я' => '觓', + 'а' => '訄', + 'б' => '訇', + 'в' => 'èµ²', + 'г' => 'è¿£', + 'д' => 'è¿¡', + 'е' => 'è¿®', + 'ж' => 'è¿ ', + 'з' => '郱', + 'и' => '邽', + 'й' => 'é‚¿', + 'к' => '郕', + 'л' => '郅', + 'м' => '邾', + 'н' => '郇', + 'о' => '郋', + 'п' => '郈', + 'ÐÀ' => '釔', + 'ÐÁ' => '釓', + 'ÐÂ' => 'é™”', + 'ÐÃ' => 'é™', + 'ÐÄ' => '陑', + 'ÐÅ' => '陓', + 'ÐÆ' => '陊', + 'ÐÇ' => '陎', + 'ÐÈ' => '倞', + 'ÐÉ' => '倅', + 'ÐÊ' => '倇', + 'ÐË' => '倓', + 'ÐÌ' => '倢', + 'ÐÍ' => '倰', + 'ÐÎ' => '倛', + 'ÐÏ' => '俵', + 'ÐÐ' => 'ä¿´', + 'ÐÑ' => '倳', + 'ÐÒ' => '倷', + 'ÐÓ' => '倬', + 'ÐÔ' => '俶', + 'ÐÕ' => 'ä¿·', + 'ÐÖ' => '倗', + 'Ð×' => '倜', + 'ÐØ' => '倠', + 'ÐÙ' => '倧', + 'ÐÚ' => '倵', + 'ÐÛ' => '倯', + 'ÐÜ' => '倱', + 'ÐÝ' => '倎', + 'ÐÞ' => 'å…š', + 'Ðß' => '冔', + 'Ðà' => '冓', + 'Ðá' => '凊', + 'Ðâ' => '凄', + 'Ðã' => '凅', + 'Ðä' => '凈', + 'Ðå' => '凎', + 'Ðæ' => '剡', + 'Ðç' => '剚', + 'Ðè' => '剒', + 'Ðé' => '剞', + 'Ðê' => '剟', + 'Ðë' => '剕', + 'Ðì' => '剢', + 'Ðí' => 'å‹', + 'Ðî' => '匎', + 'Ðï' => '厞', + 'Ðð' => '唦', + 'Ðñ' => 'å“¢', + 'Ðò' => 'å”—', + 'Ðó' => 'å”’', + 'Ðô' => '哧', + 'Ðõ' => '哳', + 'Ðö' => '哤', + 'Ð÷' => '唚', + 'Ðø' => 'å“¿', + 'Ðù' => '唄', + 'Ðú' => '唈', + 'Ðû' => 'å“«', + 'Ðü' => '唑', + 'Ðý' => 'å”…', + 'Ðþ' => '哱', + 'Ñ@' => '唊', + 'ÑA' => 'å“»', + 'ÑB' => 'å“·', + 'ÑC' => '哸', + 'ÑD' => 'å“ ', + 'ÑE' => '唎', + 'ÑF' => '唃', + 'ÑG' => '唋', + 'ÑH' => 'åœ', + 'ÑI' => '圂', + 'ÑJ' => '埌', + 'ÑK' => 'å ²', + 'ÑL' => '埕', + 'ÑM' => '埒', + 'ÑN' => '垺', + 'ÑO' => '埆', + 'ÑP' => 'åž½', + 'ÑQ' => 'åž¼', + 'ÑR' => '垸', + 'ÑS' => '垶', + 'ÑT' => 'åž¿', + 'ÑU' => '埇', + 'ÑV' => 'åŸ', + 'ÑW' => 'åž¹', + 'ÑX' => 'åŸ', + 'ÑY' => '夎', + 'ÑZ' => '奊', + 'Ñ[' => '娙', + 'Ñ\\' => '娖', + 'Ñ]' => '娭', + 'Ñ^' => '娮', + 'Ñ_' => '娕', + 'Ñ`' => 'å¨', + 'Ña' => '娗', + 'Ñb' => '娊', + 'Ñc' => '娞', + 'Ñd' => '娳', + 'Ñe' => 'å­¬', + 'Ñf' => '宧', + 'Ñg' => 'å®­', + 'Ñh' => '宬', + 'Ñi' => 'å°ƒ', + 'Ñj' => 'å±–', + 'Ñk' => 'å±”', + 'Ñl' => '峬', + 'Ñm' => '峿', + 'Ñn' => 'å³®', + 'Ño' => 'å³±', + 'Ñp' => 'å³·', + 'Ñq' => 'å´€', + 'Ñr' => 'å³¹', + 'Ñs' => '帩', + 'Ñt' => '帨', + 'Ñu' => '庨', + 'Ñv' => '庮', + 'Ñw' => '庪', + 'Ñx' => '庬', + 'Ñy' => 'å¼³', + 'Ñz' => 'å¼°', + 'Ñ{' => '彧', + 'Ñ|' => 'æ', + 'Ñ}' => 'æš', + 'Ñ~' => 'æ§', + 'Ñ¡' => 'æ', + 'Ñ¢' => 'æ‚¢', + 'Ñ£' => '悈', + 'Ѥ' => 'æ‚€', + 'Ñ¥' => 'æ‚’', + 'Ѧ' => 'æ‚', + 'ѧ' => 'æ‚', + 'Ѩ' => '悃', + 'Ñ©' => 'æ‚•', + 'Ѫ' => 'æ‚›', + 'Ñ«' => 'æ‚—', + 'Ѭ' => '悇', + 'Ñ­' => 'æ‚œ', + 'Ñ®' => 'æ‚Ž', + 'ѯ' => '戙', + 'Ñ°' => '扆', + 'ѱ' => '拲', + 'Ѳ' => 'æŒ', + 'ѳ' => 'æ–', + 'Ñ´' => '挬', + 'ѵ' => 'æ„', + 'Ѷ' => 'æ…', + 'Ñ·' => '挶', + 'Ѹ' => 'æƒ', + 'ѹ' => 'æ¤', + 'Ѻ' => '挹', + 'Ñ»' => 'æ‹', + 'Ѽ' => 'æŠ', + 'ѽ' => '挼', + 'Ѿ' => '挩', + 'Ñ¿' => 'æ', + 'ÑÀ' => '挴', + 'ÑÁ' => 'æ˜', + 'ÑÂ' => 'æ”', + 'ÑÃ' => 'æ™', + 'ÑÄ' => '挭', + 'ÑÅ' => 'æ‡', + 'ÑÆ' => '挳', + 'ÑÇ' => 'æš', + 'ÑÈ' => 'æ‘', + 'ÑÉ' => '挸', + 'ÑÊ' => 'æ—', + 'ÑË' => 'æ€', + 'ÑÌ' => 'æˆ', + 'ÑÍ' => 'æ•Š', + 'ÑÎ' => '敆', + 'ÑÏ' => 'æ—†', + 'ÑÐ' => 'æ—ƒ', + 'ÑÑ' => 'æ—„', + 'ÑÒ' => 'æ—‚', + 'ÑÓ' => '晊', + 'ÑÔ' => '晟', + 'ÑÕ' => '晇', + 'ÑÖ' => '晑', + 'Ñ×' => '朒', + 'ÑØ' => '朓', + 'ÑÙ' => 'æ Ÿ', + 'ÑÚ' => 'æ š', + 'ÑÛ' => '桉', + 'ÑÜ' => 'æ ²', + 'ÑÝ' => 'æ ³', + 'ÑÞ' => 'æ »', + 'Ñß' => 'æ¡‹', + 'Ñà' => 'æ¡', + 'Ñá' => 'æ –', + 'Ñâ' => 'æ ±', + 'Ñã' => 'æ œ', + 'Ñä' => 'æ µ', + 'Ñå' => 'æ «', + 'Ñæ' => 'æ ­', + 'Ñç' => 'æ ¯', + 'Ñè' => 'æ¡Ž', + 'Ñé' => 'æ¡„', + 'Ñê' => 'æ ´', + 'Ñë' => 'æ ', + 'Ñì' => 'æ ’', + 'Ñí' => 'æ ”', + 'Ñî' => 'æ ¦', + 'Ñï' => 'æ ¨', + 'Ñð' => 'æ ®', + 'Ññ' => 'æ¡', + 'Ñò' => 'æ º', + 'Ñó' => 'æ ¥', + 'Ñô' => 'æ  ', + 'Ñõ' => '欬', + 'Ñö' => '欯', + 'Ñ÷' => '欭', + 'Ñø' => '欱', + 'Ñù' => '欴', + 'Ñú' => 'æ­­', + 'Ñû' => 'è‚‚', + 'Ñü' => '殈', + 'Ñý' => '毦', + 'Ñþ' => '毤', + 'Ò@' => '毨', + 'ÒA' => '毣', + 'ÒB' => '毢', + 'ÒC' => '毧', + 'ÒD' => 'æ°¥', + 'ÒE' => '浺', + 'ÒF' => 'æµ£', + 'ÒG' => '浤', + 'ÒH' => '浶', + 'ÒI' => 'æ´', + 'ÒJ' => '浡', + 'ÒK' => '涒', + 'ÒL' => '浘', + 'ÒM' => 'æµ¢', + 'ÒN' => 'æµ­', + 'ÒO' => '浯', + 'ÒP' => '涑', + 'ÒQ' => 'æ¶', + 'ÒR' => 'æ·¯', + 'ÒS' => '浿', + 'ÒT' => '涆', + 'ÒU' => '浞', + 'ÒV' => '浧', + 'ÒW' => 'æµ ', + 'ÒX' => '涗', + 'ÒY' => 'æµ°', + 'ÒZ' => 'æµ¼', + 'Ò[' => '浟', + 'Ò\\' => '涂', + 'Ò]' => '涘', + 'Ò^' => 'æ´¯', + 'Ò_' => '浨', + 'Ò`' => '涋', + 'Òa' => 'æµ¾', + 'Òb' => '涀', + 'Òc' => '涄', + 'Òd' => 'æ´–', + 'Òe' => '涃', + 'Òf' => 'æµ»', + 'Òg' => 'æµ½', + 'Òh' => 'æµµ', + 'Òi' => 'æ¶', + 'Òj' => '烜', + 'Òk' => '烓', + 'Òl' => '烑', + 'Òm' => 'çƒ', + 'Òn' => '烋', + 'Òo' => 'ç¼¹', + 'Òp' => '烢', + 'Òq' => '烗', + 'Òr' => '烒', + 'Òs' => '烞', + 'Òt' => '烠', + 'Òu' => '烔', + 'Òv' => 'çƒ', + 'Òw' => '烅', + 'Òx' => '烆', + 'Òy' => '烇', + 'Òz' => '烚', + 'Ò{' => '烎', + 'Ò|' => '烡', + 'Ò}' => '牂', + 'Ò~' => '牸', + 'Ò¡' => '牷', + 'Ò¢' => '牶', + 'Ò£' => '猀', + 'Ò¤' => '狺', + 'Ò¥' => 'ç‹´', + 'Ò¦' => '狾', + 'Ò§' => '狶', + 'Ò¨' => '狳', + 'Ò©' => 'ç‹»', + 'Òª' => 'çŒ', + 'Ò«' => 'ç“', + 'Ò¬' => 'ç™', + 'Ò­' => 'ç¥', + 'Ò®' => 'ç–', + 'Ò¯' => '玼', + 'Ò°' => 'ç§', + 'Ò±' => 'ç£', + 'Ò²' => 'ç©', + 'Ò³' => 'çœ', + 'Ò´' => 'ç’', + 'Òµ' => 'ç›', + 'Ò¶' => 'ç”', + 'Ò·' => 'ç', + 'Ò¸' => 'çš', + 'Ò¹' => 'ç—', + 'Òº' => 'ç˜', + 'Ò»' => 'ç¨', + 'Ò¼' => 'ç“ž', + 'Ò½' => 'ç“Ÿ', + 'Ò¾' => 'ç“´', + 'Ò¿' => '瓵', + 'ÒÀ' => '甡', + 'ÒÁ' => 'ç•›', + 'ÒÂ' => 'ç•Ÿ', + 'ÒÃ' => 'ç–°', + 'ÒÄ' => 'ç—', + 'ÒÅ' => 'ç–»', + 'ÒÆ' => 'ç—„', + 'ÒÇ' => 'ç—€', + 'ÒÈ' => 'ç–¿', + 'ÒÉ' => 'ç–¶', + 'ÒÊ' => 'ç–º', + 'ÒË' => '皊', + 'ÒÌ' => '盉', + 'ÒÍ' => 'çœ', + 'ÒÎ' => '眛', + 'ÒÏ' => 'çœ', + 'ÒÐ' => '眓', + 'ÒÑ' => '眒', + 'ÒÒ' => '眣', + 'ÒÓ' => '眑', + 'ÒÔ' => '眕', + 'ÒÕ' => '眙', + 'ÒÖ' => '眚', + 'Ò×' => '眢', + 'ÒØ' => '眧', + 'ÒÙ' => 'ç £', + 'ÒÚ' => 'ç ¬', + 'ÒÛ' => 'ç ¢', + 'ÒÜ' => 'ç µ', + 'ÒÝ' => 'ç ¯', + 'ÒÞ' => 'ç ¨', + 'Òß' => 'ç ®', + 'Òà' => 'ç «', + 'Òá' => 'ç ¡', + 'Òâ' => 'ç ©', + 'Òã' => 'ç ³', + 'Òä' => 'ç ª', + 'Òå' => 'ç ±', + 'Òæ' => '祔', + 'Òç' => '祛', + 'Òè' => 'ç¥', + 'Òé' => '祜', + 'Òê' => '祓', + 'Òë' => '祒', + 'Òì' => '祑', + 'Òí' => '秫', + 'Òî' => '秬', + 'Òï' => '秠', + 'Òð' => '秮', + 'Òñ' => '秭', + 'Òò' => '秪', + 'Òó' => '秜', + 'Òô' => '秞', + 'Òõ' => 'ç§', + 'Òö' => '窆', + 'Ò÷' => '窉', + 'Òø' => '窅', + 'Òù' => '窋', + 'Òú' => '窌', + 'Òû' => '窊', + 'Òü' => '窇', + 'Òý' => '竘', + 'Òþ' => 'ç¬', + 'Ó@' => '笄', + 'ÓA' => '笓', + 'ÓB' => '笅', + 'ÓC' => 'ç¬', + 'ÓD' => '笈', + 'ÓE' => '笊', + 'ÓF' => '笎', + 'ÓG' => '笉', + 'ÓH' => '笒', + 'ÓI' => '粄', + 'ÓJ' => '粑', + 'ÓK' => '粊', + 'ÓL' => '粌', + 'ÓM' => '粈', + 'ÓN' => 'ç²', + 'ÓO' => 'ç²…', + 'ÓP' => 'ç´ž', + 'ÓQ' => 'ç´', + 'ÓR' => 'ç´‘', + 'ÓS' => 'ç´Ž', + 'ÓT' => 'ç´˜', + 'ÓU' => 'ç´–', + 'ÓV' => 'ç´“', + 'ÓW' => 'ç´Ÿ', + 'ÓX' => 'ç´’', + 'ÓY' => 'ç´', + 'ÓZ' => 'ç´Œ', + 'Ó[' => '罜', + 'Ó\\' => '罡', + 'Ó]' => '罞', + 'Ó^' => 'ç½ ', + 'Ó_' => 'ç½', + 'Ó`' => 'ç½›', + 'Óa' => 'ç¾–', + 'Ób' => 'ç¾’', + 'Óc' => '翃', + 'Ód' => 'ç¿‚', + 'Óe' => 'ç¿€', + 'Óf' => '耖', + 'Óg' => '耾', + 'Óh' => '耹', + 'Ói' => '胺', + 'Ój' => '胲', + 'Ók' => '胹', + 'Ól' => '胵', + 'Óm' => 'è„', + 'Ón' => '胻', + 'Óo' => 'è„€', + 'Óp' => 'èˆ', + 'Óq' => '舯', + 'Ór' => '舥', + 'Ós' => '茳', + 'Ót' => '茭', + 'Óu' => 'è„', + 'Óv' => '茙', + 'Ów' => 'è‘', + 'Óx' => '茥', + 'Óy' => 'è–', + 'Óz' => '茿', + 'Ó{' => 'è', + 'Ó|' => '茦', + 'Ó}' => '茜', + 'Ó~' => '茢', + 'Ó¡' => 'è‚', + 'Ó¢' => 'èŽ', + 'Ó£' => '茛', + 'Ó¤' => '茪', + 'Ó¥' => '茈', + 'Ó¦' => '茼', + 'Ó§' => 'è', + 'Ó¨' => '茖', + 'Ó©' => '茤', + 'Óª' => '茠', + 'Ó«' => '茷', + 'Ó¬' => '茯', + 'Ó­' => '茩', + 'Ó®' => 'è‡', + 'Ó¯' => 'è…', + 'Ó°' => 'èŒ', + 'Ó±' => 'è“', + 'Ó²' => '茞', + 'Ó³' => '茬', + 'Ó´' => 'è‹', + 'Óµ' => '茧', + 'Ó¶' => 'èˆ', + 'Ó·' => '虓', + 'Ó¸' => 'è™’', + 'Ó¹' => '蚢', + 'Óº' => '蚨', + 'Ó»' => 'èš–', + 'Ó¼' => 'èš', + 'Ó½' => 'èš‘', + 'Ó¾' => 'èšž', + 'Ó¿' => '蚇', + 'ÓÀ' => 'èš—', + 'ÓÁ' => '蚆', + 'ÓÂ' => 'èš‹', + 'ÓÃ' => 'èšš', + 'ÓÄ' => 'èš…', + 'ÓÅ' => '蚥', + 'ÓÆ' => 'èš™', + 'ÓÇ' => 'èš¡', + 'ÓÈ' => '蚧', + 'ÓÉ' => 'èš•', + 'ÓÊ' => '蚘', + 'ÓË' => '蚎', + 'ÓÌ' => 'èš', + 'ÓÍ' => 'èš', + 'ÓÎ' => 'èš”', + 'ÓÏ' => '衃', + 'ÓÐ' => 'è¡„', + 'ÓÑ' => 'è¡­', + 'ÓÒ' => '衵', + 'ÓÓ' => '衶', + 'ÓÔ' => '衲', + 'ÓÕ' => '袀', + 'ÓÖ' => '衱', + 'Ó×' => 'è¡¿', + 'ÓØ' => '衯', + 'ÓÙ' => '袃', + 'ÓÚ' => '衾', + 'ÓÛ' => 'è¡´', + 'ÓÜ' => '衼', + 'ÓÝ' => '訒', + 'ÓÞ' => '豇', + 'Óß' => 'è±—', + 'Óà' => 'è±»', + 'Óá' => '貤', + 'Óâ' => 'è²£', + 'Óã' => '赶', + 'Óä' => '赸', + 'Óå' => '趵', + 'Óæ' => '趷', + 'Óç' => '趶', + 'Óè' => '軑', + 'Óé' => '軓', + 'Óê' => '迾', + 'Óë' => '迵', + 'Óì' => '适', + 'Óí' => 'è¿¿', + 'Óî' => 'è¿»', + 'Óï' => '逄', + 'Óð' => '迼', + 'Óñ' => '迶', + 'Óò' => '郖', + 'Óó' => '郠', + 'Óô' => '郙', + 'Óõ' => '郚', + 'Óö' => '郣', + 'Ó÷' => '郟', + 'Óø' => '郥', + 'Óù' => '郘', + 'Óú' => '郛', + 'Óû' => '郗', + 'Óü' => '郜', + 'Óý' => '郤', + 'Óþ' => 'é…', + 'Ô@' => 'é…Ž', + 'ÔA' => 'é…', + 'ÔB' => '釕', + 'ÔC' => '釢', + 'ÔD' => '釚', + 'ÔE' => '陜', + 'ÔF' => '陟', + 'ÔG' => 'éš¼', + 'ÔH' => '飣', + 'ÔI' => 'é«Ÿ', + 'ÔJ' => '鬯', + 'ÔK' => '乿', + 'ÔL' => 'å°', + 'ÔM' => 'åª', + 'ÔN' => 'å¡', + 'ÔO' => 'åž', + 'ÔP' => 'å ', + 'ÔQ' => 'å“', + 'ÔR' => 'å‹', + 'ÔS' => 'å', + 'ÔT' => 'å²', + 'ÔU' => 'åˆ', + 'ÔV' => 'å', + 'ÔW' => 'å', + 'ÔX' => 'å›', + 'ÔY' => 'åŠ', + 'ÔZ' => 'å¢', + 'Ô[' => '倕', + 'Ô\\' => 'å…', + 'Ô]' => 'åŸ', + 'Ô^' => 'å©', + 'Ô_' => 'å«', + 'Ô`' => 'å£', + 'Ôa' => 'å¤', + 'Ôb' => 'å†', + 'Ôc' => 'å€', + 'Ôd' => 'å®', + 'Ôe' => 'å³', + 'Ôf' => 'å—', + 'Ôg' => 'å‘', + 'Ôh' => 'å‡', + 'Ôi' => '剫', + 'Ôj' => '剭', + 'Ôk' => '剬', + 'Ôl' => '剮', + 'Ôm' => 'å‹–', + 'Ôn' => 'å‹“', + 'Ôo' => '匭', + 'Ôp' => '厜', + 'Ôq' => '啵', + 'Ôr' => '啶', + 'Ôs' => '唼', + 'Ôt' => 'å•', + 'Ôu' => 'å•', + 'Ôv' => 'å”´', + 'Ôw' => '唪', + 'Ôx' => 'å•‘', + 'Ôy' => 'å•¢', + 'Ôz' => '唶', + 'Ô{' => '唵', + 'Ô|' => 'å”°', + 'Ô}' => 'å•’', + 'Ô~' => 'å•…', + 'Ô¡' => '唌', + 'Ô¢' => '唲', + 'Ô£' => 'å•¥', + 'Ô¤' => 'å•Ž', + 'Ô¥' => '唹', + 'Ô¦' => '啈', + 'Ô§' => 'å”­', + 'Ô¨' => 'å”»', + 'Ô©' => 'å•€', + 'Ôª' => 'å•‹', + 'Ô«' => '圊', + 'Ô¬' => '圇', + 'Ô­' => '埻', + 'Ô®' => 'å ”', + 'Ô¯' => '埢', + 'Ô°' => '埶', + 'Ô±' => '埜', + 'Ô²' => '埴', + 'Ô³' => 'å €', + 'Ô´' => '埭', + 'Ôµ' => '埽', + 'Ô¶' => 'å ˆ', + 'Ô·' => '埸', + 'Ô¸' => 'å ‹', + 'Ô¹' => '埳', + 'Ôº' => 'åŸ', + 'Ô»' => 'å ‡', + 'Ô¼' => '埮', + 'Ô½' => '埣', + 'Ô¾' => '埲', + 'Ô¿' => '埥', + 'ÔÀ' => '埬', + 'ÔÁ' => '埡', + 'ÔÂ' => 'å Ž', + 'ÔÃ' => '埼', + 'ÔÄ' => 'å ', + 'ÔÅ' => '埧', + 'ÔÆ' => 'å ', + 'ÔÇ' => 'å Œ', + 'ÔÈ' => '埱', + 'ÔÉ' => '埩', + 'ÔÊ' => '埰', + 'ÔË' => 'å ', + 'ÔÌ' => 'å „', + 'ÔÍ' => '奜', + 'ÔÎ' => 'å© ', + 'ÔÏ' => '婘', + 'ÔÐ' => 'å©•', + 'ÔÑ' => '婧', + 'ÔÒ' => 'å©ž', + 'ÔÓ' => '娸', + 'ÔÔ' => '娵', + 'ÔÕ' => 'å©­', + 'ÔÖ' => 'å©', + 'Ô×' => 'å©Ÿ', + 'ÔØ' => 'å©¥', + 'ÔÙ' => '婬', + 'ÔÚ' => 'å©“', + 'ÔÛ' => '婤', + 'ÔÜ' => 'å©—', + 'ÔÝ' => '婃', + 'ÔÞ' => 'å©', + 'Ôß' => 'å©’', + 'Ôà' => 'å©„', + 'Ôá' => 'å©›', + 'Ôâ' => '婈', + 'Ôã' => '媎', + 'Ôä' => '娾', + 'Ôå' => 'å©', + 'Ôæ' => '娹', + 'Ôç' => 'å©Œ', + 'Ôè' => 'å©°', + 'Ôé' => 'å©©', + 'Ôê' => '婇', + 'Ôë' => 'å©‘', + 'Ôì' => 'å©–', + 'Ôí' => 'å©‚', + 'Ôî' => 'å©œ', + 'Ôï' => 'å­²', + 'Ôð' => 'å­®', + 'Ôñ' => 'å¯', + 'Ôò' => '寀', + 'Ôó' => 'å±™', + 'Ôô' => 'å´ž', + 'Ôõ' => 'å´‹', + 'Ôö' => 'å´', + 'Ô÷' => 'å´š', + 'Ôø' => 'å´ ', + 'Ôù' => 'å´Œ', + 'Ôú' => 'å´¨', + 'Ôû' => 'å´', + 'Ôü' => 'å´¦', + 'Ôý' => 'å´¥', + 'Ôþ' => 'å´', + 'Õ@' => 'å´°', + 'ÕA' => 'å´’', + 'ÕB' => 'å´£', + 'ÕC' => 'å´Ÿ', + 'ÕD' => 'å´®', + 'ÕE' => '帾', + 'ÕF' => '帴', + 'ÕG' => '庱', + 'ÕH' => '庴', + 'ÕI' => '庹', + 'ÕJ' => '庲', + 'ÕK' => '庳', + 'ÕL' => '弶', + 'ÕM' => '弸', + 'ÕN' => 'å¾›', + 'ÕO' => 'å¾–', + 'ÕP' => '徟', + 'ÕQ' => 'æ‚Š', + 'ÕR' => 'æ‚', + 'ÕS' => '悆', + 'ÕT' => '悾', + 'ÕU' => 'æ‚°', + 'ÕV' => '悺', + 'ÕW' => '惓', + 'ÕX' => '惔', + 'ÕY' => 'æƒ', + 'ÕZ' => '惤', + 'Õ[' => '惙', + 'Õ\\' => 'æƒ', + 'Õ]' => '惈', + 'Õ^' => '悱', + 'Õ_' => '惛', + 'Õ`' => 'æ‚·', + 'Õa' => '惊', + 'Õb' => 'æ‚¿', + 'Õc' => '惃', + 'Õd' => 'æƒ', + 'Õe' => '惀', + 'Õf' => '挲', + 'Õg' => 'æ¥', + 'Õh' => '掊', + 'Õi' => '掂', + 'Õj' => 'æ½', + 'Õk' => '掽', + 'Õl' => '掞', + 'Õm' => '掭', + 'Õn' => 'æŽ', + 'Õo' => '掗', + 'Õp' => '掫', + 'Õq' => '掎', + 'Õr' => 'æ¯', + 'Õs' => '掇', + 'Õt' => 'æŽ', + 'Õu' => 'æ®', + 'Õv' => '掯', + 'Õw' => 'æµ', + 'Õx' => '掜', + 'Õy' => 'æ­', + 'Õz' => '掮', + 'Õ{' => 'æ¼', + 'Õ|' => '掤', + 'Õ}' => '挻', + 'Õ~' => '掟', + 'Õ¡' => 'æ¸', + 'Õ¢' => '掅', + 'Õ£' => 'æŽ', + 'Õ¤' => '掑', + 'Õ¥' => 'æŽ', + 'Õ¦' => 'æ°', + 'Õ§' => 'æ•“', + 'Õ¨' => 'æ—', + 'Õ©' => '晥', + 'Õª' => '晡', + 'Õ«' => 'æ™›', + 'Õ¬' => 'æ™™', + 'Õ­' => '晜', + 'Õ®' => '晢', + 'Õ¯' => '朘', + 'Õ°' => '桹', + 'Õ±' => '梇', + 'Õ²' => 'æ¢', + 'Õ³' => '梜', + 'Õ´' => 'æ¡­', + 'Õµ' => 'æ¡®', + 'Õ¶' => '梮', + 'Õ·' => '梫', + 'Õ¸' => '楖', + 'Õ¹' => '桯', + 'Õº' => '梣', + 'Õ»' => '梬', + 'Õ¼' => '梩', + 'Õ½' => '桵', + 'Õ¾' => 'æ¡´', + 'Õ¿' => '梲', + 'ÕÀ' => 'æ¢', + 'ÕÁ' => 'æ¡·', + 'ÕÂ' => '梒', + 'ÕÃ' => '桼', + 'ÕÄ' => 'æ¡«', + 'ÕÅ' => '桲', + 'ÕÆ' => '梪', + 'ÕÇ' => '梀', + 'ÕÈ' => '桱', + 'ÕÉ' => '桾', + 'ÕÊ' => '梛', + 'ÕË' => '梖', + 'ÕÌ' => '梋', + 'ÕÍ' => '梠', + 'ÕÎ' => '梉', + 'ÕÏ' => '梤', + 'ÕÐ' => '桸', + 'ÕÑ' => 'æ¡»', + 'ÕÒ' => '梑', + 'ÕÓ' => '梌', + 'ÕÔ' => '梊', + 'ÕÕ' => '桽', + 'ÕÖ' => '欶', + 'Õ×' => '欳', + 'ÕØ' => '欷', + 'ÕÙ' => '欸', + 'ÕÚ' => '殑', + 'ÕÛ' => 'æ®', + 'ÕÜ' => 'æ®', + 'ÕÝ' => '殎', + 'ÕÞ' => '殌', + 'Õß' => 'æ°ª', + 'Õà' => 'æ·€', + 'Õá' => '涫', + 'Õâ' => '涴', + 'Õã' => '涳', + 'Õä' => 'æ¹´', + 'Õå' => '涬', + 'Õæ' => 'æ·©', + 'Õç' => 'æ·¢', + 'Õè' => '涷', + 'Õé' => 'æ·¶', + 'Õê' => 'æ·”', + 'Õë' => '渀', + 'Õì' => 'æ·ˆ', + 'Õí' => 'æ· ', + 'Õî' => 'æ·Ÿ', + 'Õï' => 'æ·–', + 'Õð' => '涾', + 'Õñ' => 'æ·¥', + 'Õò' => 'æ·œ', + 'Õó' => 'æ·', + 'Õô' => 'æ·›', + 'Õõ' => 'æ·´', + 'Õö' => 'æ·Š', + 'Õ÷' => '涽', + 'Õø' => 'æ·­', + 'Õù' => 'æ·°', + 'Õú' => '涺', + 'Õû' => 'æ·•', + 'Õü' => 'æ·‚', + 'Õý' => 'æ·', + 'Õþ' => 'æ·‰', + 'Ö@' => 'æ·', + 'ÖA' => 'æ·²', + 'ÖB' => 'æ·“', + 'ÖC' => 'æ·½', + 'ÖD' => 'æ·—', + 'ÖE' => 'æ·', + 'ÖF' => 'æ·£', + 'ÖG' => '涻', + 'ÖH' => '烺', + 'ÖI' => 'ç„', + 'ÖJ' => '烷', + 'ÖK' => 'ç„—', + 'ÖL' => '烴', + 'ÖM' => 'ç„Œ', + 'ÖN' => '烰', + 'ÖO' => 'ç„„', + 'ÖP' => '烳', + 'ÖQ' => 'ç„', + 'ÖR' => '烼', + 'ÖS' => '烿', + 'ÖT' => '焆', + 'ÖU' => 'ç„“', + 'ÖV' => 'ç„€', + 'ÖW' => '烸', + 'ÖX' => '烶', + 'ÖY' => 'ç„‹', + 'ÖZ' => 'ç„‚', + 'Ö[' => 'ç„Ž', + 'Ö\\' => '牾', + 'Ö]' => '牻', + 'Ö^' => '牼', + 'Ö_' => '牿', + 'Ö`' => 'çŒ', + 'Öa' => '猗', + 'Öb' => '猇', + 'Öc' => '猑', + 'Öd' => '猘', + 'Öe' => '猊', + 'Öf' => '猈', + 'Ög' => 'ç‹¿', + 'Öh' => 'çŒ', + 'Öi' => '猞', + 'Öj' => '玈', + 'Ök' => 'ç¶', + 'Öl' => 'ç¸', + 'Öm' => 'çµ', + 'Ön' => 'ç„', + 'Öo' => 'ç', + 'Öp' => 'ç½', + 'Öq' => 'ç‡', + 'Ör' => 'ç€', + 'Ös' => 'çº', + 'Öt' => 'ç¼', + 'Öu' => 'ç¿', + 'Öv' => 'çŒ', + 'Öw' => 'ç‹', + 'Öx' => 'ç´', + 'Öy' => 'çˆ', + 'Öz' => '畤', + 'Ö{' => 'ç•£', + 'Ö|' => 'ç—Ž', + 'Ö}' => 'ç—’', + 'Ö~' => 'ç—', + 'Ö¡' => 'ç—‹', + 'Ö¢' => 'ç—Œ', + 'Ö£' => 'ç—‘', + 'Ö¤' => 'ç—', + 'Ö¥' => 'çš', + 'Ö¦' => '皉', + 'Ö§' => '盓', + 'Ö¨' => '眹', + 'Ö©' => '眯', + 'Öª' => '眭', + 'Ö«' => '眱', + 'Ö¬' => '眲', + 'Ö­' => '眴', + 'Ö®' => '眳', + 'Ö¯' => '眽', + 'Ö°' => '眥', + 'Ö±' => '眻', + 'Ö²' => '眵', + 'Ö³' => '硈', + 'Ö´' => 'ç¡’', + 'Öµ' => '硉', + 'Ö¶' => 'ç¡', + 'Ö·' => 'ç¡Š', + 'Ö¸' => 'ç¡Œ', + 'Ö¹' => 'ç ¦', + 'Öº' => 'ç¡…', + 'Ö»' => 'ç¡', + 'Ö¼' => '祤', + 'Ö½' => '祧', + 'Ö¾' => '祩', + 'Ö¿' => '祪', + 'ÖÀ' => '祣', + 'ÖÁ' => '祫', + 'ÖÂ' => '祡', + 'ÖÃ' => '离', + 'ÖÄ' => '秺', + 'ÖÅ' => '秸', + 'ÖÆ' => '秶', + 'ÖÇ' => '秷', + 'ÖÈ' => 'çª', + 'ÖÉ' => '窔', + 'ÖÊ' => 'çª', + 'ÖË' => '笵', + 'ÖÌ' => 'ç­‡', + 'ÖÍ' => '笴', + 'ÖÎ' => '笥', + 'ÖÏ' => '笰', + 'ÖÐ' => '笢', + 'ÖÑ' => '笤', + 'ÖÒ' => '笳', + 'ÖÓ' => '笘', + 'ÖÔ' => '笪', + 'ÖÕ' => 'ç¬', + 'ÖÖ' => '笱', + 'Ö×' => '笫', + 'ÖØ' => '笭', + 'ÖÙ' => '笯', + 'ÖÚ' => '笲', + 'ÖÛ' => '笸', + 'ÖÜ' => '笚', + 'ÖÝ' => '笣', + 'ÖÞ' => 'ç²”', + 'Öß' => '粘', + 'Öà' => 'ç²–', + 'Öá' => 'ç²£', + 'Öâ' => 'ç´µ', + 'Öã' => 'ç´½', + 'Öä' => 'ç´¸', + 'Öå' => 'ç´¶', + 'Öæ' => 'ç´º', + 'Öç' => 'çµ…', + 'Öè' => 'ç´¬', + 'Öé' => 'ç´©', + 'Öê' => 'çµ', + 'Öë' => '絇', + 'Öì' => 'ç´¾', + 'Öí' => 'ç´¿', + 'Öî' => '絊', + 'Öï' => 'ç´»', + 'Öð' => 'ç´¨', + 'Öñ' => 'ç½£', + 'Öò' => '羕', + 'Öó' => '羜', + 'Öô' => 'ç¾', + 'Öõ' => 'ç¾›', + 'Öö' => 'ç¿Š', + 'Ö÷' => 'ç¿‹', + 'Öø' => 'ç¿', + 'Öù' => 'ç¿', + 'Öú' => 'ç¿‘', + 'Öû' => '翇', + 'Öü' => 'ç¿', + 'Öý' => '翉', + 'Öþ' => '耟', + '×@' => '耞', + '×A' => '耛', + '×B' => 'è‡', + '×C' => 'èƒ', + '×D' => 'èˆ', + '×E' => '脘', + '×F' => 'è„¥', + '×G' => 'è„™', + '×H' => 'è„›', + '×I' => 'è„­', + '×J' => 'è„Ÿ', + '×K' => '脬', + '×L' => 'è„ž', + '×M' => 'è„¡', + '×N' => 'è„•', + '×O' => '脧', + '×P' => 'è„', + '×Q' => 'è„¢', + '×R' => '舑', + '×S' => '舸', + '×T' => '舳', + '×U' => '舺', + '×V' => '舴', + '×W' => '舲', + '×X' => '艴', + '×Y' => 'èŽ', + '×Z' => '莣', + '×[' => '莨', + '×\\' => 'èŽ', + '×]' => 'èº', + '×^' => 'è³', + '×_' => '莤', + '×`' => 'è´', + '×a' => 'èŽ', + '×b' => 'èŽ', + '×c' => '莕', + '×d' => '莙', + '×e' => 'èµ', + '×f' => '莔', + '×g' => '莩', + '×h' => 'è½', + '×i' => '莃', + '×j' => '莌', + '×k' => 'èŽ', + '×l' => '莛', + '×m' => '莪', + '×n' => '莋', + '×o' => 'è¾', + '×p' => '莥', + '×q' => '莯', + '×r' => '莈', + '×s' => '莗', + '×t' => '莰', + '×u' => 'è¿', + '×v' => '莦', + '×w' => '莇', + '×x' => '莮', + '×y' => 'è¶', + '×z' => '莚', + '×{' => 'è™™', + '×|' => 'è™–', + '×}' => 'èš¿', + '×~' => 'èš·', + 'ס' => '蛂', + '×¢' => 'è›', + '×£' => 'è›…', + 'פ' => '蚺', + '×¥' => 'èš°', + 'צ' => '蛈', + 'ק' => 'èš¹', + 'ר' => 'èš³', + 'ש' => '蚸', + 'ת' => '蛌', + '׫' => 'èš´', + '׬' => 'èš»', + '×­' => 'èš¼', + '×®' => '蛃', + 'ׯ' => 'èš½', + '×°' => 'èš¾', + '×±' => 'è¡’', + 'ײ' => '袉', + '׳' => '袕', + '×´' => '袨', + '×µ' => '袢', + '׶' => '袪', + '×·' => '袚', + '׸' => '袑', + '×¹' => '袡', + '׺' => '袟', + '×»' => '袘', + '×¼' => '袧', + '×½' => '袙', + '×¾' => '袛', + '׿' => '袗', + '×À' => '袤', + '×Á' => '袬', + '×Â' => '袌', + '×Ã' => '袓', + '×Ä' => '袎', + '×Å' => '覂', + '×Æ' => '觖', + '×Ç' => '觙', + '×È' => '觕', + '×É' => '訰', + '×Ê' => '訧', + '×Ë' => '訬', + '×Ì' => '訞', + '×Í' => 'è°¹', + '×Î' => 'è°»', + '×Ï' => '豜', + '×Ð' => 'è±', + '×Ñ' => 'è±½', + '×Ò' => 'è²¥', + '×Ó' => 'èµ½', + '×Ô' => 'èµ»', + '×Õ' => 'èµ¹', + '×Ö' => '趼', + '××' => 'è·‚', + '×Ø' => '趹', + '×Ù' => '趿', + '×Ú' => 'è·', + '×Û' => '軘', + '×Ü' => '軞', + '×Ý' => 'è»', + '×Þ' => '軜', + '×ß' => 'è»—', + '×à' => 'è» ', + '×á' => '軡', + '×â' => '逤', + '×ã' => '逋', + '×ä' => '逑', + '×å' => '逜', + '×æ' => '逌', + '×ç' => '逡', + '×è' => '郯', + '×é' => '郪', + '×ê' => '郰', + '×ë' => '郴', + '×ì' => '郲', + '×í' => '郳', + '×î' => '郔', + '×ï' => '郫', + '×ð' => '郬', + '×ñ' => '郩', + '×ò' => 'é…–', + '×ó' => 'é…˜', + '×ô' => 'é…š', + '×õ' => 'é…“', + '×ö' => 'é…•', + '×÷' => '釬', + '×ø' => '釴', + '×ù' => '釱', + '×ú' => '釳', + '×û' => '釸', + '×ü' => '釤', + '×ý' => '釹', + '×þ' => '釪', + 'Ø@' => '釫', + 'ØA' => '釷', + 'ØB' => '釨', + 'ØC' => '釮', + 'ØD' => '镺', + 'ØE' => 'é–†', + 'ØF' => 'é–ˆ', + 'ØG' => '陼', + 'ØH' => 'é™­', + 'ØI' => '陫', + 'ØJ' => 'é™±', + 'ØK' => '陯', + 'ØL' => 'éš¿', + 'ØM' => 'éª', + 'ØN' => 'é „', + 'ØO' => '飥', + 'ØP' => '馗', + 'ØQ' => 'å‚›', + 'ØR' => 'å‚•', + 'ØS' => 'å‚”', + 'ØT' => 'å‚ž', + 'ØU' => 'å‚‹', + 'ØV' => 'å‚£', + 'ØW' => '傃', + 'ØX' => 'å‚Œ', + 'ØY' => 'å‚Ž', + 'ØZ' => 'å‚', + 'Ø[' => 'å¨', + 'Ø\\' => 'å‚œ', + 'Ø]' => 'å‚’', + 'Ø^' => 'å‚‚', + 'Ø_' => '傇', + 'Ø`' => 'å…Ÿ', + 'Øa' => '凔', + 'Øb' => '匒', + 'Øc' => '匑', + 'Ød' => '厤', + 'Øe' => '厧', + 'Øf' => 'å–‘', + 'Øg' => 'å–¨', + 'Øh' => 'å–¥', + 'Øi' => 'å–­', + 'Øj' => 'å•·', + 'Øk' => 'å™…', + 'Øl' => 'å–¢', + 'Øm' => 'å–“', + 'Øn' => 'å–ˆ', + 'Øo' => 'å–', + 'Øp' => 'å–µ', + 'Øq' => 'å–', + 'Ør' => 'å–£', + 'Øs' => 'å–’', + 'Øt' => 'å–¤', + 'Øu' => '啽', + 'Øv' => 'å–Œ', + 'Øw' => 'å–¦', + 'Øx' => 'å•¿', + 'Øy' => 'å–•', + 'Øz' => 'å–¡', + 'Ø{' => 'å–Ž', + 'Ø|' => '圌', + 'Ø}' => 'å ©', + 'Ø~' => 'å ·', + 'Ø¡' => 'å ™', + 'Ø¢' => 'å ž', + 'Ø£' => 'å §', + 'ؤ' => 'å £', + 'Ø¥' => 'å ¨', + 'ئ' => '埵', + 'ا' => '塈', + 'ب' => 'å ¥', + 'Ø©' => 'å œ', + 'ت' => 'å ›', + 'Ø«' => 'å ³', + 'ج' => 'å ¿', + 'Ø­' => 'å ¶', + 'Ø®' => 'å ®', + 'د' => 'å ¹', + 'Ø°' => 'å ¸', + 'ر' => 'å ­', + 'ز' => 'å ¬', + 'س' => 'å »', + 'Ø´' => '奡', + 'ص' => '媯', + 'ض' => '媔', + 'Ø·' => '媟', + 'ظ' => '婺', + 'ع' => '媢', + 'غ' => '媞', + 'Ø»' => '婸', + 'ؼ' => '媦', + 'ؽ' => '婼', + 'ؾ' => '媥', + 'Ø¿' => '媬', + 'ØÀ' => '媕', + 'ØÁ' => '媮', + 'ØÂ' => '娷', + 'ØÃ' => '媄', + 'ØÄ' => '媊', + 'ØÅ' => '媗', + 'ØÆ' => '媃', + 'ØÇ' => '媋', + 'ØÈ' => '媩', + 'ØÉ' => 'å©»', + 'ØÊ' => '婽', + 'ØË' => '媌', + 'ØÌ' => '媜', + 'ØÍ' => 'åª', + 'ØÎ' => '媓', + 'ØÏ' => 'åª', + 'ØÐ' => '寪', + 'ØÑ' => 'å¯', + 'ØÒ' => '寋', + 'ØÓ' => '寔', + 'ØÔ' => '寑', + 'ØÕ' => '寊', + 'ØÖ' => '寎', + 'Ø×' => 'å°Œ', + 'ØØ' => 'å°°', + 'ØÙ' => 'å´·', + 'ØÚ' => '嵃', + 'ØÛ' => '嵫', + 'ØÜ' => 'åµ', + 'ØÝ' => '嵋', + 'ØÞ' => 'å´¿', + 'Øß' => 'å´µ', + 'Øà' => '嵑', + 'Øá' => '嵎', + 'Øâ' => '嵕', + 'Øã' => 'å´³', + 'Øä' => 'å´º', + 'Øå' => 'åµ’', + 'Øæ' => 'å´½', + 'Øç' => 'å´±', + 'Øè' => 'åµ™', + 'Øé' => '嵂', + 'Øê' => 'å´¹', + 'Øë' => '嵉', + 'Øì' => 'å´¸', + 'Øí' => 'å´¼', + 'Øî' => 'å´²', + 'Øï' => 'å´¶', + 'Øð' => 'åµ€', + 'Øñ' => 'åµ…', + 'Øò' => '幄', + 'Øó' => 'å¹', + 'Øô' => '彘', + 'Øõ' => '徦', + 'Øö' => 'å¾¥', + 'Ø÷' => '徫', + 'Øø' => '惉', + 'Øù' => '悹', + 'Øú' => '惌', + 'Øû' => '惢', + 'Øü' => '惎', + 'Øý' => '惄', + 'Øþ' => 'æ„”', + 'Ù@' => '惲', + 'ÙA' => 'æ„Š', + 'ÙB' => 'æ„–', + 'ÙC' => 'æ„…', + 'ÙD' => '惵', + 'ÙE' => 'æ„“', + 'ÙF' => '惸', + 'ÙG' => '惼', + 'ÙH' => '惾', + 'ÙI' => 'æƒ', + 'ÙJ' => '愃', + 'ÙK' => '愘', + 'ÙL' => 'æ„', + 'ÙM' => 'æ„', + 'ÙN' => '惿', + 'ÙO' => 'æ„„', + 'ÙP' => 'æ„‹', + 'ÙQ' => '扊', + 'ÙR' => '掔', + 'ÙS' => '掱', + 'ÙT' => '掰', + 'ÙU' => 'æŽ', + 'ÙV' => 'æ¥', + 'ÙW' => 'æ¨', + 'ÙX' => 'æ¯', + 'ÙY' => 'æƒ', + 'ÙZ' => 'æ’', + 'Ù[' => 'æ³', + 'Ù\\' => 'æŠ', + 'Ù]' => 'æ ', + 'Ù^' => 'æ¶', + 'Ù_' => 'æ•', + 'Ù`' => 'æ²', + 'Ùa' => 'æµ', + 'Ùb' => 'æ‘¡', + 'Ùc' => 'æŸ', + 'Ùd' => '掾', + 'Ùe' => 'æ', + 'Ùf' => 'æœ', + 'Ùg' => 'æ„', + 'Ùh' => 'æ˜', + 'Ùi' => 'æ“', + 'Ùj' => 'æ‚', + 'Ùk' => 'æ‡', + 'Ùl' => 'æŒ', + 'Ùm' => 'æ‹', + 'Ùn' => 'æˆ', + 'Ùo' => 'æ°', + 'Ùp' => 'æ—', + 'Ùq' => 'æ™', + 'Ùr' => '攲', + 'Ùs' => '敧', + 'Ùt' => '敪', + 'Ùu' => '敤', + 'Ùv' => 'æ•œ', + 'Ùw' => '敨', + 'Ùx' => 'æ•¥', + 'Ùy' => 'æ–Œ', + 'Ùz' => 'æ–', + 'Ù{' => 'æ–ž', + 'Ù|' => 'æ–®', + 'Ù}' => 'æ—', + 'Ù~' => 'æ—’', + 'Ù¡' => '晼', + 'Ù¢' => '晬', + 'Ù£' => 'æ™»', + 'Ù¤' => '暀', + 'Ù¥' => 'æ™±', + 'Ù¦' => '晹', + 'Ù§' => '晪', + 'Ù¨' => '晲', + 'Ù©' => 'æœ', + 'Ùª' => '椌', + 'Ù«' => '棓', + 'Ù¬' => '椄', + 'Ù­' => '棜', + 'Ù®' => '椪', + 'Ù¯' => '棬', + 'Ù°' => '棪', + 'Ù±' => '棱', + 'Ù²' => 'æ¤', + 'Ù³' => '棖', + 'Ù´' => '棷', + 'Ùµ' => '棫', + 'Ù¶' => '棤', + 'Ù·' => '棶', + 'Ù¸' => '椓', + 'Ù¹' => 'æ¤', + 'Ùº' => '棳', + 'Ù»' => '棡', + 'Ù¼' => '椇', + 'Ù½' => '棌', + 'Ù¾' => '椈', + 'Ù¿' => '楰', + 'ÙÀ' => '梴', + 'ÙÁ' => '椑', + 'ÙÂ' => '棯', + 'ÙÃ' => '棆', + 'ÙÄ' => '椔', + 'ÙÅ' => '棸', + 'ÙÆ' => 'æ£', + 'ÙÇ' => '棽', + 'ÙÈ' => '棼', + 'ÙÉ' => '棨', + 'ÙÊ' => '椋', + 'ÙË' => '椊', + 'ÙÌ' => '椗', + 'ÙÍ' => '棎', + 'ÙÎ' => '棈', + 'ÙÏ' => 'æ£', + 'ÙÐ' => '棞', + 'ÙÑ' => '棦', + 'ÙÒ' => '棴', + 'ÙÓ' => '棑', + 'ÙÔ' => '椆', + 'ÙÕ' => '棔', + 'ÙÖ' => '棩', + 'Ù×' => '椕', + 'ÙØ' => '椥', + 'ÙÙ' => '棇', + 'ÙÚ' => '欹', + 'ÙÛ' => '欻', + 'ÙÜ' => '欿', + 'ÙÝ' => '欼', + 'ÙÞ' => 'æ®”', + 'Ùß' => 'æ®—', + 'Ùà' => 'æ®™', + 'Ùá' => '殕', + 'Ùâ' => '殽', + 'Ùã' => '毰', + 'Ùä' => '毲', + 'Ùå' => '毳', + 'Ùæ' => 'æ°°', + 'Ùç' => 'æ·¼', + 'Ùè' => '湆', + 'Ùé' => '湇', + 'Ùê' => '渟', + 'Ùë' => '湉', + 'Ùì' => '溈', + 'Ùí' => '渼', + 'Ùî' => '渽', + 'Ùï' => 'æ¹…', + 'Ùð' => 'æ¹¢', + 'Ùñ' => '渫', + 'Ùò' => '渿', + 'Ùó' => 'æ¹', + 'Ùô' => 'æ¹', + 'Ùõ' => 'æ¹³', + 'Ùö' => '渜', + 'Ù÷' => '渳', + 'Ùø' => '湋', + 'Ùù' => 'æ¹€', + 'Ùú' => '湑', + 'Ùû' => '渻', + 'Ùü' => '渃', + 'Ùý' => '渮', + 'Ùþ' => '湞', + 'Ú@' => '湨', + 'ÚA' => '湜', + 'ÚB' => '湡', + 'ÚC' => '渱', + 'ÚD' => '渨', + 'ÚE' => 'æ¹ ', + 'ÚF' => 'æ¹±', + 'ÚG' => '湫', + 'ÚH' => '渹', + 'ÚI' => '渢', + 'ÚJ' => '渰', + 'ÚK' => '湓', + 'ÚL' => 'æ¹¥', + 'ÚM' => '渧', + 'ÚN' => '湸', + 'ÚO' => '湤', + 'ÚP' => 'æ¹·', + 'ÚQ' => '湕', + 'ÚR' => 'æ¹¹', + 'ÚS' => 'æ¹’', + 'ÚT' => '湦', + 'ÚU' => '渵', + 'ÚV' => '渶', + 'ÚW' => '湚', + 'ÚX' => 'ç„ ', + 'ÚY' => 'ç„ž', + 'ÚZ' => '焯', + 'Ú[' => '烻', + 'Ú\\' => 'ç„®', + 'Ú]' => '焱', + 'Ú^' => 'ç„£', + 'Ú_' => 'ç„¥', + 'Ú`' => 'ç„¢', + 'Úa' => '焲', + 'Úb' => 'ç„Ÿ', + 'Úc' => '焨', + 'Úd' => '焺', + 'Úe' => 'ç„›', + 'Úf' => '牋', + 'Úg' => '牚', + 'Úh' => '犈', + 'Úi' => '犉', + 'Új' => '犆', + 'Úk' => '犅', + 'Úl' => '犋', + 'Úm' => '猒', + 'Ún' => '猋', + 'Úo' => '猰', + 'Úp' => '猢', + 'Úq' => '猱', + 'Úr' => '猳', + 'Ús' => '猧', + 'Út' => '猲', + 'Úu' => '猭', + 'Úv' => '猦', + 'Úw' => '猣', + 'Úx' => '猵', + 'Úy' => '猌', + 'Úz' => 'ç®', + 'Ú{' => 'ç¬', + 'Ú|' => 'ç°', + 'Ú}' => 'ç«', + 'Ú~' => 'ç–', + 'Ú¡' => 'çš', + 'Ú¢' => 'ç¡', + 'Ú£' => 'ç­', + 'Ú¤' => 'ç±', + 'Ú¥' => 'ç¤', + 'Ú¦' => 'ç£', + 'Ú§' => 'ç', + 'Ú¨' => 'ç©', + 'Ú©' => 'ç ', + 'Úª' => 'ç²', + 'Ú«' => 'ç“»', + 'Ú¬' => '甯', + 'Ú­' => '畯', + 'Ú®' => '畬', + 'Ú¯' => 'ç—§', + 'Ú°' => 'ç—š', + 'Ú±' => 'ç—¡', + 'Ú²' => 'ç—¦', + 'Ú³' => 'ç—', + 'Ú´' => 'ç—Ÿ', + 'Úµ' => 'ç—¤', + 'Ú¶' => 'ç——', + 'Ú·' => 'çš•', + 'Ú¸' => 'çš’', + 'Ú¹' => '盚', + 'Úº' => 'ç†', + 'Ú»' => 'ç‡', + 'Ú¼' => 'ç„', + 'Ú½' => 'ç', + 'Ú¾' => 'ç…', + 'Ú¿' => 'çŠ', + 'ÚÀ' => 'çŽ', + 'ÚÁ' => 'ç‹', + 'ÚÂ' => 'çŒ', + 'ÚÃ' => '矞', + 'ÚÄ' => '矬', + 'ÚÅ' => 'ç¡ ', + 'ÚÆ' => '硤', + 'ÚÇ' => 'ç¡¥', + 'ÚÈ' => 'ç¡œ', + 'ÚÉ' => 'ç¡­', + 'ÚÊ' => '硱', + 'ÚË' => '硪', + 'ÚÌ' => 'ç¡®', + 'ÚÍ' => 'ç¡°', + 'ÚÎ' => 'ç¡©', + 'ÚÏ' => '硨', + 'ÚÐ' => 'ç¡ž', + 'ÚÑ' => 'ç¡¢', + 'ÚÒ' => '祴', + 'ÚÓ' => '祳', + 'ÚÔ' => '祲', + 'ÚÕ' => '祰', + 'ÚÖ' => '稂', + 'Ú×' => '稊', + 'ÚØ' => '稃', + 'ÚÙ' => '稌', + 'ÚÚ' => '稄', + 'ÚÛ' => '窙', + 'ÚÜ' => '竦', + 'ÚÝ' => '竤', + 'ÚÞ' => 'ç­Š', + 'Úß' => '笻', + 'Úà' => 'ç­„', + 'Úá' => 'ç­ˆ', + 'Úâ' => 'ç­Œ', + 'Úã' => 'ç­Ž', + 'Úä' => 'ç­€', + 'Úå' => 'ç­˜', + 'Úæ' => 'ç­…', + 'Úç' => 'ç²¢', + 'Úè' => '粞', + 'Úé' => '粨', + 'Úê' => '粡', + 'Úë' => '絘', + 'Úì' => '絯', + 'Úí' => 'çµ£', + 'Úî' => '絓', + 'Úï' => 'çµ–', + 'Úð' => '絧', + 'Úñ' => '絪', + 'Úò' => 'çµ', + 'Úó' => 'çµ­', + 'Úô' => '絜', + 'Úõ' => '絫', + 'Úö' => 'çµ’', + 'Ú÷' => 'çµ”', + 'Úø' => '絩', + 'Úù' => '絑', + 'Úú' => '絟', + 'Úû' => '絎', + 'Úü' => 'ç¼¾', + 'Úý' => '缿', + 'Úþ' => 'ç½¥', + 'Û@' => '罦', + 'ÛA' => 'ç¾¢', + 'ÛB' => 'ç¾ ', + 'ÛC' => '羡', + 'ÛD' => 'ç¿—', + 'ÛE' => 'è‘', + 'ÛF' => 'è', + 'ÛG' => 'è', + 'ÛH' => '胾', + 'ÛI' => '胔', + 'ÛJ' => 'è…ƒ', + 'ÛK' => 'è…Š', + 'ÛL' => 'è…’', + 'ÛM' => 'è…', + 'ÛN' => 'è…‡', + 'ÛO' => '脽', + 'ÛP' => 'è…', + 'ÛQ' => '脺', + 'ÛR' => '臦', + 'ÛS' => '臮', + 'ÛT' => '臷', + 'ÛU' => '臸', + 'ÛV' => '臹', + 'ÛW' => '舄', + 'ÛX' => '舼', + 'ÛY' => '舽', + 'ÛZ' => '舿', + 'Û[' => '艵', + 'Û\\' => '茻', + 'Û]' => 'è', + 'Û^' => 'è¹', + 'Û_' => 'è£', + 'Û`' => 'è€', + 'Ûa' => 'è¨', + 'Ûb' => 'è’', + 'Ûc' => 'è§', + 'Ûd' => 'è¤', + 'Ûe' => 'è¼', + 'Ûf' => 'è¶', + 'Ûg' => 'è', + 'Ûh' => 'è†', + 'Ûi' => 'èˆ', + 'Ûj' => 'è«', + 'Ûk' => 'è£', + 'Ûl' => '莿', + 'Ûm' => 'è', + 'Ûn' => 'è', + 'Ûo' => 'è¥', + 'Ûp' => 'è˜', + 'Ûq' => 'è¿', + 'Ûr' => 'è¡', + 'Ûs' => 'è‹', + 'Ût' => 'èŽ', + 'Ûu' => 'è–', + 'Ûv' => 'èµ', + 'Ûw' => 'è‰', + 'Ûx' => 'è‰', + 'Ûy' => 'è', + 'Ûz' => 'èž', + 'Û{' => 'è‘', + 'Û|' => 'è†', + 'Û}' => 'è‚', + 'Û~' => 'è³', + 'Û¡' => 'è•', + 'Û¢' => 'èº', + 'Û£' => 'è‡', + 'Û¤' => 'è‘', + 'Û¥' => 'èª', + 'Û¦' => 'è“', + 'Û§' => 'èƒ', + 'Û¨' => 'è¬', + 'Û©' => 'è®', + 'Ûª' => 'è„', + 'Û«' => 'è»', + 'Û¬' => 'è—', + 'Û­' => 'è¢', + 'Û®' => 'è›', + 'Û¯' => 'è›', + 'Û°' => 'è¾', + 'Û±' => '蛘', + 'Û²' => '蛢', + 'Û³' => '蛦', + 'Û´' => '蛓', + 'Ûµ' => '蛣', + 'Û¶' => '蛚', + 'Û·' => '蛪', + 'Û¸' => 'è›', + 'Û¹' => '蛫', + 'Ûº' => '蛜', + 'Û»' => '蛬', + 'Û¼' => '蛩', + 'Û½' => 'è›—', + 'Û¾' => '蛨', + 'Û¿' => '蛑', + 'ÛÀ' => '衈', + 'ÛÁ' => 'è¡–', + 'ÛÂ' => 'è¡•', + 'ÛÃ' => '袺', + 'ÛÄ' => '裗', + 'ÛÅ' => '袹', + 'ÛÆ' => '袸', + 'ÛÇ' => '裀', + 'ÛÈ' => '袾', + 'ÛÉ' => '袶', + 'ÛÊ' => '袼', + 'ÛË' => '袷', + 'ÛÌ' => '袽', + 'ÛÍ' => '袲', + 'ÛÎ' => 'è¤', + 'ÛÏ' => '裉', + 'ÛÐ' => '覕', + 'ÛÑ' => '覘', + 'ÛÒ' => '覗', + 'ÛÓ' => 'è§', + 'ÛÔ' => '觚', + 'ÛÕ' => '觛', + 'ÛÖ' => 'è©Ž', + 'Û×' => 'è©', + 'ÛØ' => '訹', + 'ÛÙ' => 'è©™', + 'ÛÚ' => 'è©€', + 'ÛÛ' => 'è©—', + 'ÛÜ' => '詘', + 'ÛÝ' => 'è©„', + 'ÛÞ' => 'è©…', + 'Ûß' => 'è©’', + 'Ûà' => '詈', + 'Ûá' => 'è©‘', + 'Ûâ' => 'è©Š', + 'Ûã' => 'è©Œ', + 'Ûä' => 'è©', + 'Ûå' => '豟', + 'Ûæ' => 'è²', + 'Ûç' => 'è²€', + 'Ûè' => '貺', + 'Ûé' => 'è²¾', + 'Ûê' => 'è²°', + 'Ûë' => 'è²¹', + 'Ûì' => 'è²µ', + 'Ûí' => '趄', + 'Ûî' => '趀', + 'Ûï' => '趉', + 'Ûð' => 'è·˜', + 'Ûñ' => 'è·“', + 'Ûò' => 'è·', + 'Ûó' => 'è·‡', + 'Ûô' => 'è·–', + 'Ûõ' => 'è·œ', + 'Ûö' => 'è·', + 'Û÷' => 'è·•', + 'Ûø' => 'è·™', + 'Ûù' => 'è·ˆ', + 'Ûú' => 'è·—', + 'Ûû' => 'è·…', + 'Ûü' => '軯', + 'Ûý' => 'è»·', + 'Ûþ' => '軺', + 'Ü@' => '軹', + 'ÜA' => '軦', + 'ÜB' => 'è»®', + 'ÜC' => '軥', + 'ÜD' => '軵', + 'ÜE' => '軧', + 'ÜF' => '軨', + 'ÜG' => '軶', + 'ÜH' => '軫', + 'ÜI' => 'è»±', + 'ÜJ' => '軬', + 'ÜK' => 'è»´', + 'ÜL' => '軩', + 'ÜM' => '逭', + 'ÜN' => '逴', + 'ÜO' => '逯', + 'ÜP' => '鄆', + 'ÜQ' => '鄬', + 'ÜR' => 'é„„', + 'ÜS' => '郿', + 'ÜT' => '郼', + 'ÜU' => '鄈', + 'ÜV' => '郹', + 'ÜW' => '郻', + 'ÜX' => 'é„', + 'ÜY' => 'é„€', + 'ÜZ' => '鄇', + 'Ü[' => 'é„…', + 'Ü\\' => '鄃', + 'Ü]' => 'é…¡', + 'Ü^' => 'é…¤', + 'Ü_' => 'é…Ÿ', + 'Ü`' => 'é…¢', + 'Üa' => 'é… ', + 'Üb' => 'éˆ', + 'Üc' => '鈊', + 'Üd' => '鈥', + 'Üe' => '鈃', + 'Üf' => '鈚', + 'Üg' => '鈦', + 'Üh' => 'éˆ', + 'Üi' => '鈌', + 'Üj' => '鈀', + 'Ük' => '鈒', + 'Ül' => '釿', + 'Üm' => '釽', + 'Ün' => '鈆', + 'Üo' => '鈄', + 'Üp' => '鈧', + 'Üq' => '鈂', + 'Ür' => '鈜', + 'Üs' => '鈤', + 'Üt' => '鈙', + 'Üu' => '鈗', + 'Üv' => '鈅', + 'Üw' => '鈖', + 'Üx' => 'é•»', + 'Üy' => 'é–', + 'Üz' => 'é–Œ', + 'Ü{' => 'é–', + 'Ü|' => '隇', + 'Ü}' => '陾', + 'Ü~' => '隈', + 'Ü¡' => '隉', + 'Ü¢' => '隃', + 'Ü£' => '隀', + 'ܤ' => '雂', + 'Ü¥' => '雈', + 'ܦ' => '雃', + 'ܧ' => 'é›±', + 'ܨ' => 'é›°', + 'Ü©' => 'é¬', + 'ܪ' => 'é°', + 'Ü«' => 'é®', + 'ܬ' => 'é ‡', + 'Ü­' => '颩', + 'Ü®' => '飫', + 'ܯ' => '鳦', + 'Ü°' => '黹', + 'ܱ' => '亃', + 'ܲ' => '亄', + 'ܳ' => '亶', + 'Ü´' => '傽', + 'ܵ' => 'å‚¿', + 'ܶ' => '僆', + 'Ü·' => 'å‚®', + 'ܸ' => '僄', + 'ܹ' => '僊', + 'ܺ' => 'å‚´', + 'Ü»' => '僈', + 'ܼ' => '僂', + 'ܽ' => 'å‚°', + 'ܾ' => 'åƒ', + 'Ü¿' => '傺', + 'ÜÀ' => '傱', + 'ÜÁ' => '僋', + 'ÜÂ' => '僉', + 'ÜÃ' => '傶', + 'ÜÄ' => '傸', + 'ÜÅ' => '凗', + 'ÜÆ' => '剺', + 'ÜÇ' => '剸', + 'ÜÈ' => '剻', + 'ÜÉ' => '剼', + 'ÜÊ' => 'å—ƒ', + 'ÜË' => 'å—›', + 'ÜÌ' => 'å—Œ', + 'ÜÍ' => 'å—', + 'ÜÎ' => 'å—‹', + 'ÜÏ' => 'å—Š', + 'ÜÐ' => 'å—', + 'ÜÑ' => 'å—€', + 'ÜÒ' => 'å—”', + 'ÜÓ' => 'å—„', + 'ÜÔ' => 'å—©', + 'ÜÕ' => 'å–¿', + 'ÜÖ' => 'å—’', + 'Ü×' => 'å–', + 'ÜØ' => 'å—', + 'ÜÙ' => 'å—•', + 'ÜÚ' => 'å—¢', + 'ÜÛ' => 'å—–', + 'ÜÜ' => 'å—ˆ', + 'ÜÝ' => 'å—²', + 'ÜÞ' => 'å—', + 'Üß' => 'å—™', + 'Üà' => 'å—‚', + 'Üá' => '圔', + 'Üâ' => 'å¡“', + 'Üã' => '塨', + 'Üä' => '塤', + 'Üå' => 'å¡', + 'Üæ' => 'å¡', + 'Üç' => '塉', + 'Üè' => '塯', + 'Üé' => 'å¡•', + 'Üê' => 'å¡Ž', + 'Üë' => 'å¡', + 'Üì' => 'å¡™', + 'Üí' => 'å¡¥', + 'Üî' => 'å¡›', + 'Üï' => 'å ½', + 'Üð' => 'å¡£', + 'Üñ' => '塱', + 'Üò' => '壼', + 'Üó' => '嫇', + 'Üô' => 'å«„', + 'Üõ' => 'å«‹', + 'Üö' => '媺', + 'Ü÷' => '媸', + 'Üø' => '媱', + 'Üù' => '媵', + 'Üú' => '媰', + 'Üû' => '媿', + 'Üü' => '嫈', + 'Üý' => '媻', + 'Üþ' => '嫆', + 'Ý@' => '媷', + 'ÝA' => 'å«€', + 'ÝB' => 'å«Š', + 'ÝC' => '媴', + 'ÝD' => '媶', + 'ÝE' => 'å«', + 'ÝF' => '媹', + 'ÝG' => 'åª', + 'ÝH' => '寖', + 'ÝI' => '寘', + 'ÝJ' => '寙', + 'ÝK' => 'å°Ÿ', + 'ÝL' => 'å°³', + 'ÝM' => 'åµ±', + 'ÝN' => 'åµ£', + 'ÝO' => '嵊', + 'ÝP' => 'åµ¥', + 'ÝQ' => 'åµ²', + 'ÝR' => '嵬', + 'ÝS' => '嵞', + 'ÝT' => '嵨', + 'ÝU' => '嵧', + 'ÝV' => 'åµ¢', + 'ÝW' => 'å·°', + 'ÝX' => 'å¹', + 'ÝY' => '幎', + 'ÝZ' => '幊', + 'Ý[' => 'å¹', + 'Ý\\' => '幋', + 'Ý]' => 'å»…', + 'Ý^' => '廌', + 'Ý_' => '廆', + 'Ý`' => '廋', + 'Ýa' => '廇', + 'Ýb' => 'å½€', + 'Ýc' => '徯', + 'Ýd' => 'å¾­', + 'Ýe' => '惷', + 'Ýf' => 'æ…‰', + 'Ýg' => 'æ…Š', + 'Ýh' => 'æ„«', + 'Ýi' => 'æ……', + 'Ýj' => '愶', + 'Ýk' => '愲', + 'Ýl' => 'æ„®', + 'Ým' => 'æ…†', + 'Ýn' => '愯', + 'Ýo' => 'æ…', + 'Ýp' => 'æ„©', + 'Ýq' => 'æ…€', + 'Ýr' => '戠', + 'Ýs' => 'é…¨', + 'Ýt' => '戣', + 'Ýu' => '戥', + 'Ýv' => '戤', + 'Ýw' => 'æ…', + 'Ýx' => 'æ±', + 'Ýy' => 'æ«', + 'Ýz' => 'æ', + 'Ý{' => 'æ’', + 'Ý|' => 'æ‰', + 'Ý}' => 'æ ', + 'Ý~' => 'æ¤', + 'Ý¡' => 'æ³', + 'Ý¢' => '摃', + 'Ý£' => 'æŸ', + 'ݤ' => 'æ•', + 'Ý¥' => 'æ˜', + 'ݦ' => 'æ¹', + 'ݧ' => 'æ·', + 'ݨ' => 'æ¢', + 'Ý©' => 'æ£', + 'ݪ' => 'æŒ', + 'Ý«' => 'æ¦', + 'ݬ' => 'æ°', + 'Ý­' => 'æ¨', + 'Ý®' => 'æ‘', + 'ݯ' => 'æµ', + 'Ý°' => 'æ¯', + 'ݱ' => 'æŠ', + 'ݲ' => 'æš', + 'ݳ' => 'æ‘€', + 'Ý´' => 'æ¥', + 'ݵ' => 'æ§', + 'ݶ' => 'æ‹', + 'Ý·' => 'æ§', + 'ݸ' => 'æ›', + 'ݹ' => 'æ®', + 'ݺ' => 'æ¡', + 'Ý»' => 'æŽ', + 'ݼ' => '敯', + 'ݽ' => 'æ–’', + 'ݾ' => 'æ—“', + 'Ý¿' => '暆', + 'ÝÀ' => '暌', + 'ÝÁ' => 'æš•', + 'ÝÂ' => 'æš', + 'ÝÃ' => 'æš‹', + 'ÝÄ' => '暊', + 'ÝÅ' => 'æš™', + 'ÝÆ' => 'æš”', + 'ÝÇ' => '晸', + 'ÝÈ' => '朠', + 'ÝÉ' => '楦', + 'ÝÊ' => '楟', + 'ÝË' => '椸', + 'ÝÌ' => '楎', + 'ÝÍ' => '楢', + 'ÝÎ' => '楱', + 'ÝÏ' => '椿', + 'ÝÐ' => '楅', + 'ÝÑ' => '楪', + 'ÝÒ' => '椹', + 'ÝÓ' => '楂', + 'ÝÔ' => '楗', + 'ÝÕ' => '楙', + 'ÝÖ' => '楺', + 'Ý×' => '楈', + 'ÝØ' => '楉', + 'ÝÙ' => '椵', + 'ÝÚ' => '楬', + 'ÝÛ' => '椳', + 'ÝÜ' => '椽', + 'ÝÝ' => '楥', + 'ÝÞ' => '棰', + 'Ýß' => '楸', + 'Ýà' => '椴', + 'Ýá' => '楩', + 'Ýâ' => '楀', + 'Ýã' => '楯', + 'Ýä' => '楄', + 'Ýå' => '楶', + 'Ýæ' => '楘', + 'Ýç' => 'æ¥', + 'Ýè' => '楴', + 'Ýé' => '楌', + 'Ýê' => '椻', + 'Ýë' => '楋', + 'Ýì' => '椷', + 'Ýí' => '楜', + 'Ýî' => 'æ¥', + 'Ýï' => '楑', + 'Ýð' => '椲', + 'Ýñ' => '楒', + 'Ýò' => '椯', + 'Ýó' => '楻', + 'Ýô' => '椼', + 'Ýõ' => 'æ­†', + 'Ýö' => 'æ­…', + 'Ý÷' => 'æ­ƒ', + 'Ýø' => 'æ­‚', + 'Ýù' => 'æ­ˆ', + 'Ýú' => 'æ­', + 'Ýû' => 'æ®›', + 'Ýü' => 'ï¨', + 'Ýý' => '毻', + 'Ýþ' => '毼', + 'Þ@' => '毹', + 'ÞA' => '毷', + 'ÞB' => '毸', + 'ÞC' => '溛', + 'ÞD' => 'æ»–', + 'ÞE' => '滈', + 'ÞF' => 'æº', + 'ÞG' => '滀', + 'ÞH' => '溟', + 'ÞI' => '溓', + 'ÞJ' => '溔', + 'ÞK' => '溠', + 'ÞL' => '溱', + 'ÞM' => '溹', + 'ÞN' => '滆', + 'ÞO' => 'æ»’', + 'ÞP' => '溽', + 'ÞQ' => 'æ»', + 'ÞR' => '溞', + 'ÞS' => '滉', + 'ÞT' => '溷', + 'ÞU' => '溰', + 'ÞV' => 'æ»', + 'ÞW' => '溦', + 'ÞX' => 'æ»', + 'ÞY' => '溲', + 'ÞZ' => '溾', + 'Þ[' => '滃', + 'Þ\\' => '滜', + 'Þ]' => '滘', + 'Þ^' => '溙', + 'Þ_' => '溒', + 'Þ`' => '溎', + 'Þa' => 'æº', + 'Þb' => '溤', + 'Þc' => '溡', + 'Þd' => '溿', + 'Þe' => '溳', + 'Þf' => 'æ»', + 'Þg' => '滊', + 'Þh' => '溗', + 'Þi' => '溮', + 'Þj' => '溣', + 'Þk' => 'ç…‡', + 'Þl' => 'ç…”', + 'Þm' => 'ç…’', + 'Þn' => 'ç…£', + 'Þo' => 'ç… ', + 'Þp' => 'ç…', + 'Þq' => 'ç…', + 'Þr' => 'ç…¢', + 'Þs' => 'ç…²', + 'Þt' => 'ç…¸', + 'Þu' => 'ç…ª', + 'Þv' => 'ç…¡', + 'Þw' => 'ç…‚', + 'Þx' => 'ç…˜', + 'Þy' => 'ç…ƒ', + 'Þz' => 'ç…‹', + 'Þ{' => 'ç…°', + 'Þ|' => 'ç…Ÿ', + 'Þ}' => 'ç…', + 'Þ~' => 'ç…“', + 'Þ¡' => 'ç…„', + 'Þ¢' => 'ç…', + 'Þ£' => 'ç…š', + 'Þ¤' => 'ç‰', + 'Þ¥' => 'çŠ', + 'Þ¦' => '犌', + 'Þ§' => '犑', + 'Þ¨' => 'çŠ', + 'Þ©' => '犎', + 'Þª' => '猼', + 'Þ«' => 'ç‚', + 'Þ¬' => '猻', + 'Þ­' => '猺', + 'Þ®' => 'ç€', + 'Þ¯' => 'çŠ', + 'Þ°' => 'ç‰', + 'Þ±' => 'ç‘„', + 'Þ²' => 'ç‘Š', + 'Þ³' => 'ç‘‹', + 'Þ´' => 'ç‘’', + 'Þµ' => 'ç‘‘', + 'Þ¶' => 'ç‘—', + 'Þ·' => 'ç‘€', + 'Þ¸' => 'ç‘', + 'Þ¹' => 'ç‘', + 'Þº' => 'ç‘Ž', + 'Þ»' => 'ç‘‚', + 'Þ¼' => '瑆', + 'Þ½' => 'ç‘', + 'Þ¾' => 'ç‘”', + 'Þ¿' => 'ç“¡', + 'ÞÀ' => 'ç“¿', + 'ÞÁ' => '瓾', + 'ÞÂ' => '瓽', + 'ÞÃ' => 'ç”', + 'ÞÄ' => '畹', + 'ÞÅ' => 'ç•·', + 'ÞÆ' => '榃', + 'ÞÇ' => 'ç—¯', + 'ÞÈ' => 'ç˜', + 'ÞÉ' => '瘃', + 'ÞÊ' => 'ç—·', + 'ÞË' => 'ç—¾', + 'ÞÌ' => 'ç—¼', + 'ÞÍ' => 'ç—¹', + 'ÞÎ' => 'ç—¸', + 'ÞÏ' => 'ç˜', + 'ÞÐ' => 'ç—»', + 'ÞÑ' => 'ç—¶', + 'ÞÒ' => 'ç—­', + 'ÞÓ' => 'ç—µ', + 'ÞÔ' => 'ç—½', + 'ÞÕ' => 'çš™', + 'ÞÖ' => 'çšµ', + 'Þ×' => 'ç›', + 'ÞØ' => 'ç•', + 'ÞÙ' => 'çŸ', + 'ÞÚ' => 'ç ', + 'ÞÛ' => 'ç’', + 'ÞÜ' => 'ç–', + 'ÞÝ' => 'çš', + 'ÞÞ' => 'ç©', + 'Þß' => 'ç§', + 'Þà' => 'ç”', + 'Þá' => 'ç™', + 'Þâ' => 'ç­', + 'Þã' => '矠', + 'Þä' => '碇', + 'Þå' => '碚', + 'Þæ' => '碔', + 'Þç' => 'ç¢', + 'Þè' => '碄', + 'Þé' => '碕', + 'Þê' => '碅', + 'Þë' => '碆', + 'Þì' => '碡', + 'Þí' => '碃', + 'Þî' => '硹', + 'Þï' => '碙', + 'Þð' => '碀', + 'Þñ' => '碖', + 'Þò' => 'ç¡»', + 'Þó' => '祼', + 'Þô' => '禂', + 'Þõ' => '祽', + 'Þö' => '祹', + 'Þ÷' => '稑', + 'Þø' => '稘', + 'Þù' => '稙', + 'Þú' => '稒', + 'Þû' => '稗', + 'Þü' => '稕', + 'Þý' => '稢', + 'Þþ' => '稓', + 'ß@' => '稛', + 'ßA' => 'ç¨', + 'ßB' => '窣', + 'ßC' => '窢', + 'ßD' => '窞', + 'ßE' => 'ç««', + 'ßF' => 'ç­¦', + 'ßG' => 'ç­¤', + 'ßH' => 'ç­­', + 'ßI' => 'ç­´', + 'ßJ' => 'ç­©', + 'ßK' => 'ç­²', + 'ßL' => 'ç­¥', + 'ßM' => 'ç­³', + 'ßN' => 'ç­±', + 'ßO' => 'ç­°', + 'ßP' => 'ç­¡', + 'ßQ' => 'ç­¸', + 'ßR' => 'ç­¶', + 'ßS' => 'ç­£', + 'ßT' => 'ç²²', + 'ßU' => 'ç²´', + 'ßV' => '粯', + 'ßW' => '綈', + 'ßX' => '綆', + 'ßY' => '綀', + 'ßZ' => 'ç¶', + 'ß[' => '絿', + 'ß\\' => '綅', + 'ß]' => '絺', + 'ß^' => '綎', + 'ß_' => 'çµ»', + 'ß`' => '綃', + 'ßa' => 'çµ¼', + 'ßb' => '綌', + 'ßc' => '綔', + 'ßd' => '綄', + 'ße' => 'çµ½', + 'ßf' => '綒', + 'ßg' => 'ç½­', + 'ßh' => '罫', + 'ßi' => '罧', + 'ßj' => '罨', + 'ßk' => '罬', + 'ßl' => '羦', + 'ßm' => 'ç¾¥', + 'ßn' => '羧', + 'ßo' => 'ç¿›', + 'ßp' => 'ç¿œ', + 'ßq' => '耡', + 'ßr' => 'è…¤', + 'ßs' => 'è… ', + 'ßt' => 'è…·', + 'ßu' => 'è…œ', + 'ßv' => 'è…©', + 'ßw' => 'è…›', + 'ßx' => 'è…¢', + 'ßy' => 'è…²', + 'ßz' => '朡', + 'ß{' => 'è…ž', + 'ß|' => 'è…¶', + 'ß}' => 'è…§', + 'ß~' => 'è…¯', + 'ß¡' => 'è…„', + 'ߢ' => 'è…¡', + 'ߣ' => 'èˆ', + 'ߤ' => '艉', + 'ߥ' => '艄', + 'ߦ' => '艀', + 'ߧ' => '艂', + 'ߨ' => '艅', + 'ß©' => '蓱', + 'ߪ' => 'è¿', + 'ß«' => 'è‘–', + '߬' => '葶', + 'ß­' => '葹', + 'ß®' => 'è’', + '߯' => 'è’', + 'ß°' => 'è‘¥', + 'ß±' => 'è‘‘', + 'ß²' => 'è‘€', + 'ß³' => 'è’†', + 'ß´' => '葧', + 'ßµ' => 'è°', + '߶' => 'è‘', + 'ß·' => '葽', + '߸' => 'è‘š', + 'ß¹' => 'è‘™', + 'ߺ' => 'è‘´', + 'ß»' => '葳', + 'ß¼' => 'è‘', + 'ß½' => '蔇', + 'ß¾' => 'è‘ž', + 'ß¿' => 'è·', + 'ßÀ' => 'èº', + 'ßÁ' => 'è´', + 'ßÂ' => '葺', + 'ßÃ' => '葃', + 'ßÄ' => '葸', + 'ßÅ' => 'è²', + 'ßÆ' => 'è‘…', + 'ßÇ' => 'è©', + 'ßÈ' => 'è™', + 'ßÉ' => 'è‘‹', + 'ßÊ' => 'è¯', + 'ßË' => 'è‘‚', + 'ßÌ' => 'è­', + 'ßÍ' => 'è‘Ÿ', + 'ßÎ' => 'è‘°', + 'ßÏ' => 'è¹', + 'ßÐ' => 'è‘Ž', + 'ßÑ' => 'è‘Œ', + 'ßÒ' => 'è‘’', + 'ßÓ' => '葯', + 'ßÔ' => 'è“…', + 'ßÕ' => 'è’Ž', + 'ßÖ' => 'è»', + 'ß×' => '葇', + 'ßØ' => 'è¶', + 'ßÙ' => 'è³', + 'ßÚ' => '葨', + 'ßÛ' => '葾', + 'ßÜ' => 'è‘„', + 'ßÝ' => 'è«', + 'ßÞ' => 'è‘ ', + 'ßß' => 'è‘”', + 'ßà' => 'è‘®', + 'ßá' => 'è‘', + 'ßâ' => '蜋', + 'ßã' => '蜄', + 'ßä' => 'è›·', + 'ßå' => '蜌', + 'ßæ' => '蛺', + 'ßç' => 'è›–', + 'ßè' => '蛵', + 'ßé' => 'è', + 'ßê' => '蛸', + 'ßë' => '蜎', + 'ßì' => '蜉', + 'ßí' => 'èœ', + 'ßî' => '蛶', + 'ßï' => 'èœ', + 'ßð' => '蜅', + 'ßñ' => '裖', + 'ßò' => '裋', + 'ßó' => 'è£', + 'ßô' => '裎', + 'ßõ' => '裞', + 'ßö' => '裛', + 'ß÷' => '裚', + 'ßø' => '裌', + 'ßù' => 'è£', + 'ßú' => '覅', + 'ßû' => '覛', + 'ßü' => '觟', + 'ßý' => '觥', + 'ßþ' => '觤', + 'à@' => '觡', + 'àA' => '觠', + 'àB' => '觢', + 'àC' => '觜', + 'àD' => '触', + 'àE' => '詶', + 'àF' => '誆', + 'àG' => 'è©¿', + 'àH' => 'è©¡', + 'àI' => '訿', + 'àJ' => 'è©·', + 'àK' => '誂', + 'àL' => '誄', + 'àM' => '詵', + 'àN' => '誃', + 'àO' => 'èª', + 'àP' => 'è©´', + 'àQ' => '詺', + 'àR' => 'è°¼', + 'àS' => '豋', + 'àT' => '豊', + 'àU' => 'è±¥', + 'àV' => '豤', + 'àW' => '豦', + 'àX' => '貆', + 'àY' => '貄', + 'àZ' => 'è²…', + 'à[' => '賌', + 'à\\' => '赨', + 'à]' => '赩', + 'à^' => '趑', + 'à_' => '趌', + 'à`' => '趎', + 'àa' => 'è¶', + 'àb' => 'è¶', + 'àc' => '趓', + 'àd' => '趔', + 'àe' => 'è¶', + 'àf' => '趒', + 'àg' => 'è·°', + 'àh' => 'è· ', + 'ài' => 'è·¬', + 'àj' => 'è·±', + 'àk' => 'è·®', + 'àl' => 'è·', + 'àm' => 'è·©', + 'àn' => 'è·£', + 'ào' => 'è·¢', + 'àp' => 'è·§', + 'àq' => 'è·²', + 'àr' => 'è·«', + 'às' => 'è·´', + 'àt' => '輆', + 'àu' => '軿', + 'àv' => 'è¼', + 'àw' => 'è¼€', + 'àx' => 'è¼…', + 'ày' => '輇', + 'àz' => '輈', + 'à{' => '輂', + 'à|' => '輋', + 'à}' => 'é’', + 'à~' => '逿', + 'à¡' => 'é„', + 'à¢' => 'é‰', + 'à£' => '逽', + 'à¤' => 'é„', + 'à¥' => 'é„', + 'à¦' => 'é„', + 'à§' => 'é„‘', + 'à¨' => 'é„–', + 'à©' => 'é„”', + 'àª' => 'é„‹', + 'à«' => 'é„Ž', + 'à¬' => 'é…®', + 'à­' => 'é…¯', + 'à®' => '鉈', + 'à¯' => '鉒', + 'à°' => '鈰', + 'à±' => '鈺', + 'à²' => '鉦', + 'à³' => '鈳', + 'à´' => '鉥', + 'àµ' => '鉞', + 'à¶' => '銃', + 'à·' => '鈮', + 'à¸' => '鉊', + 'à¹' => '鉆', + 'àº' => '鉭', + 'à»' => '鉬', + 'à¼' => 'é‰', + 'à½' => '鉠', + 'à¾' => '鉧', + 'à¿' => '鉯', + 'àÀ' => '鈶', + 'àÁ' => '鉡', + 'àÂ' => '鉰', + 'àÃ' => '鈱', + 'àÄ' => '鉔', + 'àÅ' => '鉣', + 'àÆ' => 'é‰', + 'àÇ' => '鉲', + 'àÈ' => '鉎', + 'àÉ' => '鉓', + 'àÊ' => '鉌', + 'àË' => '鉖', + 'àÌ' => '鈲', + 'àÍ' => 'é–Ÿ', + 'àÎ' => 'é–œ', + 'àÏ' => 'é–ž', + 'àÐ' => 'é–›', + 'àÑ' => 'éš’', + 'àÒ' => 'éš“', + 'àÓ' => 'éš‘', + 'àÔ' => 'éš—', + 'àÕ' => '雎', + 'àÖ' => '雺', + 'à×' => '雽', + 'àØ' => '雸', + 'àÙ' => '雵', + 'àÚ' => 'é³', + 'àÛ' => 'é·', + 'àÜ' => 'é¸', + 'àÝ' => 'é²', + 'àÞ' => 'é ', + 'àß' => 'é ', + 'àà' => 'é Ž', + 'àá' => '颬', + 'àâ' => '飶', + 'àã' => '飹', + 'àä' => '馯', + 'àå' => '馲', + 'àæ' => '馰', + 'àç' => '馵', + 'àè' => '骭', + 'àé' => '骫', + 'àê' => 'é­›', + 'àë' => '鳪', + 'àì' => 'é³­', + 'àí' => '鳧', + 'àî' => '麀', + 'àï' => '黽', + 'àð' => '僦', + 'àñ' => '僔', + 'àò' => '僗', + 'àó' => '僨', + 'àô' => '僳', + 'àõ' => '僛', + 'àö' => '僪', + 'à÷' => 'åƒ', + 'àø' => '僤', + 'àù' => '僓', + 'àú' => '僬', + 'àû' => '僰', + 'àü' => '僯', + 'àý' => '僣', + 'àþ' => '僠', + 'á@' => '凘', + 'áA' => '劀', + 'áB' => 'åŠ', + 'áC' => 'å‹©', + 'áD' => 'å‹«', + 'áE' => '匰', + 'áF' => '厬', + 'áG' => '嘧', + 'áH' => '嘕', + 'áI' => '嘌', + 'áJ' => '嘒', + 'áK' => 'å—¼', + 'áL' => 'å˜', + 'áM' => '嘜', + 'áN' => 'å˜', + 'áO' => '嘓', + 'áP' => '嘂', + 'áQ' => 'å—º', + 'áR' => 'å˜', + 'áS' => '嘄', + 'áT' => 'å—¿', + 'áU' => 'å—¹', + 'áV' => '墉', + 'áW' => '塼', + 'áX' => 'å¢', + 'áY' => '墘', + 'áZ' => '墆', + 'á[' => 'å¢', + 'á\\' => 'å¡¿', + 'á]' => 'å¡´', + 'á^' => '墋', + 'á_' => '塺', + 'á`' => '墇', + 'áa' => '墑', + 'áb' => '墎', + 'ác' => '塶', + 'ád' => '墂', + 'áe' => '墈', + 'áf' => 'å¡»', + 'ág' => '墔', + 'áh' => 'å¢', + 'ái' => '壾', + 'áj' => '奫', + 'ák' => 'å«œ', + 'ál' => 'å«®', + 'ám' => 'å«¥', + 'án' => 'å«•', + 'áo' => '嫪', + 'áp' => 'å«š', + 'áq' => 'å«­', + 'ár' => 'å««', + 'ás' => '嫳', + 'át' => 'å«¢', + 'áu' => 'å« ', + 'áv' => 'å«›', + 'áw' => '嫬', + 'áx' => 'å«ž', + 'áy' => 'å«', + 'áz' => 'å«™', + 'á{' => '嫨', + 'á|' => 'å«Ÿ', + 'á}' => 'å­·', + 'á~' => '寠', + 'á¡' => '寣', + 'á¢' => 'å±£', + 'á£' => '嶂', + 'á¤' => '嶀', + 'á¥' => 'åµ½', + 'á¦' => '嶆', + 'á§' => '嵺', + 'á¨' => 'å¶', + 'á©' => 'åµ·', + 'áª' => '嶊', + 'á«' => '嶉', + 'á¬' => '嶈', + 'á­' => 'åµ¾', + 'á®' => 'åµ¼', + 'á¯' => 'å¶', + 'á°' => 'åµ¹', + 'á±' => '嵿', + 'á²' => '幘', + 'á³' => 'å¹™', + 'á´' => '幓', + 'áµ' => '廘', + 'á¶' => '廑', + 'á·' => 'å»—', + 'á¸' => '廎', + 'á¹' => '廜', + 'áº' => '廕', + 'á»' => 'å»™', + 'á¼' => 'å»’', + 'á½' => 'å»”', + 'á¾' => '彄', + 'á¿' => '彃', + 'áÀ' => '彯', + 'áÁ' => '徶', + 'áÂ' => '愬', + 'áÃ' => '愨', + 'áÄ' => 'æ…', + 'áÅ' => 'æ…ž', + 'áÆ' => 'æ…±', + 'áÇ' => 'æ…³', + 'áÈ' => 'æ…’', + 'áÉ' => 'æ…“', + 'áÊ' => 'æ…²', + 'áË' => 'æ…¬', + 'áÌ' => '憀', + 'áÍ' => 'æ…´', + 'áÎ' => 'æ…”', + 'áÏ' => 'æ…º', + 'áÐ' => 'æ…›', + 'áÑ' => 'æ…¥', + 'áÒ' => 'æ„»', + 'áÓ' => 'æ…ª', + 'áÔ' => 'æ…¡', + 'áÕ' => 'æ…–', + 'áÖ' => '戩', + 'á×' => '戧', + 'áØ' => '戫', + 'áÙ' => 'æ«', + 'áÚ' => 'æ‘', + 'áÛ' => 'æ‘›', + 'áÜ' => 'æ‘', + 'áÝ' => 'æ‘´', + 'áÞ' => '摶', + 'áß' => '摲', + 'áà' => '摳', + 'áá' => '摽', + 'áâ' => '摵', + 'áã' => '摦', + 'áä' => 'æ’¦', + 'áå' => 'æ‘Ž', + 'áæ' => 'æ’‚', + 'áç' => 'æ‘ž', + 'áè' => 'æ‘œ', + 'áé' => 'æ‘‹', + 'áê' => 'æ‘“', + 'áë' => 'æ‘ ', + 'áì' => 'æ‘', + 'áí' => 'æ‘¿', + 'áî' => 'æ¿', + 'áï' => '摬', + 'áð' => 'æ‘«', + 'áñ' => 'æ‘™', + 'áò' => 'æ‘¥', + 'áó' => 'æ‘·', + 'áô' => '敳', + 'áõ' => 'æ– ', + 'áö' => 'æš¡', + 'á÷' => 'æš ', + 'áø' => '暟', + 'áù' => '朅', + 'áú' => '朄', + 'áû' => '朢', + 'áü' => '榱', + 'áý' => '榶', + 'áþ' => '槉', + 'â@' => '榠', + 'âA' => '槎', + 'âB' => '榖', + 'âC' => '榰', + 'âD' => '榬', + 'âE' => '榼', + 'âF' => '榑', + 'âG' => '榙', + 'âH' => '榎', + 'âI' => '榧', + 'âJ' => 'æ¦', + 'âK' => '榩', + 'âL' => '榾', + 'âM' => '榯', + 'âN' => '榿', + 'âO' => '槄', + 'âP' => '榽', + 'âQ' => '榤', + 'âR' => '槔', + 'âS' => '榹', + 'âT' => '槊', + 'âU' => '榚', + 'âV' => 'æ§', + 'âW' => '榳', + 'âX' => '榓', + 'âY' => '榪', + 'âZ' => '榡', + 'â[' => '榞', + 'â\\' => '槙', + 'â]' => '榗', + 'â^' => 'æ¦', + 'â_' => '槂', + 'â`' => '榵', + 'âa' => '榥', + 'âb' => '槆', + 'âc' => 'æ­Š', + 'âd' => 'æ­', + 'âe' => 'æ­‹', + 'âf' => '殞', + 'âg' => '殟', + 'âh' => 'æ® ', + 'âi' => '毃', + 'âj' => '毄', + 'âk' => '毾', + 'âl' => '滎', + 'âm' => '滵', + 'ân' => 'æ»±', + 'âo' => '漃', + 'âp' => 'æ¼¥', + 'âq' => '滸', + 'âr' => 'æ¼·', + 'âs' => 'æ»»', + 'ât' => 'æ¼®', + 'âu' => '漉', + 'âv' => '潎', + 'âw' => 'æ¼™', + 'âx' => '漚', + 'ây' => '漧', + 'âz' => '漘', + 'â{' => 'æ¼»', + 'â|' => 'æ¼’', + 'â}' => 'æ»­', + 'â~' => '漊', + 'â¡' => '漶', + 'â¢' => 'æ½³', + 'â£' => '滹', + 'â¤' => 'æ»®', + 'â¥' => 'æ¼­', + 'â¦' => 'æ½€', + 'â§' => 'æ¼°', + 'â¨' => 'æ¼¼', + 'â©' => 'æ¼µ', + 'âª' => '滫', + 'â«' => '漇', + 'â¬' => '漎', + 'â­' => '潃', + 'â®' => 'æ¼…', + 'â¯' => '滽', + 'â°' => '滶', + 'â±' => 'æ¼¹', + 'â²' => '漜', + 'â³' => '滼', + 'â´' => '漺', + 'âµ' => '漟', + 'â¶' => 'æ¼', + 'â·' => '漞', + 'â¸' => '漈', + 'â¹' => '漡', + 'âº' => '熇', + 'â»' => 'ç†', + 'â¼' => '熉', + 'â½' => '熀', + 'â¾' => '熅', + 'â¿' => '熂', + 'âÀ' => 'ç†', + 'âÁ' => 'ç…»', + 'âÂ' => '熆', + 'âÃ' => 'ç†', + 'âÄ' => '熗', + 'âÅ' => '牄', + 'âÆ' => '牓', + 'âÇ' => '犗', + 'âÈ' => '犕', + 'âÉ' => '犓', + 'âÊ' => 'çƒ', + 'âË' => 'ç', + 'âÌ' => 'ç‘', + 'âÍ' => 'çŒ', + 'âÎ' => 'ç‘¢', + 'âÏ' => '瑳', + 'âÐ' => '瑱', + 'âÑ' => '瑵', + 'âÒ' => '瑲', + 'âÓ' => '瑧', + 'âÔ' => 'ç‘®', + 'âÕ' => '甀', + 'âÖ' => '甂', + 'â×' => '甃', + 'âØ' => '畽', + 'âÙ' => 'ç–', + 'âÚ' => '瘖', + 'âÛ' => '瘈', + 'âÜ' => '瘌', + 'âÝ' => '瘕', + 'âÞ' => '瘑', + 'âß' => '瘊', + 'âà' => '瘔', + 'âá' => '皸', + 'ââ' => 'çž', + 'âã' => 'ç¼', + 'âä' => 'çž…', + 'âå' => 'çž‚', + 'âæ' => 'ç®', + 'âç' => '瞀', + 'âè' => 'ç¯', + 'âé' => 'ç¾', + 'âê' => '瞃', + 'âë' => '碲', + 'âì' => '碪', + 'âí' => '碴', + 'âî' => '碭', + 'âï' => '碨', + 'âð' => '硾', + 'âñ' => '碫', + 'âò' => '碞', + 'âó' => '碥', + 'âô' => '碠', + 'âõ' => '碬', + 'âö' => '碢', + 'â÷' => '碤', + 'âø' => '禘', + 'âù' => '禊', + 'âú' => '禋', + 'âû' => '禖', + 'âü' => '禕', + 'âý' => '禔', + 'âþ' => '禓', + 'ã@' => '禗', + 'ãA' => '禈', + 'ãB' => '禒', + 'ãC' => 'ç¦', + 'ãD' => '稫', + 'ãE' => 'ç©Š', + 'ãF' => '稰', + 'ãG' => '稯', + 'ãH' => '稨', + 'ãI' => '稦', + 'ãJ' => '窨', + 'ãK' => '窫', + 'ãL' => '窬', + 'ãM' => 'ç«®', + 'ãN' => '箈', + 'ãO' => '箜', + 'ãP' => '箊', + 'ãQ' => '箑', + 'ãR' => 'ç®', + 'ãS' => 'ç®–', + 'ãT' => 'ç®', + 'ãU' => '箌', + 'ãV' => 'ç®›', + 'ãW' => '箎', + 'ãX' => 'ç®…', + 'ãY' => '箘', + 'ãZ' => '劄', + 'ã[' => 'ç®™', + 'ã\\' => '箤', + 'ã]' => '箂', + 'ã^' => 'ç²»', + 'ã_' => '粿', + 'ã`' => 'ç²¼', + 'ãa' => '粺', + 'ãb' => '綧', + 'ãc' => '綷', + 'ãd' => 'ç·‚', + 'ãe' => '綣', + 'ãf' => '綪', + 'ãg' => 'ç·', + 'ãh' => 'ç·€', + 'ãi' => 'ç·…', + 'ãj' => 'ç¶', + 'ãk' => 'ç·Ž', + 'ãl' => 'ç·„', + 'ãm' => 'ç·†', + 'ãn' => 'ç·‹', + 'ão' => 'ç·Œ', + 'ãp' => '綯', + 'ãq' => '綹', + 'ãr' => '綖', + 'ãs' => '綼', + 'ãt' => '綟', + 'ãu' => '綦', + 'ãv' => '綮', + 'ãw' => '綩', + 'ãx' => '綡', + 'ãy' => 'ç·‰', + 'ãz' => 'ç½³', + 'ã{' => 'ç¿¢', + 'ã|' => 'ç¿£', + 'ã}' => 'ç¿¥', + 'ã~' => 'ç¿ž', + 'ã¡' => '耤', + 'ã¢' => 'è', + 'ã£' => 'èœ', + 'ã¤' => '膉', + 'ã¥' => '膆', + 'ã¦' => '膃', + 'ã§' => '膇', + 'ã¨' => 'è†', + 'ã©' => '膌', + 'ãª' => '膋', + 'ã«' => '舕', + 'ã¬' => 'è’—', + 'ã­' => 'è’¤', + 'ã®' => 'è’¡', + 'ã¯' => 'è’Ÿ', + 'ã°' => 'è’º', + 'ã±' => 'è“Ž', + 'ã²' => 'è“‚', + 'ã³' => 'è’¬', + 'ã´' => 'è’®', + 'ãµ' => 'è’«', + 'ã¶' => 'è’¹', + 'ã·' => 'è’´', + 'ã¸' => 'è“', + 'ã¹' => 'è“', + 'ãº' => 'è’ª', + 'ã»' => 'è’š', + 'ã¼' => 'è’±', + 'ã½' => 'è“', + 'ã¾' => 'è’', + 'ã¿' => 'è’§', + 'ãÀ' => 'è’»', + 'ãÁ' => 'è’¢', + 'ãÂ' => 'è’”', + 'ãÃ' => '蓇', + 'ãÄ' => 'è“Œ', + 'ãÅ' => 'è’›', + 'ãÆ' => 'è’©', + 'ãÇ' => 'è’¯', + 'ãÈ' => 'è’¨', + 'ãÉ' => 'è“–', + 'ãÊ' => 'è’˜', + 'ãË' => 'è’¶', + 'ãÌ' => 'è“', + 'ãÍ' => 'è’ ', + 'ãÎ' => 'è“—', + 'ãÏ' => 'è“”', + 'ãÐ' => 'è“’', + 'ãÑ' => 'è“›', + 'ãÒ' => 'è’°', + 'ãÓ' => 'è’‘', + 'ãÔ' => '虡', + 'ãÕ' => '蜳', + 'ãÖ' => '蜣', + 'ã×' => '蜨', + 'ãØ' => 'è«', + 'ãÙ' => 'è€', + 'ãÚ' => '蜮', + 'ãÛ' => '蜞', + 'ãÜ' => '蜡', + 'ãÝ' => '蜙', + 'ãÞ' => '蜛', + 'ãß' => 'èƒ', + 'ãà' => '蜬', + 'ãá' => 'è', + 'ãâ' => '蜾', + 'ãã' => 'è†', + 'ãä' => '蜠', + 'ãå' => '蜲', + 'ãæ' => '蜪', + 'ãç' => '蜭', + 'ãè' => '蜼', + 'ãé' => '蜒', + 'ãê' => '蜺', + 'ãë' => '蜱', + 'ãì' => '蜵', + 'ãí' => 'è‚', + 'ãî' => '蜦', + 'ãï' => '蜧', + 'ãð' => '蜸', + 'ãñ' => '蜤', + 'ãò' => '蜚', + 'ãó' => '蜰', + 'ãô' => '蜑', + 'ãõ' => '裷', + 'ãö' => '裧', + 'ã÷' => '裱', + 'ãø' => '裲', + 'ãù' => '裺', + 'ãú' => '裾', + 'ãû' => '裮', + 'ãü' => '裼', + 'ãý' => '裶', + 'ãþ' => '裻', + 'ä@' => '裰', + 'äA' => '裬', + 'äB' => '裫', + 'äC' => 'è¦', + 'äD' => '覡', + 'äE' => '覟', + 'äF' => '覞', + 'äG' => '觩', + 'äH' => '觫', + 'äI' => '觨', + 'äJ' => '誫', + 'äK' => '誙', + 'äL' => '誋', + 'äM' => '誒', + 'äN' => 'èª', + 'äO' => '誖', + 'äP' => 'è°½', + 'äQ' => '豨', + 'äR' => '豩', + 'äS' => '賕', + 'äT' => 'è³', + 'äU' => 'è³—', + 'äV' => '趖', + 'äW' => '踉', + 'äX' => '踂', + 'äY' => 'è·¿', + 'äZ' => 'è¸', + 'ä[' => 'è·½', + 'ä\\' => '踊', + 'ä]' => '踃', + 'ä^' => '踇', + 'ä_' => '踆', + 'ä`' => '踅', + 'äa' => 'è·¾', + 'äb' => '踀', + 'äc' => '踄', + 'äd' => 'è¼', + 'äe' => '輑', + 'äf' => '輎', + 'äg' => 'è¼', + 'äh' => 'é„£', + 'äi' => 'é„œ', + 'äj' => 'é„ ', + 'äk' => 'é„¢', + 'äl' => 'é„Ÿ', + 'äm' => 'é„', + 'än' => 'é„š', + 'äo' => '鄤', + 'äp' => 'é„¡', + 'äq' => 'é„›', + 'är' => 'é…º', + 'äs' => 'é…²', + 'ät' => 'é…¹', + 'äu' => 'é…³', + 'äv' => '銥', + 'äw' => '銤', + 'äx' => '鉶', + 'äy' => '銛', + 'äz' => '鉺', + 'ä{' => '銠', + 'ä|' => '銔', + 'ä}' => '銪', + 'ä~' => 'éŠ', + 'ä¡' => '銦', + 'ä¢' => '銚', + 'ä£' => '銫', + 'ä¤' => '鉹', + 'ä¥' => '銗', + 'ä¦' => '鉿', + 'ä§' => '銣', + 'ä¨' => 'é‹®', + 'ä©' => '銎', + 'äª' => '銂', + 'ä«' => '銕', + 'ä¬' => '銢', + 'ä­' => '鉽', + 'ä®' => '銈', + 'ä¯' => '銡', + 'ä°' => '銊', + 'ä±' => '銆', + 'ä²' => '銌', + 'ä³' => '銙', + 'ä´' => '銧', + 'äµ' => '鉾', + 'ä¶' => '銇', + 'ä·' => '銩', + 'ä¸' => 'éŠ', + 'ä¹' => '銋', + 'äº' => '鈭', + 'ä»' => 'éšž', + 'ä¼' => 'éš¡', + 'ä½' => '雿', + 'ä¾' => 'é˜', + 'ä¿' => 'é½', + 'äÀ' => 'éº', + 'äÁ' => 'é¾', + 'äÂ' => '鞃', + 'äÃ' => '鞀', + 'äÄ' => 'éž‚', + 'äÅ' => 'é»', + 'äÆ' => 'éž„', + 'äÇ' => 'éž', + 'äÈ' => 'é¿', + 'äÉ' => '韎', + 'äÊ' => 'éŸ', + 'äË' => 'é –', + 'äÌ' => '颭', + 'äÍ' => '颮', + 'äÎ' => '餂', + 'äÏ' => '餀', + 'äÐ' => '餇', + 'äÑ' => 'é¦', + 'äÒ' => '馜', + 'äÓ' => '駃', + 'äÔ' => '馹', + 'äÕ' => '馻', + 'äÖ' => '馺', + 'ä×' => '駂', + 'äØ' => '馽', + 'äÙ' => '駇', + 'äÚ' => '骱', + 'äÛ' => 'é«£', + 'äÜ' => '髧', + 'äÝ' => '鬾', + 'äÞ' => '鬿', + 'äß' => 'é­ ', + 'äà' => 'é­¡', + 'äá' => 'é­Ÿ', + 'äâ' => 'é³±', + 'äã' => 'é³²', + 'ää' => 'é³µ', + 'äå' => '麧', + 'äæ' => '僿', + 'äç' => '儃', + 'äè' => 'å„°', + 'äé' => '僸', + 'äê' => '儆', + 'äë' => '儇', + 'äì' => '僶', + 'äí' => '僾', + 'äî' => 'å„‹', + 'äï' => 'å„Œ', + 'äð' => '僽', + 'äñ' => 'å„Š', + 'äò' => '劋', + 'äó' => '劌', + 'äô' => '勱', + 'äõ' => '勯', + 'äö' => '噈', + 'ä÷' => '噂', + 'äø' => '噌', + 'äù' => '嘵', + 'äú' => 'å™', + 'äû' => '噊', + 'äü' => '噉', + 'äý' => '噆', + 'äþ' => '噘', + 'å@' => '噚', + 'åA' => '噀', + 'åB' => '嘳', + 'åC' => '嘽', + 'åD' => '嘬', + 'åE' => '嘾', + 'åF' => '嘸', + 'åG' => '嘪', + 'åH' => '嘺', + 'åI' => '圚', + 'åJ' => '墫', + 'åK' => 'å¢', + 'åL' => '墱', + 'åM' => '墠', + 'åN' => '墣', + 'åO' => '墯', + 'åP' => '墬', + 'åQ' => '墥', + 'åR' => '墡', + 'åS' => '壿', + 'åT' => 'å«¿', + 'åU' => 'å«´', + 'åV' => '嫽', + 'åW' => 'å«·', + 'åX' => '嫶', + 'åY' => '嬃', + 'åZ' => '嫸', + 'å[' => '嬂', + 'å\\' => '嫹', + 'å]' => 'å¬', + 'å^' => '嬇', + 'å_' => '嬅', + 'å`' => 'å¬', + 'åa' => '屧', + 'åb' => '嶙', + 'åc' => '嶗', + 'åd' => '嶟', + 'åe' => '嶒', + 'åf' => '嶢', + 'åg' => '嶓', + 'åh' => '嶕', + 'åi' => '嶠', + 'åj' => '嶜', + 'åk' => '嶡', + 'ål' => '嶚', + 'åm' => '嶞', + 'ån' => '幩', + 'åo' => 'å¹', + 'åp' => 'å¹ ', + 'åq' => '幜', + 'år' => 'ç·³', + 'ås' => 'å»›', + 'åt' => '廞', + 'åu' => '廡', + 'åv' => '彉', + 'åw' => 'å¾²', + 'åx' => '憋', + 'åy' => '憃', + 'åz' => 'æ…¹', + 'å{' => '憱', + 'å|' => '憰', + 'å}' => '憢', + 'å~' => '憉', + 'å¡' => '憛', + 'å¢' => '憓', + 'å£' => '憯', + 'å¤' => '憭', + 'å¥' => '憟', + 'å¦' => '憒', + 'å§' => '憪', + 'å¨' => '憡', + 'å©' => 'æ†', + 'åª' => 'æ…¦', + 'å«' => '憳', + 'å¬' => '戭', + 'å­' => 'æ‘®', + 'å®' => 'æ‘°', + 'å¯' => 'æ’–', + 'å°' => 'æ’ ', + 'å±' => 'æ’…', + 'å²' => 'æ’—', + 'å³' => 'æ’œ', + 'å´' => 'æ’', + 'åµ' => 'æ’‹', + 'å¶' => 'æ’Š', + 'å·' => 'æ’Œ', + 'å¸' => 'æ’£', + 'å¹' => 'æ’Ÿ', + 'åº' => '摨', + 'å»' => 'æ’±', + 'å¼' => 'æ’˜', + 'å½' => '敶', + 'å¾' => '敺', + 'å¿' => '敹', + 'åÀ' => 'æ•»', + 'åÁ' => 'æ–²', + 'åÂ' => 'æ–³', + 'åÃ' => 'æšµ', + 'åÄ' => 'æš°', + 'åÅ' => 'æš©', + 'åÆ' => 'æš²', + 'åÇ' => 'æš·', + 'åÈ' => '暪', + 'åÉ' => '暯', + 'åÊ' => '樀', + 'åË' => '樆', + 'åÌ' => '樗', + 'åÍ' => '槥', + 'åÎ' => '槸', + 'åÏ' => '樕', + 'åÐ' => '槱', + 'åÑ' => '槤', + 'åÒ' => '樠', + 'åÓ' => '槿', + 'åÔ' => '槬', + 'åÕ' => '槢', + 'åÖ' => '樛', + 'å×' => 'æ¨', + 'åØ' => '槾', + 'åÙ' => '樧', + 'åÚ' => '槲', + 'åÛ' => '槮', + 'åÜ' => '樔', + 'åÝ' => '槷', + 'åÞ' => '槧', + 'åß' => 'æ©€', + 'åà' => '樈', + 'åá' => '槦', + 'åâ' => '槻', + 'åã' => 'æ¨', + 'åä' => '槼', + 'åå' => '槫', + 'åæ' => '樉', + 'åç' => '樄', + 'åè' => '樘', + 'åé' => '樥', + 'åê' => 'æ¨', + 'åë' => '槶', + 'åì' => '樦', + 'åí' => '樇', + 'åî' => '槴', + 'åï' => '樖', + 'åð' => 'æ­‘', + 'åñ' => '殥', + 'åò' => '殣', + 'åó' => '殢', + 'åô' => '殦', + 'åõ' => 'æ°', + 'åö' => 'æ°€', + 'å÷' => '毿', + 'åø' => 'æ°‚', + 'åù' => 'æ½', + 'åú' => '漦', + 'åû' => 'æ½¾', + 'åü' => '澇', + 'åý' => '濆', + 'åþ' => 'æ¾’', + 'æ@' => 'æ¾', + 'æA' => '澉', + 'æB' => '澌', + 'æC' => 'æ½¢', + 'æD' => 'æ½', + 'æE' => 'æ¾…', + 'æF' => '潚', + 'æG' => 'æ¾–', + 'æH' => '潶', + 'æI' => '潬', + 'æJ' => '澂', + 'æK' => '潕', + 'æL' => 'æ½²', + 'æM' => 'æ½’', + 'æN' => 'æ½', + 'æO' => 'æ½—', + 'æP' => 'æ¾”', + 'æQ' => '澓', + 'æR' => 'æ½', + 'æS' => 'æ¼€', + 'æT' => '潡', + 'æU' => '潫', + 'æV' => 'æ½½', + 'æW' => '潧', + 'æX' => 'æ¾', + 'æY' => '潓', + 'æZ' => '澋', + 'æ[' => '潩', + 'æ\\' => '潿', + 'æ]' => '澕', + 'æ^' => 'æ½£', + 'æ_' => 'æ½·', + 'æ`' => '潪', + 'æa' => 'æ½»', + 'æb' => '熲', + 'æc' => '熯', + 'æd' => '熛', + 'æe' => '熰', + 'æf' => '熠', + 'æg' => '熚', + 'æh' => '熩', + 'æi' => '熵', + 'æj' => 'ç†', + 'æk' => '熥', + 'æl' => '熞', + 'æm' => '熤', + 'æn' => '熡', + 'æo' => '熪', + 'æp' => '熜', + 'æq' => '熧', + 'ær' => '熳', + 'æs' => '犘', + 'æt' => '犚', + 'æu' => 'ç˜', + 'æv' => 'ç’', + 'æw' => 'çž', + 'æx' => 'çŸ', + 'æy' => 'ç ', + 'æz' => 'ç', + 'æ{' => 'ç›', + 'æ|' => 'ç¡', + 'æ}' => 'çš', + 'æ~' => 'ç™', + 'æ¡' => 'ç¢', + 'æ¢' => 'ç’‡', + 'æ£' => 'ç’‰', + 'æ¤' => 'ç’Š', + 'æ¥' => 'ç’†', + 'æ¦' => 'ç’', + 'æ§' => '瑽', + 'æ¨' => 'ç’…', + 'æ©' => 'ç’ˆ', + 'æª' => '瑼', + 'æ«' => '瑹', + 'æ¬' => '甈', + 'æ­' => '甇', + 'æ®' => '畾', + 'æ¯' => '瘥', + 'æ°' => '瘞', + 'æ±' => '瘙', + 'æ²' => 'ç˜', + 'æ³' => '瘜', + 'æ´' => '瘣', + 'æµ' => '瘚', + 'æ¶' => '瘨', + 'æ·' => '瘛', + 'æ¸' => 'çšœ', + 'æ¹' => 'çš', + 'æº' => 'çšž', + 'æ»' => 'çš›', + 'æ¼' => 'çž', + 'æ½' => 'çž', + 'æ¾' => '瞉', + 'æ¿' => '瞈', + 'æÀ' => 'ç£', + 'æÁ' => '碻', + 'æÂ' => 'ç£', + 'æÃ' => '磌', + 'æÄ' => '磑', + 'æÅ' => '磎', + 'æÆ' => '磔', + 'æÇ' => '磈', + 'æÈ' => '磃', + 'æÉ' => '磄', + 'æÊ' => '磉', + 'æË' => '禚', + 'æÌ' => '禡', + 'æÍ' => '禠', + 'æÎ' => '禜', + 'æÏ' => '禢', + 'æÐ' => '禛', + 'æÑ' => 'æ­¶', + 'æÒ' => '稹', + 'æÓ' => '窲', + 'æÔ' => '窴', + 'æÕ' => '窳', + 'æÖ' => 'ç®·', + 'æ×' => '篋', + 'æØ' => '箾', + 'æÙ' => '箬', + 'æÚ' => '篎', + 'æÛ' => '箯', + 'æÜ' => '箹', + 'æÝ' => '篊', + 'æÞ' => '箵', + 'æß' => 'ç³…', + 'æà' => '糈', + 'æá' => '糌', + 'æâ' => '糋', + 'æã' => 'ç··', + 'æä' => 'ç·›', + 'æå' => 'ç·ª', + 'ææ' => 'ç·§', + 'æç' => 'ç·—', + 'æè' => 'ç·¡', + 'æé' => '縃', + 'æê' => 'ç·º', + 'æë' => 'ç·¦', + 'æì' => 'ç·¶', + 'æí' => 'ç·±', + 'æî' => 'ç·°', + 'æï' => 'ç·®', + 'æð' => 'ç·Ÿ', + 'æñ' => '罶', + 'æò' => '羬', + 'æó' => 'ç¾°', + 'æô' => 'ç¾­', + 'æõ' => 'ç¿­', + 'æö' => 'ç¿«', + 'æ÷' => '翪', + 'æø' => '翬', + 'æù' => '翦', + 'æú' => '翨', + 'æû' => 'è¤', + 'æü' => 'è§', + 'æý' => '膣', + 'æþ' => '膟', + 'ç@' => '膞', + 'çA' => '膕', + 'çB' => '膢', + 'çC' => '膙', + 'çD' => '膗', + 'çE' => '舖', + 'çF' => 'è‰', + 'çG' => '艓', + 'çH' => '艒', + 'çI' => 'è‰', + 'çJ' => '艎', + 'çK' => '艑', + 'çL' => '蔤', + 'çM' => 'è”»', + 'çN' => 'è”', + 'çO' => '蔀', + 'çP' => '蔩', + 'çQ' => '蔎', + 'çR' => '蔉', + 'çS' => 'è”', + 'çT' => '蔟', + 'çU' => '蔊', + 'çV' => '蔧', + 'çW' => '蔜', + 'çX' => 'è“»', + 'çY' => '蔫', + 'çZ' => '蓺', + 'ç[' => '蔈', + 'ç\\' => '蔌', + 'ç]' => 'è“´', + 'ç^' => '蔪', + 'ç_' => '蓲', + 'ç`' => '蔕', + 'ça' => 'è“·', + 'çb' => 'è“«', + 'çc' => '蓳', + 'çd' => '蓼', + 'çe' => 'è”’', + 'çf' => '蓪', + 'çg' => 'è“©', + 'çh' => 'è”–', + 'çi' => '蓾', + 'çj' => '蔨', + 'çk' => 'è”', + 'çl' => 'è”®', + 'çm' => '蔂', + 'çn' => '蓽', + 'ço' => '蔞', + 'çp' => '蓶', + 'çq' => 'è”±', + 'çr' => '蔦', + 'çs' => '蓧', + 'çt' => '蓨', + 'çu' => 'è“°', + 'çv' => '蓯', + 'çw' => '蓹', + 'çx' => '蔘', + 'çy' => 'è” ', + 'çz' => 'è”°', + 'ç{' => '蔋', + 'ç|' => 'è”™', + 'ç}' => '蔯', + 'ç~' => '虢', + 'ç¡' => 'è–', + 'ç¢' => 'è£', + 'ç£' => 'è¤', + 'ç¤' => 'è·', + 'ç¥' => '蟡', + 'ç¦' => 'è³', + 'ç§' => 'è˜', + 'ç¨' => 'è”', + 'ç©' => 'è›', + 'çª' => 'è’', + 'ç«' => 'è¡', + 'ç¬' => 'èš', + 'ç­' => 'è‘', + 'ç®' => 'èž', + 'ç¯' => 'è­', + 'ç°' => 'èª', + 'ç±' => 'è', + 'ç²' => 'èŽ', + 'ç³' => 'èŸ', + 'ç´' => 'è', + 'çµ' => 'è¯', + 'ç¶' => 'è¬', + 'ç·' => 'èº', + 'ç¸' => 'è®', + 'ç¹' => 'èœ', + 'çº' => 'è¥', + 'ç»' => 'è', + 'ç¼' => 'è»', + 'ç½' => 'èµ', + 'ç¾' => 'è¢', + 'ç¿' => 'è§', + 'çÀ' => 'è©', + 'çÁ' => 'è¡š', + 'çÂ' => '褅', + 'çÃ' => '褌', + 'çÄ' => '褔', + 'çÅ' => '褋', + 'çÆ' => '褗', + 'çÇ' => '褘', + 'çÈ' => '褙', + 'çÉ' => '褆', + 'çÊ' => '褖', + 'çË' => '褑', + 'çÌ' => '褎', + 'çÍ' => '褉', + 'çÎ' => '覢', + 'çÏ' => '覤', + 'çÐ' => '覣', + 'çÑ' => '觭', + 'çÒ' => '觰', + 'çÓ' => '觬', + 'çÔ' => 'è«', + 'çÕ' => '諆', + 'çÖ' => '誸', + 'ç×' => 'è«“', + 'çØ' => 'è«‘', + 'çÙ' => 'è«”', + 'çÚ' => 'è«•', + 'çÛ' => '誻', + 'çÜ' => 'è«—', + 'çÝ' => '誾', + 'çÞ' => 'è«€', + 'çß' => 'è«…', + 'çà' => '諘', + 'çá' => '諃', + 'çâ' => '誺', + 'çã' => '誽', + 'çä' => 'è«™', + 'çå' => 'è°¾', + 'çæ' => 'è±', + 'çç' => 'è²', + 'çè' => 'è³¥', + 'çé' => '賟', + 'çê' => 'è³™', + 'çë' => '賨', + 'çì' => '賚', + 'çí' => 'è³', + 'çî' => '賧', + 'çï' => '趠', + 'çð' => '趜', + 'çñ' => '趡', + 'çò' => '趛', + 'çó' => '踠', + 'çô' => '踣', + 'çõ' => '踥', + 'çö' => '踤', + 'ç÷' => '踮', + 'çø' => '踕', + 'çù' => '踛', + 'çú' => '踖', + 'çû' => '踑', + 'çü' => '踙', + 'çý' => '踦', + 'çþ' => '踧', + 'è@' => '踔', + 'èA' => '踒', + 'èB' => '踘', + 'èC' => '踓', + 'èD' => '踜', + 'èE' => '踗', + 'èF' => '踚', + 'èG' => '輬', + 'èH' => '輤', + 'èI' => '輘', + 'èJ' => '輚', + 'èK' => 'è¼ ', + 'èL' => 'è¼£', + 'èM' => 'è¼–', + 'èN' => 'è¼—', + 'èO' => 'é³', + 'èP' => 'é°', + 'èQ' => 'é¯', + 'èR' => 'é§', + 'èS' => 'é«', + 'èT' => '鄯', + 'èU' => 'é„«', + 'èV' => 'é„©', + 'èW' => '鄪', + 'èX' => '鄲', + 'èY' => '鄦', + 'èZ' => 'é„®', + 'è[' => '醅', + 'è\\' => '醆', + 'è]' => '醊', + 'è^' => 'é†', + 'è_' => '醂', + 'è`' => '醄', + 'èa' => '醀', + 'èb' => 'é‹', + 'èc' => '鋃', + 'èd' => 'é‹„', + 'èe' => 'é‹€', + 'èf' => 'é‹™', + 'èg' => '銶', + 'èh' => 'é‹', + 'èi' => '鋱', + 'èj' => 'é‹Ÿ', + 'èk' => '鋘', + 'èl' => 'é‹©', + 'èm' => 'é‹—', + 'èn' => 'é‹', + 'èo' => 'é‹Œ', + 'èp' => '鋯', + 'èq' => 'é‹‚', + 'èr' => '鋨', + 'ès' => 'é‹Š', + 'èt' => '鋈', + 'èu' => 'é‹Ž', + 'èv' => '鋦', + 'èw' => 'é‹', + 'èx' => 'é‹•', + 'èy' => '鋉', + 'èz' => 'é‹ ', + 'è{' => 'é‹ž', + 'è|' => '鋧', + 'è}' => 'é‹‘', + 'è~' => 'é‹“', + 'è¡' => '銵', + 'è¢' => 'é‹¡', + 'è£' => '鋆', + 'è¤' => '銴', + 'è¥' => '镼', + 'è¦' => 'é–¬', + 'è§' => 'é–«', + 'è¨' => 'é–®', + 'è©' => 'é–°', + 'èª' => '隤', + 'è«' => '隢', + 'è¬' => '雓', + 'è­' => '霅', + 'è®' => '霈', + 'è¯' => '霂', + 'è°' => 'éš', + 'è±' => '鞊', + 'è²' => '鞎', + 'è³' => '鞈', + 'è´' => 'éŸ', + 'èµ' => 'éŸ', + 'è¶' => 'é ž', + 'è·' => 'é ', + 'è¸' => 'é ¦', + 'è¹' => 'é ©', + 'èº' => 'é ¨', + 'è»' => 'é  ', + 'è¼' => 'é ›', + 'è½' => 'é §', + 'è¾' => '颲', + 'è¿' => '餈', + 'èÀ' => '飺', + 'èÁ' => '餑', + 'èÂ' => '餔', + 'èÃ' => '餖', + 'èÄ' => '餗', + 'èÅ' => '餕', + 'èÆ' => '駜', + 'èÇ' => 'é§', + 'èÈ' => 'é§', + 'èÉ' => '駓', + 'èÊ' => '駔', + 'èË' => '駎', + 'èÌ' => '駉', + 'èÍ' => '駖', + 'èÎ' => '駘', + 'èÏ' => '駋', + 'èÐ' => '駗', + 'èÑ' => '駌', + 'èÒ' => '骳', + 'èÓ' => '髬', + 'èÔ' => 'é««', + 'èÕ' => '髳', + 'èÖ' => '髲', + 'è×' => '髱', + 'èØ' => 'é­†', + 'èÙ' => 'é­ƒ', + 'èÚ' => 'é­§', + 'èÛ' => 'é­´', + 'èÜ' => 'é­±', + 'èÝ' => 'é­¦', + 'èÞ' => 'é­¶', + 'èß' => 'é­µ', + 'èà' => 'é­°', + 'èá' => 'é­¨', + 'èâ' => 'é­¤', + 'èã' => 'é­¬', + 'èä' => 'é³¼', + 'èå' => '鳺', + 'èæ' => 'é³½', + 'èç' => '鳿', + 'èè' => 'é³·', + 'èé' => 'é´‡', + 'èê' => 'é´€', + 'èë' => 'é³¹', + 'èì' => 'é³»', + 'èí' => 'é´ˆ', + 'èî' => 'é´…', + 'èï' => 'é´„', + 'èð' => '麃', + 'èñ' => '黓', + 'èò' => 'é¼', + 'èó' => 'é¼', + 'èô' => 'å„œ', + 'èõ' => 'å„“', + 'èö' => 'å„—', + 'è÷' => 'å„š', + 'èø' => 'å„‘', + 'èù' => '凞', + 'èú' => '匴', + 'èû' => 'å¡', + 'èü' => 'å™°', + 'èý' => 'å™ ', + 'èþ' => 'å™®', + 'é@' => '噳', + 'éA' => '噦', + 'éB' => '噣', + 'éC' => 'å™­', + 'éD' => '噲', + 'éE' => '噞', + 'éF' => 'å™·', + 'éG' => '圜', + 'éH' => '圛', + 'éI' => '壈', + 'éJ' => '墽', + 'éK' => '壉', + 'éL' => '墿', + 'éM' => '墺', + 'éN' => '壂', + 'éO' => '墼', + 'éP' => '壆', + 'éQ' => '嬗', + 'éR' => '嬙', + 'éS' => '嬛', + 'éT' => '嬡', + 'éU' => '嬔', + 'éV' => '嬓', + 'éW' => 'å¬', + 'éX' => '嬖', + 'éY' => '嬨', + 'éZ' => '嬚', + 'é[' => '嬠', + 'é\\' => '嬞', + 'é]' => '寯', + 'é^' => '嶬', + 'é_' => '嶱', + 'é`' => '嶩', + 'éa' => '嶧', + 'éb' => '嶵', + 'éc' => '嶰', + 'éd' => '嶮', + 'ée' => '嶪', + 'éf' => '嶨', + 'ég' => '嶲', + 'éh' => '嶭', + 'éi' => '嶯', + 'éj' => '嶴', + 'ék' => '幧', + 'él' => '幨', + 'ém' => '幦', + 'én' => '幯', + 'éo' => '廩', + 'ép' => '廧', + 'éq' => '廦', + 'ér' => '廨', + 'és' => '廥', + 'ét' => '彋', + 'éu' => 'å¾¼', + 'év' => 'æ†', + 'éw' => '憨', + 'éx' => '憖', + 'éy' => '懅', + 'éz' => '憴', + 'é{' => '懆', + 'é|' => 'æ‡', + 'é}' => '懌', + 'é~' => '憺', + 'é¡' => '憿', + 'é¢' => '憸', + 'é£' => '憌', + 'é¤' => 'æ“—', + 'é¥' => 'æ“–', + 'é¦' => 'æ“', + 'é§' => 'æ“', + 'é¨' => '擉', + 'é©' => 'æ’½', + 'éª' => 'æ’‰', + 'é«' => '擃', + 'é¬' => 'æ“›', + 'é­' => '擳', + 'é®' => 'æ“™', + 'é¯' => '攳', + 'é°' => 'æ•¿', + 'é±' => '敼', + 'é²' => 'æ–¢', + 'é³' => '曈', + 'é´' => 'æš¾', + 'éµ' => '曀', + 'é¶' => '曊', + 'é·' => '曋', + 'é¸' => 'æ›', + 'é¹' => 'æš½', + 'éº' => 'æš»', + 'é»' => '暺', + 'é¼' => '曌', + 'é½' => '朣', + 'é¾' => '樴', + 'é¿' => '橦', + 'éÀ' => '橉', + 'éÁ' => '橧', + 'éÂ' => '樲', + 'éÃ' => '橨', + 'éÄ' => '樾', + 'éÅ' => 'æ©', + 'éÆ' => 'æ©­', + 'éÇ' => '橶', + 'éÈ' => 'æ©›', + 'éÉ' => 'æ©‘', + 'éÊ' => '樨', + 'éË' => 'æ©š', + 'éÌ' => '樻', + 'éÍ' => '樿', + 'éÎ' => 'æ©', + 'éÏ' => '橪', + 'éÐ' => '橤', + 'éÑ' => 'æ©', + 'éÒ' => 'æ©', + 'éÓ' => 'æ©”', + 'éÔ' => '橯', + 'éÕ' => 'æ©©', + 'éÖ' => 'æ© ', + 'é×' => '樼', + 'éØ' => 'æ©ž', + 'éÙ' => 'æ©–', + 'éÚ' => 'æ©•', + 'éÛ' => 'æ©', + 'éÜ' => 'æ©Ž', + 'éÝ' => '橆', + 'éÞ' => 'æ­•', + 'éß' => 'æ­”', + 'éà' => 'æ­–', + 'éá' => '殧', + 'éâ' => '殪', + 'éã' => '殫', + 'éä' => '毈', + 'éå' => '毇', + 'éæ' => 'æ°„', + 'éç' => 'æ°ƒ', + 'éè' => 'æ°†', + 'éé' => 'æ¾­', + 'éê' => 'æ¿‹', + 'éë' => 'æ¾£', + 'éì' => '濇', + 'éí' => 'æ¾¼', + 'éî' => 'æ¿Ž', + 'éï' => '濈', + 'éð' => '潞', + 'éñ' => 'æ¿„', + 'éò' => 'æ¾½', + 'éó' => '澞', + 'éô' => 'æ¿Š', + 'éõ' => '澨', + 'éö' => '瀄', + 'é÷' => 'æ¾¥', + 'éø' => 'æ¾®', + 'éù' => '澺', + 'éú' => '澬', + 'éû' => '澪', + 'éü' => 'æ¿', + 'éý' => '澿', + 'éþ' => '澸', + 'ê@' => 'æ¾¢', + 'êA' => '濉', + 'êB' => '澫', + 'êC' => 'æ¿', + 'êD' => '澯', + 'êE' => 'æ¾²', + 'êF' => 'æ¾°', + 'êG' => '燅', + 'êH' => '燂', + 'êI' => '熿', + 'êJ' => '熸', + 'êK' => '燖', + 'êL' => '燀', + 'êM' => 'ç‡', + 'êN' => '燋', + 'êO' => '燔', + 'êP' => '燊', + 'êQ' => '燇', + 'êR' => 'ç‡', + 'êS' => '熽', + 'êT' => '燘', + 'êU' => '熼', + 'êV' => '燆', + 'êW' => '燚', + 'êX' => '燛', + 'êY' => 'çŠ', + 'êZ' => '犞', + 'ê[' => 'ç©', + 'ê\\' => 'ç¦', + 'ê]' => 'ç§', + 'ê^' => 'ç¬', + 'ê_' => 'ç¥', + 'ê`' => 'ç«', + 'êa' => 'çª', + 'êb' => 'ç‘¿', + 'êc' => 'ç’š', + 'êd' => 'ç’ ', + 'êe' => 'ç’”', + 'êf' => 'ç’’', + 'êg' => 'ç’•', + 'êh' => 'ç’¡', + 'êi' => '甋', + 'êj' => 'ç–€', + 'êk' => '瘯', + 'êl' => '瘭', + 'êm' => '瘱', + 'ên' => '瘽', + 'êo' => '瘳', + 'êp' => '瘼', + 'êq' => '瘵', + 'êr' => '瘲', + 'ês' => '瘰', + 'êt' => 'çš»', + 'êu' => '盦', + 'êv' => 'çžš', + 'êw' => 'çž', + 'êx' => 'çž¡', + 'êy' => 'çžœ', + 'êz' => 'çž›', + 'ê{' => '瞢', + 'ê|' => '瞣', + 'ê}' => 'çž•', + 'ê~' => 'çž™', + 'ê¡' => 'çž—', + 'ê¢' => 'ç£', + 'ê£' => '磩', + 'ê¤' => '磥', + 'ê¥' => '磪', + 'ê¦' => '磞', + 'ê§' => '磣', + 'ê¨' => '磛', + 'ê©' => '磡', + 'êª' => '磢', + 'ê«' => '磭', + 'ê¬' => '磟', + 'ê­' => '磠', + 'ê®' => '禤', + 'ê¯' => 'ç©„', + 'ê°' => '穈', + 'ê±' => '穇', + 'ê²' => '窶', + 'ê³' => '窸', + 'ê´' => '窵', + 'êµ' => '窱', + 'ê¶' => '窷', + 'ê·' => '篞', + 'ê¸' => '篣', + 'ê¹' => '篧', + 'êº' => 'ç¯', + 'ê»' => '篕', + 'ê¼' => '篥', + 'ê½' => '篚', + 'ê¾' => '篨', + 'ê¿' => '篹', + 'êÀ' => '篔', + 'êÁ' => '篪', + 'êÂ' => '篢', + 'êÃ' => '篜', + 'êÄ' => '篫', + 'êÅ' => '篘', + 'êÆ' => '篟', + 'êÇ' => 'ç³’', + 'êÈ' => 'ç³”', + 'êÉ' => 'ç³—', + 'êÊ' => 'ç³', + 'êË' => '糑', + 'êÌ' => '縒', + 'êÍ' => '縡', + 'êÎ' => '縗', + 'êÏ' => '縌', + 'êÐ' => '縟', + 'êÑ' => '縠', + 'êÒ' => '縓', + 'êÓ' => '縎', + 'êÔ' => '縜', + 'êÕ' => '縕', + 'êÖ' => '縚', + 'ê×' => '縢', + 'êØ' => '縋', + 'êÙ' => 'ç¸', + 'êÚ' => '縖', + 'êÛ' => 'ç¸', + 'êÜ' => '縔', + 'êÝ' => '縥', + 'êÞ' => '縤', + 'êß' => '罃', + 'êà' => 'ç½»', + 'êá' => 'ç½¼', + 'êâ' => '罺', + 'êã' => 'ç¾±', + 'êä' => '翯', + 'êå' => '耪', + 'êæ' => '耩', + 'êç' => 'è¬', + 'êè' => '膱', + 'êé' => '膦', + 'êê' => '膮', + 'êë' => '膹', + 'êì' => '膵', + 'êí' => '膫', + 'êî' => '膰', + 'êï' => '膬', + 'êð' => '膴', + 'êñ' => '膲', + 'êò' => '膷', + 'êó' => '膧', + 'êô' => '臲', + 'êõ' => '艕', + 'êö' => '艖', + 'ê÷' => '艗', + 'êø' => 'è•–', + 'êù' => 'è•…', + 'êú' => 'è•«', + 'êû' => 'è•', + 'êü' => 'è•“', + 'êý' => 'è•¡', + 'êþ' => '蕘', + 'ë@' => 'è•€', + 'ëA' => '蕆', + 'ëB' => '蕤', + 'ëC' => 'è•', + 'ëD' => 'è•¢', + 'ëE' => 'è•„', + 'ëF' => 'è•‘', + 'ëG' => '蕇', + 'ëH' => 'è•£', + 'ëI' => '蔾', + 'ëJ' => 'è•›', + 'ëK' => '蕱', + 'ëL' => 'è•Ž', + 'ëM' => 'è•®', + 'ëN' => '蕵', + 'ëO' => 'è••', + 'ëP' => '蕧', + 'ëQ' => 'è• ', + 'ëR' => 'è–Œ', + 'ëS' => '蕦', + 'ëT' => 'è•', + 'ëU' => 'è•”', + 'ëV' => 'è•¥', + 'ëW' => '蕬', + 'ëX' => '虣', + 'ëY' => '虥', + 'ëZ' => '虤', + 'ë[' => 'èž›', + 'ë\\' => 'èž', + 'ë]' => 'èž—', + 'ë^' => 'èž“', + 'ë_' => 'èž’', + 'ë`' => '螈', + 'ëa' => 'èž', + 'ëb' => 'èž–', + 'ëc' => '螘', + 'ëd' => 'è¹', + 'ëe' => '螇', + 'ëf' => '螣', + 'ëg' => 'èž…', + 'ëh' => 'èž', + 'ëi' => 'èž‘', + 'ëj' => 'èž', + 'ëk' => 'èž„', + 'ël' => 'èž”', + 'ëm' => 'èžœ', + 'ën' => 'èžš', + 'ëo' => '螉', + 'ëp' => '褞', + 'ëq' => '褦', + 'ër' => '褰', + 'ës' => '褭', + 'ët' => '褮', + 'ëu' => '褧', + 'ëv' => '褱', + 'ëw' => '褢', + 'ëx' => '褩', + 'ëy' => '褣', + 'ëz' => '褯', + 'ë{' => '褬', + 'ë|' => '褟', + 'ë}' => '觱', + 'ë~' => 'è« ', + 'ë¡' => 'è«¢', + 'ë¢' => '諲', + 'ë£' => 'è«´', + 'ë¤' => '諵', + 'ë¥' => 'è«', + 'ë¦' => '謔', + 'ë§' => '諤', + 'ë¨' => 'è«Ÿ', + 'ë©' => 'è«°', + 'ëª' => '諈', + 'ë«' => 'è«ž', + 'ë¬' => 'è«¡', + 'ë­' => '諨', + 'ë®' => 'è«¿', + 'ë¯' => '諯', + 'ë°' => 'è«»', + 'ë±' => '貑', + 'ë²' => 'è²’', + 'ë³' => 'è²', + 'ë´' => 'è³µ', + 'ëµ' => 'è³®', + 'ë¶' => 'è³±', + 'ë·' => 'è³°', + 'ë¸' => 'è³³', + 'ë¹' => '赬', + 'ëº' => 'èµ®', + 'ë»' => '趥', + 'ë¼' => '趧', + 'ë½' => '踳', + 'ë¾' => '踾', + 'ë¿' => '踸', + 'ëÀ' => 'è¹€', + 'ëÁ' => 'è¹…', + 'ëÂ' => '踶', + 'ëÃ' => '踼', + 'ëÄ' => '踽', + 'ëÅ' => 'è¹', + 'ëÆ' => '踰', + 'ëÇ' => '踿', + 'ëÈ' => '躽', + 'ëÉ' => '輶', + 'ëÊ' => 'è¼®', + 'ëË' => 'è¼µ', + 'ëÌ' => 'è¼²', + 'ëÍ' => 'è¼¹', + 'ëÎ' => 'è¼·', + 'ëÏ' => 'è¼´', + 'ëÐ' => 'é¶', + 'ëÑ' => 'é¹', + 'ëÒ' => 'é»', + 'ëÓ' => '邆', + 'ëÔ' => '郺', + 'ëÕ' => '鄳', + 'ëÖ' => '鄵', + 'ë×' => '鄶', + 'ëØ' => '醓', + 'ëÙ' => 'é†', + 'ëÚ' => '醑', + 'ëÛ' => 'é†', + 'ëÜ' => 'é†', + 'ëÝ' => '錧', + 'ëÞ' => '錞', + 'ëß' => '錈', + 'ëà' => '錟', + 'ëá' => '錆', + 'ëâ' => 'éŒ', + 'ëã' => 'éº', + 'ëä' => '錸', + 'ëå' => '錼', + 'ëæ' => '錛', + 'ëç' => '錣', + 'ëè' => '錒', + 'ëé' => 'éŒ', + 'ëê' => 'é†', + 'ëë' => '錭', + 'ëì' => '錎', + 'ëí' => 'éŒ', + 'ëî' => 'é‹‹', + 'ëï' => 'éŒ', + 'ëð' => '鋺', + 'ëñ' => '錥', + 'ëò' => '錓', + 'ëó' => '鋹', + 'ëô' => 'é‹·', + 'ëõ' => '錴', + 'ëö' => '錂', + 'ë÷' => '錤', + 'ëø' => 'é‹¿', + 'ëù' => '錩', + 'ëú' => '錹', + 'ëû' => '錵', + 'ëü' => '錪', + 'ëý' => '錔', + 'ëþ' => '錌', + 'ì@' => '錋', + 'ìA' => '鋾', + 'ìB' => '錉', + 'ìC' => '錀', + 'ìD' => 'é‹»', + 'ìE' => '錖', + 'ìF' => 'é–¼', + 'ìG' => 'é—', + 'ìH' => 'é–¾', + 'ìI' => 'é–¹', + 'ìJ' => 'é–º', + 'ìK' => 'é–¶', + 'ìL' => 'é–¿', + 'ìM' => 'é–µ', + 'ìN' => 'é–½', + 'ìO' => 'éš©', + 'ìP' => 'é›”', + 'ìQ' => '霋', + 'ìR' => '霒', + 'ìS' => 'éœ', + 'ìT' => 'éž™', + 'ìU' => 'éž—', + 'ìV' => 'éž”', + 'ìW' => '韰', + 'ìX' => '韸', + 'ìY' => 'é µ', + 'ìZ' => 'é ¯', + 'ì[' => 'é ²', + 'ì\\' => '餤', + 'ì]' => '餟', + 'ì^' => '餧', + 'ì_' => '餩', + 'ì`' => '馞', + 'ìa' => '駮', + 'ìb' => '駬', + 'ìc' => '駥', + 'ìd' => '駤', + 'ìe' => '駰', + 'ìf' => '駣', + 'ìg' => '駪', + 'ìh' => '駩', + 'ìi' => '駧', + 'ìj' => '骹', + 'ìk' => '骿', + 'ìl' => '骴', + 'ìm' => '骻', + 'ìn' => '髶', + 'ìo' => '髺', + 'ìp' => '髹', + 'ìq' => 'é«·', + 'ìr' => '鬳', + 'ìs' => '鮀', + 'ìt' => 'é®…', + 'ìu' => '鮇', + 'ìv' => 'é­¼', + 'ìw' => 'é­¾', + 'ìx' => 'é­»', + 'ìy' => '鮂', + 'ìz' => '鮓', + 'ì{' => 'é®’', + 'ì|' => 'é®', + 'ì}' => 'é­º', + 'ì~' => '鮕', + 'ì¡' => 'é­½', + 'ì¢' => '鮈', + 'ì£' => 'é´¥', + 'ì¤' => 'é´—', + 'ì¥' => 'é´ ', + 'ì¦' => 'é´ž', + 'ì§' => 'é´”', + 'ì¨' => 'é´©', + 'ì©' => 'é´', + 'ìª' => 'é´˜', + 'ì«' => 'é´¢', + 'ì¬' => 'é´', + 'ì­' => 'é´™', + 'ì®' => 'é´Ÿ', + 'ì¯' => '麈', + 'ì°' => '麆', + 'ì±' => '麇', + 'ì²' => '麮', + 'ì³' => '麭', + 'ì´' => '黕', + 'ìµ' => 'é»–', + 'ì¶' => '黺', + 'ì·' => 'é¼’', + 'ì¸' => 'é¼½', + 'ì¹' => '儦', + 'ìº' => 'å„¥', + 'ì»' => 'å„¢', + 'ì¼' => '儤', + 'ì½' => 'å„ ', + 'ì¾' => 'å„©', + 'ì¿' => 'å‹´', + 'ìÀ' => 'åš“', + 'ìÁ' => '嚌', + 'ìÂ' => 'åš', + 'ìÃ' => '嚆', + 'ìÄ' => 'åš„', + 'ìÅ' => '嚃', + 'ìÆ' => '噾', + 'ìÇ' => 'åš‚', + 'ìÈ' => '噿', + 'ìÉ' => 'åš', + 'ìÊ' => '壖', + 'ìË' => '壔', + 'ìÌ' => 'å£', + 'ìÍ' => '壒', + 'ìÎ' => '嬭', + 'ìÏ' => '嬥', + 'ìÐ' => '嬲', + 'ìÑ' => '嬣', + 'ìÒ' => '嬬', + 'ìÓ' => '嬧', + 'ìÔ' => '嬦', + 'ìÕ' => '嬯', + 'ìÖ' => '嬮', + 'ì×' => 'å­»', + 'ìØ' => '寱', + 'ìÙ' => '寲', + 'ìÚ' => '嶷', + 'ìÛ' => '幬', + 'ìÜ' => '幪', + 'ìÝ' => 'å¾¾', + 'ìÞ' => 'å¾»', + 'ìß' => '懃', + 'ìà' => '憵', + 'ìá' => '憼', + 'ìâ' => '懧', + 'ìã' => '懠', + 'ìä' => '懥', + 'ìå' => '懤', + 'ìæ' => '懨', + 'ìç' => '懞', + 'ìè' => '擯', + 'ìé' => 'æ“©', + 'ìê' => 'æ“£', + 'ìë' => 'æ“«', + 'ìì' => '擤', + 'ìí' => '擨', + 'ìî' => 'æ–', + 'ìï' => 'æ–€', + 'ìð' => 'æ–¶', + 'ìñ' => 'æ—š', + 'ìò' => 'æ›’', + 'ìó' => 'æª', + 'ìô' => '檖', + 'ìõ' => 'æª', + 'ìö' => '檥', + 'ì÷' => '檉', + 'ìø' => '檟', + 'ìù' => '檛', + 'ìú' => '檡', + 'ìû' => '檞', + 'ìü' => '檇', + 'ìý' => '檓', + 'ìþ' => '檎', + 'í@' => '檕', + 'íA' => '檃', + 'íB' => '檨', + 'íC' => '檤', + 'íD' => '檑', + 'íE' => 'æ©¿', + 'íF' => '檦', + 'íG' => '檚', + 'íH' => '檅', + 'íI' => '檌', + 'íJ' => '檒', + 'íK' => 'æ­›', + 'íL' => 'æ®­', + 'íM' => 'æ°‰', + 'íN' => 'æ¿Œ', + 'íO' => '澩', + 'íP' => 'æ¿´', + 'íQ' => 'æ¿”', + 'íR' => 'æ¿£', + 'íS' => 'æ¿œ', + 'íT' => 'æ¿­', + 'íU' => '濧', + 'íV' => '濦', + 'íW' => 'æ¿ž', + 'íX' => '濲', + 'íY' => 'æ¿', + 'íZ' => 'æ¿¢', + 'í[' => '濨', + 'í\\' => '燡', + 'í]' => '燱', + 'í^' => '燨', + 'í_' => '燲', + 'í`' => '燤', + 'ía' => '燰', + 'íb' => '燢', + 'íc' => 'ç³', + 'íd' => 'ç®', + 'íe' => 'ç¯', + 'íf' => 'ç’—', + 'íg' => 'ç’²', + 'íh' => 'ç’«', + 'íi' => 'ç’', + 'íj' => 'ç’ª', + 'ík' => 'ç’­', + 'íl' => 'ç’±', + 'ím' => 'ç’¥', + 'ín' => 'ç’¯', + 'ío' => 'ç”', + 'íp' => '甑', + 'íq' => 'ç”’', + 'ír' => 'ç”', + 'ís' => 'ç–„', + 'ít' => '癃', + 'íu' => '癈', + 'ív' => '癉', + 'íw' => '癇', + 'íx' => '皤', + 'íy' => '盩', + 'íz' => 'çžµ', + 'í{' => 'çž«', + 'í|' => 'çž²', + 'í}' => 'çž·', + 'í~' => '瞶', + 'í¡' => 'çž´', + 'í¢' => 'çž±', + 'í£' => '瞨', + 'í¤' => '矰', + 'í¥' => '磳', + 'í¦' => '磽', + 'í§' => '礂', + 'í¨' => '磻', + 'í©' => '磼', + 'íª' => '磲', + 'í«' => '礅', + 'í¬' => '磹', + 'í­' => '磾', + 'í®' => '礄', + 'í¯' => '禫', + 'í°' => '禨', + 'í±' => 'ç©œ', + 'í²' => 'ç©›', + 'í³' => 'ç©–', + 'í´' => '穘', + 'íµ' => 'ç©”', + 'í¶' => 'ç©š', + 'í·' => '窾', + 'í¸' => 'ç«€', + 'í¹' => 'ç«', + 'íº' => 'ç°…', + 'í»' => 'ç°', + 'í¼' => '篲', + 'í½' => 'ç°€', + 'í¾' => '篿', + 'í¿' => '篻', + 'íÀ' => 'ç°Ž', + 'íÁ' => '篴', + 'íÂ' => 'ç°‹', + 'íÃ' => '篳', + 'íÄ' => 'ç°‚', + 'íÅ' => 'ç°‰', + 'íÆ' => 'ç°ƒ', + 'íÇ' => 'ç°', + 'íÈ' => '篸', + 'íÉ' => '篽', + 'íÊ' => 'ç°†', + 'íË' => '篰', + 'íÌ' => '篱', + 'íÍ' => 'ç°', + 'íÎ' => 'ç°Š', + 'íÏ' => '糨', + 'íÐ' => '縭', + 'íÑ' => '縼', + 'íÒ' => '繂', + 'íÓ' => '縳', + 'íÔ' => '顈', + 'íÕ' => '縸', + 'íÖ' => '縪', + 'í×' => '繉', + 'íØ' => 'ç¹€', + 'íÙ' => '繇', + 'íÚ' => '縩', + 'íÛ' => '繌', + 'íÜ' => '縰', + 'íÝ' => '縻', + 'íÞ' => '縶', + 'íß' => '繄', + 'íà' => '縺', + 'íá' => 'ç½…', + 'íâ' => '罿', + 'íã' => 'ç½¾', + 'íä' => 'ç½½', + 'íå' => 'ç¿´', + 'íæ' => '翲', + 'íç' => '耬', + 'íè' => '膻', + 'íé' => '臄', + 'íê' => '臌', + 'íë' => '臊', + 'íì' => '臅', + 'íí' => '臇', + 'íî' => '膼', + 'íï' => '臩', + 'íð' => '艛', + 'íñ' => '艚', + 'íò' => '艜', + 'íó' => 'è–ƒ', + 'íô' => 'è–€', + 'íõ' => 'è–', + 'íö' => 'è–§', + 'í÷' => 'è–•', + 'íø' => 'è– ', + 'íù' => 'è–‹', + 'íú' => 'è–£', + 'íû' => 'è•»', + 'íü' => 'è–¤', + 'íý' => 'è–š', + 'íþ' => 'è–ž', + 'î@' => 'è•·', + 'îA' => '蕼', + 'îB' => 'è–‰', + 'îC' => 'è–¡', + 'îD' => '蕺', + 'îE' => '蕸', + 'îF' => 'è•—', + 'îG' => 'è–Ž', + 'îH' => 'è––', + 'îI' => 'è–†', + 'îJ' => 'è–', + 'îK' => 'è–™', + 'îL' => 'è–', + 'îM' => 'è–', + 'îN' => 'è–¢', + 'îO' => 'è–‚', + 'îP' => 'è–ˆ', + 'îQ' => 'è–…', + 'îR' => '蕹', + 'îS' => '蕶', + 'îT' => 'è–˜', + 'îU' => 'è–', + 'îV' => 'è–Ÿ', + 'îW' => '虨', + 'îX' => 'èž¾', + 'îY' => '螪', + 'îZ' => 'èž­', + 'î[' => '蟅', + 'î\\' => 'èž°', + 'î]' => '螬', + 'î^' => 'èž¹', + 'î_' => 'èžµ', + 'î`' => 'èž¼', + 'îa' => 'èž®', + 'îb' => '蟉', + 'îc' => '蟃', + 'îd' => '蟂', + 'îe' => '蟌', + 'îf' => 'èž·', + 'îg' => '螯', + 'îh' => '蟄', + 'îi' => '蟊', + 'îj' => 'èž´', + 'îk' => '螶', + 'îl' => 'èž¿', + 'îm' => '螸', + 'în' => 'èž½', + 'îo' => '蟞', + 'îp' => 'èž²', + 'îq' => '褵', + 'îr' => '褳', + 'îs' => '褼', + 'ît' => '褾', + 'îu' => 'è¥', + 'îv' => '襒', + 'îw' => '褷', + 'îx' => '襂', + 'îy' => '覭', + 'îz' => '覯', + 'î{' => '覮', + 'î|' => '觲', + 'î}' => '觳', + 'î~' => '謞', + 'î¡' => '謘', + 'î¢' => '謖', + 'î£' => '謑', + 'î¤' => '謅', + 'î¥' => '謋', + 'î¦' => '謢', + 'î§' => 'è¬', + 'î¨' => '謒', + 'î©' => '謕', + 'îª' => '謇', + 'î«' => 'è¬', + 'î¬' => '謈', + 'î­' => '謆', + 'î®' => '謜', + 'î¯' => '謓', + 'î°' => '謚', + 'î±' => 'è±', + 'î²' => 'è±°', + 'î³' => 'è±²', + 'î´' => 'è±±', + 'îµ' => '豯', + 'î¶' => '貕', + 'î·' => 'è²”', + 'î¸' => 'è³¹', + 'î¹' => '赯', + 'îº' => '蹎', + 'î»' => 'è¹', + 'î¼' => '蹓', + 'î½' => 'è¹', + 'î¾' => '蹌', + 'î¿' => '蹇', + 'îÀ' => '轃', + 'îÁ' => 'è½€', + 'îÂ' => 'é‚…', + 'îÃ' => 'é¾', + 'îÄ' => '鄸', + 'îÅ' => '醚', + 'îÆ' => '醢', + 'îÇ' => '醛', + 'îÈ' => '醙', + 'îÉ' => '醟', + 'îÊ' => '醡', + 'îË' => 'é†', + 'îÌ' => '醠', + 'îÍ' => '鎡', + 'îÎ' => '鎃', + 'îÏ' => '鎯', + 'îÐ' => 'é¤', + 'îÑ' => 'é–', + 'îÒ' => 'é‡', + 'îÓ' => 'é¼', + 'îÔ' => 'é˜', + 'îÕ' => 'éœ', + 'îÖ' => 'é¶', + 'î×' => 'é‰', + 'îØ' => 'é', + 'îÙ' => 'é‘', + 'îÚ' => 'é ', + 'îÛ' => 'é­', + 'îÜ' => 'éŽ', + 'îÝ' => 'éŒ', + 'îÞ' => 'éª', + 'îß' => 'é¹', + 'îà' => 'é—', + 'îá' => 'é•', + 'îâ' => 'é’', + 'îã' => 'é', + 'îä' => 'é±', + 'îå' => 'é·', + 'îæ' => 'é»', + 'îç' => 'é¡', + 'îè' => 'éž', + 'îé' => 'é£', + 'îê' => 'é§', + 'îë' => '鎀', + 'îì' => 'éŽ', + 'îí' => 'é™', + 'îî' => 'é—‡', + 'îï' => 'é—€', + 'îð' => 'é—‰', + 'îñ' => 'é—ƒ', + 'îò' => 'é—…', + 'îó' => 'é–·', + 'îô' => 'éš®', + 'îõ' => 'éš°', + 'îö' => '隬', + 'î÷' => '霠', + 'îø' => '霟', + 'îù' => '霘', + 'îú' => 'éœ', + 'îû' => '霙', + 'îü' => 'éžš', + 'îý' => 'éž¡', + 'îþ' => 'éžœ', + 'ï@' => 'éžž', + 'ïA' => 'éž', + 'ïB' => '韕', + 'ïC' => '韔', + 'ïD' => '韱', + 'ïE' => 'é¡', + 'ïF' => 'é¡„', + 'ïG' => 'é¡Š', + 'ïH' => '顉', + 'ïI' => 'é¡…', + 'ïJ' => '顃', + 'ïK' => '餥', + 'ïL' => '餫', + 'ïM' => '餬', + 'ïN' => '餪', + 'ïO' => '餳', + 'ïP' => '餲', + 'ïQ' => '餯', + 'ïR' => '餭', + 'ïS' => '餱', + 'ïT' => '餰', + 'ïU' => '馘', + 'ïV' => '馣', + 'ïW' => '馡', + 'ïX' => '騂', + 'ïY' => '駺', + 'ïZ' => '駴', + 'ï[' => '駷', + 'ï\\' => '駹', + 'ï]' => '駸', + 'ï^' => '駶', + 'ï_' => '駻', + 'ï`' => '駽', + 'ïa' => '駾', + 'ïb' => '駼', + 'ïc' => '騃', + 'ïd' => '骾', + 'ïe' => '髾', + 'ïf' => '髽', + 'ïg' => 'é¬', + 'ïh' => '髼', + 'ïi' => 'é­ˆ', + 'ïj' => '鮚', + 'ïk' => '鮨', + 'ïl' => '鮞', + 'ïm' => 'é®›', + 'ïn' => '鮦', + 'ïo' => '鮡', + 'ïp' => '鮥', + 'ïq' => '鮤', + 'ïr' => '鮆', + 'ïs' => '鮢', + 'ït' => 'é® ', + 'ïu' => '鮯', + 'ïv' => 'é´³', + 'ïw' => 'éµ', + 'ïx' => '鵧', + 'ïy' => 'é´¶', + 'ïz' => 'é´®', + 'ï{' => 'é´¯', + 'ï|' => 'é´±', + 'ï}' => 'é´¸', + 'ï~' => 'é´°', + 'ï¡' => 'éµ…', + 'ï¢' => '鵂', + 'ï£' => '鵃', + 'ï¤' => 'é´¾', + 'ï¥' => 'é´·', + 'ï¦' => 'éµ€', + 'ï§' => 'é´½', + 'ï¨' => '翵', + 'ï©' => 'é´­', + 'ïª' => '麊', + 'ï«' => '麉', + 'ï¬' => 'éº', + 'ï­' => '麰', + 'ï®' => '黈', + 'ï¯' => '黚', + 'ï°' => 'é»»', + 'ï±' => '黿', + 'ï²' => '鼤', + 'ï³' => 'é¼£', + 'ï´' => 'é¼¢', + 'ïµ' => 'é½”', + 'ï¶' => 'é¾ ', + 'ï·' => '儱', + 'ï¸' => 'å„­', + 'ï¹' => 'å„®', + 'ïº' => '嚘', + 'ï»' => 'åšœ', + 'ï¼' => 'åš—', + 'ï½' => 'åšš', + 'ï¾' => 'åš', + 'ï¿' => 'åš™', + 'ïÀ' => '奰', + 'ïÁ' => '嬼', + 'ïÂ' => '屩', + 'ïÃ' => '屪', + 'ïÄ' => 'å·€', + 'ïÅ' => 'å¹­', + 'ïÆ' => 'å¹®', + 'ïÇ' => '懘', + 'ïÈ' => '懟', + 'ïÉ' => '懭', + 'ïÊ' => '懮', + 'ïË' => '懱', + 'ïÌ' => '懪', + 'ïÍ' => '懰', + 'ïÎ' => '懫', + 'ïÏ' => '懖', + 'ïÐ' => '懩', + 'ïÑ' => 'æ“¿', + 'ïÒ' => '攄', + 'ïÓ' => '擽', + 'ïÔ' => '擸', + 'ïÕ' => 'æ”', + 'ïÖ' => '攃', + 'ï×' => '擼', + 'ïØ' => 'æ–”', + 'ïÙ' => 'æ—›', + 'ïÚ' => '曚', + 'ïÛ' => 'æ››', + 'ïÜ' => '曘', + 'ïÝ' => 'æ«…', + 'ïÞ' => '檹', + 'ïß' => '檽', + 'ïà' => 'æ«¡', + 'ïá' => '櫆', + 'ïâ' => '檺', + 'ïã' => '檶', + 'ïä' => '檷', + 'ïå' => '櫇', + 'ïæ' => '檴', + 'ïç' => '檭', + 'ïè' => 'æ­ž', + 'ïé' => '毉', + 'ïê' => 'æ°‹', + 'ïë' => '瀇', + 'ïì' => '瀌', + 'ïí' => 'ç€', + 'ïî' => 'ç€', + 'ïï' => '瀅', + 'ïð' => '瀔', + 'ïñ' => '瀎', + 'ïò' => 'æ¿¿', + 'ïó' => '瀀', + 'ïô' => 'æ¿»', + 'ïõ' => '瀦', + 'ïö' => '濼', + 'ï÷' => 'æ¿·', + 'ïø' => '瀊', + 'ïù' => 'çˆ', + 'ïú' => '燿', + 'ïû' => '燹', + 'ïü' => '爃', + 'ïý' => '燽', + 'ïþ' => 'ç¶', + 'ð@' => 'ç’¸', + 'ðA' => 'ç“€', + 'ðB' => 'ç’µ', + 'ðC' => 'ç“', + 'ðD' => 'ç’¾', + 'ðE' => 'ç’¶', + 'ðF' => 'ç’»', + 'ðG' => 'ç“‚', + 'ðH' => 'ç””', + 'ðI' => '甓', + 'ðJ' => '癜', + 'ðK' => '癤', + 'ðL' => 'ç™™', + 'ðM' => 'ç™', + 'ðN' => '癓', + 'ðO' => 'ç™—', + 'ðP' => '癚', + 'ðQ' => '皦', + 'ðR' => 'çš½', + 'ðS' => '盬', + 'ðT' => '矂', + 'ðU' => '瞺', + 'ðV' => '磿', + 'ðW' => '礌', + 'ðX' => '礓', + 'ðY' => '礔', + 'ðZ' => '礉', + 'ð[' => 'ç¤', + 'ð\\' => '礒', + 'ð]' => '礑', + 'ð^' => '禭', + 'ð_' => '禬', + 'ð`' => 'ç©Ÿ', + 'ða' => 'ç°œ', + 'ðb' => 'ç°©', + 'ðc' => 'ç°™', + 'ðd' => 'ç° ', + 'ðe' => 'ç°Ÿ', + 'ðf' => 'ç°­', + 'ðg' => 'ç°', + 'ðh' => 'ç°¦', + 'ði' => 'ç°¨', + 'ðj' => 'ç°¢', + 'ðk' => 'ç°¥', + 'ðl' => 'ç°°', + 'ðm' => '繜', + 'ðn' => 'ç¹', + 'ðo' => 'ç¹–', + 'ðp' => 'ç¹£', + 'ðq' => '繘', + 'ðr' => 'ç¹¢', + 'ðs' => '繟', + 'ðt' => '繑', + 'ðu' => 'ç¹ ', + 'ðv' => 'ç¹—', + 'ðw' => '繓', + 'ðx' => 'ç¾µ', + 'ðy' => 'ç¾³', + 'ðz' => 'ç¿·', + 'ð{' => '翸', + 'ð|' => 'èµ', + 'ð}' => '臑', + 'ð~' => '臒', + 'ð¡' => 'è‡', + 'ð¢' => '艟', + 'ð£' => '艞', + 'ð¤' => 'è–´', + 'ð¥' => 'è—†', + 'ð¦' => 'è—€', + 'ð§' => 'è—ƒ', + 'ð¨' => 'è—‚', + 'ð©' => 'è–³', + 'ðª' => 'è–µ', + 'ð«' => 'è–½', + 'ð¬' => 'è—‡', + 'ð­' => 'è—„', + 'ð®' => 'è–¿', + 'ð¯' => 'è—‹', + 'ð°' => 'è—Ž', + 'ð±' => 'è—ˆ', + 'ð²' => 'è—…', + 'ð³' => 'è–±', + 'ð´' => 'è–¶', + 'ðµ' => 'è—’', + 'ð¶' => '蘤', + 'ð·' => 'è–¸', + 'ð¸' => 'è–·', + 'ð¹' => 'è–¾', + 'ðº' => '虩', + 'ð»' => '蟧', + 'ð¼' => '蟦', + 'ð½' => '蟢', + 'ð¾' => '蟛', + 'ð¿' => '蟫', + 'ðÀ' => '蟪', + 'ðÁ' => '蟥', + 'ðÂ' => '蟟', + 'ðÃ' => '蟳', + 'ðÄ' => '蟤', + 'ðÅ' => '蟔', + 'ðÆ' => '蟜', + 'ðÇ' => '蟓', + 'ðÈ' => '蟭', + 'ðÉ' => '蟘', + 'ðÊ' => '蟣', + 'ðË' => '螤', + 'ðÌ' => '蟗', + 'ðÍ' => '蟙', + 'ðÎ' => 'è ', + 'ðÏ' => '蟴', + 'ðÐ' => '蟨', + 'ðÑ' => 'èŸ', + 'ðÒ' => '襓', + 'ðÓ' => '襋', + 'ðÔ' => 'è¥', + 'ðÕ' => '襌', + 'ðÖ' => '襆', + 'ð×' => 'è¥', + 'ðØ' => '襑', + 'ðÙ' => '襉', + 'ðÚ' => '謪', + 'ðÛ' => '謧', + 'ðÜ' => '謣', + 'ðÝ' => '謳', + 'ðÞ' => '謰', + 'ðß' => '謵', + 'ðà' => 'è­‡', + 'ðá' => '謯', + 'ðâ' => '謼', + 'ðã' => '謾', + 'ðä' => '謱', + 'ðå' => '謥', + 'ðæ' => '謷', + 'ðç' => '謦', + 'ðè' => '謶', + 'ðé' => '謮', + 'ðê' => '謤', + 'ðë' => '謻', + 'ðì' => '謽', + 'ðí' => '謺', + 'ðî' => '豂', + 'ðï' => 'è±µ', + 'ðð' => 'è²™', + 'ðñ' => '貘', + 'ðò' => 'è²—', + 'ðó' => 'è³¾', + 'ðô' => 'è´„', + 'ðõ' => 'è´‚', + 'ðö' => 'è´€', + 'ð÷' => '蹜', + 'ðø' => 'è¹¢', + 'ðù' => 'è¹ ', + 'ðú' => 'è¹—', + 'ðû' => 'è¹–', + 'ðü' => '蹞', + 'ðý' => 'è¹¥', + 'ðþ' => '蹧', + 'ñ@' => 'è¹›', + 'ñA' => '蹚', + 'ñB' => '蹡', + 'ñC' => 'è¹', + 'ñD' => '蹩', + 'ñE' => 'è¹”', + 'ñF' => '轆', + 'ñG' => '轇', + 'ñH' => '轈', + 'ñI' => '轋', + 'ñJ' => '鄨', + 'ñK' => '鄺', + 'ñL' => 'é„»', + 'ñM' => '鄾', + 'ñN' => '醨', + 'ñO' => '醥', + 'ñP' => '醧', + 'ñQ' => '醯', + 'ñR' => '醪', + 'ñS' => '鎵', + 'ñT' => '鎌', + 'ñU' => '鎒', + 'ñV' => '鎷', + 'ñW' => '鎛', + 'ñX' => 'éŽ', + 'ñY' => '鎉', + 'ñZ' => '鎧', + 'ñ[' => '鎎', + 'ñ\\' => '鎪', + 'ñ]' => '鎞', + 'ñ^' => '鎦', + 'ñ_' => '鎕', + 'ñ`' => '鎈', + 'ña' => '鎙', + 'ñb' => '鎟', + 'ñc' => 'éŽ', + 'ñd' => '鎱', + 'ñe' => '鎑', + 'ñf' => '鎲', + 'ñg' => '鎤', + 'ñh' => '鎨', + 'ñi' => '鎴', + 'ñj' => '鎣', + 'ñk' => '鎥', + 'ñl' => 'é—’', + 'ñm' => 'é—“', + 'ñn' => 'é—‘', + 'ño' => 'éš³', + 'ñp' => 'é›—', + 'ñq' => '雚', + 'ñr' => 'å·‚', + 'ñs' => '雟', + 'ñt' => '雘', + 'ñu' => 'é›', + 'ñv' => '霣', + 'ñw' => '霢', + 'ñx' => '霥', + 'ñy' => '鞬', + 'ñz' => 'éž®', + 'ñ{' => '鞨', + 'ñ|' => 'éž«', + 'ñ}' => '鞤', + 'ñ~' => '鞪', + 'ñ¡' => '鞢', + 'ñ¢' => '鞥', + 'ñ£' => '韗', + 'ñ¤' => '韙', + 'ñ¥' => '韖', + 'ñ¦' => '韘', + 'ñ§' => '韺', + 'ñ¨' => 'é¡', + 'ñ©' => 'é¡‘', + 'ñª' => 'é¡’', + 'ñ«' => '颸', + 'ñ¬' => 'é¥', + 'ñ­' => '餼', + 'ñ®' => '餺', + 'ñ¯' => 'é¨', + 'ñ°' => '騋', + 'ñ±' => '騉', + 'ñ²' => 'é¨', + 'ñ³' => '騄', + 'ñ´' => '騑', + 'ñµ' => '騊', + 'ñ¶' => '騅', + 'ñ·' => '騇', + 'ñ¸' => '騆', + 'ñ¹' => 'é«€', + 'ñº' => 'é«œ', + 'ñ»' => '鬈', + 'ñ¼' => '鬄', + 'ñ½' => '鬅', + 'ñ¾' => '鬩', + 'ñ¿' => '鬵', + 'ñÀ' => 'é­Š', + 'ñÁ' => 'é­Œ', + 'ñÂ' => 'é­‹', + 'ñÃ' => '鯇', + 'ñÄ' => '鯆', + 'ñÅ' => '鯃', + 'ñÆ' => '鮿', + 'ñÇ' => 'é¯', + 'ñÈ' => '鮵', + 'ñÉ' => '鮸', + 'ñÊ' => '鯓', + 'ñË' => '鮶', + 'ñÌ' => '鯄', + 'ñÍ' => '鮹', + 'ñÎ' => '鮽', + 'ñÏ' => '鵜', + 'ñÐ' => '鵓', + 'ñÑ' => 'éµ', + 'ñÒ' => '鵊', + 'ñÓ' => 'éµ›', + 'ñÔ' => '鵋', + 'ñÕ' => 'éµ™', + 'ñÖ' => 'éµ–', + 'ñ×' => '鵌', + 'ñØ' => 'éµ—', + 'ñÙ' => 'éµ’', + 'ñÚ' => 'éµ”', + 'ñÛ' => '鵟', + 'ñÜ' => '鵘', + 'ñÝ' => '鵚', + 'ñÞ' => '麎', + 'ñß' => '麌', + 'ñà' => '黟', + 'ñá' => 'é¼', + 'ñâ' => 'é¼€', + 'ñã' => 'é¼–', + 'ñä' => 'é¼¥', + 'ñå' => '鼫', + 'ñæ' => '鼪', + 'ñç' => '鼩', + 'ñè' => '鼨', + 'ñé' => '齌', + 'ñê' => '齕', + 'ñë' => 'å„´', + 'ñì' => '儵', + 'ñí' => '劖', + 'ñî' => 'å‹·', + 'ñï' => '厴', + 'ñð' => 'åš«', + 'ññ' => 'åš­', + 'ñò' => '嚦', + 'ñó' => '嚧', + 'ñô' => '嚪', + 'ñõ' => '嚬', + 'ñö' => '壚', + 'ñ÷' => 'å£', + 'ñø' => '壛', + 'ñù' => '夒', + 'ñú' => '嬽', + 'ñû' => '嬾', + 'ñü' => '嬿', + 'ñý' => 'å·ƒ', + 'ñþ' => 'å¹°', + 'ò@' => '徿', + 'òA' => '懻', + 'òB' => '攇', + 'òC' => 'æ”', + 'òD' => 'æ”', + 'òE' => '攉', + 'òF' => '攌', + 'òG' => '攎', + 'òH' => 'æ–„', + 'òI' => 'æ—ž', + 'òJ' => 'æ—', + 'òK' => '曞', + 'òL' => '櫧', + 'òM' => 'æ« ', + 'òN' => 'æ«Œ', + 'òO' => 'æ«‘', + 'òP' => 'æ«™', + 'òQ' => 'æ«‹', + 'òR' => 'æ«Ÿ', + 'òS' => 'æ«œ', + 'òT' => 'æ«', + 'òU' => 'æ««', + 'òV' => 'æ«', + 'òW' => 'æ«', + 'òX' => 'æ«ž', + 'òY' => 'æ­ ', + 'òZ' => 'æ®°', + 'ò[' => 'æ°Œ', + 'ò\\' => '瀙', + 'ò]' => '瀧', + 'ò^' => '瀠', + 'ò_' => '瀖', + 'ò`' => '瀫', + 'òa' => '瀡', + 'òb' => '瀢', + 'òc' => '瀣', + 'òd' => '瀩', + 'òe' => '瀗', + 'òf' => '瀤', + 'òg' => '瀜', + 'òh' => '瀪', + 'òi' => '爌', + 'òj' => '爊', + 'òk' => '爇', + 'òl' => '爂', + 'òm' => '爅', + 'òn' => '犥', + 'òo' => '犦', + 'òp' => '犤', + 'òq' => '犣', + 'òr' => '犡', + 'òs' => 'ç“‹', + 'òt' => 'ç“…', + 'òu' => 'ç’·', + 'òv' => '瓃', + 'òw' => 'ç”–', + 'òx' => 'ç™ ', + 'òy' => '矉', + 'òz' => '矊', + 'ò{' => '矄', + 'ò|' => '矱', + 'ò}' => 'ç¤', + 'ò~' => '礛', + 'ò¡' => '礡', + 'ò¢' => '礜', + 'ò£' => '礗', + 'ò¤' => '礞', + 'ò¥' => '禰', + 'ò¦' => '穧', + 'ò§' => '穨', + 'ò¨' => 'ç°³', + 'ò©' => 'ç°¼', + 'òª' => 'ç°¹', + 'ò«' => 'ç°¬', + 'ò¬' => 'ç°»', + 'ò­' => '糬', + 'ò®' => '糪', + 'ò¯' => '繶', + 'ò°' => 'ç¹µ', + 'ò±' => '繸', + 'ò²' => 'ç¹°', + 'ò³' => 'ç¹·', + 'ò´' => '繯', + 'òµ' => '繺', + 'ò¶' => 'ç¹²', + 'ò·' => 'ç¹´', + 'ò¸' => '繨', + 'ò¹' => '罋', + 'òº' => '罊', + 'ò»' => '羃', + 'ò¼' => '羆', + 'ò½' => 'ç¾·', + 'ò¾' => '翽', + 'ò¿' => '翾', + 'òÀ' => 'è¸', + 'òÁ' => '臗', + 'òÂ' => '臕', + 'òÃ' => '艤', + 'òÄ' => '艡', + 'òÅ' => '艣', + 'òÆ' => 'è—«', + 'òÇ' => 'è—±', + 'òÈ' => 'è—­', + 'òÉ' => 'è—™', + 'òÊ' => 'è—¡', + 'òË' => 'è—¨', + 'òÌ' => 'è—š', + 'òÍ' => 'è——', + 'òÎ' => 'è—¬', + 'òÏ' => 'è—²', + 'òÐ' => 'è—¸', + 'òÑ' => 'è—˜', + 'òÒ' => 'è—Ÿ', + 'òÓ' => 'è—£', + 'òÔ' => 'è—œ', + 'òÕ' => 'è—‘', + 'òÖ' => 'è—°', + 'ò×' => 'è—¦', + 'òØ' => 'è—¯', + 'òÙ' => 'è—ž', + 'òÚ' => 'è—¢', + 'òÛ' => 'è €', + 'òÜ' => '蟺', + 'òÝ' => 'è ƒ', + 'òÞ' => '蟶', + 'òß' => '蟷', + 'òà' => 'è ‰', + 'òá' => 'è Œ', + 'òâ' => 'è ‹', + 'òã' => 'è †', + 'òä' => '蟼', + 'òå' => 'è ˆ', + 'òæ' => '蟿', + 'òç' => 'è Š', + 'òè' => 'è ‚', + 'òé' => '襢', + 'òê' => '襚', + 'òë' => '襛', + 'òì' => '襗', + 'òí' => '襡', + 'òî' => '襜', + 'òï' => '襘', + 'òð' => 'è¥', + 'òñ' => '襙', + 'òò' => '覈', + 'òó' => '覷', + 'òô' => '覶', + 'òõ' => '觶', + 'òö' => 'è­', + 'ò÷' => 'è­ˆ', + 'òø' => 'è­Š', + 'òù' => 'è­€', + 'òú' => 'è­“', + 'òû' => 'è­–', + 'òü' => 'è­”', + 'òý' => 'è­‹', + 'òþ' => 'è­•', + 'ó@' => 'è­‘', + 'óA' => 'è­‚', + 'óB' => 'è­’', + 'óC' => 'è­—', + 'óD' => '豃', + 'óE' => 'è±·', + 'óF' => '豶', + 'óG' => '貚', + 'óH' => 'è´†', + 'óI' => 'è´‡', + 'óJ' => 'è´‰', + 'óK' => '趬', + 'óL' => '趪', + 'óM' => '趭', + 'óN' => '趫', + 'óO' => 'è¹­', + 'óP' => '蹸', + 'óQ' => 'è¹³', + 'óR' => '蹪', + 'óS' => '蹯', + 'óT' => 'è¹»', + 'óU' => '軂', + 'óV' => 'è½’', + 'óW' => '轑', + 'óX' => 'è½', + 'óY' => 'è½', + 'óZ' => '轓', + 'ó[' => 'è¾´', + 'ó\\' => 'é…€', + 'ó]' => 'é„¿', + 'ó^' => '醰', + 'ó_' => '醭', + 'ó`' => 'éž', + 'óa' => 'é‡', + 'ób' => 'é', + 'óc' => 'é‚', + 'ód' => 'éš', + 'óe' => 'é', + 'óf' => 'é¹', + 'óg' => 'é¬', + 'óh' => 'éŒ', + 'ói' => 'é™', + 'ój' => '鎩', + 'ók' => 'é¦', + 'ól' => 'éŠ', + 'óm' => 'é”', + 'ón' => 'é®', + 'óo' => 'é£', + 'óp' => 'é•', + 'óq' => 'é„', + 'ór' => 'éŽ', + 'ós' => 'é€', + 'ót' => 'é’', + 'óu' => 'é§', + 'óv' => '镽', + 'ów' => 'é—š', + 'óx' => 'é—›', + 'óy' => '雡', + 'óz' => '霩', + 'ó{' => '霫', + 'ó|' => '霬', + 'ó}' => '霨', + 'ó~' => '霦', + 'ó¡' => 'éž³', + 'ó¢' => 'éž·', + 'ó£' => '鞶', + 'ó¤' => 'éŸ', + 'ó¥' => '韞', + 'ó¦' => '韟', + 'ó§' => 'é¡œ', + 'ó¨' => 'é¡™', + 'ó©' => 'é¡', + 'óª' => 'é¡—', + 'ó«' => '颿', + 'ó¬' => '颽', + 'ó­' => '颻', + 'ó®' => '颾', + 'ó¯' => '饈', + 'ó°' => '饇', + 'ó±' => '饃', + 'ó²' => '馦', + 'ó³' => '馧', + 'ó´' => '騚', + 'óµ' => '騕', + 'ó¶' => '騥', + 'ó·' => 'é¨', + 'ó¸' => '騤', + 'ó¹' => '騛', + 'óº' => '騢', + 'ó»' => '騠', + 'ó¼' => '騧', + 'ó½' => '騣', + 'ó¾' => '騞', + 'ó¿' => '騜', + 'óÀ' => '騔', + 'óÁ' => 'é«‚', + 'óÂ' => '鬋', + 'óÃ' => '鬊', + 'óÄ' => '鬎', + 'óÅ' => '鬌', + 'óÆ' => '鬷', + 'óÇ' => '鯪', + 'óÈ' => '鯫', + 'óÉ' => '鯠', + 'óÊ' => '鯞', + 'óË' => '鯤', + 'óÌ' => '鯦', + 'óÍ' => '鯢', + 'óÎ' => '鯰', + 'óÏ' => '鯔', + 'óÐ' => '鯗', + 'óÑ' => '鯬', + 'óÒ' => '鯜', + 'óÓ' => '鯙', + 'óÔ' => '鯥', + 'óÕ' => '鯕', + 'óÖ' => '鯡', + 'ó×' => '鯚', + 'óØ' => 'éµ·', + 'óÙ' => 'é¶', + 'óÚ' => '鶊', + 'óÛ' => '鶄', + 'óÜ' => '鶈', + 'óÝ' => 'éµ±', + 'óÞ' => '鶀', + 'óß' => '鵸', + 'óà' => '鶆', + 'óá' => '鶋', + 'óâ' => '鶌', + 'óã' => 'éµ½', + 'óä' => '鵫', + 'óå' => 'éµ´', + 'óæ' => 'éµµ', + 'óç' => 'éµ°', + 'óè' => '鵩', + 'óé' => '鶅', + 'óê' => 'éµ³', + 'óë' => 'éµ»', + 'óì' => '鶂', + 'óí' => '鵯', + 'óî' => 'éµ¹', + 'óï' => '鵿', + 'óð' => '鶇', + 'óñ' => '鵨', + 'óò' => '麔', + 'óó' => '麑', + 'óô' => '黀', + 'óõ' => '黼', + 'óö' => 'é¼­', + 'ó÷' => 'é½€', + 'óø' => 'é½', + 'óù' => 'é½', + 'óú' => 'é½–', + 'óû' => 'é½—', + 'óü' => '齘', + 'óý' => '匷', + 'óþ' => 'åš²', + 'ô@' => 'åšµ', + 'ôA' => 'åš³', + 'ôB' => '壣', + 'ôC' => 'å­…', + 'ôD' => 'å·†', + 'ôE' => 'å·‡', + 'ôF' => 'å»®', + 'ôG' => '廯', + 'ôH' => 'å¿€', + 'ôI' => 'å¿', + 'ôJ' => '懹', + 'ôK' => 'æ”—', + 'ôL' => 'æ”–', + 'ôM' => '攕', + 'ôN' => '攓', + 'ôO' => 'æ—Ÿ', + 'ôP' => '曨', + 'ôQ' => '曣', + 'ôR' => '曤', + 'ôS' => '櫳', + 'ôT' => 'æ«°', + 'ôU' => '櫪', + 'ôV' => '櫨', + 'ôW' => '櫹', + 'ôX' => '櫱', + 'ôY' => 'æ«®', + 'ôZ' => '櫯', + 'ô[' => '瀼', + 'ô\\' => '瀵', + 'ô]' => '瀯', + 'ô^' => '瀷', + 'ô_' => '瀴', + 'ô`' => '瀱', + 'ôa' => 'ç‚', + 'ôb' => '瀸', + 'ôc' => '瀿', + 'ôd' => '瀺', + 'ôe' => '瀹', + 'ôf' => 'ç€', + 'ôg' => '瀻', + 'ôh' => '瀳', + 'ôi' => 'ç', + 'ôj' => '爓', + 'ôk' => '爔', + 'ôl' => '犨', + 'ôm' => 'ç½', + 'ôn' => 'ç¼', + 'ôo' => 'ç’º', + 'ôp' => 'çš«', + 'ôq' => '皪', + 'ôr' => 'çš¾', + 'ôs' => 'ç›­', + 'ôt' => '矌', + 'ôu' => '矎', + 'ôv' => 'çŸ', + 'ôw' => 'çŸ', + 'ôx' => '矲', + 'ôy' => '礥', + 'ôz' => '礣', + 'ô{' => '礧', + 'ô|' => '礨', + 'ô}' => '礤', + 'ô~' => '礩', + 'ô¡' => '禲', + 'ô¢' => 'ç©®', + 'ô£' => '穬', + 'ô¤' => 'ç©­', + 'ô¥' => 'ç«·', + 'ô¦' => '籉', + 'ô§' => '籈', + 'ô¨' => '籊', + 'ô©' => '籇', + 'ôª' => 'ç±…', + 'ô«' => 'ç³®', + 'ô¬' => 'ç¹»', + 'ô­' => 'ç¹¾', + 'ô®' => 'çº', + 'ô¯' => '纀', + 'ô°' => '羺', + 'ô±' => 'ç¿¿', + 'ô²' => 'è¹', + 'ô³' => '臛', + 'ô´' => '臙', + 'ôµ' => '舋', + 'ô¶' => '艨', + 'ô·' => '艩', + 'ô¸' => '蘢', + 'ô¹' => 'è—¿', + 'ôº' => 'è˜', + 'ô»' => 'è—¾', + 'ô¼' => '蘛', + 'ô½' => '蘀', + 'ô¾' => 'è—¶', + 'ô¿' => '蘄', + 'ôÀ' => '蘉', + 'ôÁ' => '蘅', + 'ôÂ' => '蘌', + 'ôÃ' => 'è—½', + 'ôÄ' => 'è ™', + 'ôÅ' => 'è ', + 'ôÆ' => 'è ‘', + 'ôÇ' => 'è —', + 'ôÈ' => 'è “', + 'ôÉ' => 'è –', + 'ôÊ' => '襣', + 'ôË' => '襦', + 'ôÌ' => '覹', + 'ôÍ' => '觷', + 'ôÎ' => 'è­ ', + 'ôÏ' => 'è­ª', + 'ôÐ' => 'è­', + 'ôÑ' => 'è­¨', + 'ôÒ' => 'è­£', + 'ôÓ' => 'è­¥', + 'ôÔ' => 'è­§', + 'ôÕ' => 'è­­', + 'ôÖ' => '趮', + 'ô×' => '躆', + 'ôØ' => '躈', + 'ôÙ' => '躄', + 'ôÚ' => 'è½™', + 'ôÛ' => 'è½–', + 'ôÜ' => 'è½—', + 'ôÝ' => '轕', + 'ôÞ' => '轘', + 'ôß' => '轚', + 'ôà' => 'é‚', + 'ôá' => 'é…ƒ', + 'ôâ' => 'é…', + 'ôã' => '醷', + 'ôä' => '醵', + 'ôå' => '醲', + 'ôæ' => '醳', + 'ôç' => 'é‹', + 'ôè' => 'é“', + 'ôé' => 'é»', + 'ôê' => 'é ', + 'ôë' => 'é', + 'ôì' => 'é”', + 'ôí' => 'é¾', + 'ôî' => 'é•', + 'ôï' => 'é', + 'ôð' => 'é¨', + 'ôñ' => 'é™', + 'ôò' => 'é', + 'ôó' => 'éµ', + 'ôô' => 'é€', + 'ôõ' => 'é·', + 'ôö' => 'é‡', + 'ô÷' => 'éŽ', + 'ôø' => 'é–', + 'ôù' => 'é’', + 'ôú' => 'éº', + 'ôû' => 'é‰', + 'ôü' => 'é¸', + 'ôý' => 'éŠ', + 'ôþ' => 'é¿', + 'õ@' => 'é¼', + 'õA' => 'éŒ', + 'õB' => 'é¶', + 'õC' => 'é‘', + 'õD' => 'é†', + 'õE' => 'é—ž', + 'õF' => 'é— ', + 'õG' => 'é—Ÿ', + 'õH' => '霮', + 'õI' => '霯', + 'õJ' => 'éž¹', + 'õK' => 'éž»', + 'õL' => '韽', + 'õM' => '韾', + 'õN' => 'é¡ ', + 'õO' => 'é¡¢', + 'õP' => 'é¡£', + 'õQ' => 'é¡Ÿ', + 'õR' => 'é£', + 'õS' => '飂', + 'õT' => 'é¥', + 'õU' => '饎', + 'õV' => '饙', + 'õW' => '饌', + 'õX' => '饋', + 'õY' => '饓', + 'õZ' => '騲', + 'õ[' => '騴', + 'õ\\' => '騱', + 'õ]' => '騬', + 'õ^' => '騪', + 'õ_' => '騶', + 'õ`' => '騩', + 'õa' => '騮', + 'õb' => '騸', + 'õc' => '騭', + 'õd' => '髇', + 'õe' => 'é«Š', + 'õf' => '髆', + 'õg' => 'é¬', + 'õh' => '鬒', + 'õi' => '鬑', + 'õj' => 'é°‹', + 'õk' => 'é°ˆ', + 'õl' => '鯷', + 'õm' => 'é°…', + 'õn' => 'é°’', + 'õo' => '鯸', + 'õp' => 'é±€', + 'õq' => 'é°‡', + 'õr' => 'é°Ž', + 'õs' => 'é°†', + 'õt' => 'é°—', + 'õu' => 'é°”', + 'õv' => 'é°‰', + 'õw' => '鶟', + 'õx' => '鶙', + 'õy' => '鶤', + 'õz' => 'é¶', + 'õ{' => '鶒', + 'õ|' => '鶘', + 'õ}' => 'é¶', + 'õ~' => '鶛', + 'õ¡' => '鶠', + 'õ¢' => '鶔', + 'õ£' => '鶜', + 'õ¤' => '鶪', + 'õ¥' => '鶗', + 'õ¦' => '鶡', + 'õ§' => '鶚', + 'õ¨' => '鶢', + 'õ©' => '鶨', + 'õª' => '鶞', + 'õ«' => '鶣', + 'õ¬' => '鶿', + 'õ­' => '鶩', + 'õ®' => '鶖', + 'õ¯' => '鶦', + 'õ°' => '鶧', + 'õ±' => '麙', + 'õ²' => '麛', + 'õ³' => '麚', + 'õ´' => '黥', + 'õµ' => '黤', + 'õ¶' => '黧', + 'õ·' => '黦', + 'õ¸' => 'é¼°', + 'õ¹' => 'é¼®', + 'õº' => 'é½›', + 'õ»' => 'é½ ', + 'õ¼' => '齞', + 'õ½' => 'é½', + 'õ¾' => 'é½™', + 'õ¿' => '龑', + 'õÀ' => '儺', + 'õÁ' => '儹', + 'õÂ' => '劘', + 'õÃ' => '劗', + 'õÄ' => '囃', + 'õÅ' => 'åš½', + 'õÆ' => 'åš¾', + 'õÇ' => 'å­ˆ', + 'õÈ' => 'å­‡', + 'õÉ' => 'å·‹', + 'õÊ' => 'å·', + 'õË' => 'å»±', + 'õÌ' => '懽', + 'õÍ' => 'æ”›', + 'õÎ' => '欂', + 'õÏ' => '櫼', + 'õÐ' => '欃', + 'õÑ' => '櫸', + 'õÒ' => '欀', + 'õÓ' => 'çƒ', + 'õÔ' => 'ç„', + 'õÕ' => 'çŠ', + 'õÖ' => 'çˆ', + 'õ×' => 'ç‰', + 'õØ' => 'ç…', + 'õÙ' => 'ç†', + 'õÚ' => 'çˆ', + 'õÛ' => '爚', + 'õÜ' => '爙', + 'õÝ' => 'ç¾', + 'õÞ' => 'ç”—', + 'õß' => '癪', + 'õà' => 'çŸ', + 'õá' => '礭', + 'õâ' => '礱', + 'õã' => '礯', + 'õä' => 'ç±”', + 'õå' => '籓', + 'õæ' => 'ç³²', + 'õç' => '纊', + 'õè' => '纇', + 'õé' => '纈', + 'õê' => '纋', + 'õë' => '纆', + 'õì' => 'çº', + 'õí' => 'ç½', + 'õî' => 'ç¾»', + 'õï' => '耰', + 'õð' => 'è‡', + 'õñ' => '蘘', + 'õò' => '蘪', + 'õó' => '蘦', + 'õô' => '蘟', + 'õõ' => '蘣', + 'õö' => '蘜', + 'õ÷' => '蘙', + 'õø' => '蘧', + 'õù' => '蘮', + 'õú' => '蘡', + 'õû' => '蘠', + 'õü' => '蘩', + 'õý' => '蘞', + 'õþ' => '蘥', + 'ö@' => 'è ©', + 'öA' => 'è ', + 'öB' => 'è ›', + 'öC' => 'è  ', + 'öD' => 'è ¤', + 'öE' => 'è œ', + 'öF' => 'è «', + 'öG' => 'è¡Š', + 'öH' => '襭', + 'öI' => '襩', + 'öJ' => '襮', + 'öK' => '襫', + 'öL' => '觺', + 'öM' => 'è­¹', + 'öN' => 'è­¸', + 'öO' => 'è­…', + 'öP' => 'è­º', + 'öQ' => 'è­»', + 'öR' => 'è´', + 'öS' => 'è´”', + 'öT' => '趯', + 'öU' => '躎', + 'öV' => '躌', + 'öW' => '轞', + 'öX' => 'è½›', + 'öY' => 'è½', + 'öZ' => 'é…†', + 'ö[' => 'é…„', + 'ö\\' => 'é……', + 'ö]' => '醹', + 'ö^' => 'é¿', + 'ö_' => 'é»', + 'ö`' => 'é¶', + 'öa' => 'é©', + 'öb' => 'é½', + 'öc' => 'é¼', + 'öd' => 'é°', + 'öe' => 'é¹', + 'öf' => 'éª', + 'ög' => 'é·', + 'öh' => 'é¬', + 'öi' => 'é‘€', + 'öj' => 'é±', + 'ök' => 'é—¥', + 'öl' => 'é—¤', + 'öm' => 'é—£', + 'ön' => '霵', + 'öo' => '霺', + 'öp' => 'éž¿', + 'öq' => '韡', + 'ör' => '顤', + 'ös' => '飉', + 'öt' => '飆', + 'öu' => '飀', + 'öv' => '饘', + 'öw' => '饖', + 'öx' => '騹', + 'öy' => '騽', + 'öz' => '驆', + 'ö{' => 'é©„', + 'ö|' => 'é©‚', + 'ö}' => 'é©', + 'ö~' => '騺', + 'ö¡' => '騿', + 'ö¢' => 'é«', + 'ö£' => '鬕', + 'ö¤' => '鬗', + 'ö¥' => '鬘', + 'ö¦' => '鬖', + 'ö§' => '鬺', + 'ö¨' => 'é­’', + 'ö©' => 'é°«', + 'öª' => 'é°', + 'ö«' => 'é°œ', + 'ö¬' => 'é°¬', + 'ö­' => 'é°£', + 'ö®' => 'é°¨', + 'ö¯' => 'é°©', + 'ö°' => 'é°¤', + 'ö±' => 'é°¡', + 'ö²' => '鶷', + 'ö³' => '鶶', + 'ö´' => '鶼', + 'öµ' => 'é·', + 'ö¶' => 'é·‡', + 'ö·' => 'é·Š', + 'ö¸' => 'é·', + 'ö¹' => '鶾', + 'öº' => 'é·…', + 'ö»' => 'é·ƒ', + 'ö¼' => '鶻', + 'ö½' => '鶵', + 'ö¾' => 'é·Ž', + 'ö¿' => '鶹', + 'öÀ' => '鶺', + 'öÁ' => '鶬', + 'öÂ' => 'é·ˆ', + 'öÃ' => '鶱', + 'öÄ' => '鶭', + 'öÅ' => 'é·Œ', + 'öÆ' => '鶳', + 'öÇ' => 'é·', + 'öÈ' => '鶲', + 'öÉ' => '鹺', + 'öÊ' => '麜', + 'öË' => '黫', + 'öÌ' => 'é»®', + 'öÍ' => 'é»­', + 'öÎ' => 'é¼›', + 'öÏ' => '鼘', + 'öÐ' => '鼚', + 'öÑ' => 'é¼±', + 'öÒ' => '齎', + 'öÓ' => 'é½¥', + 'öÔ' => '齤', + 'öÕ' => 'é¾’', + 'öÖ' => '亹', + 'ö×' => '囆', + 'öØ' => 'å›…', + 'öÙ' => '囋', + 'öÚ' => '奱', + 'öÛ' => 'å­‹', + 'öÜ' => 'å­Œ', + 'öÝ' => 'å·•', + 'öÞ' => 'å·‘', + 'öß' => '廲', + 'öà' => '攡', + 'öá' => 'æ” ', + 'öâ' => '攦', + 'öã' => '攢', + 'öä' => '欋', + 'öå' => '欈', + 'öæ' => '欉', + 'öç' => 'æ°', + 'öè' => 'ç•', + 'öé' => 'ç–', + 'öê' => 'ç—', + 'öë' => 'ç’', + 'öì' => '爞', + 'öí' => '爟', + 'öî' => '犩', + 'öï' => 'ç¿', + 'öð' => '瓘', + 'öñ' => 'ç“•', + 'öò' => 'ç“™', + 'öó' => 'ç“—', + 'öô' => 'ç™­', + 'öõ' => 'çš­', + 'öö' => '礵', + 'ö÷' => '禴', + 'öø' => 'ç©°', + 'öù' => '穱', + 'öú' => 'ç±—', + 'öû' => '籜', + 'öü' => 'ç±™', + 'öý' => 'ç±›', + 'öþ' => '籚', + '÷@' => 'ç³´', + '÷A' => 'ç³±', + '÷B' => '纑', + '÷C' => 'ç½', + '÷D' => '羇', + '÷E' => '臞', + '÷F' => '艫', + '÷G' => '蘴', + '÷H' => '蘵', + '÷I' => '蘳', + '÷J' => '蘬', + '÷K' => '蘲', + '÷L' => '蘶', + '÷M' => 'è ¬', + '÷N' => 'è ¨', + '÷O' => 'è ¦', + '÷P' => 'è ª', + '÷Q' => 'è ¥', + '÷R' => '襱', + '÷S' => '覿', + '÷T' => '覾', + '÷U' => '觻', + '÷V' => 'è­¾', + '÷W' => '讄', + '÷X' => '讂', + '÷Y' => '讆', + '÷Z' => 'è®…', + '÷[' => 'è­¿', + '÷\\' => 'è´•', + '÷]' => '躕', + '÷^' => '躔', + '÷_' => '躚', + '÷`' => '躒', + '÷a' => 'èº', + '÷b' => '躖', + '÷c' => '躗', + '÷d' => 'è½ ', + '÷e' => 'è½¢', + '÷f' => 'é…‡', + '÷g' => 'é‘Œ', + '÷h' => 'é‘', + '÷i' => 'é‘Š', + '÷j' => 'é‘‹', + '÷k' => 'é‘', + '÷l' => '鑇', + '÷m' => 'é‘…', + '÷n' => '鑈', + '÷o' => '鑉', + '÷p' => '鑆', + '÷q' => '霿', + '÷r' => '韣', + '÷s' => '顪', + '÷t' => 'é¡©', + '÷u' => '飋', + '÷v' => '饔', + '÷w' => '饛', + '÷x' => 'é©Ž', + '÷y' => 'é©“', + '÷z' => 'é©”', + '÷{' => 'é©Œ', + '÷|' => 'é©', + '÷}' => '驈', + '÷~' => 'é©Š', + '÷¡' => '驉', + '÷¢' => 'é©’', + '÷£' => 'é©', + '÷¤' => 'é«', + '÷¥' => '鬙', + '÷¦' => '鬫', + '÷§' => '鬻', + '÷¨' => 'é­–', + '÷©' => 'é­•', + '÷ª' => '鱆', + '÷«' => '鱈', + '÷¬' => 'é°¿', + '÷­' => '鱄', + '÷®' => 'é°¹', + '÷¯' => 'é°³', + '÷°' => 'é±', + '÷±' => 'é°¼', + '÷²' => 'é°·', + '÷³' => 'é°´', + '÷´' => 'é°²', + '÷µ' => 'é°½', + '÷¶' => 'é°¶', + '÷·' => 'é·›', + '÷¸' => 'é·’', + '÷¹' => 'é·ž', + '÷º' => 'é·š', + '÷»' => 'é·‹', + '÷¼' => 'é·', + '÷½' => 'é·œ', + '÷¾' => 'é·‘', + '÷¿' => 'é·Ÿ', + '÷À' => 'é·©', + '÷Á' => 'é·™', + '÷Â' => 'é·˜', + '÷Ã' => 'é·–', + '÷Ä' => 'é·µ', + '÷Å' => 'é·•', + '÷Æ' => 'é·', + '÷Ç' => '麶', + '÷È' => 'é»°', + '÷É' => 'é¼µ', + '÷Ê' => 'é¼³', + '÷Ë' => 'é¼²', + '÷Ì' => '齂', + '÷Í' => '齫', + '÷Î' => '龕', + '÷Ï' => 'é¾¢', + '÷Ð' => '儽', + '÷Ñ' => '劙', + '÷Ò' => '壨', + '÷Ó' => '壧', + '÷Ô' => '奲', + '÷Õ' => 'å­', + '÷Ö' => 'å·˜', + '÷×' => 'è ¯', + '÷Ø' => 'å½', + '÷Ù' => 'æˆ', + '÷Ú' => '戃', + '÷Û' => '戄', + '÷Ü' => '攩', + '÷Ý' => '攥', + '÷Þ' => 'æ––', + '÷ß' => '曫', + '÷à' => '欑', + '÷á' => '欒', + '÷â' => 'æ¬', + '÷ã' => '毊', + '÷ä' => 'ç›', + '÷å' => 'çš', + '÷æ' => '爢', + '÷ç' => '玂', + '÷è' => 'çŽ', + '÷é' => '玃', + '÷ê' => 'ç™°', + '÷ë' => '矔', + '÷ì' => '籧', + '÷í' => '籦', + '÷î' => '纕', + '÷ï' => '艬', + '÷ð' => '蘺', + '÷ñ' => '虀', + '÷ò' => '蘹', + '÷ó' => '蘼', + '÷ô' => '蘱', + '÷õ' => '蘻', + '÷ö' => '蘾', + '÷÷' => 'è °', + '÷ø' => 'è ²', + '÷ù' => 'è ®', + '÷ú' => 'è ³', + '÷û' => '襶', + '÷ü' => '襴', + '÷ý' => '襳', + '÷þ' => '觾', + 'ø@' => '讌', + 'øA' => '讎', + 'øB' => '讋', + 'øC' => '讈', + 'øD' => 'è±…', + 'øE' => 'è´™', + 'øF' => '躘', + 'øG' => '轤', + 'øH' => 'è½£', + 'øI' => '醼', + 'øJ' => 'é‘¢', + 'øK' => 'é‘•', + 'øL' => 'é‘', + 'øM' => 'é‘—', + 'øN' => 'é‘ž', + 'øO' => '韄', + 'øP' => '韅', + 'øQ' => 'é €', + 'øR' => 'é©–', + 'øS' => 'é©™', + 'øT' => '鬞', + 'øU' => '鬟', + 'øV' => '鬠', + 'øW' => 'é±’', + 'øX' => '鱘', + 'øY' => 'é±', + 'øZ' => '鱊', + 'ø[' => 'é±', + 'ø\\' => '鱋', + 'ø]' => '鱕', + 'ø^' => 'é±™', + 'ø_' => '鱌', + 'ø`' => '鱎', + 'øa' => 'é·»', + 'øb' => 'é··', + 'øc' => 'é·¯', + 'ød' => 'é·£', + 'øe' => 'é·«', + 'øf' => 'é·¸', + 'øg' => 'é·¤', + 'øh' => 'é·¶', + 'øi' => 'é·¡', + 'øj' => 'é·®', + 'øk' => 'é·¦', + 'øl' => 'é·²', + 'øm' => 'é·°', + 'øn' => 'é·¢', + 'øo' => 'é·¬', + 'øp' => 'é·´', + 'øq' => 'é·³', + 'ør' => 'é·¨', + 'øs' => 'é·­', + 'øt' => '黂', + 'øu' => 'é»', + 'øv' => '黲', + 'øw' => '黳', + 'øx' => '鼆', + 'øy' => '鼜', + 'øz' => '鼸', + 'ø{' => 'é¼·', + 'ø|' => '鼶', + 'ø}' => '齃', + 'ø~' => 'é½', + 'ø¡' => 'é½±', + 'ø¢' => 'é½°', + 'ø£' => 'é½®', + 'ø¤' => '齯', + 'ø¥' => '囓', + 'ø¦' => 'å›', + 'ø§' => 'å­Ž', + 'ø¨' => 'å±­', + 'ø©' => 'æ”­', + 'øª' => 'æ›­', + 'ø«' => 'æ›®', + 'ø¬' => '欓', + 'ø­' => 'çŸ', + 'ø®' => 'ç¡', + 'ø¯' => 'ç', + 'ø°' => 'ç ', + 'ø±' => '爣', + 'ø²' => 'ç“›', + 'ø³' => 'ç“¥', + 'ø´' => '矕', + 'øµ' => '礸', + 'ø¶' => '禷', + 'ø·' => '禶', + 'ø¸' => '籪', + 'ø¹' => '纗', + 'øº' => '羉', + 'ø»' => '艭', + 'ø¼' => '虃', + 'ø½' => 'è ¸', + 'ø¾' => 'è ·', + 'ø¿' => 'è µ', + 'øÀ' => 'è¡‹', + 'øÁ' => 'è®”', + 'øÂ' => '讕', + 'øÃ' => '躞', + 'øÄ' => '躟', + 'øÅ' => '躠', + 'øÆ' => 'èº', + 'øÇ' => '醾', + 'øÈ' => '醽', + 'øÉ' => '釂', + 'øÊ' => 'é‘«', + 'øË' => '鑨', + 'øÌ' => 'é‘©', + 'øÍ' => '雥', + 'øÎ' => 'é†', + 'øÏ' => 'éƒ', + 'øÐ' => 'é‡', + 'øÑ' => '韇', + 'øÒ' => '韥', + 'øÓ' => 'é©ž', + 'øÔ' => 'é«•', + 'øÕ' => 'é­™', + 'øÖ' => 'é±£', + 'ø×' => '鱧', + 'øØ' => '鱦', + 'øÙ' => 'é±¢', + 'øÚ' => '鱞', + 'øÛ' => 'é± ', + 'øÜ' => '鸂', + 'øÝ' => 'é·¾', + 'øÞ' => '鸇', + 'øß' => '鸃', + 'øà' => '鸆', + 'øá' => '鸅', + 'øâ' => '鸀', + 'øã' => 'é¸', + 'øä' => '鸉', + 'øå' => 'é·¿', + 'øæ' => 'é·½', + 'øç' => '鸄', + 'øè' => '麠', + 'øé' => '鼞', + 'øê' => '齆', + 'øë' => 'é½´', + 'øì' => 'é½µ', + 'øí' => '齶', + 'øî' => 'å›”', + 'øï' => 'æ”®', + 'øð' => 'æ–¸', + 'øñ' => '欘', + 'øò' => '欙', + 'øó' => '欗', + 'øô' => '欚', + 'øõ' => 'ç¢', + 'øö' => '爦', + 'ø÷' => '犪', + 'øø' => '矘', + 'øù' => '矙', + 'øú' => '礹', + 'øû' => '籩', + 'øü' => '籫', + 'øý' => '糶', + 'øþ' => '纚', + 'ù@' => '纘', + 'ùA' => '纛', + 'ùB' => '纙', + 'ùC' => '臠', + 'ùD' => '臡', + 'ùE' => '虆', + 'ùF' => '虇', + 'ùG' => '虈', + 'ùH' => '襹', + 'ùI' => '襺', + 'ùJ' => '襼', + 'ùK' => '襻', + 'ùL' => '觿', + 'ùM' => '讘', + 'ùN' => 'è®™', + 'ùO' => '躥', + 'ùP' => '躤', + 'ùQ' => '躣', + 'ùR' => 'é‘®', + 'ùS' => 'é‘­', + 'ùT' => '鑯', + 'ùU' => '鑱', + 'ùV' => '鑳', + 'ùW' => 'é‰', + 'ùX' => '顲', + 'ùY' => '饟', + 'ùZ' => '鱨', + 'ù[' => 'é±®', + 'ù\\' => 'é±­', + 'ù]' => '鸋', + 'ù^' => 'é¸', + 'ù_' => 'é¸', + 'ù`' => 'é¸', + 'ùa' => '鸒', + 'ùb' => '鸑', + 'ùc' => '麡', + 'ùd' => '黵', + 'ùe' => '鼉', + 'ùf' => '齇', + 'ùg' => '齸', + 'ùh' => 'é½»', + 'ùi' => '齺', + 'ùj' => 'é½¹', + 'ùk' => '圞', + 'ùl' => 'ç¦', + 'ùm' => '籯', + 'ùn' => 'è ¼', + 'ùo' => '趲', + 'ùp' => '躦', + 'ùq' => '釃', + 'ùr' => 'é‘´', + 'ùs' => '鑸', + 'ùt' => '鑶', + 'ùu' => '鑵', + 'ùv' => 'é© ', + 'ùw' => 'é±´', + 'ùx' => 'é±³', + 'ùy' => 'é±±', + 'ùz' => 'é±µ', + 'ù{' => '鸔', + 'ù|' => '鸓', + 'ù}' => '黶', + 'ù~' => '鼊', + 'ù¡' => '龤', + 'ù¢' => 'ç¨', + 'ù£' => 'ç¥', + 'ù¤' => 'ç³·', + 'ù¥' => '虪', + 'ù¦' => 'è ¾', + 'ù§' => 'è ½', + 'ù¨' => 'è ¿', + 'ù©' => '讞', + 'ùª' => '貜', + 'ù«' => '躩', + 'ù¬' => '軉', + 'ù­' => 'é‹', + 'ù®' => '顳', + 'ù¯' => 'é¡´', + 'ù°' => '飌', + 'ù±' => '饡', + 'ù²' => '馫', + 'ù³' => '驤', + 'ù´' => '驦', + 'ùµ' => '驧', + 'ù¶' => '鬤', + 'ù·' => '鸕', + 'ù¸' => '鸗', + 'ù¹' => '齈', + 'ùº' => '戇', + 'ù»' => '欞', + 'ù¼' => '爧', + 'ù½' => '虌', + 'ù¾' => '躨', + 'ù¿' => 'é’‚', + 'ùÀ' => 'é’€', + 'ùÁ' => 'é’', + 'ùÂ' => 'é©©', + 'ùÃ' => '驨', + 'ùÄ' => '鬮', + 'ùÅ' => '鸙', + 'ùÆ' => '爩', + 'ùÇ' => '虋', + 'ùÈ' => '讟', + 'ùÉ' => 'é’ƒ', + 'ùÊ' => 'é±¹', + 'ùË' => '麷', + 'ùÌ' => '癵', + 'ùÍ' => 'é©«', + 'ùÎ' => '鱺', + 'ùÏ' => 'é¸', + 'ùÐ' => 'ç©', + 'ùÑ' => 'çª', + 'ùÒ' => '麤', + 'ùÓ' => 'é½¾', + 'ùÔ' => '齉', + 'ùÕ' => '龘', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php new file mode 100644 index 00000000..a014e4b4 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php new file mode 100644 index 00000000..2b5e7beb Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php new file mode 100644 index 00000000..aba455b5 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php new file mode 100644 index 00000000..e8e23703 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php new file mode 100644 index 00000000..e3ebb45c Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php new file mode 100644 index 00000000..3771c8f6 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php new file mode 100644 index 00000000..2d67d33f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php new file mode 100644 index 00000000..1fbc4cdc Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php new file mode 100644 index 00000000..0b314c80 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php new file mode 100644 index 00000000..f8c318ca Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php new file mode 100644 index 00000000..48440ba1 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php new file mode 100644 index 00000000..c9cac0c3 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php new file mode 100644 index 00000000..3e7770ad Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php new file mode 100644 index 00000000..2a52d473 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php new file mode 100644 index 00000000..4ba6573c Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php new file mode 100644 index 00000000..d2a29a22 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php new file mode 100644 index 00000000..1f36b9a2 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php new file mode 100644 index 00000000..953e4635 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php new file mode 100644 index 00000000..2668bcc4 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php new file mode 100644 index 00000000..a7b47f8f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php new file mode 100644 index 00000000..0f040548 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php new file mode 100644 index 00000000..47994569 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php new file mode 100644 index 00000000..85616453 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php new file mode 100644 index 00000000..0bf828ff Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php new file mode 100644 index 00000000..a593d05d Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php new file mode 100644 index 00000000..d4e99f1f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php new file mode 100644 index 00000000..267b1906 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php new file mode 100644 index 00000000..d7a217c9 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php new file mode 100644 index 00000000..d60f6473 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php new file mode 100644 index 00000000..d69220bf Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php new file mode 100644 index 00000000..838783f1 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php new file mode 100644 index 00000000..65a48ee3 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php new file mode 100644 index 00000000..42e50e0f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php new file mode 100644 index 00000000..46758a6a Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php new file mode 100644 index 00000000..5f23f515 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php new file mode 100644 index 00000000..b31bb83f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php new file mode 100644 index 00000000..9cbf9f37 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php new file mode 100644 index 00000000..fd038823 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php new file mode 100644 index 00000000..ed6f72f3 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php new file mode 100644 index 00000000..cf723ac6 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php new file mode 100644 index 00000000..c978731a Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php new file mode 100644 index 00000000..2a3e36a4 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php new file mode 100644 index 00000000..d83c2125 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php new file mode 100644 index 00000000..dbbf96be Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php new file mode 100644 index 00000000..94a93b28 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php new file mode 100644 index 00000000..d1d5e6f2 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php new file mode 100644 index 00000000..f422a71f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php new file mode 100644 index 00000000..ba6d203d Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php new file mode 100644 index 00000000..c04dc8f0 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php new file mode 100644 index 00000000..1cfadcf2 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php new file mode 100644 index 00000000..f73cbb6f Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php new file mode 100644 index 00000000..953704f6 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php new file mode 100644 index 00000000..78580ece Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php new file mode 100644 index 00000000..de1609d8 Binary files /dev/null and b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php differ diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/translit.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/translit.php new file mode 100644 index 00000000..f322ff0d --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/Resources/charset/translit.php @@ -0,0 +1,4106 @@ + 'μ', + '¼' => ' 1â„4 ', + '½' => ' 1â„2 ', + '¾' => ' 3â„4 ', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ä¿' => 'L·', + 'Å€' => 'l·', + 'ʼn' => 'ʼn', + 'Å¿' => 's', + 'Ç„' => 'DŽ', + 'Ç…' => 'Dž', + 'dž' => 'dž', + 'LJ' => 'LJ', + 'Lj' => 'Lj', + 'lj' => 'lj', + 'ÇŠ' => 'NJ', + 'Ç‹' => 'Nj', + 'ÇŒ' => 'nj', + 'DZ' => 'DZ', + 'Dz' => 'Dz', + 'dz' => 'dz', + 'Ï' => 'β', + 'Ï‘' => 'θ', + 'Ï’' => 'Î¥', + 'Ï•' => 'φ', + 'Ï–' => 'Ï€', + 'Ï°' => 'κ', + 'ϱ' => 'Ï', + 'ϲ' => 'Ï‚', + 'Ï´' => 'Θ', + 'ϵ' => 'ε', + 'Ϲ' => 'Σ', + 'Ö‡' => 'Õ¥Ö‚', + 'Ùµ' => 'اٴ', + 'Ù¶' => 'وٴ', + 'Ù·' => 'Û‡Ù´', + 'Ù¸' => 'يٴ', + 'ำ' => 'à¹à¸²', + 'ຳ' => 'à»àº²', + 'ໜ' => 'ຫນ', + 'à»' => 'ຫມ', + 'ཷ' => 'ྲà¾', + 'ཹ' => 'ླà¾', + 'ẚ' => 'aʾ', + '․' => '.', + '‥' => '..', + '…' => '...', + '″' => '′′', + '‴' => '′′′', + '‶' => '‵‵', + '‷' => '‵‵‵', + '‼' => '!!', + 'â‡' => '??', + 'âˆ' => '?!', + 'â‰' => '!?', + 'â—' => '′′′′', + '₨' => 'Rs', + 'â„€' => 'a/c', + 'â„' => 'a/s', + 'â„‚' => 'C', + '℃' => '°C', + 'â„…' => 'c/o', + '℆' => 'c/u', + 'ℇ' => 'Æ', + '℉' => '°F', + 'â„Š' => 'g', + 'â„‹' => 'H', + 'â„Œ' => 'H', + 'â„' => 'H', + 'â„Ž' => 'h', + 'â„' => 'ħ', + 'â„' => 'I', + 'â„‘' => 'I', + 'â„’' => 'L', + 'â„“' => 'l', + 'â„•' => 'N', + 'â„–' => 'No', + 'â„™' => 'P', + 'â„š' => 'Q', + 'â„›' => 'R', + 'â„œ' => 'R', + 'â„' => 'R', + 'â„¡' => 'TEL', + 'ℤ' => 'Z', + 'ℨ' => 'Z', + 'ℬ' => 'B', + 'â„­' => 'C', + 'ℯ' => 'e', + 'â„°' => 'E', + 'ℱ' => 'F', + 'ℳ' => 'M', + 'â„´' => 'o', + 'ℵ' => '×', + 'ℶ' => 'ב', + 'â„·' => '×’', + 'ℸ' => 'ד', + 'ℹ' => 'i', + 'â„»' => 'FAX', + 'ℼ' => 'Ï€', + 'ℽ' => 'γ', + 'ℾ' => 'Γ', + 'â„¿' => 'Π', + 'â…€' => '∑', + 'â……' => 'D', + 'â…†' => 'd', + 'â…‡' => 'e', + 'â…ˆ' => 'i', + 'â…‰' => 'j', + 'â…' => ' 1â„7 ', + 'â…‘' => ' 1â„9 ', + 'â…’' => ' 1â„10 ', + 'â…“' => ' 1â„3 ', + 'â…”' => ' 2â„3 ', + 'â…•' => ' 1â„5 ', + 'â…–' => ' 2â„5 ', + 'â…—' => ' 3â„5 ', + 'â…˜' => ' 4â„5 ', + 'â…™' => ' 1â„6 ', + 'â…š' => ' 5â„6 ', + 'â…›' => ' 1â„8 ', + 'â…œ' => ' 3â„8 ', + 'â…' => ' 5â„8 ', + 'â…ž' => ' 7â„8 ', + 'â…Ÿ' => ' 1â„ ', + 'â… ' => 'I', + 'â…¡' => 'II', + 'â…¢' => 'III', + 'â…£' => 'IV', + 'â…¤' => 'V', + 'â…¥' => 'VI', + 'â…¦' => 'VII', + 'â…§' => 'VIII', + 'â…¨' => 'IX', + 'â…©' => 'X', + 'â…ª' => 'XI', + 'â…«' => 'XII', + 'â…¬' => 'L', + 'â…­' => 'C', + 'â…®' => 'D', + 'â…¯' => 'M', + 'â…°' => 'i', + 'â…±' => 'ii', + 'â…²' => 'iii', + 'â…³' => 'iv', + 'â…´' => 'v', + 'â…µ' => 'vi', + 'â…¶' => 'vii', + 'â…·' => 'viii', + 'â…¸' => 'ix', + 'â…¹' => 'x', + 'â…º' => 'xi', + 'â…»' => 'xii', + 'â…¼' => 'l', + 'â…½' => 'c', + 'â…¾' => 'd', + 'â…¿' => 'm', + '↉' => ' 0â„3 ', + '∬' => '∫∫', + '∭' => '∫∫∫', + '∯' => '∮∮', + '∰' => '∮∮∮', + 'â‘ ' => '(1)', + 'â‘¡' => '(2)', + 'â‘¢' => '(3)', + 'â‘£' => '(4)', + '⑤' => '(5)', + 'â‘¥' => '(6)', + '⑦' => '(7)', + '⑧' => '(8)', + '⑨' => '(9)', + 'â‘©' => '(10)', + '⑪' => '(11)', + 'â‘«' => '(12)', + '⑬' => '(13)', + 'â‘­' => '(14)', + 'â‘®' => '(15)', + '⑯' => '(16)', + 'â‘°' => '(17)', + '⑱' => '(18)', + '⑲' => '(19)', + '⑳' => '(20)', + 'â‘´' => '(1)', + '⑵' => '(2)', + '⑶' => '(3)', + 'â‘·' => '(4)', + '⑸' => '(5)', + '⑹' => '(6)', + '⑺' => '(7)', + 'â‘»' => '(8)', + '⑼' => '(9)', + '⑽' => '(10)', + '⑾' => '(11)', + 'â‘¿' => '(12)', + 'â’€' => '(13)', + 'â’' => '(14)', + 'â’‚' => '(15)', + 'â’ƒ' => '(16)', + 'â’„' => '(17)', + 'â’…' => '(18)', + 'â’†' => '(19)', + 'â’‡' => '(20)', + 'â’ˆ' => '1.', + 'â’‰' => '2.', + 'â’Š' => '3.', + 'â’‹' => '4.', + 'â’Œ' => '5.', + 'â’' => '6.', + 'â’Ž' => '7.', + 'â’' => '8.', + 'â’' => '9.', + 'â’‘' => '10.', + 'â’’' => '11.', + 'â’“' => '12.', + 'â’”' => '13.', + 'â’•' => '14.', + 'â’–' => '15.', + 'â’—' => '16.', + 'â’˜' => '17.', + 'â’™' => '18.', + 'â’š' => '19.', + 'â’›' => '20.', + 'â’œ' => '(a)', + 'â’' => '(b)', + 'â’ž' => '(c)', + 'â’Ÿ' => '(d)', + 'â’ ' => '(e)', + 'â’¡' => '(f)', + 'â’¢' => '(g)', + 'â’£' => '(h)', + 'â’¤' => '(i)', + 'â’¥' => '(j)', + 'â’¦' => '(k)', + 'â’§' => '(l)', + 'â’¨' => '(m)', + 'â’©' => '(n)', + 'â’ª' => '(o)', + 'â’«' => '(p)', + 'â’¬' => '(q)', + 'â’­' => '(r)', + 'â’®' => '(s)', + 'â’¯' => '(t)', + 'â’°' => '(u)', + 'â’±' => '(v)', + 'â’²' => '(w)', + 'â’³' => '(x)', + 'â’´' => '(y)', + 'â’µ' => '(z)', + 'â’¶' => '(A)', + 'â’·' => '(B)', + 'â’¸' => '(C)', + 'â’¹' => '(D)', + 'â’º' => '(E)', + 'â’»' => '(F)', + 'â’¼' => '(G)', + 'â’½' => '(H)', + 'â’¾' => '(I)', + 'â’¿' => '(J)', + 'â“€' => '(K)', + 'â“' => '(L)', + 'â“‚' => '(M)', + 'Ⓝ' => '(N)', + 'â“„' => '(O)', + 'â“…' => '(P)', + 'Ⓠ' => '(Q)', + 'Ⓡ' => '(R)', + 'Ⓢ' => '(S)', + 'Ⓣ' => '(T)', + 'â“Š' => '(U)', + 'â“‹' => '(V)', + 'â“Œ' => '(W)', + 'â“' => '(X)', + 'â“Ž' => '(Y)', + 'â“' => '(Z)', + 'â“' => '(a)', + 'â“‘' => '(b)', + 'â“’' => '(c)', + 'â““' => '(d)', + 'â“”' => '(e)', + 'â“•' => '(f)', + 'â“–' => '(g)', + 'â“—' => '(h)', + 'ⓘ' => '(i)', + 'â“™' => '(j)', + 'â“š' => '(k)', + 'â“›' => '(l)', + 'â“œ' => '(m)', + 'â“' => '(n)', + 'â“ž' => '(o)', + 'â“Ÿ' => '(p)', + 'â“ ' => '(q)', + 'â“¡' => '(r)', + 'â“¢' => '(s)', + 'â“£' => '(t)', + 'ⓤ' => '(u)', + 'â“¥' => '(v)', + 'ⓦ' => '(w)', + 'ⓧ' => '(x)', + 'ⓨ' => '(y)', + 'â“©' => '(z)', + '⓪' => '(0)', + '⨌' => '∫∫∫∫', + 'â©´' => '::=', + '⩵' => '==', + '⩶' => '===', + '⺟' => 'æ¯', + '⻳' => '龟', + 'â¼€' => '一', + 'â¼' => '丨', + '⼂' => '丶', + '⼃' => '丿', + '⼄' => 'ä¹™', + 'â¼…' => '亅', + '⼆' => '二', + '⼇' => '亠', + '⼈' => '人', + '⼉' => 'å„¿', + '⼊' => 'å…¥', + '⼋' => 'å…«', + '⼌' => '冂', + 'â¼' => '冖', + '⼎' => '冫', + 'â¼' => '几', + 'â¼' => '凵', + '⼑' => '刀', + 'â¼’' => '力', + '⼓' => '勹', + 'â¼”' => '匕', + '⼕' => '匚', + 'â¼–' => '匸', + 'â¼—' => 'å', + '⼘' => 'åœ', + 'â¼™' => 'å©', + '⼚' => '厂', + 'â¼›' => '厶', + '⼜' => 'åˆ', + 'â¼' => 'å£', + '⼞' => 'å›—', + '⼟' => '土', + 'â¼ ' => '士', + '⼡' => '夂', + 'â¼¢' => '夊', + 'â¼£' => '夕', + '⼤' => '大', + 'â¼¥' => '女', + '⼦' => 'å­', + '⼧' => '宀', + '⼨' => '寸', + '⼩' => 'å°', + '⼪' => 'å°¢', + '⼫' => 'å°¸', + '⼬' => 'å±®', + 'â¼­' => 'å±±', + 'â¼®' => 'å·›', + '⼯' => 'å·¥', + 'â¼°' => 'å·±', + 'â¼±' => 'å·¾', + 'â¼²' => 'å¹²', + 'â¼³' => '幺', + 'â¼´' => '广', + 'â¼µ' => 'å»´', + '⼶' => '廾', + 'â¼·' => '弋', + '⼸' => '弓', + 'â¼¹' => 'å½', + '⼺' => '彡', + 'â¼»' => 'å½³', + 'â¼¼' => '心', + 'â¼½' => '戈', + 'â¼¾' => '戶', + '⼿' => '手', + 'â½€' => '支', + 'â½' => 'æ”´', + '⽂' => 'æ–‡', + '⽃' => 'æ–—', + '⽄' => 'æ–¤', + 'â½…' => 'æ–¹', + '⽆' => 'æ— ', + '⽇' => 'æ—¥', + '⽈' => 'æ›°', + '⽉' => '月', + '⽊' => '木', + '⽋' => '欠', + '⽌' => 'æ­¢', + 'â½' => 'æ­¹', + '⽎' => '殳', + 'â½' => '毋', + 'â½' => '比', + '⽑' => '毛', + 'â½’' => 'æ°', + '⽓' => 'æ°”', + 'â½”' => 'æ°´', + '⽕' => 'ç«', + 'â½–' => '爪', + 'â½—' => '父', + '⽘' => '爻', + 'â½™' => '爿', + '⽚' => '片', + 'â½›' => '牙', + '⽜' => '牛', + 'â½' => '犬', + '⽞' => '玄', + '⽟' => '玉', + 'â½ ' => 'ç“œ', + '⽡' => '瓦', + 'â½¢' => '甘', + 'â½£' => '生', + '⽤' => '用', + 'â½¥' => 'ç”°', + '⽦' => 'ç–‹', + '⽧' => 'ç–’', + '⽨' => '癶', + '⽩' => '白', + '⽪' => 'çš®', + '⽫' => 'çš¿', + '⽬' => 'ç›®', + 'â½­' => '矛', + 'â½®' => '矢', + '⽯' => '石', + 'â½°' => '示', + 'â½±' => '禸', + 'â½²' => '禾', + 'â½³' => 'ç©´', + 'â½´' => 'ç«‹', + 'â½µ' => '竹', + '⽶' => 'ç±³', + 'â½·' => '糸', + '⽸' => '缶', + 'â½¹' => '网', + '⽺' => '羊', + 'â½»' => 'ç¾½', + 'â½¼' => 'è€', + 'â½½' => '而', + 'â½¾' => '耒', + '⽿' => '耳', + 'â¾€' => 'è¿', + 'â¾' => '肉', + '⾂' => '臣', + '⾃' => '自', + '⾄' => '至', + 'â¾…' => '臼', + '⾆' => '舌', + '⾇' => '舛', + '⾈' => '舟', + '⾉' => '艮', + '⾊' => '色', + '⾋' => '艸', + '⾌' => 'è™', + 'â¾' => '虫', + '⾎' => 'è¡€', + 'â¾' => 'è¡Œ', + 'â¾' => 'è¡£', + '⾑' => '襾', + 'â¾’' => '見', + '⾓' => '角', + 'â¾”' => '言', + '⾕' => 'è°·', + 'â¾–' => '豆', + 'â¾—' => '豕', + '⾘' => '豸', + 'â¾™' => 'è²', + '⾚' => '赤', + 'â¾›' => 'èµ°', + '⾜' => '足', + 'â¾' => '身', + '⾞' => '車', + '⾟' => 'è¾›', + 'â¾ ' => 'è¾°', + '⾡' => 'è¾µ', + 'â¾¢' => 'é‚‘', + 'â¾£' => 'é…‰', + '⾤' => '釆', + 'â¾¥' => '里', + '⾦' => '金', + '⾧' => 'é•·', + '⾨' => 'é–€', + '⾩' => '阜', + '⾪' => '隶', + '⾫' => 'éš¹', + '⾬' => '雨', + 'â¾­' => 'é‘', + 'â¾®' => 'éž', + '⾯' => 'é¢', + 'â¾°' => 'é©', + 'â¾±' => '韋', + 'â¾²' => '韭', + 'â¾³' => '音', + 'â¾´' => 'é ', + 'â¾µ' => '風', + '⾶' => '飛', + 'â¾·' => '食', + '⾸' => '首', + 'â¾¹' => '香', + '⾺' => '馬', + 'â¾»' => '骨', + 'â¾¼' => '高', + 'â¾½' => 'é«Ÿ', + 'â¾¾' => '鬥', + '⾿' => '鬯', + 'â¿€' => '鬲', + 'â¿' => '鬼', + 'â¿‚' => 'é­š', + '⿃' => 'é³¥', + 'â¿„' => 'é¹µ', + 'â¿…' => '鹿', + '⿆' => '麥', + '⿇' => '麻', + '⿈' => '黃', + '⿉' => 'é»', + 'â¿Š' => '黑', + 'â¿‹' => '黹', + 'â¿Œ' => '黽', + 'â¿' => '鼎', + 'â¿Ž' => '鼓', + 'â¿' => 'é¼ ', + 'â¿' => 'é¼»', + 'â¿‘' => '齊', + 'â¿’' => 'é½’', + 'â¿“' => 'é¾', + 'â¿”' => '龜', + 'â¿•' => 'é¾ ', + ' ' => ' ', + '〶' => '〒', + '〸' => 'å', + '〹' => 'å„', + '〺' => 'å…', + 'ㄱ' => 'á„€', + 'ㄲ' => 'á„', + 'ㄳ' => 'ᆪ', + 'ã„´' => 'á„‚', + 'ㄵ' => 'ᆬ', + 'ㄶ' => 'ᆭ', + 'ã„·' => 'ᄃ', + 'ㄸ' => 'á„„', + 'ㄹ' => 'á„…', + 'ㄺ' => 'ᆰ', + 'ã„»' => 'ᆱ', + 'ㄼ' => 'ᆲ', + 'ㄽ' => 'ᆳ', + 'ㄾ' => 'ᆴ', + 'ã„¿' => 'ᆵ', + 'ã…€' => 'á„š', + 'ã…' => 'ᄆ', + 'ã…‚' => 'ᄇ', + 'ã…ƒ' => 'ᄈ', + 'ã…„' => 'á„¡', + 'ã……' => 'ᄉ', + 'ã…†' => 'á„Š', + 'ã…‡' => 'á„‹', + 'ã…ˆ' => 'á„Œ', + 'ã…‰' => 'á„', + 'ã…Š' => 'á„Ž', + 'ã…‹' => 'á„', + 'ã…Œ' => 'á„', + 'ã…' => 'á„‘', + 'ã…Ž' => 'á„’', + 'ã…' => 'á…¡', + 'ã…' => 'á…¢', + 'ã…‘' => 'á…£', + 'ã…’' => 'á…¤', + 'ã…“' => 'á…¥', + 'ã…”' => 'á…¦', + 'ã…•' => 'á…§', + 'ã…–' => 'á…¨', + 'ã…—' => 'á…©', + 'ã…˜' => 'á…ª', + 'ã…™' => 'á…«', + 'ã…š' => 'á…¬', + 'ã…›' => 'á…­', + 'ã…œ' => 'á…®', + 'ã…' => 'á…¯', + 'ã…ž' => 'á…°', + 'ã…Ÿ' => 'á…±', + 'ã… ' => 'á…²', + 'ã…¡' => 'á…³', + 'ã…¢' => 'á…´', + 'ã…£' => 'á…µ', + 'ã…¤' => 'á… ', + 'ã…¥' => 'á„”', + 'ã…¦' => 'á„•', + 'ã…§' => 'ᇇ', + 'ã…¨' => 'ᇈ', + 'ã…©' => 'ᇌ', + 'ã…ª' => 'ᇎ', + 'ã…«' => 'ᇓ', + 'ã…¬' => 'ᇗ', + 'ã…­' => 'ᇙ', + 'ã…®' => 'á„œ', + 'ã…¯' => 'á‡', + 'ã…°' => 'ᇟ', + 'ã…±' => 'á„', + 'ã…²' => 'á„ž', + 'ã…³' => 'á„ ', + 'ã…´' => 'á„¢', + 'ã…µ' => 'á„£', + 'ã…¶' => 'ᄧ', + 'ã…·' => 'á„©', + 'ã…¸' => 'á„«', + 'ã…¹' => 'ᄬ', + 'ã…º' => 'á„­', + 'ã…»' => 'á„®', + 'ã…¼' => 'ᄯ', + 'ã…½' => 'ᄲ', + 'ã…¾' => 'ᄶ', + 'ã…¿' => 'á…€', + 'ㆀ' => 'á…‡', + 'ã†' => 'á…Œ', + 'ㆂ' => 'ᇱ', + 'ㆃ' => 'ᇲ', + 'ㆄ' => 'á…—', + 'ㆅ' => 'á…˜', + 'ㆆ' => 'á…™', + 'ㆇ' => 'ᆄ', + 'ㆈ' => 'ᆅ', + 'ㆉ' => 'ᆈ', + 'ㆊ' => 'ᆑ', + 'ㆋ' => 'ᆒ', + 'ㆌ' => 'ᆔ', + 'ã†' => 'ᆞ', + 'ㆎ' => 'ᆡ', + '㈀' => '(á„€)', + 'ãˆ' => '(á„‚)', + '㈂' => '(ᄃ)', + '㈃' => '(á„…)', + '㈄' => '(ᄆ)', + '㈅' => '(ᄇ)', + '㈆' => '(ᄉ)', + '㈇' => '(á„‹)', + '㈈' => '(á„Œ)', + '㈉' => '(á„Ž)', + '㈊' => '(á„)', + '㈋' => '(á„)', + '㈌' => '(á„‘)', + 'ãˆ' => '(á„’)', + '㈎' => '(가)', + 'ãˆ' => '(á„‚á…¡)', + 'ãˆ' => '(다)', + '㈑' => '(á„…á…¡)', + '㈒' => '(마)', + '㈓' => '(바)', + '㈔' => '(사)', + '㈕' => '(á„‹á…¡)', + '㈖' => '(자)', + '㈗' => '(á„Žá…¡)', + '㈘' => '(á„á…¡)', + '㈙' => '(á„á…¡)', + '㈚' => '(á„‘á…¡)', + '㈛' => '(á„’á…¡)', + '㈜' => '(주)', + 'ãˆ' => '(오전)', + '㈞' => '(á„‹á…©á„’á…®)', + '㈠' => '(一)', + '㈡' => '(二)', + '㈢' => '(三)', + '㈣' => '(å››)', + '㈤' => '(五)', + '㈥' => '(å…­)', + '㈦' => '(七)', + '㈧' => '(å…«)', + '㈨' => '(ä¹)', + '㈩' => '(å)', + '㈪' => '(月)', + '㈫' => '(ç«)', + '㈬' => '(æ°´)', + '㈭' => '(木)', + '㈮' => '(金)', + '㈯' => '(土)', + '㈰' => '(æ—¥)', + '㈱' => '(æ ª)', + '㈲' => '(有)', + '㈳' => '(社)', + '㈴' => '(å)', + '㈵' => '(特)', + '㈶' => '(財)', + '㈷' => '(ç¥)', + '㈸' => '(労)', + '㈹' => '(代)', + '㈺' => '(呼)', + '㈻' => '(å­¦)', + '㈼' => '(監)', + '㈽' => '(ä¼)', + '㈾' => '(資)', + '㈿' => '(å”)', + '㉀' => '(祭)', + 'ã‰' => '(休)', + '㉂' => '(自)', + '㉃' => '(至)', + '㉄' => '(å•)', + '㉅' => '(å¹¼)', + '㉆' => '(æ–‡)', + '㉇' => '(ç®)', + 'ã‰' => 'PTE', + '㉑' => '(21)', + '㉒' => '(22)', + '㉓' => '(23)', + '㉔' => '(24)', + '㉕' => '(25)', + '㉖' => '(26)', + '㉗' => '(27)', + '㉘' => '(28)', + '㉙' => '(29)', + '㉚' => '(30)', + '㉛' => '(31)', + '㉜' => '(32)', + 'ã‰' => '(33)', + '㉞' => '(34)', + '㉟' => '(35)', + '㉠' => '(á„€)', + '㉡' => '(á„‚)', + '㉢' => '(ᄃ)', + '㉣' => '(á„…)', + '㉤' => '(ᄆ)', + '㉥' => '(ᄇ)', + '㉦' => '(ᄉ)', + '㉧' => '(á„‹)', + '㉨' => '(á„Œ)', + '㉩' => '(á„Ž)', + '㉪' => '(á„)', + '㉫' => '(á„)', + '㉬' => '(á„‘)', + '㉭' => '(á„’)', + '㉮' => '(가)', + '㉯' => '(á„‚á…¡)', + '㉰' => '(다)', + '㉱' => '(á„…á…¡)', + '㉲' => '(마)', + '㉳' => '(바)', + '㉴' => '(사)', + '㉵' => '(á„‹á…¡)', + '㉶' => '(자)', + '㉷' => '(á„Žá…¡)', + '㉸' => '(á„á…¡)', + '㉹' => '(á„á…¡)', + '㉺' => '(á„‘á…¡)', + '㉻' => '(á„’á…¡)', + '㉼' => '(참고)', + '㉽' => '(주의)', + '㉾' => '(á„‹á…®)', + '㊀' => '(一)', + 'ãŠ' => '(二)', + '㊂' => '(三)', + '㊃' => '(å››)', + '㊄' => '(五)', + '㊅' => '(å…­)', + '㊆' => '(七)', + '㊇' => '(å…«)', + '㊈' => '(ä¹)', + '㊉' => '(å)', + '㊊' => '(月)', + '㊋' => '(ç«)', + '㊌' => '(æ°´)', + 'ãŠ' => '(木)', + '㊎' => '(金)', + 'ãŠ' => '(土)', + 'ãŠ' => '(æ—¥)', + '㊑' => '(æ ª)', + '㊒' => '(有)', + '㊓' => '(社)', + '㊔' => '(å)', + '㊕' => '(特)', + '㊖' => '(財)', + '㊗' => '(ç¥)', + '㊘' => '(労)', + '㊙' => '(秘)', + '㊚' => '(ç”·)', + '㊛' => '(女)', + '㊜' => '(é©)', + 'ãŠ' => '(優)', + '㊞' => '(å°)', + '㊟' => '(注)', + '㊠' => '(é …)', + '㊡' => '(休)', + '㊢' => '(写)', + '㊣' => '(æ­£)', + '㊤' => '(上)', + '㊥' => '(中)', + '㊦' => '(下)', + '㊧' => '(å·¦)', + '㊨' => '(å³)', + '㊩' => '(医)', + '㊪' => '(å®—)', + '㊫' => '(å­¦)', + '㊬' => '(監)', + '㊭' => '(ä¼)', + '㊮' => '(資)', + '㊯' => '(å”)', + '㊰' => '(夜)', + '㊱' => '(36)', + '㊲' => '(37)', + '㊳' => '(38)', + '㊴' => '(39)', + '㊵' => '(40)', + '㊶' => '(41)', + '㊷' => '(42)', + '㊸' => '(43)', + '㊹' => '(44)', + '㊺' => '(45)', + '㊻' => '(46)', + '㊼' => '(47)', + '㊽' => '(48)', + '㊾' => '(49)', + '㊿' => '(50)', + 'ã‹€' => '1月', + 'ã‹' => '2月', + 'ã‹‚' => '3月', + '㋃' => '4月', + 'ã‹„' => '5月', + 'ã‹…' => '6月', + '㋆' => '7月', + '㋇' => '8月', + '㋈' => '9月', + '㋉' => '10月', + 'ã‹Š' => '11月', + 'ã‹‹' => '12月', + 'ã‹Œ' => 'Hg', + 'ã‹' => 'erg', + 'ã‹Ž' => 'eV', + 'ã‹' => 'LTD', + 'ã‹' => '(ã‚¢)', + 'ã‹‘' => '(イ)', + 'ã‹’' => '(ウ)', + 'ã‹“' => '(エ)', + 'ã‹”' => '(オ)', + 'ã‹•' => '(ã‚«)', + 'ã‹–' => '(ã‚­)', + 'ã‹—' => '(ク)', + '㋘' => '(ケ)', + 'ã‹™' => '(コ)', + 'ã‹š' => '(サ)', + 'ã‹›' => '(ã‚·)', + 'ã‹œ' => '(ス)', + 'ã‹' => '(ã‚»)', + 'ã‹ž' => '(ソ)', + 'ã‹Ÿ' => '(ã‚¿)', + 'ã‹ ' => '(ãƒ)', + 'ã‹¡' => '(ツ)', + 'ã‹¢' => '(テ)', + 'ã‹£' => '(ト)', + '㋤' => '(ナ)', + 'ã‹¥' => '(ニ)', + '㋦' => '(ヌ)', + '㋧' => '(ãƒ)', + '㋨' => '(ノ)', + 'ã‹©' => '(ãƒ)', + '㋪' => '(ヒ)', + 'ã‹«' => '(フ)', + '㋬' => '(ヘ)', + 'ã‹­' => '(ホ)', + 'ã‹®' => '(マ)', + '㋯' => '(ミ)', + 'ã‹°' => '(ム)', + '㋱' => '(メ)', + '㋲' => '(モ)', + '㋳' => '(ヤ)', + 'ã‹´' => '(ユ)', + '㋵' => '(ヨ)', + '㋶' => '(ラ)', + 'ã‹·' => '(リ)', + '㋸' => '(ル)', + '㋹' => '(レ)', + '㋺' => '(ロ)', + 'ã‹»' => '(ワ)', + '㋼' => '(ヰ)', + '㋽' => '(ヱ)', + '㋾' => '(ヲ)', + 'ã‹¿' => '令和', + '㌀' => 'アパート', + 'ãŒ' => 'アルファ', + '㌂' => 'アンペア', + '㌃' => 'アール', + '㌄' => 'イニング', + '㌅' => 'インãƒ', + '㌆' => 'ウォン', + '㌇' => 'エスクード', + '㌈' => 'エーカー', + '㌉' => 'オンス', + '㌊' => 'オーム', + '㌋' => 'カイリ', + '㌌' => 'カラット', + 'ãŒ' => 'カロリー', + '㌎' => 'ガロン', + 'ãŒ' => 'ガンマ', + 'ãŒ' => 'ギガ', + '㌑' => 'ギニー', + '㌒' => 'キュリー', + '㌓' => 'ギルダー', + '㌔' => 'キロ', + '㌕' => 'キログラム', + '㌖' => 'キロメートル', + '㌗' => 'キロワット', + '㌘' => 'グラム', + '㌙' => 'グラムトン', + '㌚' => 'クルゼイロ', + '㌛' => 'クローãƒ', + '㌜' => 'ケース', + 'ãŒ' => 'コルナ', + '㌞' => 'コーãƒ', + '㌟' => 'サイクル', + '㌠' => 'サンãƒãƒ¼ãƒ ', + '㌡' => 'シリング', + '㌢' => 'センãƒ', + '㌣' => 'セント', + '㌤' => 'ダース', + '㌥' => 'デシ', + '㌦' => 'ドル', + '㌧' => 'トン', + '㌨' => 'ナノ', + '㌩' => 'ノット', + '㌪' => 'ãƒã‚¤ãƒ„', + '㌫' => 'パーセント', + '㌬' => 'パーツ', + '㌭' => 'ãƒãƒ¼ãƒ¬ãƒ«', + '㌮' => 'ピアストル', + '㌯' => 'ピクル', + '㌰' => 'ピコ', + '㌱' => 'ビル', + '㌲' => 'ファラッド', + '㌳' => 'フィート', + '㌴' => 'ブッシェル', + '㌵' => 'フラン', + '㌶' => 'ヘクタール', + '㌷' => 'ペソ', + '㌸' => 'ペニヒ', + '㌹' => 'ヘルツ', + '㌺' => 'ペンス', + '㌻' => 'ページ', + '㌼' => 'ベータ', + '㌽' => 'ãƒã‚¤ãƒ³ãƒˆ', + '㌾' => 'ボルト', + '㌿' => 'ホン', + 'ã€' => 'ãƒãƒ³ãƒ‰', + 'ã' => 'ホール', + 'ã‚' => 'ホーン', + 'ãƒ' => 'マイクロ', + 'ã„' => 'マイル', + 'ã…' => 'マッãƒ', + 'ã†' => 'マルク', + 'ã‡' => 'マンション', + 'ãˆ' => 'ミクロン', + 'ã‰' => 'ミリ', + 'ãŠ' => 'ミリãƒãƒ¼ãƒ«', + 'ã‹' => 'メガ', + 'ãŒ' => 'メガトン', + 'ã' => 'メートル', + 'ãŽ' => 'ヤード', + 'ã' => 'ヤール', + 'ã' => 'ユアン', + 'ã‘' => 'リットル', + 'ã’' => 'リラ', + 'ã“' => 'ルピー', + 'ã”' => 'ルーブル', + 'ã•' => 'レム', + 'ã–' => 'レントゲン', + 'ã—' => 'ワット', + 'ã˜' => '0点', + 'ã™' => '1点', + 'ãš' => '2点', + 'ã›' => '3点', + 'ãœ' => '4点', + 'ã' => '5点', + 'ãž' => '6点', + 'ãŸ' => '7点', + 'ã ' => '8点', + 'ã¡' => '9点', + 'ã¢' => '10点', + 'ã£' => '11点', + 'ã¤' => '12点', + 'ã¥' => '13点', + 'ã¦' => '14点', + 'ã§' => '15点', + 'ã¨' => '16点', + 'ã©' => '17点', + 'ãª' => '18点', + 'ã«' => '19点', + 'ã¬' => '20点', + 'ã­' => '21点', + 'ã®' => '22点', + 'ã¯' => '23点', + 'ã°' => '24点', + 'ã±' => 'hPa', + 'ã²' => 'da', + 'ã³' => 'AU', + 'ã´' => 'bar', + 'ãµ' => 'oV', + 'ã¶' => 'pc', + 'ã·' => 'dm', + 'ã¸' => 'dm²', + 'ã¹' => 'dm³', + 'ãº' => 'IU', + 'ã»' => 'å¹³æˆ', + 'ã¼' => '昭和', + 'ã½' => '大正', + 'ã¾' => '明治', + 'ã¿' => 'æ ªå¼ä¼šç¤¾', + '㎀' => 'pA', + 'ãŽ' => 'nA', + '㎂' => 'μA', + '㎃' => 'mA', + '㎄' => 'kA', + '㎅' => 'KB', + '㎆' => 'MB', + '㎇' => 'GB', + '㎈' => 'cal', + '㎉' => 'kcal', + '㎊' => 'pF', + '㎋' => 'nF', + '㎌' => 'μF', + 'ãŽ' => 'μg', + '㎎' => 'mg', + 'ãŽ' => 'kg', + 'ãŽ' => 'Hz', + '㎑' => 'kHz', + '㎒' => 'MHz', + '㎓' => 'GHz', + '㎔' => 'THz', + '㎕' => 'μℓ', + '㎖' => 'mâ„“', + '㎗' => 'dâ„“', + '㎘' => 'kâ„“', + '㎙' => 'fm', + '㎚' => 'nm', + '㎛' => 'μm', + '㎜' => 'mm', + 'ãŽ' => 'cm', + '㎞' => 'km', + '㎟' => 'mm²', + '㎠' => 'cm²', + '㎡' => 'm²', + '㎢' => 'km²', + '㎣' => 'mm³', + '㎤' => 'cm³', + '㎥' => 'm³', + '㎦' => 'km³', + '㎧' => 'm∕s', + '㎨' => 'm∕s²', + '㎩' => 'Pa', + '㎪' => 'kPa', + '㎫' => 'MPa', + '㎬' => 'GPa', + '㎭' => 'rad', + '㎮' => 'rad∕s', + '㎯' => 'rad∕s²', + '㎰' => 'ps', + '㎱' => 'ns', + '㎲' => 'μs', + '㎳' => 'ms', + '㎴' => 'pV', + '㎵' => 'nV', + '㎶' => 'μV', + '㎷' => 'mV', + '㎸' => 'kV', + '㎹' => 'MV', + '㎺' => 'pW', + '㎻' => 'nW', + '㎼' => 'μW', + '㎽' => 'mW', + '㎾' => 'kW', + '㎿' => 'MW', + 'ã€' => 'kΩ', + 'ã' => 'MΩ', + 'ã‚' => 'a.m.', + 'ãƒ' => 'Bq', + 'ã„' => 'cc', + 'ã…' => 'cd', + 'ã†' => 'C∕kg', + 'ã‡' => 'Co.', + 'ãˆ' => 'dB', + 'ã‰' => 'Gy', + 'ãŠ' => 'ha', + 'ã‹' => 'HP', + 'ãŒ' => 'in', + 'ã' => 'KK', + 'ãŽ' => 'KM', + 'ã' => 'kt', + 'ã' => 'lm', + 'ã‘' => 'ln', + 'ã’' => 'log', + 'ã“' => 'lx', + 'ã”' => 'mb', + 'ã•' => 'mil', + 'ã–' => 'mol', + 'ã—' => 'PH', + 'ã˜' => 'p.m.', + 'ã™' => 'PPM', + 'ãš' => 'PR', + 'ã›' => 'sr', + 'ãœ' => 'Sv', + 'ã' => 'Wb', + 'ãž' => 'V∕m', + 'ãŸ' => 'A∕m', + 'ã ' => '1æ—¥', + 'ã¡' => '2æ—¥', + 'ã¢' => '3æ—¥', + 'ã£' => '4æ—¥', + 'ã¤' => '5æ—¥', + 'ã¥' => '6æ—¥', + 'ã¦' => '7æ—¥', + 'ã§' => '8æ—¥', + 'ã¨' => '9æ—¥', + 'ã©' => '10æ—¥', + 'ãª' => '11æ—¥', + 'ã«' => '12æ—¥', + 'ã¬' => '13æ—¥', + 'ã­' => '14æ—¥', + 'ã®' => '15æ—¥', + 'ã¯' => '16æ—¥', + 'ã°' => '17æ—¥', + 'ã±' => '18æ—¥', + 'ã²' => '19æ—¥', + 'ã³' => '20æ—¥', + 'ã´' => '21æ—¥', + 'ãµ' => '22æ—¥', + 'ã¶' => '23æ—¥', + 'ã·' => '24æ—¥', + 'ã¸' => '25æ—¥', + 'ã¹' => '26æ—¥', + 'ãº' => '27æ—¥', + 'ã»' => '28æ—¥', + 'ã¼' => '29æ—¥', + 'ã½' => '30æ—¥', + 'ã¾' => '31æ—¥', + 'ã¿' => 'gal', + '豈' => '豈', + 'ï¤' => 'æ›´', + '車' => '車', + '賈' => '賈', + '滑' => '滑', + '串' => '串', + '句' => 'å¥', + '龜' => '龜', + '龜' => '龜', + '契' => '契', + '金' => '金', + '喇' => 'å–‡', + '奈' => '奈', + 'ï¤' => '懶', + '癩' => '癩', + 'ï¤' => 'ç¾…', + 'ï¤' => '蘿', + '螺' => '螺', + '裸' => '裸', + '邏' => 'é‚', + '樂' => '樂', + '洛' => 'æ´›', + '烙' => '烙', + '珞' => 'çž', + '落' => 'è½', + '酪' => 'é…ª', + '駱' => '駱', + '亂' => '亂', + '卵' => 'åµ', + 'ï¤' => '欄', + '爛' => '爛', + '蘭' => '蘭', + '鸞' => '鸞', + '嵐' => 'åµ', + '濫' => 'æ¿«', + '藍' => 'è—', + '襤' => '襤', + '拉' => '拉', + '臘' => '臘', + '蠟' => 'è Ÿ', + '廊' => '廊', + '朗' => '朗', + '浪' => '浪', + '狼' => '狼', + '郎' => '郎', + '來' => '來', + '冷' => '冷', + '勞' => 'å‹ž', + '擄' => 'æ“„', + '櫓' => 'æ«“', + '爐' => 'çˆ', + '盧' => '盧', + '老' => 'è€', + '蘆' => '蘆', + '虜' => '虜', + '路' => 'è·¯', + '露' => '露', + '魯' => 'é­¯', + '鷺' => 'é·º', + '碌' => '碌', + '祿' => '祿', + '綠' => '綠', + '菉' => 'è‰', + '錄' => '錄', + '鹿' => '鹿', + 'ï¥' => 'è«–', + '壟' => '壟', + '弄' => '弄', + '籠' => 'ç± ', + '聾' => 'è¾', + '牢' => '牢', + '磊' => '磊', + '賂' => '賂', + '雷' => 'é›·', + '壘' => '壘', + '屢' => 'å±¢', + '樓' => '樓', + 'ï¥' => 'æ·š', + '漏' => 'æ¼', + 'ï¥' => 'ç´¯', + 'ï¥' => '縷', + '陋' => '陋', + '勒' => 'å‹’', + '肋' => 'è‚‹', + '凜' => '凜', + '凌' => '凌', + '稜' => '稜', + '綾' => '綾', + '菱' => 'è±', + '陵' => '陵', + '讀' => '讀', + '拏' => 'æ‹', + '樂' => '樂', + 'ï¥' => '諾', + '丹' => '丹', + '寧' => '寧', + '怒' => '怒', + '率' => '率', + '異' => 'ç•°', + '北' => '北', + '磻' => '磻', + '便' => '便', + '復' => '復', + '不' => 'ä¸', + '泌' => '泌', + '數' => '數', + '索' => 'ç´¢', + '參' => 'åƒ', + '塞' => 'å¡ž', + '省' => 'çœ', + '葉' => '葉', + '說' => '說', + '殺' => '殺', + '辰' => 'è¾°', + '沈' => '沈', + '拾' => '拾', + '若' => 'è‹¥', + '掠' => '掠', + '略' => 'ç•¥', + '亮' => '亮', + '兩' => 'å…©', + '凉' => '凉', + '梁' => 'æ¢', + '糧' => '糧', + '良' => '良', + '諒' => 'è«’', + '量' => 'é‡', + '勵' => '勵', + '呂' => 'å‘‚', + 'ï¦' => '女', + '廬' => '廬', + '旅' => 'æ—…', + '濾' => '濾', + '礪' => '礪', + '閭' => 'é–­', + '驪' => '驪', + '麗' => '麗', + '黎' => '黎', + '力' => '力', + '曆' => '曆', + '歷' => 'æ­·', + 'ï¦' => 'è½¢', + '年' => 'å¹´', + 'ï¦' => 'æ†', + 'ï¦' => '戀', + '撚' => 'æ’š', + '漣' => 'æ¼£', + '煉' => 'ç…‰', + '璉' => 'ç’‰', + '秊' => '秊', + '練' => 'ç·´', + '聯' => 'è¯', + '輦' => '輦', + '蓮' => 'è“®', + '連' => '連', + '鍊' => 'éŠ', + '列' => '列', + 'ï¦' => '劣', + '咽' => 'å’½', + '烈' => '烈', + '裂' => '裂', + '說' => '說', + '廉' => '廉', + '念' => '念', + '捻' => 'æ»', + '殮' => 'æ®®', + '簾' => 'ç°¾', + '獵' => 'çµ', + '令' => '令', + '囹' => '囹', + '寧' => '寧', + '嶺' => '嶺', + '怜' => '怜', + '玲' => '玲', + '瑩' => 'ç‘©', + '羚' => '羚', + '聆' => 'è†', + '鈴' => '鈴', + '零' => '零', + '靈' => 'éˆ', + '領' => 'é ˜', + '例' => '例', + '禮' => '禮', + '醴' => '醴', + '隸' => '隸', + '惡' => '惡', + '了' => '了', + '僚' => '僚', + '寮' => '寮', + '尿' => 'å°¿', + '料' => 'æ–™', + '樂' => '樂', + '燎' => '燎', + 'ï§' => '療', + '蓼' => '蓼', + '遼' => 'é¼', + '龍' => 'é¾', + '暈' => '暈', + '阮' => '阮', + '劉' => '劉', + '杻' => 'æ»', + '柳' => '柳', + '流' => 'æµ', + '溜' => '溜', + '琉' => 'ç‰', + 'ï§' => 'ç•™', + '硫' => 'ç¡«', + 'ï§' => 'ç´', + 'ï§' => 'é¡ž', + '六' => 'å…­', + '戮' => '戮', + '陸' => '陸', + '倫' => '倫', + '崙' => 'å´™', + '淪' => 'æ·ª', + '輪' => '輪', + '律' => '律', + '慄' => 'æ…„', + '栗' => 'æ —', + '率' => '率', + '隆' => '隆', + 'ï§' => '利', + '吏' => 'å', + '履' => 'å±¥', + '易' => '易', + '李' => 'æŽ', + '梨' => '梨', + '泥' => 'æ³¥', + '理' => 'ç†', + '痢' => 'ç—¢', + '罹' => 'ç½¹', + '裏' => 'è£', + '裡' => '裡', + '里' => '里', + '離' => '離', + '匿' => '匿', + '溺' => '溺', + '吝' => 'å', + '燐' => 'ç‡', + '璘' => 'ç’˜', + '藺' => 'è—º', + '隣' => '隣', + '鱗' => 'é±—', + '麟' => '麟', + '林' => 'æž—', + '淋' => 'æ·‹', + '臨' => '臨', + '立' => 'ç«‹', + '笠' => '笠', + '粒' => 'ç²’', + '狀' => 'ç‹€', + '炙' => 'ç‚™', + '識' => 'è­˜', + '什' => '什', + '茶' => '茶', + '刺' => '刺', + '切' => '切', + 'ï¨' => '度', + '拓' => 'æ‹“', + '糖' => 'ç³–', + '宅' => 'å®…', + '洞' => 'æ´ž', + '暴' => 'æš´', + '輻' => 'è¼»', + '行' => 'è¡Œ', + '降' => 'é™', + '見' => '見', + '廓' => '廓', + '兀' => 'å…€', + 'ï¨' => 'å—€', + '﨎' => '' . "\0" . '', + 'ï¨' => '' . "\0" . '', + 'ï¨' => 'å¡š', + '﨑' => '' . "\0" . '', + '晴' => 'æ™´', + '﨓' => '' . "\0" . '', + '﨔' => '' . "\0" . '', + '凞' => '凞', + '猪' => '猪', + '益' => '益', + '礼' => '礼', + '神' => '神', + '祥' => '祥', + '福' => 'ç¦', + '靖' => 'é–', + 'ï¨' => 'ç²¾', + '羽' => 'ç¾½', + '﨟' => '' . "\0" . '', + '蘒' => '蘒', + '﨡' => '' . "\0" . '', + '諸' => '諸', + '﨣' => '' . "\0" . '', + '﨤' => '' . "\0" . '', + '逸' => '逸', + '都' => '都', + '﨧' => '' . "\0" . '', + '﨨' => '' . "\0" . '', + '﨩' => '' . "\0" . '', + '飯' => '飯', + '飼' => '飼', + '館' => '館', + '鶴' => '鶴', + '郞' => '郞', + '隷' => 'éš·', + '侮' => 'ä¾®', + '僧' => '僧', + '免' => 'å…', + '勉' => '勉', + '勤' => '勤', + '卑' => 'å‘', + '喝' => 'å–', + '嘆' => '嘆', + '器' => '器', + '塀' => 'å¡€', + '墨' => '墨', + '層' => '層', + '屮' => 'å±®', + '悔' => 'æ‚”', + '慨' => 'æ…¨', + '憎' => '憎', + 'ï©€' => '懲', + 'ï©' => 'æ•', + 'ï©‚' => 'æ—¢', + '暑' => 'æš‘', + 'ï©„' => '梅', + 'ï©…' => 'æµ·', + '渚' => '渚', + '漢' => 'æ¼¢', + '煮' => 'ç…®', + '爫' => '爫', + 'ï©Š' => 'ç¢', + 'ï©‹' => '碑', + 'ï©Œ' => '社', + 'ï©' => '祉', + 'ï©Ž' => '祈', + 'ï©' => 'ç¥', + 'ï©' => '祖', + 'ï©‘' => 'ç¥', + 'ï©’' => 'ç¦', + 'ï©“' => '禎', + 'ï©”' => 'ç©€', + 'ï©•' => 'çª', + 'ï©–' => '節', + 'ï©—' => 'ç·´', + '縉' => '縉', + 'ï©™' => 'ç¹', + 'ï©š' => 'ç½²', + 'ï©›' => '者', + 'ï©œ' => '臭', + 'ï©' => '艹', + 'ï©ž' => '艹', + 'ï©Ÿ' => 'è‘—', + 'ï© ' => 'è¤', + 'ï©¡' => '視', + 'ï©¢' => 'è¬', + 'ï©£' => '謹', + '賓' => '賓', + 'ï©¥' => 'è´ˆ', + '辶' => '辶', + '逸' => '逸', + '難' => '難', + 'ï©©' => '響', + '頻' => 'é »', + 'ï©«' => 'æµ', + '𤋮' => '𤋮', + 'ï©­' => '舘', + 'ï©°' => '並', + '况' => '况', + '全' => 'å…¨', + '侀' => 'ä¾€', + 'ï©´' => 'å……', + '冀' => '冀', + '勇' => '勇', + 'ï©·' => '勺', + '喝' => 'å–', + '啕' => 'å••', + '喙' => 'å–™', + 'ï©»' => 'å—¢', + '塚' => 'å¡š', + '墳' => '墳', + '奄' => '奄', + 'ï©¿' => '奔', + '婢' => 'å©¢', + 'ïª' => '嬨', + '廒' => 'å»’', + '廙' => 'å»™', + '彩' => '彩', + '徭' => 'å¾­', + '惘' => '惘', + '慎' => 'æ…Ž', + '愈' => '愈', + '憎' => '憎', + '慠' => 'æ… ', + '懲' => '懲', + '戴' => '戴', + 'ïª' => 'æ„', + '搜' => 'æœ', + 'ïª' => 'æ‘’', + 'ïª' => 'æ•–', + '晴' => 'æ™´', + '朗' => '朗', + '望' => '望', + '杖' => 'æ–', + '歹' => 'æ­¹', + '殺' => '殺', + '流' => 'æµ', + '滛' => 'æ»›', + '滋' => '滋', + '漢' => 'æ¼¢', + '瀞' => '瀞', + '煮' => 'ç…®', + 'ïª' => '瞧', + '爵' => '爵', + '犯' => '犯', + '猪' => '猪', + '瑱' => '瑱', + '甆' => '甆', + '画' => 'ç”»', + '瘝' => 'ç˜', + '瘟' => '瘟', + '益' => '益', + '盛' => 'ç››', + '直' => 'ç›´', + '睊' => 'çŠ', + '着' => 'ç€', + '磌' => '磌', + '窱' => '窱', + '節' => '節', + '类' => 'ç±»', + '絛' => 'çµ›', + '練' => 'ç·´', + '缾' => 'ç¼¾', + '者' => '者', + '荒' => 'è’', + '華' => 'è¯', + '蝹' => 'è¹', + '襁' => 'è¥', + '覆' => '覆', + '視' => '視', + '調' => '調', + '諸' => '諸', + '請' => 'è«‹', + '謁' => 'è¬', + '諾' => '諾', + '諭' => 'è«­', + '謹' => '謹', + 'ï«€' => '變', + 'ï«' => 'è´ˆ', + 'ï«‚' => '輸', + '遲' => 'é²', + 'ï«„' => '醙', + 'ï«…' => '鉶', + '陼' => '陼', + '難' => '難', + '靖' => 'é–', + '韛' => '韛', + 'ï«Š' => '響', + 'ï«‹' => 'é ‹', + 'ï«Œ' => 'é »', + 'ï«' => '鬒', + 'ï«Ž' => '龜', + 'ï«' => '𢡊', + 'ï«' => '𢡄', + 'ï«‘' => 'ð£•', + 'ï«’' => 'ã®', + 'ï«“' => '䀘', + 'ï«”' => '䀹', + 'ï«•' => '𥉉', + 'ï«–' => 'ð¥³', + 'ï«—' => '𧻓', + '齃' => '齃', + 'ï«™' => '龎', + 'ff' => 'ff', + 'ï¬' => 'fi', + 'fl' => 'fl', + 'ffi' => 'ffi', + 'ffl' => 'ffl', + 'ſt' => 'Å¿t', + 'st' => 'st', + 'ﬓ' => 'Õ´Õ¶', + 'ﬔ' => 'Õ´Õ¥', + 'ﬕ' => 'Õ´Õ«', + 'ﬖ' => 'Õ¾Õ¶', + 'ﬗ' => 'Õ´Õ­', + 'ﬠ' => '×¢', + 'ﬡ' => '×', + 'ﬢ' => 'ד', + 'ﬣ' => '×”', + 'ﬤ' => '×›', + 'ﬥ' => 'ל', + 'ﬦ' => '×', + 'ﬧ' => 'ר', + 'ﬨ' => 'ת', + '﬩' => '+', + 'ï­' => '×ל', + '﹉' => '‾', + '﹊' => '‾', + '﹋' => '‾', + '﹌' => '‾', + 'ï¹' => '_', + '﹎' => '_', + 'ï¹' => '_', + 'ï¹' => ',', + '﹑' => 'ã€', + 'ï¹’' => '.', + 'ï¹”' => ';', + '﹕' => ':', + 'ï¹–' => '?', + 'ï¹—' => '!', + '﹘' => '—', + 'ï¹™' => '(', + '﹚' => ')', + 'ï¹›' => '{', + '﹜' => '}', + 'ï¹' => '〔', + '﹞' => '〕', + '﹟' => '#', + 'ï¹ ' => '&', + '﹡' => '*', + 'ï¹¢' => '+', + 'ï¹£' => '-', + '﹤' => '<', + 'ï¹¥' => '>', + '﹦' => '=', + '﹨' => '\\', + '﹩' => '$', + '﹪' => '%', + '﹫' => '@', + 'ï¼' => '!', + '"' => '"', + '#' => '#', + '$' => '$', + 'ï¼…' => '%', + '&' => '&', + ''' => '\'', + '(' => '(', + ')' => ')', + '*' => '*', + '+' => '+', + ',' => ',', + 'ï¼' => '-', + '.' => '.', + 'ï¼' => '/', + 'ï¼' => '0', + '1' => '1', + 'ï¼’' => '2', + '3' => '3', + 'ï¼”' => '4', + '5' => '5', + 'ï¼–' => '6', + 'ï¼—' => '7', + '8' => '8', + 'ï¼™' => '9', + ':' => ':', + 'ï¼›' => ';', + '<' => '<', + 'ï¼' => '=', + '>' => '>', + '?' => '?', + 'ï¼ ' => '@', + 'A' => 'A', + 'ï¼¢' => 'B', + 'ï¼£' => 'C', + 'D' => 'D', + 'ï¼¥' => 'E', + 'F' => 'F', + 'G' => 'G', + 'H' => 'H', + 'I' => 'I', + 'J' => 'J', + 'K' => 'K', + 'L' => 'L', + 'ï¼­' => 'M', + 'ï¼®' => 'N', + 'O' => 'O', + 'ï¼°' => 'P', + 'ï¼±' => 'Q', + 'ï¼²' => 'R', + 'ï¼³' => 'S', + 'ï¼´' => 'T', + 'ï¼µ' => 'U', + 'V' => 'V', + 'ï¼·' => 'W', + 'X' => 'X', + 'ï¼¹' => 'Y', + 'Z' => 'Z', + 'ï¼»' => '[', + 'ï¼¼' => '\\', + 'ï¼½' => ']', + 'ï¼¾' => '^', + '_' => '_', + 'ï½€' => '`', + 'ï½' => 'a', + 'b' => 'b', + 'c' => 'c', + 'd' => 'd', + 'ï½…' => 'e', + 'f' => 'f', + 'g' => 'g', + 'h' => 'h', + 'i' => 'i', + 'j' => 'j', + 'k' => 'k', + 'l' => 'l', + 'ï½' => 'm', + 'n' => 'n', + 'ï½' => 'o', + 'ï½' => 'p', + 'q' => 'q', + 'ï½’' => 'r', + 's' => 's', + 'ï½”' => 't', + 'u' => 'u', + 'ï½–' => 'v', + 'ï½—' => 'w', + 'x' => 'x', + 'ï½™' => 'y', + 'z' => 'z', + 'ï½›' => '{', + '|' => '|', + 'ï½' => '}', + '~' => '~', + '⦅' => '⦅', + 'ï½ ' => '⦆', + '。' => '。', + 'ï½¢' => '「', + 'ï½£' => 'ã€', + '、' => 'ã€', + 'ï½¥' => '・', + 'ヲ' => 'ヲ', + 'ァ' => 'ã‚¡', + 'ィ' => 'ã‚£', + 'ゥ' => 'ã‚¥', + 'ェ' => 'ェ', + 'ォ' => 'ã‚©', + 'ャ' => 'ャ', + 'ï½­' => 'ュ', + 'ï½®' => 'ョ', + 'ッ' => 'ッ', + 'ï½°' => 'ー', + 'ï½±' => 'ã‚¢', + 'ï½²' => 'イ', + 'ï½³' => 'ウ', + 'ï½´' => 'エ', + 'ï½µ' => 'オ', + 'カ' => 'ã‚«', + 'ï½·' => 'ã‚­', + 'ク' => 'ク', + 'ï½¹' => 'ケ', + 'コ' => 'コ', + 'ï½»' => 'サ', + 'ï½¼' => 'ã‚·', + 'ï½½' => 'ス', + 'ï½¾' => 'ã‚»', + 'ソ' => 'ソ', + 'ï¾€' => 'ã‚¿', + 'ï¾' => 'ãƒ', + 'ツ' => 'ツ', + 'テ' => 'テ', + 'ト' => 'ト', + 'ï¾…' => 'ナ', + 'ニ' => 'ニ', + 'ヌ' => 'ヌ', + 'ネ' => 'ãƒ', + 'ノ' => 'ノ', + 'ハ' => 'ãƒ', + 'ヒ' => 'ヒ', + 'フ' => 'フ', + 'ï¾' => 'ヘ', + 'ホ' => 'ホ', + 'ï¾' => 'マ', + 'ï¾' => 'ミ', + 'ム' => 'ム', + 'ï¾’' => 'メ', + 'モ' => 'モ', + 'ï¾”' => 'ヤ', + 'ユ' => 'ユ', + 'ï¾–' => 'ヨ', + 'ï¾—' => 'ラ', + 'リ' => 'リ', + 'ï¾™' => 'ル', + 'レ' => 'レ', + 'ï¾›' => 'ロ', + 'ワ' => 'ワ', + 'ï¾' => 'ン', + '゙' => 'ã‚™', + '゚' => 'ã‚š', + 'ï¾ ' => 'ã…¤', + 'ᄀ' => 'ㄱ', + 'ï¾¢' => 'ㄲ', + 'ï¾£' => 'ㄳ', + 'ᄂ' => 'ã„´', + 'ï¾¥' => 'ㄵ', + 'ᆭ' => 'ㄶ', + 'ᄃ' => 'ã„·', + 'ᄄ' => 'ㄸ', + 'ᄅ' => 'ㄹ', + 'ᆰ' => 'ㄺ', + 'ᆱ' => 'ã„»', + 'ᆲ' => 'ㄼ', + 'ï¾­' => 'ㄽ', + 'ï¾®' => 'ㄾ', + 'ᆵ' => 'ã„¿', + 'ï¾°' => 'ã…€', + 'ï¾±' => 'ã…', + 'ï¾²' => 'ã…‚', + 'ï¾³' => 'ã…ƒ', + 'ï¾´' => 'ã…„', + 'ï¾µ' => 'ã……', + 'ᄊ' => 'ã…†', + 'ï¾·' => 'ã…‡', + 'ᄌ' => 'ã…ˆ', + 'ï¾¹' => 'ã…‰', + 'ᄎ' => 'ã…Š', + 'ï¾»' => 'ã…‹', + 'ï¾¼' => 'ã…Œ', + 'ï¾½' => 'ã…', + 'ï¾¾' => 'ã…Ž', + 'ï¿‚' => 'ã…', + 'ᅢ' => 'ã…', + 'ï¿„' => 'ã…‘', + 'ï¿…' => 'ã…’', + 'ᅥ' => 'ã…“', + 'ᅦ' => 'ã…”', + 'ï¿Š' => 'ã…•', + 'ï¿‹' => 'ã…–', + 'ï¿Œ' => 'ã…—', + 'ï¿' => 'ã…˜', + 'ï¿Ž' => 'ã…™', + 'ï¿' => 'ã…š', + 'ï¿’' => 'ã…›', + 'ï¿“' => 'ã…œ', + 'ï¿”' => 'ã…', + 'ï¿•' => 'ã…ž', + 'ï¿–' => 'ã…Ÿ', + 'ï¿—' => 'ã… ', + 'ï¿š' => 'ã…¡', + 'ï¿›' => 'ã…¢', + 'ï¿œ' => 'ã…£', + 'ï¿ ' => '¢', + 'ï¿¡' => '£', + 'ï¿¢' => '¬', + 'ï¿£' => '¯', + '¦' => '¦', + 'ï¿¥' => 'Â¥', + '₩' => 'â‚©', + '│' => '│', + 'ï¿©' => 'â†', + '↑' => '↑', + 'ï¿«' => '→', + '↓' => '↓', + 'ï¿­' => 'â– ', + 'ï¿®' => 'â—‹', + 'ð€' => 'A', + 'ð' => 'B', + 'ð‚' => 'C', + 'ðƒ' => 'D', + 'ð„' => 'E', + 'ð…' => 'F', + 'ð†' => 'G', + 'ð‡' => 'H', + 'ðˆ' => 'I', + 'ð‰' => 'J', + 'ðŠ' => 'K', + 'ð‹' => 'L', + 'ðŒ' => 'M', + 'ð' => 'N', + 'ðŽ' => 'O', + 'ð' => 'P', + 'ð' => 'Q', + 'ð‘' => 'R', + 'ð’' => 'S', + 'ð“' => 'T', + 'ð”' => 'U', + 'ð•' => 'V', + 'ð–' => 'W', + 'ð—' => 'X', + 'ð˜' => 'Y', + 'ð™' => 'Z', + 'ðš' => 'a', + 'ð›' => 'b', + 'ðœ' => 'c', + 'ð' => 'd', + 'ðž' => 'e', + 'ðŸ' => 'f', + 'ð ' => 'g', + 'ð¡' => 'h', + 'ð¢' => 'i', + 'ð£' => 'j', + 'ð¤' => 'k', + 'ð¥' => 'l', + 'ð¦' => 'm', + 'ð§' => 'n', + 'ð¨' => 'o', + 'ð©' => 'p', + 'ðª' => 'q', + 'ð«' => 'r', + 'ð¬' => 's', + 'ð­' => 't', + 'ð®' => 'u', + 'ð¯' => 'v', + 'ð°' => 'w', + 'ð±' => 'x', + 'ð²' => 'y', + 'ð³' => 'z', + 'ð´' => 'A', + 'ðµ' => 'B', + 'ð¶' => 'C', + 'ð·' => 'D', + 'ð¸' => 'E', + 'ð¹' => 'F', + 'ðº' => 'G', + 'ð»' => 'H', + 'ð¼' => 'I', + 'ð½' => 'J', + 'ð¾' => 'K', + 'ð¿' => 'L', + 'ð‘€' => 'M', + 'ð‘' => 'N', + 'ð‘‚' => 'O', + 'ð‘ƒ' => 'P', + 'ð‘„' => 'Q', + 'ð‘…' => 'R', + 'ð‘†' => 'S', + 'ð‘‡' => 'T', + 'ð‘ˆ' => 'U', + 'ð‘‰' => 'V', + 'ð‘Š' => 'W', + 'ð‘‹' => 'X', + 'ð‘Œ' => 'Y', + 'ð‘' => 'Z', + 'ð‘Ž' => 'a', + 'ð‘' => 'b', + 'ð‘' => 'c', + 'ð‘‘' => 'd', + 'ð‘’' => 'e', + 'ð‘“' => 'f', + 'ð‘”' => 'g', + 'ð‘–' => 'i', + 'ð‘—' => 'j', + 'ð‘˜' => 'k', + 'ð‘™' => 'l', + 'ð‘š' => 'm', + 'ð‘›' => 'n', + 'ð‘œ' => 'o', + 'ð‘' => 'p', + 'ð‘ž' => 'q', + 'ð‘Ÿ' => 'r', + 'ð‘ ' => 's', + 'ð‘¡' => 't', + 'ð‘¢' => 'u', + 'ð‘£' => 'v', + 'ð‘¤' => 'w', + 'ð‘¥' => 'x', + 'ð‘¦' => 'y', + 'ð‘§' => 'z', + 'ð‘¨' => 'A', + 'ð‘©' => 'B', + 'ð‘ª' => 'C', + 'ð‘«' => 'D', + 'ð‘¬' => 'E', + 'ð‘­' => 'F', + 'ð‘®' => 'G', + 'ð‘¯' => 'H', + 'ð‘°' => 'I', + 'ð‘±' => 'J', + 'ð‘²' => 'K', + 'ð‘³' => 'L', + 'ð‘´' => 'M', + 'ð‘µ' => 'N', + 'ð‘¶' => 'O', + 'ð‘·' => 'P', + 'ð‘¸' => 'Q', + 'ð‘¹' => 'R', + 'ð‘º' => 'S', + 'ð‘»' => 'T', + 'ð‘¼' => 'U', + 'ð‘½' => 'V', + 'ð‘¾' => 'W', + 'ð‘¿' => 'X', + 'ð’€' => 'Y', + 'ð’' => 'Z', + 'ð’‚' => 'a', + 'ð’ƒ' => 'b', + 'ð’„' => 'c', + 'ð’…' => 'd', + 'ð’†' => 'e', + 'ð’‡' => 'f', + 'ð’ˆ' => 'g', + 'ð’‰' => 'h', + 'ð’Š' => 'i', + 'ð’‹' => 'j', + 'ð’Œ' => 'k', + 'ð’' => 'l', + 'ð’Ž' => 'm', + 'ð’' => 'n', + 'ð’' => 'o', + 'ð’‘' => 'p', + 'ð’’' => 'q', + 'ð’“' => 'r', + 'ð’”' => 's', + 'ð’•' => 't', + 'ð’–' => 'u', + 'ð’—' => 'v', + 'ð’˜' => 'w', + 'ð’™' => 'x', + 'ð’š' => 'y', + 'ð’›' => 'z', + 'ð’œ' => 'A', + 'ð’ž' => 'C', + 'ð’Ÿ' => 'D', + 'ð’¢' => 'G', + 'ð’¥' => 'J', + 'ð’¦' => 'K', + 'ð’©' => 'N', + 'ð’ª' => 'O', + 'ð’«' => 'P', + 'ð’¬' => 'Q', + 'ð’®' => 'S', + 'ð’¯' => 'T', + 'ð’°' => 'U', + 'ð’±' => 'V', + 'ð’²' => 'W', + 'ð’³' => 'X', + 'ð’´' => 'Y', + 'ð’µ' => 'Z', + 'ð’¶' => 'a', + 'ð’·' => 'b', + 'ð’¸' => 'c', + 'ð’¹' => 'd', + 'ð’»' => 'f', + 'ð’½' => 'h', + 'ð’¾' => 'i', + 'ð’¿' => 'j', + 'ð“€' => 'k', + 'ð“' => 'l', + 'ð“‚' => 'm', + 'ð“ƒ' => 'n', + 'ð“…' => 'p', + 'ð“†' => 'q', + 'ð“‡' => 'r', + 'ð“ˆ' => 's', + 'ð“‰' => 't', + 'ð“Š' => 'u', + 'ð“‹' => 'v', + 'ð“Œ' => 'w', + 'ð“' => 'x', + 'ð“Ž' => 'y', + 'ð“' => 'z', + 'ð“' => 'A', + 'ð“‘' => 'B', + 'ð“’' => 'C', + 'ð““' => 'D', + 'ð“”' => 'E', + 'ð“•' => 'F', + 'ð“–' => 'G', + 'ð“—' => 'H', + 'ð“˜' => 'I', + 'ð“™' => 'J', + 'ð“š' => 'K', + 'ð“›' => 'L', + 'ð“œ' => 'M', + 'ð“' => 'N', + 'ð“ž' => 'O', + 'ð“Ÿ' => 'P', + 'ð“ ' => 'Q', + 'ð“¡' => 'R', + 'ð“¢' => 'S', + 'ð“£' => 'T', + 'ð“¤' => 'U', + 'ð“¥' => 'V', + 'ð“¦' => 'W', + 'ð“§' => 'X', + 'ð“¨' => 'Y', + 'ð“©' => 'Z', + 'ð“ª' => 'a', + 'ð“«' => 'b', + 'ð“¬' => 'c', + 'ð“­' => 'd', + 'ð“®' => 'e', + 'ð“¯' => 'f', + 'ð“°' => 'g', + 'ð“±' => 'h', + 'ð“²' => 'i', + 'ð“³' => 'j', + 'ð“´' => 'k', + 'ð“µ' => 'l', + 'ð“¶' => 'm', + 'ð“·' => 'n', + 'ð“¸' => 'o', + 'ð“¹' => 'p', + 'ð“º' => 'q', + 'ð“»' => 'r', + 'ð“¼' => 's', + 'ð“½' => 't', + 'ð“¾' => 'u', + 'ð“¿' => 'v', + 'ð”€' => 'w', + 'ð”' => 'x', + 'ð”‚' => 'y', + 'ð”ƒ' => 'z', + 'ð”„' => 'A', + 'ð”…' => 'B', + 'ð”‡' => 'D', + 'ð”ˆ' => 'E', + 'ð”‰' => 'F', + 'ð”Š' => 'G', + 'ð”' => 'J', + 'ð”Ž' => 'K', + 'ð”' => 'L', + 'ð”' => 'M', + 'ð”‘' => 'N', + 'ð”’' => 'O', + 'ð”“' => 'P', + 'ð””' => 'Q', + 'ð”–' => 'S', + 'ð”—' => 'T', + 'ð”˜' => 'U', + 'ð”™' => 'V', + 'ð”š' => 'W', + 'ð”›' => 'X', + 'ð”œ' => 'Y', + 'ð”ž' => 'a', + 'ð”Ÿ' => 'b', + 'ð” ' => 'c', + 'ð”¡' => 'd', + 'ð”¢' => 'e', + 'ð”£' => 'f', + 'ð”¤' => 'g', + 'ð”¥' => 'h', + 'ð”¦' => 'i', + 'ð”§' => 'j', + 'ð”¨' => 'k', + 'ð”©' => 'l', + 'ð”ª' => 'm', + 'ð”«' => 'n', + 'ð”¬' => 'o', + 'ð”­' => 'p', + 'ð”®' => 'q', + 'ð”¯' => 'r', + 'ð”°' => 's', + 'ð”±' => 't', + 'ð”²' => 'u', + 'ð”³' => 'v', + 'ð”´' => 'w', + 'ð”µ' => 'x', + 'ð”¶' => 'y', + 'ð”·' => 'z', + 'ð”¸' => 'A', + 'ð”¹' => 'B', + 'ð”»' => 'D', + 'ð”¼' => 'E', + 'ð”½' => 'F', + 'ð”¾' => 'G', + 'ð•€' => 'I', + 'ð•' => 'J', + 'ð•‚' => 'K', + 'ð•ƒ' => 'L', + 'ð•„' => 'M', + 'ð•†' => 'O', + 'ð•Š' => 'S', + 'ð•‹' => 'T', + 'ð•Œ' => 'U', + 'ð•' => 'V', + 'ð•Ž' => 'W', + 'ð•' => 'X', + 'ð•' => 'Y', + 'ð•’' => 'a', + 'ð•“' => 'b', + 'ð•”' => 'c', + 'ð••' => 'd', + 'ð•–' => 'e', + 'ð•—' => 'f', + 'ð•˜' => 'g', + 'ð•™' => 'h', + 'ð•š' => 'i', + 'ð•›' => 'j', + 'ð•œ' => 'k', + 'ð•' => 'l', + 'ð•ž' => 'm', + 'ð•Ÿ' => 'n', + 'ð• ' => 'o', + 'ð•¡' => 'p', + 'ð•¢' => 'q', + 'ð•£' => 'r', + 'ð•¤' => 's', + 'ð•¥' => 't', + 'ð•¦' => 'u', + 'ð•§' => 'v', + 'ð•¨' => 'w', + 'ð•©' => 'x', + 'ð•ª' => 'y', + 'ð•«' => 'z', + 'ð•¬' => 'A', + 'ð•­' => 'B', + 'ð•®' => 'C', + 'ð•¯' => 'D', + 'ð•°' => 'E', + 'ð•±' => 'F', + 'ð•²' => 'G', + 'ð•³' => 'H', + 'ð•´' => 'I', + 'ð•µ' => 'J', + 'ð•¶' => 'K', + 'ð•·' => 'L', + 'ð•¸' => 'M', + 'ð•¹' => 'N', + 'ð•º' => 'O', + 'ð•»' => 'P', + 'ð•¼' => 'Q', + 'ð•½' => 'R', + 'ð•¾' => 'S', + 'ð•¿' => 'T', + 'ð–€' => 'U', + 'ð–' => 'V', + 'ð–‚' => 'W', + 'ð–ƒ' => 'X', + 'ð–„' => 'Y', + 'ð–…' => 'Z', + 'ð–†' => 'a', + 'ð–‡' => 'b', + 'ð–ˆ' => 'c', + 'ð–‰' => 'd', + 'ð–Š' => 'e', + 'ð–‹' => 'f', + 'ð–Œ' => 'g', + 'ð–' => 'h', + 'ð–Ž' => 'i', + 'ð–' => 'j', + 'ð–' => 'k', + 'ð–‘' => 'l', + 'ð–’' => 'm', + 'ð–“' => 'n', + 'ð–”' => 'o', + 'ð–•' => 'p', + 'ð––' => 'q', + 'ð–—' => 'r', + 'ð–˜' => 's', + 'ð–™' => 't', + 'ð–š' => 'u', + 'ð–›' => 'v', + 'ð–œ' => 'w', + 'ð–' => 'x', + 'ð–ž' => 'y', + 'ð–Ÿ' => 'z', + 'ð– ' => 'A', + 'ð–¡' => 'B', + 'ð–¢' => 'C', + 'ð–£' => 'D', + 'ð–¤' => 'E', + 'ð–¥' => 'F', + 'ð–¦' => 'G', + 'ð–§' => 'H', + 'ð–¨' => 'I', + 'ð–©' => 'J', + 'ð–ª' => 'K', + 'ð–«' => 'L', + 'ð–¬' => 'M', + 'ð–­' => 'N', + 'ð–®' => 'O', + 'ð–¯' => 'P', + 'ð–°' => 'Q', + 'ð–±' => 'R', + 'ð–²' => 'S', + 'ð–³' => 'T', + 'ð–´' => 'U', + 'ð–µ' => 'V', + 'ð–¶' => 'W', + 'ð–·' => 'X', + 'ð–¸' => 'Y', + 'ð–¹' => 'Z', + 'ð–º' => 'a', + 'ð–»' => 'b', + 'ð–¼' => 'c', + 'ð–½' => 'd', + 'ð–¾' => 'e', + 'ð–¿' => 'f', + 'ð—€' => 'g', + 'ð—' => 'h', + 'ð—‚' => 'i', + 'ð—ƒ' => 'j', + 'ð—„' => 'k', + 'ð—…' => 'l', + 'ð—†' => 'm', + 'ð—‡' => 'n', + 'ð—ˆ' => 'o', + 'ð—‰' => 'p', + 'ð—Š' => 'q', + 'ð—‹' => 'r', + 'ð—Œ' => 's', + 'ð—' => 't', + 'ð—Ž' => 'u', + 'ð—' => 'v', + 'ð—' => 'w', + 'ð—‘' => 'x', + 'ð—’' => 'y', + 'ð—“' => 'z', + 'ð—”' => 'A', + 'ð—•' => 'B', + 'ð—–' => 'C', + 'ð——' => 'D', + 'ð—˜' => 'E', + 'ð—™' => 'F', + 'ð—š' => 'G', + 'ð—›' => 'H', + 'ð—œ' => 'I', + 'ð—' => 'J', + 'ð—ž' => 'K', + 'ð—Ÿ' => 'L', + 'ð— ' => 'M', + 'ð—¡' => 'N', + 'ð—¢' => 'O', + 'ð—£' => 'P', + 'ð—¤' => 'Q', + 'ð—¥' => 'R', + 'ð—¦' => 'S', + 'ð—§' => 'T', + 'ð—¨' => 'U', + 'ð—©' => 'V', + 'ð—ª' => 'W', + 'ð—«' => 'X', + 'ð—¬' => 'Y', + 'ð—­' => 'Z', + 'ð—®' => 'a', + 'ð—¯' => 'b', + 'ð—°' => 'c', + 'ð—±' => 'd', + 'ð—²' => 'e', + 'ð—³' => 'f', + 'ð—´' => 'g', + 'ð—µ' => 'h', + 'ð—¶' => 'i', + 'ð—·' => 'j', + 'ð—¸' => 'k', + 'ð—¹' => 'l', + 'ð—º' => 'm', + 'ð—»' => 'n', + 'ð—¼' => 'o', + 'ð—½' => 'p', + 'ð—¾' => 'q', + 'ð—¿' => 'r', + 'ð˜€' => 's', + 'ð˜' => 't', + 'ð˜‚' => 'u', + 'ð˜ƒ' => 'v', + 'ð˜„' => 'w', + 'ð˜…' => 'x', + 'ð˜†' => 'y', + 'ð˜‡' => 'z', + 'ð˜ˆ' => 'A', + 'ð˜‰' => 'B', + 'ð˜Š' => 'C', + 'ð˜‹' => 'D', + 'ð˜Œ' => 'E', + 'ð˜' => 'F', + 'ð˜Ž' => 'G', + 'ð˜' => 'H', + 'ð˜' => 'I', + 'ð˜‘' => 'J', + 'ð˜’' => 'K', + 'ð˜“' => 'L', + 'ð˜”' => 'M', + 'ð˜•' => 'N', + 'ð˜–' => 'O', + 'ð˜—' => 'P', + 'ð˜˜' => 'Q', + 'ð˜™' => 'R', + 'ð˜š' => 'S', + 'ð˜›' => 'T', + 'ð˜œ' => 'U', + 'ð˜' => 'V', + 'ð˜ž' => 'W', + 'ð˜Ÿ' => 'X', + 'ð˜ ' => 'Y', + 'ð˜¡' => 'Z', + 'ð˜¢' => 'a', + 'ð˜£' => 'b', + 'ð˜¤' => 'c', + 'ð˜¥' => 'd', + 'ð˜¦' => 'e', + 'ð˜§' => 'f', + 'ð˜¨' => 'g', + 'ð˜©' => 'h', + 'ð˜ª' => 'i', + 'ð˜«' => 'j', + 'ð˜¬' => 'k', + 'ð˜­' => 'l', + 'ð˜®' => 'm', + 'ð˜¯' => 'n', + 'ð˜°' => 'o', + 'ð˜±' => 'p', + 'ð˜²' => 'q', + 'ð˜³' => 'r', + 'ð˜´' => 's', + 'ð˜µ' => 't', + 'ð˜¶' => 'u', + 'ð˜·' => 'v', + 'ð˜¸' => 'w', + 'ð˜¹' => 'x', + 'ð˜º' => 'y', + 'ð˜»' => 'z', + 'ð˜¼' => 'A', + 'ð˜½' => 'B', + 'ð˜¾' => 'C', + 'ð˜¿' => 'D', + 'ð™€' => 'E', + 'ð™' => 'F', + 'ð™‚' => 'G', + 'ð™ƒ' => 'H', + 'ð™„' => 'I', + 'ð™…' => 'J', + 'ð™†' => 'K', + 'ð™‡' => 'L', + 'ð™ˆ' => 'M', + 'ð™‰' => 'N', + 'ð™Š' => 'O', + 'ð™‹' => 'P', + 'ð™Œ' => 'Q', + 'ð™' => 'R', + 'ð™Ž' => 'S', + 'ð™' => 'T', + 'ð™' => 'U', + 'ð™‘' => 'V', + 'ð™’' => 'W', + 'ð™“' => 'X', + 'ð™”' => 'Y', + 'ð™•' => 'Z', + 'ð™–' => 'a', + 'ð™—' => 'b', + 'ð™˜' => 'c', + 'ð™™' => 'd', + 'ð™š' => 'e', + 'ð™›' => 'f', + 'ð™œ' => 'g', + 'ð™' => 'h', + 'ð™ž' => 'i', + 'ð™Ÿ' => 'j', + 'ð™ ' => 'k', + 'ð™¡' => 'l', + 'ð™¢' => 'm', + 'ð™£' => 'n', + 'ð™¤' => 'o', + 'ð™¥' => 'p', + 'ð™¦' => 'q', + 'ð™§' => 'r', + 'ð™¨' => 's', + 'ð™©' => 't', + 'ð™ª' => 'u', + 'ð™«' => 'v', + 'ð™¬' => 'w', + 'ð™­' => 'x', + 'ð™®' => 'y', + 'ð™¯' => 'z', + 'ð™°' => 'A', + 'ð™±' => 'B', + 'ð™²' => 'C', + 'ð™³' => 'D', + 'ð™´' => 'E', + 'ð™µ' => 'F', + 'ð™¶' => 'G', + 'ð™·' => 'H', + 'ð™¸' => 'I', + 'ð™¹' => 'J', + 'ð™º' => 'K', + 'ð™»' => 'L', + 'ð™¼' => 'M', + 'ð™½' => 'N', + 'ð™¾' => 'O', + 'ð™¿' => 'P', + 'ðš€' => 'Q', + 'ðš' => 'R', + 'ðš‚' => 'S', + 'ðšƒ' => 'T', + 'ðš„' => 'U', + 'ðš…' => 'V', + 'ðš†' => 'W', + 'ðš‡' => 'X', + 'ðšˆ' => 'Y', + 'ðš‰' => 'Z', + 'ðšŠ' => 'a', + 'ðš‹' => 'b', + 'ðšŒ' => 'c', + 'ðš' => 'd', + 'ðšŽ' => 'e', + 'ðš' => 'f', + 'ðš' => 'g', + 'ðš‘' => 'h', + 'ðš’' => 'i', + 'ðš“' => 'j', + 'ðš”' => 'k', + 'ðš•' => 'l', + 'ðš–' => 'm', + 'ðš—' => 'n', + 'ðš˜' => 'o', + 'ðš™' => 'p', + 'ðšš' => 'q', + 'ðš›' => 'r', + 'ðšœ' => 's', + 'ðš' => 't', + 'ðšž' => 'u', + 'ðšŸ' => 'v', + 'ðš ' => 'w', + 'ðš¡' => 'x', + 'ðš¢' => 'y', + 'ðš£' => 'z', + 'ðš¤' => 'ı', + 'ðš¥' => 'È·', + 'ðš¨' => 'Α', + 'ðš©' => 'Î’', + 'ðšª' => 'Γ', + 'ðš«' => 'Δ', + 'ðš¬' => 'Ε', + 'ðš­' => 'Ζ', + 'ðš®' => 'Η', + 'ðš¯' => 'Θ', + 'ðš°' => 'Ι', + 'ðš±' => 'Κ', + 'ðš²' => 'Λ', + 'ðš³' => 'Îœ', + 'ðš´' => 'Î', + 'ðšµ' => 'Ξ', + 'ðš¶' => 'Ο', + 'ðš·' => 'Π', + 'ðš¸' => 'Ρ', + 'ðš¹' => 'Ï´', + 'ðšº' => 'Σ', + 'ðš»' => 'Τ', + 'ðš¼' => 'Î¥', + 'ðš½' => 'Φ', + 'ðš¾' => 'Χ', + 'ðš¿' => 'Ψ', + 'ð›€' => 'Ω', + 'ð›' => '∇', + 'ð›‚' => 'α', + 'ð›ƒ' => 'β', + 'ð›„' => 'γ', + 'ð›…' => 'δ', + 'ð›†' => 'ε', + 'ð›‡' => 'ζ', + 'ð›ˆ' => 'η', + 'ð›‰' => 'θ', + 'ð›Š' => 'ι', + 'ð›‹' => 'κ', + 'ð›Œ' => 'λ', + 'ð›' => 'μ', + 'ð›Ž' => 'ν', + 'ð›' => 'ξ', + 'ð›' => 'ο', + 'ð›‘' => 'Ï€', + 'ð›’' => 'Ï', + 'ð›“' => 'Ï‚', + 'ð›”' => 'σ', + 'ð›•' => 'Ï„', + 'ð›–' => 'Ï…', + 'ð›—' => 'φ', + 'ð›˜' => 'χ', + 'ð›™' => 'ψ', + 'ð›š' => 'ω', + 'ð››' => '∂', + 'ð›œ' => 'ϵ', + 'ð›' => 'Ï‘', + 'ð›ž' => 'Ï°', + 'ð›Ÿ' => 'Ï•', + 'ð› ' => 'ϱ', + 'ð›¡' => 'Ï–', + 'ð›¢' => 'Α', + 'ð›£' => 'Î’', + 'ð›¤' => 'Γ', + 'ð›¥' => 'Δ', + 'ð›¦' => 'Ε', + 'ð›§' => 'Ζ', + 'ð›¨' => 'Η', + 'ð›©' => 'Θ', + 'ð›ª' => 'Ι', + 'ð›«' => 'Κ', + 'ð›¬' => 'Λ', + 'ð›­' => 'Îœ', + 'ð›®' => 'Î', + 'ð›¯' => 'Ξ', + 'ð›°' => 'Ο', + 'ð›±' => 'Π', + 'ð›²' => 'Ρ', + 'ð›³' => 'Ï´', + 'ð›´' => 'Σ', + 'ð›µ' => 'Τ', + 'ð›¶' => 'Î¥', + 'ð›·' => 'Φ', + 'ð›¸' => 'Χ', + 'ð›¹' => 'Ψ', + 'ð›º' => 'Ω', + 'ð›»' => '∇', + 'ð›¼' => 'α', + 'ð›½' => 'β', + 'ð›¾' => 'γ', + 'ð›¿' => 'δ', + 'ðœ€' => 'ε', + 'ðœ' => 'ζ', + 'ðœ‚' => 'η', + 'ðœƒ' => 'θ', + 'ðœ„' => 'ι', + 'ðœ…' => 'κ', + 'ðœ†' => 'λ', + 'ðœ‡' => 'μ', + 'ðœˆ' => 'ν', + 'ðœ‰' => 'ξ', + 'ðœŠ' => 'ο', + 'ðœ‹' => 'Ï€', + 'ðœŒ' => 'Ï', + 'ðœ' => 'Ï‚', + 'ðœŽ' => 'σ', + 'ðœ' => 'Ï„', + 'ðœ' => 'Ï…', + 'ðœ‘' => 'φ', + 'ðœ’' => 'χ', + 'ðœ“' => 'ψ', + 'ðœ”' => 'ω', + 'ðœ•' => '∂', + 'ðœ–' => 'ϵ', + 'ðœ—' => 'Ï‘', + 'ðœ˜' => 'Ï°', + 'ðœ™' => 'Ï•', + 'ðœš' => 'ϱ', + 'ðœ›' => 'Ï–', + 'ðœœ' => 'Α', + 'ðœ' => 'Î’', + 'ðœž' => 'Γ', + 'ðœŸ' => 'Δ', + 'ðœ ' => 'Ε', + 'ðœ¡' => 'Ζ', + 'ðœ¢' => 'Η', + 'ðœ£' => 'Θ', + 'ðœ¤' => 'Ι', + 'ðœ¥' => 'Κ', + 'ðœ¦' => 'Λ', + 'ðœ§' => 'Îœ', + 'ðœ¨' => 'Î', + 'ðœ©' => 'Ξ', + 'ðœª' => 'Ο', + 'ðœ«' => 'Π', + 'ðœ¬' => 'Ρ', + 'ðœ­' => 'Ï´', + 'ðœ®' => 'Σ', + 'ðœ¯' => 'Τ', + 'ðœ°' => 'Î¥', + 'ðœ±' => 'Φ', + 'ðœ²' => 'Χ', + 'ðœ³' => 'Ψ', + 'ðœ´' => 'Ω', + 'ðœµ' => '∇', + 'ðœ¶' => 'α', + 'ðœ·' => 'β', + 'ðœ¸' => 'γ', + 'ðœ¹' => 'δ', + 'ðœº' => 'ε', + 'ðœ»' => 'ζ', + 'ðœ¼' => 'η', + 'ðœ½' => 'θ', + 'ðœ¾' => 'ι', + 'ðœ¿' => 'κ', + 'ð€' => 'λ', + 'ð' => 'μ', + 'ð‚' => 'ν', + 'ðƒ' => 'ξ', + 'ð„' => 'ο', + 'ð…' => 'Ï€', + 'ð†' => 'Ï', + 'ð‡' => 'Ï‚', + 'ðˆ' => 'σ', + 'ð‰' => 'Ï„', + 'ðŠ' => 'Ï…', + 'ð‹' => 'φ', + 'ðŒ' => 'χ', + 'ð' => 'ψ', + 'ðŽ' => 'ω', + 'ð' => '∂', + 'ð' => 'ϵ', + 'ð‘' => 'Ï‘', + 'ð’' => 'Ï°', + 'ð“' => 'Ï•', + 'ð”' => 'ϱ', + 'ð•' => 'Ï–', + 'ð–' => 'Α', + 'ð—' => 'Î’', + 'ð˜' => 'Γ', + 'ð™' => 'Δ', + 'ðš' => 'Ε', + 'ð›' => 'Ζ', + 'ðœ' => 'Η', + 'ð' => 'Θ', + 'ðž' => 'Ι', + 'ðŸ' => 'Κ', + 'ð ' => 'Λ', + 'ð¡' => 'Îœ', + 'ð¢' => 'Î', + 'ð£' => 'Ξ', + 'ð¤' => 'Ο', + 'ð¥' => 'Π', + 'ð¦' => 'Ρ', + 'ð§' => 'Ï´', + 'ð¨' => 'Σ', + 'ð©' => 'Τ', + 'ðª' => 'Î¥', + 'ð«' => 'Φ', + 'ð¬' => 'Χ', + 'ð­' => 'Ψ', + 'ð®' => 'Ω', + 'ð¯' => '∇', + 'ð°' => 'α', + 'ð±' => 'β', + 'ð²' => 'γ', + 'ð³' => 'δ', + 'ð´' => 'ε', + 'ðµ' => 'ζ', + 'ð¶' => 'η', + 'ð·' => 'θ', + 'ð¸' => 'ι', + 'ð¹' => 'κ', + 'ðº' => 'λ', + 'ð»' => 'μ', + 'ð¼' => 'ν', + 'ð½' => 'ξ', + 'ð¾' => 'ο', + 'ð¿' => 'Ï€', + 'ðž€' => 'Ï', + 'ðž' => 'Ï‚', + 'ðž‚' => 'σ', + 'ðžƒ' => 'Ï„', + 'ðž„' => 'Ï…', + 'ðž…' => 'φ', + 'ðž†' => 'χ', + 'ðž‡' => 'ψ', + 'ðžˆ' => 'ω', + 'ðž‰' => '∂', + 'ðžŠ' => 'ϵ', + 'ðž‹' => 'Ï‘', + 'ðžŒ' => 'Ï°', + 'ðž' => 'Ï•', + 'ðžŽ' => 'ϱ', + 'ðž' => 'Ï–', + 'ðž' => 'Α', + 'ðž‘' => 'Î’', + 'ðž’' => 'Γ', + 'ðž“' => 'Δ', + 'ðž”' => 'Ε', + 'ðž•' => 'Ζ', + 'ðž–' => 'Η', + 'ðž—' => 'Θ', + 'ðž˜' => 'Ι', + 'ðž™' => 'Κ', + 'ðžš' => 'Λ', + 'ðž›' => 'Îœ', + 'ðžœ' => 'Î', + 'ðž' => 'Ξ', + 'ðžž' => 'Ο', + 'ðžŸ' => 'Π', + 'ðž ' => 'Ρ', + 'ðž¡' => 'Ï´', + 'ðž¢' => 'Σ', + 'ðž£' => 'Τ', + 'ðž¤' => 'Î¥', + 'ðž¥' => 'Φ', + 'ðž¦' => 'Χ', + 'ðž§' => 'Ψ', + 'ðž¨' => 'Ω', + 'ðž©' => '∇', + 'ðžª' => 'α', + 'ðž«' => 'β', + 'ðž¬' => 'γ', + 'ðž­' => 'δ', + 'ðž®' => 'ε', + 'ðž¯' => 'ζ', + 'ðž°' => 'η', + 'ðž±' => 'θ', + 'ðž²' => 'ι', + 'ðž³' => 'κ', + 'ðž´' => 'λ', + 'ðžµ' => 'μ', + 'ðž¶' => 'ν', + 'ðž·' => 'ξ', + 'ðž¸' => 'ο', + 'ðž¹' => 'Ï€', + 'ðžº' => 'Ï', + 'ðž»' => 'Ï‚', + 'ðž¼' => 'σ', + 'ðž½' => 'Ï„', + 'ðž¾' => 'Ï…', + 'ðž¿' => 'φ', + 'ðŸ€' => 'χ', + 'ðŸ' => 'ψ', + 'ðŸ‚' => 'ω', + 'ðŸƒ' => '∂', + 'ðŸ„' => 'ϵ', + 'ðŸ…' => 'Ï‘', + 'ðŸ†' => 'Ï°', + 'ðŸ‡' => 'Ï•', + 'ðŸˆ' => 'ϱ', + 'ðŸ‰' => 'Ï–', + 'ðŸŠ' => 'Ïœ', + 'ðŸ‹' => 'Ï', + 'ðŸŽ' => '0', + 'ðŸ' => '1', + 'ðŸ' => '2', + 'ðŸ‘' => '3', + 'ðŸ’' => '4', + 'ðŸ“' => '5', + 'ðŸ”' => '6', + 'ðŸ•' => '7', + 'ðŸ–' => '8', + 'ðŸ—' => '9', + 'ðŸ˜' => '0', + 'ðŸ™' => '1', + 'ðŸš' => '2', + 'ðŸ›' => '3', + 'ðŸœ' => '4', + 'ðŸ' => '5', + 'ðŸž' => '6', + 'ðŸŸ' => '7', + 'ðŸ ' => '8', + 'ðŸ¡' => '9', + 'ðŸ¢' => '0', + 'ðŸ£' => '1', + 'ðŸ¤' => '2', + 'ðŸ¥' => '3', + 'ðŸ¦' => '4', + 'ðŸ§' => '5', + 'ðŸ¨' => '6', + 'ðŸ©' => '7', + 'ðŸª' => '8', + 'ðŸ«' => '9', + 'ðŸ¬' => '0', + 'ðŸ­' => '1', + 'ðŸ®' => '2', + 'ðŸ¯' => '3', + 'ðŸ°' => '4', + 'ðŸ±' => '5', + 'ðŸ²' => '6', + 'ðŸ³' => '7', + 'ðŸ´' => '8', + 'ðŸµ' => '9', + 'ðŸ¶' => '0', + 'ðŸ·' => '1', + 'ðŸ¸' => '2', + 'ðŸ¹' => '3', + 'ðŸº' => '4', + 'ðŸ»' => '5', + 'ðŸ¼' => '6', + 'ðŸ½' => '7', + 'ðŸ¾' => '8', + 'ðŸ¿' => '9', + '𞸀' => 'ا', + 'ðž¸' => 'ب', + '𞸂' => 'ج', + '𞸃' => 'د', + '𞸅' => 'Ùˆ', + '𞸆' => 'ز', + '𞸇' => 'Ø­', + '𞸈' => 'Ø·', + '𞸉' => 'ÙŠ', + '𞸊' => 'Ùƒ', + '𞸋' => 'Ù„', + '𞸌' => 'Ù…', + 'ðž¸' => 'Ù†', + '𞸎' => 'س', + 'ðž¸' => 'ع', + 'ðž¸' => 'Ù', + '𞸑' => 'ص', + '𞸒' => 'Ù‚', + '𞸓' => 'ر', + '𞸔' => 'Ø´', + '𞸕' => 'ت', + '𞸖' => 'Ø«', + '𞸗' => 'Ø®', + '𞸘' => 'Ø°', + '𞸙' => 'ض', + '𞸚' => 'ظ', + '𞸛' => 'غ', + '𞸜' => 'Ù®', + 'ðž¸' => 'Úº', + '𞸞' => 'Ú¡', + '𞸟' => 'Ù¯', + '𞸡' => 'ب', + '𞸢' => 'ج', + '𞸤' => 'Ù‡', + '𞸧' => 'Ø­', + '𞸩' => 'ÙŠ', + '𞸪' => 'Ùƒ', + '𞸫' => 'Ù„', + '𞸬' => 'Ù…', + '𞸭' => 'Ù†', + '𞸮' => 'س', + '𞸯' => 'ع', + '𞸰' => 'Ù', + '𞸱' => 'ص', + '𞸲' => 'Ù‚', + '𞸴' => 'Ø´', + '𞸵' => 'ت', + '𞸶' => 'Ø«', + '𞸷' => 'Ø®', + '𞸹' => 'ض', + '𞸻' => 'غ', + '𞹂' => 'ج', + '𞹇' => 'Ø­', + '𞹉' => 'ÙŠ', + '𞹋' => 'Ù„', + 'ðž¹' => 'Ù†', + '𞹎' => 'س', + 'ðž¹' => 'ع', + '𞹑' => 'ص', + 'ðž¹’' => 'Ù‚', + 'ðž¹”' => 'Ø´', + 'ðž¹—' => 'Ø®', + 'ðž¹™' => 'ض', + 'ðž¹›' => 'غ', + 'ðž¹' => 'Úº', + '𞹟' => 'Ù¯', + '𞹡' => 'ب', + 'ðž¹¢' => 'ج', + '𞹤' => 'Ù‡', + '𞹧' => 'Ø­', + '𞹨' => 'Ø·', + '𞹩' => 'ÙŠ', + '𞹪' => 'Ùƒ', + '𞹬' => 'Ù…', + 'ðž¹­' => 'Ù†', + 'ðž¹®' => 'س', + '𞹯' => 'ع', + 'ðž¹°' => 'Ù', + 'ðž¹±' => 'ص', + 'ðž¹²' => 'Ù‚', + 'ðž¹´' => 'Ø´', + 'ðž¹µ' => 'ت', + '𞹶' => 'Ø«', + 'ðž¹·' => 'Ø®', + 'ðž¹¹' => 'ض', + '𞹺' => 'ظ', + 'ðž¹»' => 'غ', + 'ðž¹¼' => 'Ù®', + 'ðž¹¾' => 'Ú¡', + '𞺀' => 'ا', + 'ðžº' => 'ب', + '𞺂' => 'ج', + '𞺃' => 'د', + '𞺄' => 'Ù‡', + '𞺅' => 'Ùˆ', + '𞺆' => 'ز', + '𞺇' => 'Ø­', + '𞺈' => 'Ø·', + '𞺉' => 'ÙŠ', + '𞺋' => 'Ù„', + '𞺌' => 'Ù…', + 'ðžº' => 'Ù†', + '𞺎' => 'س', + 'ðžº' => 'ع', + 'ðžº' => 'Ù', + '𞺑' => 'ص', + '𞺒' => 'Ù‚', + '𞺓' => 'ر', + '𞺔' => 'Ø´', + '𞺕' => 'ت', + '𞺖' => 'Ø«', + '𞺗' => 'Ø®', + '𞺘' => 'Ø°', + '𞺙' => 'ض', + '𞺚' => 'ظ', + '𞺛' => 'غ', + '𞺡' => 'ب', + '𞺢' => 'ج', + '𞺣' => 'د', + '𞺥' => 'Ùˆ', + '𞺦' => 'ز', + '𞺧' => 'Ø­', + '𞺨' => 'Ø·', + '𞺩' => 'ÙŠ', + '𞺫' => 'Ù„', + '𞺬' => 'Ù…', + '𞺭' => 'Ù†', + '𞺮' => 'س', + '𞺯' => 'ع', + '𞺰' => 'Ù', + '𞺱' => 'ص', + '𞺲' => 'Ù‚', + '𞺳' => 'ر', + '𞺴' => 'Ø´', + '𞺵' => 'ت', + '𞺶' => 'Ø«', + '𞺷' => 'Ø®', + '𞺸' => 'Ø°', + '𞺹' => 'ض', + '𞺺' => 'ظ', + '𞺻' => 'غ', + '🄀' => '0.', + 'ðŸ„' => '0,', + '🄂' => '1,', + '🄃' => '2,', + '🄄' => '3,', + '🄅' => '4,', + '🄆' => '5,', + '🄇' => '6,', + '🄈' => '7,', + '🄉' => '8,', + '🄊' => '9,', + 'ðŸ„' => '(A)', + '🄑' => '(B)', + '🄒' => '(C)', + '🄓' => '(D)', + '🄔' => '(E)', + '🄕' => '(F)', + '🄖' => '(G)', + '🄗' => '(H)', + '🄘' => '(I)', + '🄙' => '(J)', + '🄚' => '(K)', + '🄛' => '(L)', + '🄜' => '(M)', + 'ðŸ„' => '(N)', + '🄞' => '(O)', + '🄟' => '(P)', + '🄠' => '(Q)', + '🄡' => '(R)', + '🄢' => '(S)', + '🄣' => '(T)', + '🄤' => '(U)', + '🄥' => '(V)', + '🄦' => '(W)', + '🄧' => '(X)', + '🄨' => '(Y)', + '🄩' => '(Z)', + '🄪' => '〔S〕', + '🄫' => '(C)', + '🄬' => '(R)', + '🄭' => '(CD)', + '🄮' => '(WZ)', + '🄰' => 'A', + '🄱' => 'B', + '🄲' => 'C', + '🄳' => 'D', + '🄴' => 'E', + '🄵' => 'F', + '🄶' => 'G', + '🄷' => 'H', + '🄸' => 'I', + '🄹' => 'J', + '🄺' => 'K', + '🄻' => 'L', + '🄼' => 'M', + '🄽' => 'N', + '🄾' => 'O', + '🄿' => 'P', + '🅀' => 'Q', + 'ðŸ…' => 'R', + '🅂' => 'S', + '🅃' => 'T', + '🅄' => 'U', + '🅅' => 'V', + '🅆' => 'W', + '🅇' => 'X', + '🅈' => 'Y', + '🅉' => 'Z', + '🅊' => 'HV', + '🅋' => 'MV', + '🅌' => 'SD', + 'ðŸ…' => 'SS', + '🅎' => 'PPV', + 'ðŸ…' => 'WC', + 'ðŸ†' => 'DJ', + '🈀' => 'ã»ã‹', + 'ðŸˆ' => 'ココ', + '🈂' => 'サ', + 'ðŸˆ' => '手', + '🈑' => 'å­—', + '🈒' => 'åŒ', + '🈓' => 'デ', + '🈔' => '二', + '🈕' => '多', + '🈖' => '解', + '🈗' => '天', + '🈘' => '交', + '🈙' => '映', + '🈚' => 'ç„¡', + '🈛' => 'æ–™', + '🈜' => 'å‰', + 'ðŸˆ' => '後', + '🈞' => 'å†', + '🈟' => 'æ–°', + '🈠' => 'åˆ', + '🈡' => '終', + '🈢' => '生', + '🈣' => '販', + '🈤' => '声', + '🈥' => 'å¹', + '🈦' => 'æ¼”', + '🈧' => '投', + '🈨' => 'æ•', + '🈩' => '一', + '🈪' => '三', + '🈫' => 'éŠ', + '🈬' => 'å·¦', + '🈭' => '中', + '🈮' => 'å³', + '🈯' => '指', + '🈰' => 'èµ°', + '🈱' => '打', + '🈲' => 'ç¦', + '🈳' => '空', + '🈴' => 'åˆ', + '🈵' => '満', + '🈶' => '有', + '🈷' => '月', + '🈸' => '申', + '🈹' => '割', + '🈺' => 'å–¶', + '🈻' => 'é…', + '🉀' => '〔本〕', + 'ðŸ‰' => '〔三〕', + '🉂' => '〔二〕', + '🉃' => '〔安〕', + '🉄' => '〔点〕', + '🉅' => '〔打〕', + '🉆' => '〔盗〕', + '🉇' => '〔å‹ã€•', + '🉈' => '〔敗〕', + 'ðŸ‰' => '(å¾—)', + '🉑' => '(å¯)', + '🯰' => '0', + '🯱' => '1', + '🯲' => '2', + '🯳' => '3', + '🯴' => '4', + '🯵' => '5', + '🯶' => '6', + '🯷' => '7', + '🯸' => '8', + '🯹' => '9', + '丽' => '丽', + 'ð¯ ' => '丸', + '乁' => 'ä¹', + '𠄢' => 'ð „¢', + '你' => 'ä½ ', + '侮' => 'ä¾®', + '侻' => 'ä¾»', + '倂' => '倂', + '偺' => 'åº', + '備' => 'å‚™', + '僧' => '僧', + '像' => 'åƒ', + '㒞' => 'ã’ž', + 'ð¯ ' => '𠘺', + '免' => 'å…', + 'ð¯ ' => 'å…”', + 'ð¯ ' => 'å…¤', + '具' => 'å…·', + '𠔜' => '𠔜', + '㒹' => 'ã’¹', + '內' => 'å…§', + '再' => 'å†', + '𠕋' => 'ð •‹', + '冗' => '冗', + '冤' => '冤', + '仌' => '仌', + '冬' => '冬', + '况' => '况', + '𩇟' => '𩇟', + 'ð¯ ' => '凵', + '刃' => '刃', + '㓟' => 'ã“Ÿ', + '刻' => '刻', + '剆' => '剆', + '割' => '割', + '剷' => '剷', + '㔕' => '㔕', + '勇' => '勇', + '勉' => '勉', + '勤' => '勤', + '勺' => '勺', + '包' => '包', + '匆' => '匆', + '北' => '北', + '卉' => 'å‰', + '卑' => 'å‘', + '博' => 'åš', + '即' => 'å³', + '卽' => 'å½', + '卿' => 'å¿', + '卿' => 'å¿', + '卿' => 'å¿', + '𠨬' => '𠨬', + '灰' => 'ç°', + '及' => 'åŠ', + '叟' => 'åŸ', + '𠭣' => 'ð ­£', + '叫' => 'å«', + '叱' => 'å±', + '吆' => 'å†', + '咞' => 'å’ž', + '吸' => 'å¸', + '呈' => '呈', + '周' => '周', + '咢' => 'å’¢', + 'ð¯¡' => '哶', + '唐' => 'å”', + '啓' => 'å•“', + '啣' => 'å•£', + '善' => 'å–„', + '善' => 'å–„', + '喙' => 'å–™', + '喫' => 'å–«', + '喳' => 'å–³', + '嗂' => 'å—‚', + '圖' => '圖', + '嘆' => '嘆', + 'ð¯¡' => '圗', + '噑' => '噑', + 'ð¯¡' => 'å™´', + 'ð¯¡' => '切', + '壮' => '壮', + '城' => '城', + '埴' => '埴', + '堍' => 'å ', + '型' => 'åž‹', + '堲' => 'å ²', + '報' => 'å ±', + '墬' => '墬', + '𡓤' => '𡓤', + '売' => '売', + '壷' => '壷', + '夆' => '夆', + 'ð¯¡' => '多', + '夢' => '夢', + '奢' => '奢', + '𡚨' => '𡚨', + '𡛪' => '𡛪', + '姬' => '姬', + '娛' => '娛', + '娧' => '娧', + '姘' => '姘', + '婦' => '婦', + '㛮' => 'ã›®', + '㛼' => '㛼', + '嬈' => '嬈', + '嬾' => '嬾', + '嬾' => '嬾', + '𡧈' => '𡧈', + '寃' => '寃', + '寘' => '寘', + '寧' => '寧', + '寳' => '寳', + '𡬘' => '𡬘', + '寿' => '寿', + '将' => 'å°†', + '当' => '当', + '尢' => 'å°¢', + '㞁' => 'ãž', + '屠' => 'å± ', + '屮' => 'å±®', + '峀' => 'å³€', + '岍' => 'å²', + '𡷤' => 'ð¡·¤', + '嵃' => '嵃', + '𡷦' => 'ð¡·¦', + '嵮' => 'åµ®', + '嵫' => '嵫', + '嵼' => 'åµ¼', + 'ð¯¢' => 'å·¡', + '巢' => 'å·¢', + '㠯' => 'ã ¯', + '巽' => 'å·½', + '帨' => '帨', + '帽' => '帽', + '幩' => '幩', + '㡢' => 'ã¡¢', + '𢆃' => '𢆃', + '㡼' => '㡼', + '庰' => '庰', + '庳' => '庳', + 'ð¯¢' => '庶', + '廊' => '廊', + 'ð¯¢' => '𪎒', + 'ð¯¢' => '廾', + '𢌱' => '𢌱', + '𢌱' => '𢌱', + '舁' => 'èˆ', + '弢' => 'å¼¢', + '弢' => 'å¼¢', + '㣇' => '㣇', + '𣊸' => '𣊸', + '𦇚' => '𦇚', + '形' => 'å½¢', + '彫' => '彫', + '㣣' => '㣣', + '徚' => '徚', + 'ð¯¢' => 'å¿', + '志' => 'å¿—', + '忹' => '忹', + '悁' => 'æ‚', + '㤺' => '㤺', + '㤜' => '㤜', + '悔' => 'æ‚”', + '𢛔' => '𢛔', + '惇' => '惇', + '慈' => 'æ…ˆ', + '慌' => 'æ…Œ', + '慎' => 'æ…Ž', + '慌' => 'æ…Œ', + '慺' => 'æ…º', + '憎' => '憎', + '憲' => '憲', + '憤' => '憤', + '憯' => '憯', + '懞' => '懞', + '懲' => '懲', + '懶' => '懶', + '成' => 'æˆ', + '戛' => '戛', + '扝' => 'æ‰', + '抱' => '抱', + '拔' => 'æ‹”', + '捐' => 'æ', + '𢬌' => '𢬌', + '挽' => '挽', + '拼' => '拼', + '捨' => 'æ¨', + '掃' => '掃', + '揤' => 'æ¤', + '𢯱' => '𢯱', + '搢' => 'æ¢', + '揅' => 'æ…', + 'ð¯£' => '掩', + '㨮' => '㨮', + '摩' => 'æ‘©', + '摾' => '摾', + '撝' => 'æ’', + '摷' => 'æ‘·', + '㩬' => '㩬', + '敏' => 'æ•', + '敬' => '敬', + '𣀊' => '𣀊', + '旣' => 'æ—£', + '書' => '書', + 'ð¯£' => '晉', + '㬙' => '㬙', + 'ð¯£' => 'æš‘', + 'ð¯£' => '㬈', + '㫤' => '㫤', + '冒' => '冒', + '冕' => '冕', + '最' => '最', + '暜' => 'æšœ', + '肭' => 'è‚­', + '䏙' => 'ä™', + '朗' => '朗', + '望' => '望', + '朡' => '朡', + '杞' => 'æž', + '杓' => 'æ“', + 'ð¯£' => 'ð£ƒ', + '㭉' => 'ã­‰', + '柺' => '柺', + '枅' => 'æž…', + '桒' => 'æ¡’', + '梅' => '梅', + '𣑭' => '𣑭', + '梎' => '梎', + '栟' => 'æ Ÿ', + '椔' => '椔', + '㮝' => 'ã®', + '楂' => '楂', + '榣' => '榣', + '槪' => '槪', + '檨' => '檨', + '𣚣' => '𣚣', + '櫛' => 'æ«›', + '㰘' => 'ã°˜', + '次' => '次', + '𣢧' => '𣢧', + '歔' => 'æ­”', + '㱎' => '㱎', + '歲' => 'æ­²', + '殟' => '殟', + '殺' => '殺', + '殻' => 'æ®»', + '𣪍' => 'ð£ª', + '𡴋' => 'ð¡´‹', + '𣫺' => '𣫺', + '汎' => '汎', + '𣲼' => '𣲼', + '沿' => '沿', + '泍' => 'æ³', + '汧' => '汧', + '洖' => 'æ´–', + '派' => 'æ´¾', + 'ð¯¤' => 'æµ·', + '流' => 'æµ', + '浩' => '浩', + '浸' => '浸', + '涅' => '涅', + '𣴞' => '𣴞', + '洴' => 'æ´´', + '港' => '港', + '湮' => 'æ¹®', + '㴳' => 'ã´³', + '滋' => '滋', + '滇' => '滇', + 'ð¯¤' => '𣻑', + '淹' => 'æ·¹', + 'ð¯¤' => 'æ½®', + 'ð¯¤' => '𣽞', + '𣾎' => '𣾎', + '濆' => '濆', + '瀹' => '瀹', + '瀞' => '瀞', + '瀛' => '瀛', + '㶖' => '㶖', + '灊' => 'çŠ', + '災' => 'ç½', + '灷' => 'ç·', + '炭' => 'ç‚­', + '𠔥' => '𠔥', + '煅' => 'ç……', + 'ð¯¤' => '𤉣', + '熜' => '熜', + '𤎫' => '𤎫', + '爨' => '爨', + '爵' => '爵', + '牐' => 'ç‰', + '𤘈' => '𤘈', + '犀' => '犀', + '犕' => '犕', + '𤜵' => '𤜵', + '𤠔' => '𤠔', + '獺' => 'çº', + '王' => '王', + '㺬' => '㺬', + '玥' => '玥', + '㺸' => '㺸', + '㺸' => '㺸', + '瑇' => '瑇', + '瑜' => 'ç‘œ', + '瑱' => '瑱', + '璅' => 'ç’…', + '瓊' => 'ç“Š', + '㼛' => 'ã¼›', + '甤' => '甤', + '𤰶' => '𤰶', + '甾' => '甾', + '𤲒' => '𤲒', + '異' => 'ç•°', + '𢆟' => '𢆟', + '瘐' => 'ç˜', + '𤾡' => '𤾡', + '𤾸' => '𤾸', + '𥁄' => 'ð¥„', + '㿼' => '㿼', + '䀈' => '䀈', + '直' => 'ç›´', + 'ð¯¥' => '𥃳', + '𥃲' => '𥃲', + '𥄙' => '𥄙', + '𥄳' => '𥄳', + '眞' => '眞', + '真' => '真', + '真' => '真', + '睊' => 'çŠ', + '䀹' => '䀹', + '瞋' => 'çž‹', + '䁆' => 'ä†', + '䂖' => 'ä‚–', + 'ð¯¥' => 'ð¥', + '硎' => 'ç¡Ž', + 'ð¯¥' => '碌', + 'ð¯¥' => '磌', + '䃣' => '䃣', + '𥘦' => '𥘦', + '祖' => '祖', + '𥚚' => '𥚚', + '𥛅' => '𥛅', + '福' => 'ç¦', + '秫' => '秫', + '䄯' => '䄯', + '穀' => 'ç©€', + '穊' => 'ç©Š', + '穏' => 'ç©', + '𥥼' => '𥥼', + 'ð¯¥' => '𥪧', + '𥪧' => '𥪧', + '竮' => 'ç«®', + '䈂' => '䈂', + '𥮫' => '𥮫', + '篆' => '篆', + '築' => '築', + '䈧' => '䈧', + '𥲀' => '𥲀', + '糒' => 'ç³’', + '䊠' => '䊠', + '糨' => '糨', + '糣' => 'ç³£', + '紀' => 'ç´€', + '𥾆' => '𥾆', + '絣' => 'çµ£', + '䌁' => 'äŒ', + '緇' => 'ç·‡', + '縂' => '縂', + '繅' => 'ç¹…', + '䌴' => '䌴', + '𦈨' => '𦈨', + '𦉇' => '𦉇', + '䍙' => 'ä™', + '𦋙' => '𦋙', + '罺' => '罺', + '𦌾' => '𦌾', + '羕' => '羕', + '翺' => '翺', + '者' => '者', + '𦓚' => '𦓚', + '𦔣' => '𦔣', + '聠' => 'è ', + '𦖨' => '𦖨', + '聰' => 'è°', + '𣍟' => 'ð£Ÿ', + 'ð¯¦' => 'ä•', + '育' => '育', + '脃' => '脃', + '䐋' => 'ä‹', + '脾' => '脾', + '媵' => '媵', + '𦞧' => '𦞧', + '𦞵' => '𦞵', + '𣎓' => '𣎓', + '𣎜' => '𣎜', + '舁' => 'èˆ', + '舄' => '舄', + 'ð¯¦' => '辞', + '䑫' => 'ä‘«', + 'ð¯¦' => '芑', + 'ð¯¦' => '芋', + '芝' => 'èŠ', + '劳' => '劳', + '花' => '花', + '芳' => '芳', + '芽' => '芽', + '苦' => '苦', + '𦬼' => '𦬼', + '若' => 'è‹¥', + '茝' => 'èŒ', + '荣' => 'è£', + '莭' => '莭', + '茣' => '茣', + 'ð¯¦' => '莽', + '菧' => 'è§', + '著' => 'è‘—', + '荓' => 'è“', + '菊' => 'èŠ', + '菌' => 'èŒ', + '菜' => 'èœ', + '𦰶' => '𦰶', + '𦵫' => '𦵫', + '𦳕' => '𦳕', + '䔫' => '䔫', + '蓱' => '蓱', + '蓳' => '蓳', + '蔖' => 'è”–', + '𧏊' => 'ð§Š', + '蕤' => '蕤', + '𦼬' => '𦼬', + '䕝' => 'ä•', + '䕡' => 'ä•¡', + '𦾱' => '𦾱', + '𧃒' => '𧃒', + '䕫' => 'ä•«', + '虐' => 'è™', + '虜' => '虜', + '虧' => '虧', + '虩' => '虩', + '蚩' => 'èš©', + '蚈' => '蚈', + '蜎' => '蜎', + '蛢' => '蛢', + '蝹' => 'è¹', + '蜨' => '蜨', + '蝫' => 'è«', + '螆' => '螆', + '䗗' => 'ä——', + '蟡' => '蟡', + 'ð¯§' => 'è ', + '䗹' => 'ä—¹', + '衠' => 'è¡ ', + '衣' => 'è¡£', + '𧙧' => '𧙧', + '裗' => '裗', + '裞' => '裞', + '䘵' => '䘵', + '裺' => '裺', + '㒻' => 'ã’»', + '𧢮' => '𧢮', + '𧥦' => '𧥦', + 'ð¯§' => 'äš¾', + '䛇' => '䛇', + 'ð¯§' => '誠', + 'ð¯§' => 'è«­', + '變' => '變', + '豕' => '豕', + '𧲨' => '𧲨', + '貫' => '貫', + '賁' => 'è³', + '贛' => 'è´›', + '起' => 'èµ·', + '𧼯' => '𧼯', + '𠠄' => 'ð  „', + '跋' => 'è·‹', + '趼' => '趼', + '跰' => 'è·°', + 'ð¯§' => '𠣞', + '軔' => 'è»”', + '輸' => '輸', + '𨗒' => '𨗒', + '𨗭' => '𨗭', + '邔' => 'é‚”', + '郱' => '郱', + '鄑' => 'é„‘', + '𨜮' => '𨜮', + '鄛' => 'é„›', + '鈸' => '鈸', + '鋗' => 'é‹—', + '鋘' => '鋘', + '鉼' => '鉼', + '鏹' => 'é¹', + '鐕' => 'é•', + '𨯺' => '𨯺', + '開' => 'é–‹', + '䦕' => '䦕', + '閷' => 'é–·', + '𨵷' => '𨵷', + '䧦' => '䧦', + '雃' => '雃', + '嶲' => '嶲', + '霣' => '霣', + '𩅅' => 'ð©……', + '𩈚' => '𩈚', + '䩮' => 'ä©®', + '䩶' => '䩶', + '韠' => '韠', + '𩐊' => 'ð©Š', + '䪲' => '䪲', + '𩒖' => 'ð©’–', + '頋' => 'é ‹', + '頋' => 'é ‹', + '頩' => 'é ©', + 'ð¯¨' => 'ð©–¶', + '飢' => '飢', + '䬳' => '䬳', + '餩' => '餩', + '馧' => '馧', + '駂' => '駂', + '駾' => '駾', + '䯎' => '䯎', + '𩬰' => '𩬰', + '鬒' => '鬒', + '鱀' => 'é±€', + '鳽' => 'é³½', + 'ð¯¨' => '䳎', + '䳭' => 'ä³­', + 'ð¯¨' => '鵧', + 'ð¯¨' => '𪃎', + '䳸' => '䳸', + '𪄅' => '𪄅', + '𪈎' => '𪈎', + '𪊑' => '𪊑', + '麻' => '麻', + '䵖' => 'äµ–', + '黹' => '黹', + '黾' => '黾', + '鼅' => 'é¼…', + '鼏' => 'é¼', + '鼖' => 'é¼–', + '鼻' => 'é¼»', + 'ð¯¨' => '𪘀', + 'Æ' => 'AE', + 'Ã' => 'D', + 'Ø' => 'O', + 'Þ' => 'TH', + 'ß' => 'ss', + 'æ' => 'ae', + 'ð' => 'd', + 'ø' => 'o', + 'þ' => 'th', + 'Ä' => 'D', + 'Ä‘' => 'd', + 'Ħ' => 'H', + 'ħ' => 'h', + 'ı' => 'i', + 'ĸ' => 'q', + 'Å' => 'L', + 'Å‚' => 'l', + 'ÅŠ' => 'N', + 'Å‹' => 'n', + 'Å’' => 'OE', + 'Å“' => 'oe', + 'Ŧ' => 'T', + 'ŧ' => 't', + 'Æ€' => 'b', + 'Æ' => 'B', + 'Æ‚' => 'B', + 'ƃ' => 'b', + 'Ƈ' => 'C', + 'ƈ' => 'c', + 'Ɖ' => 'D', + 'ÆŠ' => 'D', + 'Æ‹' => 'D', + 'ÆŒ' => 'd', + 'Æ' => 'E', + 'Æ‘' => 'F', + 'Æ’' => 'f', + 'Æ“' => 'G', + 'Æ•' => 'hv', + 'Æ–' => 'I', + 'Æ—' => 'I', + 'Ƙ' => 'K', + 'Æ™' => 'k', + 'Æš' => 'l', + 'Æ' => 'N', + 'Æž' => 'n', + 'Æ¢' => 'OI', + 'Æ£' => 'oi', + 'Ƥ' => 'P', + 'Æ¥' => 'p', + 'Æ«' => 't', + 'Ƭ' => 'T', + 'Æ­' => 't', + 'Æ®' => 'T', + 'Ʋ' => 'V', + 'Ƴ' => 'Y', + 'Æ´' => 'y', + 'Ƶ' => 'Z', + 'ƶ' => 'z', + 'Ǥ' => 'G', + 'Ç¥' => 'g', + 'È¡' => 'd', + 'Ȥ' => 'Z', + 'È¥' => 'z', + 'È´' => 'l', + 'ȵ' => 'n', + 'ȶ' => 't', + 'È·' => 'j', + 'ȸ' => 'db', + 'ȹ' => 'qp', + 'Ⱥ' => 'A', + 'È»' => 'C', + 'ȼ' => 'c', + 'Ƚ' => 'L', + 'Ⱦ' => 'T', + 'È¿' => 's', + 'É€' => 'z', + 'Ƀ' => 'B', + 'É„' => 'U', + 'Ɇ' => 'E', + 'ɇ' => 'e', + 'Ɉ' => 'J', + 'ɉ' => 'j', + 'ÉŒ' => 'R', + 'É' => 'r', + 'ÉŽ' => 'Y', + 'É' => 'y', + 'É“' => 'b', + 'É•' => 'c', + 'É–' => 'd', + 'É—' => 'd', + 'É›' => 'e', + 'ÉŸ' => 'j', + 'É ' => 'g', + 'É¡' => 'g', + 'É¢' => 'G', + 'ɦ' => 'h', + 'ɧ' => 'h', + 'ɨ' => 'i', + 'ɪ' => 'I', + 'É«' => 'l', + 'ɬ' => 'l', + 'É­' => 'l', + 'ɱ' => 'm', + 'ɲ' => 'n', + 'ɳ' => 'n', + 'É´' => 'N', + 'ɶ' => 'OE', + 'ɼ' => 'r', + 'ɽ' => 'r', + 'ɾ' => 'r', + 'Ê€' => 'R', + 'Ê‚' => 's', + 'ʈ' => 't', + 'ʉ' => 'u', + 'Ê‹' => 'v', + 'Ê' => 'Y', + 'Ê' => 'z', + 'Ê‘' => 'z', + 'Ê™' => 'B', + 'Ê›' => 'G', + 'Êœ' => 'H', + 'Ê' => 'j', + 'ÊŸ' => 'L', + 'Ê ' => 'q', + 'Ê£' => 'dz', + 'Ê¥' => 'dz', + 'ʦ' => 'ts', + 'ʪ' => 'ls', + 'Ê«' => 'lz', + 'á´€' => 'A', + 'á´' => 'AE', + 'á´ƒ' => 'B', + 'á´„' => 'C', + 'á´…' => 'D', + 'á´†' => 'D', + 'á´‡' => 'E', + 'á´Š' => 'J', + 'á´‹' => 'K', + 'á´Œ' => 'L', + 'á´' => 'M', + 'á´' => 'O', + 'á´˜' => 'P', + 'á´›' => 'T', + 'á´œ' => 'U', + 'á´ ' => 'V', + 'á´¡' => 'W', + 'á´¢' => 'Z', + 'ᵫ' => 'ue', + 'ᵬ' => 'b', + 'áµ­' => 'd', + 'áµ®' => 'f', + 'ᵯ' => 'm', + 'áµ°' => 'n', + 'áµ±' => 'p', + 'áµ²' => 'r', + 'áµ³' => 'r', + 'áµ´' => 's', + 'áµµ' => 't', + 'ᵶ' => 'z', + 'ᵺ' => 'th', + 'áµ»' => 'I', + 'áµ½' => 'p', + 'áµ¾' => 'U', + 'ᶀ' => 'b', + 'á¶' => 'd', + 'ᶂ' => 'f', + 'ᶃ' => 'g', + 'ᶄ' => 'k', + 'ᶅ' => 'l', + 'ᶆ' => 'm', + 'ᶇ' => 'n', + 'ᶈ' => 'p', + 'ᶉ' => 'r', + 'ᶊ' => 's', + 'ᶌ' => 'v', + 'á¶' => 'x', + 'ᶎ' => 'z', + 'á¶' => 'a', + 'ᶑ' => 'd', + 'ᶒ' => 'e', + 'ᶓ' => 'e', + 'ᶖ' => 'i', + 'ᶙ' => 'u', + 'ẜ' => 's', + 'áº' => 's', + 'ẞ' => 'SS', + 'Ỻ' => 'LL', + 'á»»' => 'll', + 'Ỽ' => 'V', + 'ỽ' => 'v', + 'Ỿ' => 'Y', + 'ỿ' => 'y', + 'â± ' => 'L', + 'ⱡ' => 'l', + 'â±¢' => 'L', + 'â±£' => 'P', + 'Ɽ' => 'R', + 'â±¥' => 'a', + 'ⱦ' => 't', + 'Ⱨ' => 'H', + 'ⱨ' => 'h', + 'Ⱪ' => 'K', + 'ⱪ' => 'k', + 'Ⱬ' => 'Z', + 'ⱬ' => 'z', + 'â±®' => 'M', + 'â±±' => 'v', + 'â±²' => 'W', + 'â±³' => 'w', + 'â±´' => 'v', + 'ⱸ' => 'e', + 'ⱺ' => 'o', + 'â±¾' => 'S', + 'Ɀ' => 'Z', + 'ꜰ' => 'F', + 'ꜱ' => 'S', + 'Ꜳ' => 'AA', + 'ꜳ' => 'aa', + 'Ꜵ' => 'AO', + 'ꜵ' => 'ao', + 'Ꜷ' => 'AU', + 'ꜷ' => 'au', + 'Ꜹ' => 'AV', + 'ꜹ' => 'av', + 'Ꜻ' => 'AV', + 'ꜻ' => 'av', + 'Ꜽ' => 'AY', + 'ꜽ' => 'ay', + 'ê€' => 'K', + 'ê' => 'k', + 'ê‚' => 'K', + 'êƒ' => 'k', + 'ê„' => 'K', + 'ê…' => 'k', + 'ê†' => 'L', + 'ê‡' => 'l', + 'êˆ' => 'L', + 'ê‰' => 'l', + 'êŠ' => 'O', + 'ê‹' => 'o', + 'êŒ' => 'O', + 'ê' => 'o', + 'êŽ' => 'OO', + 'ê' => 'oo', + 'ê' => 'P', + 'ê‘' => 'p', + 'ê’' => 'P', + 'ê“' => 'p', + 'ê”' => 'P', + 'ê•' => 'p', + 'ê–' => 'Q', + 'ê—' => 'q', + 'ê˜' => 'Q', + 'ê™' => 'q', + 'êž' => 'V', + 'êŸ' => 'v', + 'ê ' => 'VY', + 'ê¡' => 'vy', + 'ê¤' => 'TH', + 'ê¥' => 'th', + 'ê¦' => 'TH', + 'ê§' => 'th', + 'ê±' => 'd', + 'ê²' => 'l', + 'ê³' => 'm', + 'ê´' => 'n', + 'êµ' => 'r', + 'ê¶' => 'R', + 'ê·' => 't', + 'ê¹' => 'D', + 'êº' => 'd', + 'ê»' => 'F', + 'ê¼' => 'f', + 'Ꞇ' => 'T', + 'ꞇ' => 't', + 'êž' => 'N', + 'êž‘' => 'n', + 'êž’' => 'C', + 'êž“' => 'c', + 'êž ' => 'G', + 'êž¡' => 'g', + 'Ꞣ' => 'K', + 'ꞣ' => 'k', + 'Ꞥ' => 'N', + 'ꞥ' => 'n', + 'Ꞧ' => 'R', + 'ꞧ' => 'r', + 'Ꞩ' => 'S', + 'êž©' => 's', + 'Ɦ' => 'H', + '©' => '(C)', + '®' => '(R)', + 'â‚ ' => 'CE', + 'â‚¢' => 'Cr', + 'â‚£' => 'Fr.', + '₤' => 'L.', + '₧' => 'Pts', + '₹' => 'Rs', + '₺' => 'TL', + 'â„—' => '(P)', + '℘' => 'P', + 'â„ž' => 'Rx', + '〇' => '0', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + 'âŸ' => ' ', + 'ʹ' => '\'', + 'ʺ' => '"', + 'Ê»' => '\'', + 'ʼ' => '\'', + 'ʽ' => '\'', + 'ˈ' => '\'', + 'Ë‹' => '`', + '‘' => '\'', + '’' => '\'', + '‚' => ',', + '‛' => '\'', + '“' => '"', + 'â€' => '"', + '„' => ',,', + '‟' => '"', + '′' => '\'', + 'ã€' => '"', + '〞' => '"', + '«' => '<<', + '»' => '>>', + '‹' => '<', + '›' => '>', + '­' => '-', + 'â€' => '-', + '‑' => '-', + '‒' => '-', + '–' => '-', + '—' => '-', + '―' => '-', + '︱' => '-', + '︲' => '-', + '¡' => '!', + '¿' => '?', + 'Ë‚' => '<', + '˃' => '>', + 'Ë„' => '^', + 'ˆ' => '^', + 'Ë' => ':', + 'Ëœ' => '~', + '‖' => '||', + 'â„' => '/', + 'â…' => '[', + 'â†' => ']', + 'âŽ' => '*', + 'ã€' => ',', + '。' => '.', + '〈' => '<', + '〉' => '>', + '《' => '<<', + '》' => '>>', + '〔' => '[', + '〕' => ']', + '〘' => '[', + '〙' => ']', + '〚' => '[', + '〛' => ']', + 'ï¸' => ',', + '︑' => ',', + '︒' => '.', + '︓' => ':', + '︔' => ';', + '︕' => '!', + '︖' => '?', + '︙' => '...', + '︰' => '..', + '︵' => '(', + '︶' => ')', + '︷' => '{', + '︸' => '}', + '︹' => '[', + '︺' => ']', + '︽' => '<<', + '︾' => '>>', + '︿' => '<', + 'ï¹€' => '>', + '﹇' => '[', + '﹈' => ']', + '±' => '+/-', + '×' => '*', + '÷' => '/', + 'Ë–' => '+', + 'Ë—' => '-', + '−' => '-', + '∕' => '/', + '∖' => '\\', + '∣' => '|', + '∥' => '||', + '≪' => '<<', + '≫' => '>>', + '⦅' => '((', + '⦆' => '))', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/bootstrap.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/bootstrap.php new file mode 100644 index 00000000..91fdba0d --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/bootstrap.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Iconv as p; + +if (extension_loaded('iconv')) { + return; +} + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!defined('ICONV_IMPL')) { + define('ICONV_IMPL', 'Symfony'); +} +if (!defined('ICONV_VERSION')) { + define('ICONV_VERSION', '1.0'); +} +if (!defined('ICONV_MIME_DECODE_STRICT')) { + define('ICONV_MIME_DECODE_STRICT', 1); +} +if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) { + define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); +} + +if (!function_exists('iconv')) { + function iconv($from_encoding, $to_encoding, $string) { return p\Iconv::iconv($from_encoding, $to_encoding, $string); } +} +if (!function_exists('iconv_get_encoding')) { + function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); } +} +if (!function_exists('iconv_set_encoding')) { + function iconv_set_encoding($type, $encoding) { return p\Iconv::iconv_set_encoding($type, $encoding); } +} +if (!function_exists('iconv_mime_encode')) { + function iconv_mime_encode($field_name, $field_value, $options = []) { return p\Iconv::iconv_mime_encode($field_name, $field_value, $options); } +} +if (!function_exists('iconv_mime_decode_headers')) { + function iconv_mime_decode_headers($headers, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode_headers($headers, $mode, $encoding); } +} + +if (extension_loaded('mbstring')) { + if (!function_exists('iconv_strlen')) { + function iconv_strlen($string, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen($string, $encoding); } + } + if (!function_exists('iconv_strpos')) { + function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos($haystack, $needle, $offset, $encoding); } + } + if (!function_exists('iconv_strrpos')) { + function iconv_strrpos($haystack, $needle, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos($haystack, $needle, 0, $encoding); } + } + if (!function_exists('iconv_substr')) { + function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr($string, $offset, $length, $encoding); } + } + if (!function_exists('iconv_mime_decode')) { + function iconv_mime_decode($string, $mode = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_decode_mimeheader($string, $mode, $encoding); } + } +} else { + if (!function_exists('iconv_strlen')) { + if (extension_loaded('xml')) { + function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen1($string, $encoding); } + } else { + function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen2($string, $encoding); } + } + } + + if (!function_exists('iconv_strpos')) { + function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Iconv::iconv_strpos($haystack, $needle, $offset, $encoding); } + } + if (!function_exists('iconv_strrpos')) { + function iconv_strrpos($haystack, $needle, $encoding = null) { return p\Iconv::iconv_strrpos($haystack, $needle, $encoding); } + } + if (!function_exists('iconv_substr')) { + function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { return p\Iconv::iconv_substr($string, $offset, $length, $encoding); } + } + if (!function_exists('iconv_mime_decode')) { + function iconv_mime_decode($string, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode($string, $mode, $encoding); } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/bootstrap80.php b/dev/plugins/email/vendor/symfony/polyfill-iconv/bootstrap80.php new file mode 100644 index 00000000..cf895574 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/bootstrap80.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Iconv as p; + +if (!defined('ICONV_IMPL')) { + define('ICONV_IMPL', 'Symfony'); +} +if (!defined('ICONV_VERSION')) { + define('ICONV_VERSION', '1.0'); +} +if (!defined('ICONV_MIME_DECODE_STRICT')) { + define('ICONV_MIME_DECODE_STRICT', 1); +} +if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) { + define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); +} + +if (!function_exists('iconv')) { + function iconv(?string $from_encoding, ?string $to_encoding, ?string $string): string|false { return p\Iconv::iconv((string) $from_encoding, (string) $to_encoding, (string) $string); } +} +if (!function_exists('iconv_get_encoding')) { + function iconv_get_encoding(?string $type = 'all'): array|string|false { return p\Iconv::iconv_get_encoding((string) $type); } +} +if (!function_exists('iconv_set_encoding')) { + function iconv_set_encoding(?string $type, ?string $encoding): bool { return p\Iconv::iconv_set_encoding((string) $type, (string) $encoding); } +} +if (!function_exists('iconv_mime_encode')) { + function iconv_mime_encode(?string $field_name, ?string $field_value, ?array $options = []): string|false { return p\Iconv::iconv_mime_encode((string) $field_name, (string) $field_value, (array) $options); } +} +if (!function_exists('iconv_mime_decode_headers')) { + function iconv_mime_decode_headers(?string $headers, ?int $mode = 0, ?string $encoding = null): array|false { return p\Iconv::iconv_mime_decode_headers((string) $headers, (int) $mode, $encoding); } +} + +if (extension_loaded('mbstring')) { + if (!function_exists('iconv_strlen')) { + function iconv_strlen(?string $string, ?string $encoding = null): int|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen((string) $string, $encoding); } + } + if (!function_exists('iconv_strpos')) { + function iconv_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } + } + if (!function_exists('iconv_strrpos')) { + function iconv_strrpos(?string $haystack, ?string $needle, ?string $encoding = null): int|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos((string) $haystack, (string) $needle, 0, $encoding); } + } + if (!function_exists('iconv_substr')) { + function iconv_substr(?string $string, ?int $offset, ?int $length = null, ?string $encoding = null): string|false { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr((string) $string, (int) $offset, $length, $encoding); } + } + if (!function_exists('iconv_mime_decode')) { + function iconv_mime_decode($string, $mode = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_decode_mimeheader($string, $mode, $encoding); } + } +} else { + if (!function_exists('iconv_strlen')) { + if (extension_loaded('xml')) { + function iconv_strlen(?string $string, ?string $encoding = null): int|false { return p\Iconv::strlen1((string) $string, $encoding); } + } else { + function iconv_strlen(?string $string, ?string $encoding = null): int|false { return p\Iconv::strlen2((string) $string, $encoding); } + } + } + + if (!function_exists('iconv_strpos')) { + function iconv_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Iconv::iconv_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } + } + if (!function_exists('iconv_strrpos')) { + function iconv_strrpos(?string $haystack, ?string $needle, ?string $encoding = null): int|false { return p\Iconv::iconv_strrpos((string) $haystack, (string) $needle, $encoding); } + } + if (!function_exists('iconv_substr')) { + function iconv_substr(?string $string, ?int $offset, ?int $length = null, ?string $encoding = null): string|false { return p\Iconv::iconv_substr((string) $string, (string) $offset, $length, $encoding); } + } + if (!function_exists('iconv_mime_decode')) { + function iconv_mime_decode(?string $string, ?int $mode = 0, ?string $encoding = null): string|false { return p\Iconv::iconv_mime_decode((string) $string, (int) $mode, $encoding); } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-iconv/composer.json b/dev/plugins/email/vendor/symfony/polyfill-iconv/composer.json new file mode 100644 index 00000000..17483e00 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-iconv/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/polyfill-iconv", + "type": "library", + "description": "Symfony polyfill for the Iconv extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "iconv"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Iconv\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Idn.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Idn.php new file mode 100644 index 00000000..fee3026d --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Idn.php @@ -0,0 +1,925 @@ + and Trevor Rowbotham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn; + +use Exception; +use Normalizer; +use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; +use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; + +/** + * @see https://www.unicode.org/reports/tr46/ + * + * @internal + */ +final class Idn +{ + public const ERROR_EMPTY_LABEL = 1; + public const ERROR_LABEL_TOO_LONG = 2; + public const ERROR_DOMAIN_NAME_TOO_LONG = 4; + public const ERROR_LEADING_HYPHEN = 8; + public const ERROR_TRAILING_HYPHEN = 0x10; + public const ERROR_HYPHEN_3_4 = 0x20; + public const ERROR_LEADING_COMBINING_MARK = 0x40; + public const ERROR_DISALLOWED = 0x80; + public const ERROR_PUNYCODE = 0x100; + public const ERROR_LABEL_HAS_DOT = 0x200; + public const ERROR_INVALID_ACE_LABEL = 0x400; + public const ERROR_BIDI = 0x800; + public const ERROR_CONTEXTJ = 0x1000; + public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; + public const ERROR_CONTEXTO_DIGITS = 0x4000; + + public const INTL_IDNA_VARIANT_2003 = 0; + public const INTL_IDNA_VARIANT_UTS46 = 1; + + public const IDNA_DEFAULT = 0; + public const IDNA_ALLOW_UNASSIGNED = 1; + public const IDNA_USE_STD3_RULES = 2; + public const IDNA_CHECK_BIDI = 4; + public const IDNA_CHECK_CONTEXTJ = 8; + public const IDNA_NONTRANSITIONAL_TO_ASCII = 16; + public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32; + + public const MAX_DOMAIN_SIZE = 253; + public const MAX_LABEL_SIZE = 63; + + public const BASE = 36; + public const TMIN = 1; + public const TMAX = 26; + public const SKEW = 38; + public const DAMP = 700; + public const INITIAL_BIAS = 72; + public const INITIAL_N = 128; + public const DELIMITER = '-'; + public const MAX_INT = 2147483647; + + /** + * Contains the numeric value of a basic code point (for use in representing integers) in the + * range 0 to BASE-1, or -1 if b is does not represent a value. + * + * @var array + */ + private static $basicToDigit = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, + + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + ]; + + /** + * @var array + */ + private static $virama; + + /** + * @var array + */ + private static $mapped; + + /** + * @var array + */ + private static $ignored; + + /** + * @var array + */ + private static $deviation; + + /** + * @var array + */ + private static $disallowed; + + /** + * @var array + */ + private static $disallowed_STD3_mapped; + + /** + * @var array + */ + private static $disallowed_STD3_valid; + + /** + * @var bool + */ + private static $mappingTableLoaded = false; + + /** + * @see https://www.unicode.org/reports/tr46/#ToASCII + * + * @param string $domainName + * @param int $options + * @param int $variant + * @param array $idna_info + * + * @return string|false + */ + public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); + } + + $options = [ + 'CheckHyphens' => true, + 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), + 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), + 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), + 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), + 'VerifyDnsLength' => true, + ]; + $info = new Info(); + $labels = self::process((string) $domainName, $options, $info); + + foreach ($labels as $i => $label) { + // Only convert labels to punycode that contain non-ASCII code points + if (1 === preg_match('/[^\x00-\x7F]/', $label)) { + try { + $label = 'xn--'.self::punycodeEncode($label); + } catch (Exception $e) { + $info->errors |= self::ERROR_PUNYCODE; + } + + $labels[$i] = $label; + } + } + + if ($options['VerifyDnsLength']) { + self::validateDomainAndLabelLength($labels, $info); + } + + $idna_info = [ + 'result' => implode('.', $labels), + 'isTransitionalDifferent' => $info->transitionalDifferent, + 'errors' => $info->errors, + ]; + + return 0 === $info->errors ? $idna_info['result'] : false; + } + + /** + * @see https://www.unicode.org/reports/tr46/#ToUnicode + * + * @param string $domainName + * @param int $options + * @param int $variant + * @param array $idna_info + * + * @return string|false + */ + public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) + { + if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) { + @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); + } + + $info = new Info(); + $labels = self::process((string) $domainName, [ + 'CheckHyphens' => true, + 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), + 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), + 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), + 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE), + ], $info); + $idna_info = [ + 'result' => implode('.', $labels), + 'isTransitionalDifferent' => $info->transitionalDifferent, + 'errors' => $info->errors, + ]; + + return 0 === $info->errors ? $idna_info['result'] : false; + } + + /** + * @param string $label + * + * @return bool + */ + private static function isValidContextJ(array $codePoints, $label) + { + if (!isset(self::$virama)) { + self::$virama = require __DIR__.\DIRECTORY_SEPARATOR.'Resources'.\DIRECTORY_SEPARATOR.'unidata'.\DIRECTORY_SEPARATOR.'virama.php'; + } + + $offset = 0; + + foreach ($codePoints as $i => $codePoint) { + if (0x200C !== $codePoint && 0x200D !== $codePoint) { + continue; + } + + if (!isset($codePoints[$i - 1])) { + return false; + } + + // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; + if (isset(self::$virama[$codePoints[$i - 1]])) { + continue; + } + + // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then + // True; + // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}] + if (0x200C === $codePoint && 1 === preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) { + $offset += \strlen($matches[1][0]); + + continue; + } + + return false; + } + + return true; + } + + /** + * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap + * + * @param string $input + * @param array $options + * + * @return string + */ + private static function mapCodePoints($input, array $options, Info $info) + { + $str = ''; + $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; + $transitional = $options['Transitional_Processing']; + + foreach (self::utf8Decode($input) as $codePoint) { + $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); + + switch ($data['status']) { + case 'disallowed': + $info->errors |= self::ERROR_DISALLOWED; + + // no break. + + case 'valid': + $str .= mb_chr($codePoint, 'utf-8'); + + break; + + case 'ignored': + // Do nothing. + break; + + case 'mapped': + $str .= $data['mapping']; + + break; + + case 'deviation': + $info->transitionalDifferent = true; + $str .= ($transitional ? $data['mapping'] : mb_chr($codePoint, 'utf-8')); + + break; + } + } + + return $str; + } + + /** + * @see https://www.unicode.org/reports/tr46/#Processing + * + * @param string $domain + * @param array $options + * + * @return array + */ + private static function process($domain, array $options, Info $info) + { + // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and + // we need to respect the VerifyDnsLength option. + $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength']; + + if ($checkForEmptyLabels && '' === $domain) { + $info->errors |= self::ERROR_EMPTY_LABEL; + + return [$domain]; + } + + // Step 1. Map each code point in the domain name string + $domain = self::mapCodePoints($domain, $options, $info); + + // Step 2. Normalize the domain name string to Unicode Normalization Form C. + if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { + $domain = Normalizer::normalize($domain, Normalizer::FORM_C); + } + + // Step 3. Break the string into labels at U+002E (.) FULL STOP. + $labels = explode('.', $domain); + $lastLabelIndex = \count($labels) - 1; + + // Step 4. Convert and validate each label in the domain name string. + foreach ($labels as $i => $label) { + $validationOptions = $options; + + if ('xn--' === substr($label, 0, 4)) { + try { + $label = self::punycodeDecode(substr($label, 4)); + } catch (Exception $e) { + $info->errors |= self::ERROR_PUNYCODE; + + continue; + } + + $validationOptions['Transitional_Processing'] = false; + $labels[$i] = $label; + } + + self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex); + } + + if ($info->bidiDomain && !$info->validBidiDomain) { + $info->errors |= self::ERROR_BIDI; + } + + // Any input domain name string that does not record an error has been successfully + // processed according to this specification. Conversely, if an input domain_name string + // causes an error, then the processing of the input domain_name string fails. Determining + // what to do with error input is up to the caller, and not in the scope of this document. + return $labels; + } + + /** + * @see https://tools.ietf.org/html/rfc5893#section-2 + * + * @param string $label + */ + private static function validateBidiLabel($label, Info $info) + { + if (1 === preg_match(Regex::RTL_LABEL, $label)) { + $info->bidiDomain = true; + + // Step 1. The first character must be a character with Bidi property L, R, or AL. + // If it has the R or AL property, it is an RTL label + if (1 !== preg_match(Regex::BIDI_STEP_1_RTL, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES, + // CS, ET, ON, BN, or NSM are allowed. + if (1 === preg_match(Regex::BIDI_STEP_2, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 3. In an RTL label, the end of the label must be a character with Bidi property + // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM. + if (1 !== preg_match(Regex::BIDI_STEP_3, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa. + if (1 === preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === preg_match(Regex::BIDI_STEP_4_EN, $label)) { + $info->validBidiDomain = false; + + return; + } + + return; + } + + // We are a LTR label + // Step 1. The first character must be a character with Bidi property L, R, or AL. + // If it has the L property, it is an LTR label. + if (1 !== preg_match(Regex::BIDI_STEP_1_LTR, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 5. In an LTR label, only characters with the Bidi properties L, EN, + // ES, CS, ET, ON, BN, or NSM are allowed. + if (1 === preg_match(Regex::BIDI_STEP_5, $label)) { + $info->validBidiDomain = false; + + return; + } + + // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or + // EN, followed by zero or more characters with Bidi property NSM. + if (1 !== preg_match(Regex::BIDI_STEP_6, $label)) { + $info->validBidiDomain = false; + + return; + } + } + + /** + * @param array $labels + */ + private static function validateDomainAndLabelLength(array $labels, Info $info) + { + $maxDomainSize = self::MAX_DOMAIN_SIZE; + $length = \count($labels); + + // Number of "." delimiters. + $domainLength = $length - 1; + + // If the last label is empty and it is not the first label, then it is the root label. + // Increase the max size by 1, making it 254, to account for the root label's "." + // delimiter. This also means we don't need to check the last label's length for being too + // long. + if ($length > 1 && '' === $labels[$length - 1]) { + ++$maxDomainSize; + --$length; + } + + for ($i = 0; $i < $length; ++$i) { + $bytes = \strlen($labels[$i]); + $domainLength += $bytes; + + if ($bytes > self::MAX_LABEL_SIZE) { + $info->errors |= self::ERROR_LABEL_TOO_LONG; + } + } + + if ($domainLength > $maxDomainSize) { + $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG; + } + } + + /** + * @see https://www.unicode.org/reports/tr46/#Validity_Criteria + * + * @param string $label + * @param array $options + * @param bool $canBeEmpty + */ + private static function validateLabel($label, Info $info, array $options, $canBeEmpty) + { + if ('' === $label) { + if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) { + $info->errors |= self::ERROR_EMPTY_LABEL; + } + + return; + } + + // Step 1. The label must be in Unicode Normalization Form C. + if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { + $info->errors |= self::ERROR_INVALID_ACE_LABEL; + } + + $codePoints = self::utf8Decode($label); + + if ($options['CheckHyphens']) { + // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character + // in both the thrid and fourth positions. + if (isset($codePoints[2], $codePoints[3]) && 0x002D === $codePoints[2] && 0x002D === $codePoints[3]) { + $info->errors |= self::ERROR_HYPHEN_3_4; + } + + // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D + // HYPHEN-MINUS character. + if ('-' === substr($label, 0, 1)) { + $info->errors |= self::ERROR_LEADING_HYPHEN; + } + + if ('-' === substr($label, -1, 1)) { + $info->errors |= self::ERROR_TRAILING_HYPHEN; + } + } + + // Step 4. The label must not contain a U+002E (.) FULL STOP. + if (false !== strpos($label, '.')) { + $info->errors |= self::ERROR_LABEL_HAS_DOT; + } + + // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark. + if (1 === preg_match(Regex::COMBINING_MARK, $label)) { + $info->errors |= self::ERROR_LEADING_COMBINING_MARK; + } + + // Step 6. Each code point in the label must only have certain status values according to + // Section 5, IDNA Mapping Table: + $transitional = $options['Transitional_Processing']; + $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; + + foreach ($codePoints as $codePoint) { + $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); + $status = $data['status']; + + if ('valid' === $status || (!$transitional && 'deviation' === $status)) { + continue; + } + + $info->errors |= self::ERROR_DISALLOWED; + + break; + } + + // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in + // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA) + // [IDNA2008]. + if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) { + $info->errors |= self::ERROR_CONTEXTJ; + } + + // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must + // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2. + if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) { + self::validateBidiLabel($label, $info); + } + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.2 + * + * @param string $input + * + * @return string + */ + private static function punycodeDecode($input) + { + $n = self::INITIAL_N; + $out = 0; + $i = 0; + $bias = self::INITIAL_BIAS; + $lastDelimIndex = strrpos($input, self::DELIMITER); + $b = false === $lastDelimIndex ? 0 : $lastDelimIndex; + $inputLength = \strlen($input); + $output = []; + $bytes = array_map('ord', str_split($input)); + + for ($j = 0; $j < $b; ++$j) { + if ($bytes[$j] > 0x7F) { + throw new Exception('Invalid input'); + } + + $output[$out++] = $input[$j]; + } + + if ($b > 0) { + ++$b; + } + + for ($in = $b; $in < $inputLength; ++$out) { + $oldi = $i; + $w = 1; + + for ($k = self::BASE; /* no condition */; $k += self::BASE) { + if ($in >= $inputLength) { + throw new Exception('Invalid input'); + } + + $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; + + if ($digit < 0) { + throw new Exception('Invalid input'); + } + + if ($digit > intdiv(self::MAX_INT - $i, $w)) { + throw new Exception('Integer overflow'); + } + + $i += $digit * $w; + + if ($k <= $bias) { + $t = self::TMIN; + } elseif ($k >= $bias + self::TMAX) { + $t = self::TMAX; + } else { + $t = $k - $bias; + } + + if ($digit < $t) { + break; + } + + $baseMinusT = self::BASE - $t; + + if ($w > intdiv(self::MAX_INT, $baseMinusT)) { + throw new Exception('Integer overflow'); + } + + $w *= $baseMinusT; + } + + $outPlusOne = $out + 1; + $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); + + if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { + throw new Exception('Integer overflow'); + } + + $n += intdiv($i, $outPlusOne); + $i %= $outPlusOne; + array_splice($output, $i++, 0, [mb_chr($n, 'utf-8')]); + } + + return implode('', $output); + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.3 + * + * @param string $input + * + * @return string + */ + private static function punycodeEncode($input) + { + $n = self::INITIAL_N; + $delta = 0; + $out = 0; + $bias = self::INITIAL_BIAS; + $inputLength = 0; + $output = ''; + $iter = self::utf8Decode($input); + + foreach ($iter as $codePoint) { + ++$inputLength; + + if ($codePoint < 0x80) { + $output .= \chr($codePoint); + ++$out; + } + } + + $h = $out; + $b = $out; + + if ($b > 0) { + $output .= self::DELIMITER; + ++$out; + } + + while ($h < $inputLength) { + $m = self::MAX_INT; + + foreach ($iter as $codePoint) { + if ($codePoint >= $n && $codePoint < $m) { + $m = $codePoint; + } + } + + if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { + throw new Exception('Integer overflow'); + } + + $delta += ($m - $n) * ($h + 1); + $n = $m; + + foreach ($iter as $codePoint) { + if ($codePoint < $n && 0 === ++$delta) { + throw new Exception('Integer overflow'); + } + + if ($codePoint === $n) { + $q = $delta; + + for ($k = self::BASE; /* no condition */; $k += self::BASE) { + if ($k <= $bias) { + $t = self::TMIN; + } elseif ($k >= $bias + self::TMAX) { + $t = self::TMAX; + } else { + $t = $k - $bias; + } + + if ($q < $t) { + break; + } + + $qMinusT = $q - $t; + $baseMinusT = self::BASE - $t; + $output .= self::encodeDigit($t + ($qMinusT) % ($baseMinusT), false); + ++$out; + $q = intdiv($qMinusT, $baseMinusT); + } + + $output .= self::encodeDigit($q, false); + ++$out; + $bias = self::adaptBias($delta, $h + 1, $h === $b); + $delta = 0; + ++$h; + } + } + + ++$delta; + ++$n; + } + + return $output; + } + + /** + * @see https://tools.ietf.org/html/rfc3492#section-6.1 + * + * @param int $delta + * @param int $numPoints + * @param bool $firstTime + * + * @return int + */ + private static function adaptBias($delta, $numPoints, $firstTime) + { + // xxx >> 1 is a faster way of doing intdiv(xxx, 2) + $delta = $firstTime ? intdiv($delta, self::DAMP) : $delta >> 1; + $delta += intdiv($delta, $numPoints); + $k = 0; + + while ($delta > ((self::BASE - self::TMIN) * self::TMAX) >> 1) { + $delta = intdiv($delta, self::BASE - self::TMIN); + $k += self::BASE; + } + + return $k + intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW); + } + + /** + * @param int $d + * @param bool $flag + * + * @return string + */ + private static function encodeDigit($d, $flag) + { + return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5)); + } + + /** + * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any + * invalid byte sequences will be replaced by a U+FFFD replacement code point. + * + * @see https://encoding.spec.whatwg.org/#utf-8-decoder + * + * @param string $input + * + * @return array + */ + private static function utf8Decode($input) + { + $bytesSeen = 0; + $bytesNeeded = 0; + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + $codePoint = 0; + $codePoints = []; + $length = \strlen($input); + + for ($i = 0; $i < $length; ++$i) { + $byte = \ord($input[$i]); + + if (0 === $bytesNeeded) { + if ($byte >= 0x00 && $byte <= 0x7F) { + $codePoints[] = $byte; + + continue; + } + + if ($byte >= 0xC2 && $byte <= 0xDF) { + $bytesNeeded = 1; + $codePoint = $byte & 0x1F; + } elseif ($byte >= 0xE0 && $byte <= 0xEF) { + if (0xE0 === $byte) { + $lowerBoundary = 0xA0; + } elseif (0xED === $byte) { + $upperBoundary = 0x9F; + } + + $bytesNeeded = 2; + $codePoint = $byte & 0xF; + } elseif ($byte >= 0xF0 && $byte <= 0xF4) { + if (0xF0 === $byte) { + $lowerBoundary = 0x90; + } elseif (0xF4 === $byte) { + $upperBoundary = 0x8F; + } + + $bytesNeeded = 3; + $codePoint = $byte & 0x7; + } else { + $codePoints[] = 0xFFFD; + } + + continue; + } + + if ($byte < $lowerBoundary || $byte > $upperBoundary) { + $codePoint = 0; + $bytesNeeded = 0; + $bytesSeen = 0; + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + --$i; + $codePoints[] = 0xFFFD; + + continue; + } + + $lowerBoundary = 0x80; + $upperBoundary = 0xBF; + $codePoint = ($codePoint << 6) | ($byte & 0x3F); + + if (++$bytesSeen !== $bytesNeeded) { + continue; + } + + $codePoints[] = $codePoint; + $codePoint = 0; + $bytesNeeded = 0; + $bytesSeen = 0; + } + + // String unexpectedly ended, so append a U+FFFD code point. + if (0 !== $bytesNeeded) { + $codePoints[] = 0xFFFD; + } + + return $codePoints; + } + + /** + * @param int $codePoint + * @param bool $useSTD3ASCIIRules + * + * @return array{status: string, mapping?: string} + */ + private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules) + { + if (!self::$mappingTableLoaded) { + self::$mappingTableLoaded = true; + self::$mapped = require __DIR__.'/Resources/unidata/mapped.php'; + self::$ignored = require __DIR__.'/Resources/unidata/ignored.php'; + self::$deviation = require __DIR__.'/Resources/unidata/deviation.php'; + self::$disallowed = require __DIR__.'/Resources/unidata/disallowed.php'; + self::$disallowed_STD3_mapped = require __DIR__.'/Resources/unidata/disallowed_STD3_mapped.php'; + self::$disallowed_STD3_valid = require __DIR__.'/Resources/unidata/disallowed_STD3_valid.php'; + } + + if (isset(self::$mapped[$codePoint])) { + return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]]; + } + + if (isset(self::$ignored[$codePoint])) { + return ['status' => 'ignored']; + } + + if (isset(self::$deviation[$codePoint])) { + return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]]; + } + + if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) { + return ['status' => 'disallowed']; + } + + $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]); + + if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) { + $status = 'disallowed'; + + if (!$useSTD3ASCIIRules) { + $status = $isDisallowedMapped ? 'mapped' : 'valid'; + } + + if ($isDisallowedMapped) { + return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]]; + } + + return ['status' => $status]; + } + + return ['status' => 'valid']; + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Info.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Info.php new file mode 100644 index 00000000..25c3582b --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Info.php @@ -0,0 +1,23 @@ + and Trevor Rowbotham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Idn; + +/** + * @internal + */ +class Info +{ + public $bidiDomain = false; + public $errors = 0; + public $validBidiDomain = true; + public $transitionalDifferent = false; +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/LICENSE b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/LICENSE new file mode 100644 index 00000000..03c5e257 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/README.md b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/README.md new file mode 100644 index 00000000..2e75f2e5 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/README.md @@ -0,0 +1,12 @@ +Symfony Polyfill / Intl: Idn +============================ + +This component provides [`idn_to_ascii`](https://php.net/idn-to-ascii) and [`idn_to_utf8`](https://php.net/idn-to-utf8) functions to users who run php versions without the [Intl](https://php.net/intl) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php new file mode 100644 index 00000000..5bb70e48 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php @@ -0,0 +1,375 @@ += 128 && $codePoint <= 159) { + return true; + } + + if ($codePoint >= 2155 && $codePoint <= 2207) { + return true; + } + + if ($codePoint >= 3676 && $codePoint <= 3712) { + return true; + } + + if ($codePoint >= 3808 && $codePoint <= 3839) { + return true; + } + + if ($codePoint >= 4059 && $codePoint <= 4095) { + return true; + } + + if ($codePoint >= 4256 && $codePoint <= 4293) { + return true; + } + + if ($codePoint >= 6849 && $codePoint <= 6911) { + return true; + } + + if ($codePoint >= 11859 && $codePoint <= 11903) { + return true; + } + + if ($codePoint >= 42955 && $codePoint <= 42996) { + return true; + } + + if ($codePoint >= 55296 && $codePoint <= 57343) { + return true; + } + + if ($codePoint >= 57344 && $codePoint <= 63743) { + return true; + } + + if ($codePoint >= 64218 && $codePoint <= 64255) { + return true; + } + + if ($codePoint >= 64976 && $codePoint <= 65007) { + return true; + } + + if ($codePoint >= 65630 && $codePoint <= 65663) { + return true; + } + + if ($codePoint >= 65953 && $codePoint <= 65999) { + return true; + } + + if ($codePoint >= 66046 && $codePoint <= 66175) { + return true; + } + + if ($codePoint >= 66518 && $codePoint <= 66559) { + return true; + } + + if ($codePoint >= 66928 && $codePoint <= 67071) { + return true; + } + + if ($codePoint >= 67432 && $codePoint <= 67583) { + return true; + } + + if ($codePoint >= 67760 && $codePoint <= 67807) { + return true; + } + + if ($codePoint >= 67904 && $codePoint <= 67967) { + return true; + } + + if ($codePoint >= 68256 && $codePoint <= 68287) { + return true; + } + + if ($codePoint >= 68528 && $codePoint <= 68607) { + return true; + } + + if ($codePoint >= 68681 && $codePoint <= 68735) { + return true; + } + + if ($codePoint >= 68922 && $codePoint <= 69215) { + return true; + } + + if ($codePoint >= 69298 && $codePoint <= 69375) { + return true; + } + + if ($codePoint >= 69466 && $codePoint <= 69551) { + return true; + } + + if ($codePoint >= 70207 && $codePoint <= 70271) { + return true; + } + + if ($codePoint >= 70517 && $codePoint <= 70655) { + return true; + } + + if ($codePoint >= 70874 && $codePoint <= 71039) { + return true; + } + + if ($codePoint >= 71134 && $codePoint <= 71167) { + return true; + } + + if ($codePoint >= 71370 && $codePoint <= 71423) { + return true; + } + + if ($codePoint >= 71488 && $codePoint <= 71679) { + return true; + } + + if ($codePoint >= 71740 && $codePoint <= 71839) { + return true; + } + + if ($codePoint >= 72026 && $codePoint <= 72095) { + return true; + } + + if ($codePoint >= 72441 && $codePoint <= 72703) { + return true; + } + + if ($codePoint >= 72887 && $codePoint <= 72959) { + return true; + } + + if ($codePoint >= 73130 && $codePoint <= 73439) { + return true; + } + + if ($codePoint >= 73465 && $codePoint <= 73647) { + return true; + } + + if ($codePoint >= 74650 && $codePoint <= 74751) { + return true; + } + + if ($codePoint >= 75076 && $codePoint <= 77823) { + return true; + } + + if ($codePoint >= 78905 && $codePoint <= 82943) { + return true; + } + + if ($codePoint >= 83527 && $codePoint <= 92159) { + return true; + } + + if ($codePoint >= 92784 && $codePoint <= 92879) { + return true; + } + + if ($codePoint >= 93072 && $codePoint <= 93759) { + return true; + } + + if ($codePoint >= 93851 && $codePoint <= 93951) { + return true; + } + + if ($codePoint >= 94112 && $codePoint <= 94175) { + return true; + } + + if ($codePoint >= 101590 && $codePoint <= 101631) { + return true; + } + + if ($codePoint >= 101641 && $codePoint <= 110591) { + return true; + } + + if ($codePoint >= 110879 && $codePoint <= 110927) { + return true; + } + + if ($codePoint >= 111356 && $codePoint <= 113663) { + return true; + } + + if ($codePoint >= 113828 && $codePoint <= 118783) { + return true; + } + + if ($codePoint >= 119366 && $codePoint <= 119519) { + return true; + } + + if ($codePoint >= 119673 && $codePoint <= 119807) { + return true; + } + + if ($codePoint >= 121520 && $codePoint <= 122879) { + return true; + } + + if ($codePoint >= 122923 && $codePoint <= 123135) { + return true; + } + + if ($codePoint >= 123216 && $codePoint <= 123583) { + return true; + } + + if ($codePoint >= 123648 && $codePoint <= 124927) { + return true; + } + + if ($codePoint >= 125143 && $codePoint <= 125183) { + return true; + } + + if ($codePoint >= 125280 && $codePoint <= 126064) { + return true; + } + + if ($codePoint >= 126133 && $codePoint <= 126208) { + return true; + } + + if ($codePoint >= 126270 && $codePoint <= 126463) { + return true; + } + + if ($codePoint >= 126652 && $codePoint <= 126703) { + return true; + } + + if ($codePoint >= 126706 && $codePoint <= 126975) { + return true; + } + + if ($codePoint >= 127406 && $codePoint <= 127461) { + return true; + } + + if ($codePoint >= 127590 && $codePoint <= 127743) { + return true; + } + + if ($codePoint >= 129202 && $codePoint <= 129279) { + return true; + } + + if ($codePoint >= 129751 && $codePoint <= 129791) { + return true; + } + + if ($codePoint >= 129995 && $codePoint <= 130031) { + return true; + } + + if ($codePoint >= 130042 && $codePoint <= 131069) { + return true; + } + + if ($codePoint >= 173790 && $codePoint <= 173823) { + return true; + } + + if ($codePoint >= 191457 && $codePoint <= 194559) { + return true; + } + + if ($codePoint >= 195102 && $codePoint <= 196605) { + return true; + } + + if ($codePoint >= 201547 && $codePoint <= 262141) { + return true; + } + + if ($codePoint >= 262144 && $codePoint <= 327677) { + return true; + } + + if ($codePoint >= 327680 && $codePoint <= 393213) { + return true; + } + + if ($codePoint >= 393216 && $codePoint <= 458749) { + return true; + } + + if ($codePoint >= 458752 && $codePoint <= 524285) { + return true; + } + + if ($codePoint >= 524288 && $codePoint <= 589821) { + return true; + } + + if ($codePoint >= 589824 && $codePoint <= 655357) { + return true; + } + + if ($codePoint >= 655360 && $codePoint <= 720893) { + return true; + } + + if ($codePoint >= 720896 && $codePoint <= 786429) { + return true; + } + + if ($codePoint >= 786432 && $codePoint <= 851965) { + return true; + } + + if ($codePoint >= 851968 && $codePoint <= 917501) { + return true; + } + + if ($codePoint >= 917536 && $codePoint <= 917631) { + return true; + } + + if ($codePoint >= 917632 && $codePoint <= 917759) { + return true; + } + + if ($codePoint >= 918000 && $codePoint <= 983037) { + return true; + } + + if ($codePoint >= 983040 && $codePoint <= 1048573) { + return true; + } + + if ($codePoint >= 1048576 && $codePoint <= 1114109) { + return true; + } + + return false; + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php new file mode 100644 index 00000000..5c1c51dd --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php @@ -0,0 +1,24 @@ + 'ss', + 962 => 'σ', + 8204 => '', + 8205 => '', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php new file mode 100644 index 00000000..25a5f564 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php @@ -0,0 +1,2638 @@ + true, + 889 => true, + 896 => true, + 897 => true, + 898 => true, + 899 => true, + 907 => true, + 909 => true, + 930 => true, + 1216 => true, + 1328 => true, + 1367 => true, + 1368 => true, + 1419 => true, + 1420 => true, + 1424 => true, + 1480 => true, + 1481 => true, + 1482 => true, + 1483 => true, + 1484 => true, + 1485 => true, + 1486 => true, + 1487 => true, + 1515 => true, + 1516 => true, + 1517 => true, + 1518 => true, + 1525 => true, + 1526 => true, + 1527 => true, + 1528 => true, + 1529 => true, + 1530 => true, + 1531 => true, + 1532 => true, + 1533 => true, + 1534 => true, + 1535 => true, + 1536 => true, + 1537 => true, + 1538 => true, + 1539 => true, + 1540 => true, + 1541 => true, + 1564 => true, + 1565 => true, + 1757 => true, + 1806 => true, + 1807 => true, + 1867 => true, + 1868 => true, + 1970 => true, + 1971 => true, + 1972 => true, + 1973 => true, + 1974 => true, + 1975 => true, + 1976 => true, + 1977 => true, + 1978 => true, + 1979 => true, + 1980 => true, + 1981 => true, + 1982 => true, + 1983 => true, + 2043 => true, + 2044 => true, + 2094 => true, + 2095 => true, + 2111 => true, + 2140 => true, + 2141 => true, + 2143 => true, + 2229 => true, + 2248 => true, + 2249 => true, + 2250 => true, + 2251 => true, + 2252 => true, + 2253 => true, + 2254 => true, + 2255 => true, + 2256 => true, + 2257 => true, + 2258 => true, + 2274 => true, + 2436 => true, + 2445 => true, + 2446 => true, + 2449 => true, + 2450 => true, + 2473 => true, + 2481 => true, + 2483 => true, + 2484 => true, + 2485 => true, + 2490 => true, + 2491 => true, + 2501 => true, + 2502 => true, + 2505 => true, + 2506 => true, + 2511 => true, + 2512 => true, + 2513 => true, + 2514 => true, + 2515 => true, + 2516 => true, + 2517 => true, + 2518 => true, + 2520 => true, + 2521 => true, + 2522 => true, + 2523 => true, + 2526 => true, + 2532 => true, + 2533 => true, + 2559 => true, + 2560 => true, + 2564 => true, + 2571 => true, + 2572 => true, + 2573 => true, + 2574 => true, + 2577 => true, + 2578 => true, + 2601 => true, + 2609 => true, + 2612 => true, + 2615 => true, + 2618 => true, + 2619 => true, + 2621 => true, + 2627 => true, + 2628 => true, + 2629 => true, + 2630 => true, + 2633 => true, + 2634 => true, + 2638 => true, + 2639 => true, + 2640 => true, + 2642 => true, + 2643 => true, + 2644 => true, + 2645 => true, + 2646 => true, + 2647 => true, + 2648 => true, + 2653 => true, + 2655 => true, + 2656 => true, + 2657 => true, + 2658 => true, + 2659 => true, + 2660 => true, + 2661 => true, + 2679 => true, + 2680 => true, + 2681 => true, + 2682 => true, + 2683 => true, + 2684 => true, + 2685 => true, + 2686 => true, + 2687 => true, + 2688 => true, + 2692 => true, + 2702 => true, + 2706 => true, + 2729 => true, + 2737 => true, + 2740 => true, + 2746 => true, + 2747 => true, + 2758 => true, + 2762 => true, + 2766 => true, + 2767 => true, + 2769 => true, + 2770 => true, + 2771 => true, + 2772 => true, + 2773 => true, + 2774 => true, + 2775 => true, + 2776 => true, + 2777 => true, + 2778 => true, + 2779 => true, + 2780 => true, + 2781 => true, + 2782 => true, + 2783 => true, + 2788 => true, + 2789 => true, + 2802 => true, + 2803 => true, + 2804 => true, + 2805 => true, + 2806 => true, + 2807 => true, + 2808 => true, + 2816 => true, + 2820 => true, + 2829 => true, + 2830 => true, + 2833 => true, + 2834 => true, + 2857 => true, + 2865 => true, + 2868 => true, + 2874 => true, + 2875 => true, + 2885 => true, + 2886 => true, + 2889 => true, + 2890 => true, + 2894 => true, + 2895 => true, + 2896 => true, + 2897 => true, + 2898 => true, + 2899 => true, + 2900 => true, + 2904 => true, + 2905 => true, + 2906 => true, + 2907 => true, + 2910 => true, + 2916 => true, + 2917 => true, + 2936 => true, + 2937 => true, + 2938 => true, + 2939 => true, + 2940 => true, + 2941 => true, + 2942 => true, + 2943 => true, + 2944 => true, + 2945 => true, + 2948 => true, + 2955 => true, + 2956 => true, + 2957 => true, + 2961 => true, + 2966 => true, + 2967 => true, + 2968 => true, + 2971 => true, + 2973 => true, + 2976 => true, + 2977 => true, + 2978 => true, + 2981 => true, + 2982 => true, + 2983 => true, + 2987 => true, + 2988 => true, + 2989 => true, + 3002 => true, + 3003 => true, + 3004 => true, + 3005 => true, + 3011 => true, + 3012 => true, + 3013 => true, + 3017 => true, + 3022 => true, + 3023 => true, + 3025 => true, + 3026 => true, + 3027 => true, + 3028 => true, + 3029 => true, + 3030 => true, + 3032 => true, + 3033 => true, + 3034 => true, + 3035 => true, + 3036 => true, + 3037 => true, + 3038 => true, + 3039 => true, + 3040 => true, + 3041 => true, + 3042 => true, + 3043 => true, + 3044 => true, + 3045 => true, + 3067 => true, + 3068 => true, + 3069 => true, + 3070 => true, + 3071 => true, + 3085 => true, + 3089 => true, + 3113 => true, + 3130 => true, + 3131 => true, + 3132 => true, + 3141 => true, + 3145 => true, + 3150 => true, + 3151 => true, + 3152 => true, + 3153 => true, + 3154 => true, + 3155 => true, + 3156 => true, + 3159 => true, + 3163 => true, + 3164 => true, + 3165 => true, + 3166 => true, + 3167 => true, + 3172 => true, + 3173 => true, + 3184 => true, + 3185 => true, + 3186 => true, + 3187 => true, + 3188 => true, + 3189 => true, + 3190 => true, + 3213 => true, + 3217 => true, + 3241 => true, + 3252 => true, + 3258 => true, + 3259 => true, + 3269 => true, + 3273 => true, + 3278 => true, + 3279 => true, + 3280 => true, + 3281 => true, + 3282 => true, + 3283 => true, + 3284 => true, + 3287 => true, + 3288 => true, + 3289 => true, + 3290 => true, + 3291 => true, + 3292 => true, + 3293 => true, + 3295 => true, + 3300 => true, + 3301 => true, + 3312 => true, + 3315 => true, + 3316 => true, + 3317 => true, + 3318 => true, + 3319 => true, + 3320 => true, + 3321 => true, + 3322 => true, + 3323 => true, + 3324 => true, + 3325 => true, + 3326 => true, + 3327 => true, + 3341 => true, + 3345 => true, + 3397 => true, + 3401 => true, + 3408 => true, + 3409 => true, + 3410 => true, + 3411 => true, + 3428 => true, + 3429 => true, + 3456 => true, + 3460 => true, + 3479 => true, + 3480 => true, + 3481 => true, + 3506 => true, + 3516 => true, + 3518 => true, + 3519 => true, + 3527 => true, + 3528 => true, + 3529 => true, + 3531 => true, + 3532 => true, + 3533 => true, + 3534 => true, + 3541 => true, + 3543 => true, + 3552 => true, + 3553 => true, + 3554 => true, + 3555 => true, + 3556 => true, + 3557 => true, + 3568 => true, + 3569 => true, + 3573 => true, + 3574 => true, + 3575 => true, + 3576 => true, + 3577 => true, + 3578 => true, + 3579 => true, + 3580 => true, + 3581 => true, + 3582 => true, + 3583 => true, + 3584 => true, + 3643 => true, + 3644 => true, + 3645 => true, + 3646 => true, + 3715 => true, + 3717 => true, + 3723 => true, + 3748 => true, + 3750 => true, + 3774 => true, + 3775 => true, + 3781 => true, + 3783 => true, + 3790 => true, + 3791 => true, + 3802 => true, + 3803 => true, + 3912 => true, + 3949 => true, + 3950 => true, + 3951 => true, + 3952 => true, + 3992 => true, + 4029 => true, + 4045 => true, + 4294 => true, + 4296 => true, + 4297 => true, + 4298 => true, + 4299 => true, + 4300 => true, + 4302 => true, + 4303 => true, + 4447 => true, + 4448 => true, + 4681 => true, + 4686 => true, + 4687 => true, + 4695 => true, + 4697 => true, + 4702 => true, + 4703 => true, + 4745 => true, + 4750 => true, + 4751 => true, + 4785 => true, + 4790 => true, + 4791 => true, + 4799 => true, + 4801 => true, + 4806 => true, + 4807 => true, + 4823 => true, + 4881 => true, + 4886 => true, + 4887 => true, + 4955 => true, + 4956 => true, + 4989 => true, + 4990 => true, + 4991 => true, + 5018 => true, + 5019 => true, + 5020 => true, + 5021 => true, + 5022 => true, + 5023 => true, + 5110 => true, + 5111 => true, + 5118 => true, + 5119 => true, + 5760 => true, + 5789 => true, + 5790 => true, + 5791 => true, + 5881 => true, + 5882 => true, + 5883 => true, + 5884 => true, + 5885 => true, + 5886 => true, + 5887 => true, + 5901 => true, + 5909 => true, + 5910 => true, + 5911 => true, + 5912 => true, + 5913 => true, + 5914 => true, + 5915 => true, + 5916 => true, + 5917 => true, + 5918 => true, + 5919 => true, + 5943 => true, + 5944 => true, + 5945 => true, + 5946 => true, + 5947 => true, + 5948 => true, + 5949 => true, + 5950 => true, + 5951 => true, + 5972 => true, + 5973 => true, + 5974 => true, + 5975 => true, + 5976 => true, + 5977 => true, + 5978 => true, + 5979 => true, + 5980 => true, + 5981 => true, + 5982 => true, + 5983 => true, + 5997 => true, + 6001 => true, + 6004 => true, + 6005 => true, + 6006 => true, + 6007 => true, + 6008 => true, + 6009 => true, + 6010 => true, + 6011 => true, + 6012 => true, + 6013 => true, + 6014 => true, + 6015 => true, + 6068 => true, + 6069 => true, + 6110 => true, + 6111 => true, + 6122 => true, + 6123 => true, + 6124 => true, + 6125 => true, + 6126 => true, + 6127 => true, + 6138 => true, + 6139 => true, + 6140 => true, + 6141 => true, + 6142 => true, + 6143 => true, + 6150 => true, + 6158 => true, + 6159 => true, + 6170 => true, + 6171 => true, + 6172 => true, + 6173 => true, + 6174 => true, + 6175 => true, + 6265 => true, + 6266 => true, + 6267 => true, + 6268 => true, + 6269 => true, + 6270 => true, + 6271 => true, + 6315 => true, + 6316 => true, + 6317 => true, + 6318 => true, + 6319 => true, + 6390 => true, + 6391 => true, + 6392 => true, + 6393 => true, + 6394 => true, + 6395 => true, + 6396 => true, + 6397 => true, + 6398 => true, + 6399 => true, + 6431 => true, + 6444 => true, + 6445 => true, + 6446 => true, + 6447 => true, + 6460 => true, + 6461 => true, + 6462 => true, + 6463 => true, + 6465 => true, + 6466 => true, + 6467 => true, + 6510 => true, + 6511 => true, + 6517 => true, + 6518 => true, + 6519 => true, + 6520 => true, + 6521 => true, + 6522 => true, + 6523 => true, + 6524 => true, + 6525 => true, + 6526 => true, + 6527 => true, + 6572 => true, + 6573 => true, + 6574 => true, + 6575 => true, + 6602 => true, + 6603 => true, + 6604 => true, + 6605 => true, + 6606 => true, + 6607 => true, + 6619 => true, + 6620 => true, + 6621 => true, + 6684 => true, + 6685 => true, + 6751 => true, + 6781 => true, + 6782 => true, + 6794 => true, + 6795 => true, + 6796 => true, + 6797 => true, + 6798 => true, + 6799 => true, + 6810 => true, + 6811 => true, + 6812 => true, + 6813 => true, + 6814 => true, + 6815 => true, + 6830 => true, + 6831 => true, + 6988 => true, + 6989 => true, + 6990 => true, + 6991 => true, + 7037 => true, + 7038 => true, + 7039 => true, + 7156 => true, + 7157 => true, + 7158 => true, + 7159 => true, + 7160 => true, + 7161 => true, + 7162 => true, + 7163 => true, + 7224 => true, + 7225 => true, + 7226 => true, + 7242 => true, + 7243 => true, + 7244 => true, + 7305 => true, + 7306 => true, + 7307 => true, + 7308 => true, + 7309 => true, + 7310 => true, + 7311 => true, + 7355 => true, + 7356 => true, + 7368 => true, + 7369 => true, + 7370 => true, + 7371 => true, + 7372 => true, + 7373 => true, + 7374 => true, + 7375 => true, + 7419 => true, + 7420 => true, + 7421 => true, + 7422 => true, + 7423 => true, + 7674 => true, + 7958 => true, + 7959 => true, + 7966 => true, + 7967 => true, + 8006 => true, + 8007 => true, + 8014 => true, + 8015 => true, + 8024 => true, + 8026 => true, + 8028 => true, + 8030 => true, + 8062 => true, + 8063 => true, + 8117 => true, + 8133 => true, + 8148 => true, + 8149 => true, + 8156 => true, + 8176 => true, + 8177 => true, + 8181 => true, + 8191 => true, + 8206 => true, + 8207 => true, + 8228 => true, + 8229 => true, + 8230 => true, + 8232 => true, + 8233 => true, + 8234 => true, + 8235 => true, + 8236 => true, + 8237 => true, + 8238 => true, + 8289 => true, + 8290 => true, + 8291 => true, + 8293 => true, + 8294 => true, + 8295 => true, + 8296 => true, + 8297 => true, + 8298 => true, + 8299 => true, + 8300 => true, + 8301 => true, + 8302 => true, + 8303 => true, + 8306 => true, + 8307 => true, + 8335 => true, + 8349 => true, + 8350 => true, + 8351 => true, + 8384 => true, + 8385 => true, + 8386 => true, + 8387 => true, + 8388 => true, + 8389 => true, + 8390 => true, + 8391 => true, + 8392 => true, + 8393 => true, + 8394 => true, + 8395 => true, + 8396 => true, + 8397 => true, + 8398 => true, + 8399 => true, + 8433 => true, + 8434 => true, + 8435 => true, + 8436 => true, + 8437 => true, + 8438 => true, + 8439 => true, + 8440 => true, + 8441 => true, + 8442 => true, + 8443 => true, + 8444 => true, + 8445 => true, + 8446 => true, + 8447 => true, + 8498 => true, + 8579 => true, + 8588 => true, + 8589 => true, + 8590 => true, + 8591 => true, + 9255 => true, + 9256 => true, + 9257 => true, + 9258 => true, + 9259 => true, + 9260 => true, + 9261 => true, + 9262 => true, + 9263 => true, + 9264 => true, + 9265 => true, + 9266 => true, + 9267 => true, + 9268 => true, + 9269 => true, + 9270 => true, + 9271 => true, + 9272 => true, + 9273 => true, + 9274 => true, + 9275 => true, + 9276 => true, + 9277 => true, + 9278 => true, + 9279 => true, + 9291 => true, + 9292 => true, + 9293 => true, + 9294 => true, + 9295 => true, + 9296 => true, + 9297 => true, + 9298 => true, + 9299 => true, + 9300 => true, + 9301 => true, + 9302 => true, + 9303 => true, + 9304 => true, + 9305 => true, + 9306 => true, + 9307 => true, + 9308 => true, + 9309 => true, + 9310 => true, + 9311 => true, + 9352 => true, + 9353 => true, + 9354 => true, + 9355 => true, + 9356 => true, + 9357 => true, + 9358 => true, + 9359 => true, + 9360 => true, + 9361 => true, + 9362 => true, + 9363 => true, + 9364 => true, + 9365 => true, + 9366 => true, + 9367 => true, + 9368 => true, + 9369 => true, + 9370 => true, + 9371 => true, + 11124 => true, + 11125 => true, + 11158 => true, + 11311 => true, + 11359 => true, + 11508 => true, + 11509 => true, + 11510 => true, + 11511 => true, + 11512 => true, + 11558 => true, + 11560 => true, + 11561 => true, + 11562 => true, + 11563 => true, + 11564 => true, + 11566 => true, + 11567 => true, + 11624 => true, + 11625 => true, + 11626 => true, + 11627 => true, + 11628 => true, + 11629 => true, + 11630 => true, + 11633 => true, + 11634 => true, + 11635 => true, + 11636 => true, + 11637 => true, + 11638 => true, + 11639 => true, + 11640 => true, + 11641 => true, + 11642 => true, + 11643 => true, + 11644 => true, + 11645 => true, + 11646 => true, + 11671 => true, + 11672 => true, + 11673 => true, + 11674 => true, + 11675 => true, + 11676 => true, + 11677 => true, + 11678 => true, + 11679 => true, + 11687 => true, + 11695 => true, + 11703 => true, + 11711 => true, + 11719 => true, + 11727 => true, + 11735 => true, + 11743 => true, + 11930 => true, + 12020 => true, + 12021 => true, + 12022 => true, + 12023 => true, + 12024 => true, + 12025 => true, + 12026 => true, + 12027 => true, + 12028 => true, + 12029 => true, + 12030 => true, + 12031 => true, + 12246 => true, + 12247 => true, + 12248 => true, + 12249 => true, + 12250 => true, + 12251 => true, + 12252 => true, + 12253 => true, + 12254 => true, + 12255 => true, + 12256 => true, + 12257 => true, + 12258 => true, + 12259 => true, + 12260 => true, + 12261 => true, + 12262 => true, + 12263 => true, + 12264 => true, + 12265 => true, + 12266 => true, + 12267 => true, + 12268 => true, + 12269 => true, + 12270 => true, + 12271 => true, + 12272 => true, + 12273 => true, + 12274 => true, + 12275 => true, + 12276 => true, + 12277 => true, + 12278 => true, + 12279 => true, + 12280 => true, + 12281 => true, + 12282 => true, + 12283 => true, + 12284 => true, + 12285 => true, + 12286 => true, + 12287 => true, + 12352 => true, + 12439 => true, + 12440 => true, + 12544 => true, + 12545 => true, + 12546 => true, + 12547 => true, + 12548 => true, + 12592 => true, + 12644 => true, + 12687 => true, + 12772 => true, + 12773 => true, + 12774 => true, + 12775 => true, + 12776 => true, + 12777 => true, + 12778 => true, + 12779 => true, + 12780 => true, + 12781 => true, + 12782 => true, + 12783 => true, + 12831 => true, + 13250 => true, + 13255 => true, + 13272 => true, + 40957 => true, + 40958 => true, + 40959 => true, + 42125 => true, + 42126 => true, + 42127 => true, + 42183 => true, + 42184 => true, + 42185 => true, + 42186 => true, + 42187 => true, + 42188 => true, + 42189 => true, + 42190 => true, + 42191 => true, + 42540 => true, + 42541 => true, + 42542 => true, + 42543 => true, + 42544 => true, + 42545 => true, + 42546 => true, + 42547 => true, + 42548 => true, + 42549 => true, + 42550 => true, + 42551 => true, + 42552 => true, + 42553 => true, + 42554 => true, + 42555 => true, + 42556 => true, + 42557 => true, + 42558 => true, + 42559 => true, + 42744 => true, + 42745 => true, + 42746 => true, + 42747 => true, + 42748 => true, + 42749 => true, + 42750 => true, + 42751 => true, + 42944 => true, + 42945 => true, + 43053 => true, + 43054 => true, + 43055 => true, + 43066 => true, + 43067 => true, + 43068 => true, + 43069 => true, + 43070 => true, + 43071 => true, + 43128 => true, + 43129 => true, + 43130 => true, + 43131 => true, + 43132 => true, + 43133 => true, + 43134 => true, + 43135 => true, + 43206 => true, + 43207 => true, + 43208 => true, + 43209 => true, + 43210 => true, + 43211 => true, + 43212 => true, + 43213 => true, + 43226 => true, + 43227 => true, + 43228 => true, + 43229 => true, + 43230 => true, + 43231 => true, + 43348 => true, + 43349 => true, + 43350 => true, + 43351 => true, + 43352 => true, + 43353 => true, + 43354 => true, + 43355 => true, + 43356 => true, + 43357 => true, + 43358 => true, + 43389 => true, + 43390 => true, + 43391 => true, + 43470 => true, + 43482 => true, + 43483 => true, + 43484 => true, + 43485 => true, + 43519 => true, + 43575 => true, + 43576 => true, + 43577 => true, + 43578 => true, + 43579 => true, + 43580 => true, + 43581 => true, + 43582 => true, + 43583 => true, + 43598 => true, + 43599 => true, + 43610 => true, + 43611 => true, + 43715 => true, + 43716 => true, + 43717 => true, + 43718 => true, + 43719 => true, + 43720 => true, + 43721 => true, + 43722 => true, + 43723 => true, + 43724 => true, + 43725 => true, + 43726 => true, + 43727 => true, + 43728 => true, + 43729 => true, + 43730 => true, + 43731 => true, + 43732 => true, + 43733 => true, + 43734 => true, + 43735 => true, + 43736 => true, + 43737 => true, + 43738 => true, + 43767 => true, + 43768 => true, + 43769 => true, + 43770 => true, + 43771 => true, + 43772 => true, + 43773 => true, + 43774 => true, + 43775 => true, + 43776 => true, + 43783 => true, + 43784 => true, + 43791 => true, + 43792 => true, + 43799 => true, + 43800 => true, + 43801 => true, + 43802 => true, + 43803 => true, + 43804 => true, + 43805 => true, + 43806 => true, + 43807 => true, + 43815 => true, + 43823 => true, + 43884 => true, + 43885 => true, + 43886 => true, + 43887 => true, + 44014 => true, + 44015 => true, + 44026 => true, + 44027 => true, + 44028 => true, + 44029 => true, + 44030 => true, + 44031 => true, + 55204 => true, + 55205 => true, + 55206 => true, + 55207 => true, + 55208 => true, + 55209 => true, + 55210 => true, + 55211 => true, + 55212 => true, + 55213 => true, + 55214 => true, + 55215 => true, + 55239 => true, + 55240 => true, + 55241 => true, + 55242 => true, + 55292 => true, + 55293 => true, + 55294 => true, + 55295 => true, + 64110 => true, + 64111 => true, + 64263 => true, + 64264 => true, + 64265 => true, + 64266 => true, + 64267 => true, + 64268 => true, + 64269 => true, + 64270 => true, + 64271 => true, + 64272 => true, + 64273 => true, + 64274 => true, + 64280 => true, + 64281 => true, + 64282 => true, + 64283 => true, + 64284 => true, + 64311 => true, + 64317 => true, + 64319 => true, + 64322 => true, + 64325 => true, + 64450 => true, + 64451 => true, + 64452 => true, + 64453 => true, + 64454 => true, + 64455 => true, + 64456 => true, + 64457 => true, + 64458 => true, + 64459 => true, + 64460 => true, + 64461 => true, + 64462 => true, + 64463 => true, + 64464 => true, + 64465 => true, + 64466 => true, + 64832 => true, + 64833 => true, + 64834 => true, + 64835 => true, + 64836 => true, + 64837 => true, + 64838 => true, + 64839 => true, + 64840 => true, + 64841 => true, + 64842 => true, + 64843 => true, + 64844 => true, + 64845 => true, + 64846 => true, + 64847 => true, + 64912 => true, + 64913 => true, + 64968 => true, + 64969 => true, + 64970 => true, + 64971 => true, + 64972 => true, + 64973 => true, + 64974 => true, + 64975 => true, + 65022 => true, + 65023 => true, + 65042 => true, + 65049 => true, + 65050 => true, + 65051 => true, + 65052 => true, + 65053 => true, + 65054 => true, + 65055 => true, + 65072 => true, + 65106 => true, + 65107 => true, + 65127 => true, + 65132 => true, + 65133 => true, + 65134 => true, + 65135 => true, + 65141 => true, + 65277 => true, + 65278 => true, + 65280 => true, + 65440 => true, + 65471 => true, + 65472 => true, + 65473 => true, + 65480 => true, + 65481 => true, + 65488 => true, + 65489 => true, + 65496 => true, + 65497 => true, + 65501 => true, + 65502 => true, + 65503 => true, + 65511 => true, + 65519 => true, + 65520 => true, + 65521 => true, + 65522 => true, + 65523 => true, + 65524 => true, + 65525 => true, + 65526 => true, + 65527 => true, + 65528 => true, + 65529 => true, + 65530 => true, + 65531 => true, + 65532 => true, + 65533 => true, + 65534 => true, + 65535 => true, + 65548 => true, + 65575 => true, + 65595 => true, + 65598 => true, + 65614 => true, + 65615 => true, + 65787 => true, + 65788 => true, + 65789 => true, + 65790 => true, + 65791 => true, + 65795 => true, + 65796 => true, + 65797 => true, + 65798 => true, + 65844 => true, + 65845 => true, + 65846 => true, + 65935 => true, + 65949 => true, + 65950 => true, + 65951 => true, + 66205 => true, + 66206 => true, + 66207 => true, + 66257 => true, + 66258 => true, + 66259 => true, + 66260 => true, + 66261 => true, + 66262 => true, + 66263 => true, + 66264 => true, + 66265 => true, + 66266 => true, + 66267 => true, + 66268 => true, + 66269 => true, + 66270 => true, + 66271 => true, + 66300 => true, + 66301 => true, + 66302 => true, + 66303 => true, + 66340 => true, + 66341 => true, + 66342 => true, + 66343 => true, + 66344 => true, + 66345 => true, + 66346 => true, + 66347 => true, + 66348 => true, + 66379 => true, + 66380 => true, + 66381 => true, + 66382 => true, + 66383 => true, + 66427 => true, + 66428 => true, + 66429 => true, + 66430 => true, + 66431 => true, + 66462 => true, + 66500 => true, + 66501 => true, + 66502 => true, + 66503 => true, + 66718 => true, + 66719 => true, + 66730 => true, + 66731 => true, + 66732 => true, + 66733 => true, + 66734 => true, + 66735 => true, + 66772 => true, + 66773 => true, + 66774 => true, + 66775 => true, + 66812 => true, + 66813 => true, + 66814 => true, + 66815 => true, + 66856 => true, + 66857 => true, + 66858 => true, + 66859 => true, + 66860 => true, + 66861 => true, + 66862 => true, + 66863 => true, + 66916 => true, + 66917 => true, + 66918 => true, + 66919 => true, + 66920 => true, + 66921 => true, + 66922 => true, + 66923 => true, + 66924 => true, + 66925 => true, + 66926 => true, + 67383 => true, + 67384 => true, + 67385 => true, + 67386 => true, + 67387 => true, + 67388 => true, + 67389 => true, + 67390 => true, + 67391 => true, + 67414 => true, + 67415 => true, + 67416 => true, + 67417 => true, + 67418 => true, + 67419 => true, + 67420 => true, + 67421 => true, + 67422 => true, + 67423 => true, + 67590 => true, + 67591 => true, + 67593 => true, + 67638 => true, + 67641 => true, + 67642 => true, + 67643 => true, + 67645 => true, + 67646 => true, + 67670 => true, + 67743 => true, + 67744 => true, + 67745 => true, + 67746 => true, + 67747 => true, + 67748 => true, + 67749 => true, + 67750 => true, + 67827 => true, + 67830 => true, + 67831 => true, + 67832 => true, + 67833 => true, + 67834 => true, + 67868 => true, + 67869 => true, + 67870 => true, + 67898 => true, + 67899 => true, + 67900 => true, + 67901 => true, + 67902 => true, + 68024 => true, + 68025 => true, + 68026 => true, + 68027 => true, + 68048 => true, + 68049 => true, + 68100 => true, + 68103 => true, + 68104 => true, + 68105 => true, + 68106 => true, + 68107 => true, + 68116 => true, + 68120 => true, + 68150 => true, + 68151 => true, + 68155 => true, + 68156 => true, + 68157 => true, + 68158 => true, + 68169 => true, + 68170 => true, + 68171 => true, + 68172 => true, + 68173 => true, + 68174 => true, + 68175 => true, + 68185 => true, + 68186 => true, + 68187 => true, + 68188 => true, + 68189 => true, + 68190 => true, + 68191 => true, + 68327 => true, + 68328 => true, + 68329 => true, + 68330 => true, + 68343 => true, + 68344 => true, + 68345 => true, + 68346 => true, + 68347 => true, + 68348 => true, + 68349 => true, + 68350 => true, + 68351 => true, + 68406 => true, + 68407 => true, + 68408 => true, + 68438 => true, + 68439 => true, + 68467 => true, + 68468 => true, + 68469 => true, + 68470 => true, + 68471 => true, + 68498 => true, + 68499 => true, + 68500 => true, + 68501 => true, + 68502 => true, + 68503 => true, + 68504 => true, + 68509 => true, + 68510 => true, + 68511 => true, + 68512 => true, + 68513 => true, + 68514 => true, + 68515 => true, + 68516 => true, + 68517 => true, + 68518 => true, + 68519 => true, + 68520 => true, + 68787 => true, + 68788 => true, + 68789 => true, + 68790 => true, + 68791 => true, + 68792 => true, + 68793 => true, + 68794 => true, + 68795 => true, + 68796 => true, + 68797 => true, + 68798 => true, + 68799 => true, + 68851 => true, + 68852 => true, + 68853 => true, + 68854 => true, + 68855 => true, + 68856 => true, + 68857 => true, + 68904 => true, + 68905 => true, + 68906 => true, + 68907 => true, + 68908 => true, + 68909 => true, + 68910 => true, + 68911 => true, + 69247 => true, + 69290 => true, + 69294 => true, + 69295 => true, + 69416 => true, + 69417 => true, + 69418 => true, + 69419 => true, + 69420 => true, + 69421 => true, + 69422 => true, + 69423 => true, + 69580 => true, + 69581 => true, + 69582 => true, + 69583 => true, + 69584 => true, + 69585 => true, + 69586 => true, + 69587 => true, + 69588 => true, + 69589 => true, + 69590 => true, + 69591 => true, + 69592 => true, + 69593 => true, + 69594 => true, + 69595 => true, + 69596 => true, + 69597 => true, + 69598 => true, + 69599 => true, + 69623 => true, + 69624 => true, + 69625 => true, + 69626 => true, + 69627 => true, + 69628 => true, + 69629 => true, + 69630 => true, + 69631 => true, + 69710 => true, + 69711 => true, + 69712 => true, + 69713 => true, + 69744 => true, + 69745 => true, + 69746 => true, + 69747 => true, + 69748 => true, + 69749 => true, + 69750 => true, + 69751 => true, + 69752 => true, + 69753 => true, + 69754 => true, + 69755 => true, + 69756 => true, + 69757 => true, + 69758 => true, + 69821 => true, + 69826 => true, + 69827 => true, + 69828 => true, + 69829 => true, + 69830 => true, + 69831 => true, + 69832 => true, + 69833 => true, + 69834 => true, + 69835 => true, + 69836 => true, + 69837 => true, + 69838 => true, + 69839 => true, + 69865 => true, + 69866 => true, + 69867 => true, + 69868 => true, + 69869 => true, + 69870 => true, + 69871 => true, + 69882 => true, + 69883 => true, + 69884 => true, + 69885 => true, + 69886 => true, + 69887 => true, + 69941 => true, + 69960 => true, + 69961 => true, + 69962 => true, + 69963 => true, + 69964 => true, + 69965 => true, + 69966 => true, + 69967 => true, + 70007 => true, + 70008 => true, + 70009 => true, + 70010 => true, + 70011 => true, + 70012 => true, + 70013 => true, + 70014 => true, + 70015 => true, + 70112 => true, + 70133 => true, + 70134 => true, + 70135 => true, + 70136 => true, + 70137 => true, + 70138 => true, + 70139 => true, + 70140 => true, + 70141 => true, + 70142 => true, + 70143 => true, + 70162 => true, + 70279 => true, + 70281 => true, + 70286 => true, + 70302 => true, + 70314 => true, + 70315 => true, + 70316 => true, + 70317 => true, + 70318 => true, + 70319 => true, + 70379 => true, + 70380 => true, + 70381 => true, + 70382 => true, + 70383 => true, + 70394 => true, + 70395 => true, + 70396 => true, + 70397 => true, + 70398 => true, + 70399 => true, + 70404 => true, + 70413 => true, + 70414 => true, + 70417 => true, + 70418 => true, + 70441 => true, + 70449 => true, + 70452 => true, + 70458 => true, + 70469 => true, + 70470 => true, + 70473 => true, + 70474 => true, + 70478 => true, + 70479 => true, + 70481 => true, + 70482 => true, + 70483 => true, + 70484 => true, + 70485 => true, + 70486 => true, + 70488 => true, + 70489 => true, + 70490 => true, + 70491 => true, + 70492 => true, + 70500 => true, + 70501 => true, + 70509 => true, + 70510 => true, + 70511 => true, + 70748 => true, + 70754 => true, + 70755 => true, + 70756 => true, + 70757 => true, + 70758 => true, + 70759 => true, + 70760 => true, + 70761 => true, + 70762 => true, + 70763 => true, + 70764 => true, + 70765 => true, + 70766 => true, + 70767 => true, + 70768 => true, + 70769 => true, + 70770 => true, + 70771 => true, + 70772 => true, + 70773 => true, + 70774 => true, + 70775 => true, + 70776 => true, + 70777 => true, + 70778 => true, + 70779 => true, + 70780 => true, + 70781 => true, + 70782 => true, + 70783 => true, + 70856 => true, + 70857 => true, + 70858 => true, + 70859 => true, + 70860 => true, + 70861 => true, + 70862 => true, + 70863 => true, + 71094 => true, + 71095 => true, + 71237 => true, + 71238 => true, + 71239 => true, + 71240 => true, + 71241 => true, + 71242 => true, + 71243 => true, + 71244 => true, + 71245 => true, + 71246 => true, + 71247 => true, + 71258 => true, + 71259 => true, + 71260 => true, + 71261 => true, + 71262 => true, + 71263 => true, + 71277 => true, + 71278 => true, + 71279 => true, + 71280 => true, + 71281 => true, + 71282 => true, + 71283 => true, + 71284 => true, + 71285 => true, + 71286 => true, + 71287 => true, + 71288 => true, + 71289 => true, + 71290 => true, + 71291 => true, + 71292 => true, + 71293 => true, + 71294 => true, + 71295 => true, + 71353 => true, + 71354 => true, + 71355 => true, + 71356 => true, + 71357 => true, + 71358 => true, + 71359 => true, + 71451 => true, + 71452 => true, + 71468 => true, + 71469 => true, + 71470 => true, + 71471 => true, + 71923 => true, + 71924 => true, + 71925 => true, + 71926 => true, + 71927 => true, + 71928 => true, + 71929 => true, + 71930 => true, + 71931 => true, + 71932 => true, + 71933 => true, + 71934 => true, + 71943 => true, + 71944 => true, + 71946 => true, + 71947 => true, + 71956 => true, + 71959 => true, + 71990 => true, + 71993 => true, + 71994 => true, + 72007 => true, + 72008 => true, + 72009 => true, + 72010 => true, + 72011 => true, + 72012 => true, + 72013 => true, + 72014 => true, + 72015 => true, + 72104 => true, + 72105 => true, + 72152 => true, + 72153 => true, + 72165 => true, + 72166 => true, + 72167 => true, + 72168 => true, + 72169 => true, + 72170 => true, + 72171 => true, + 72172 => true, + 72173 => true, + 72174 => true, + 72175 => true, + 72176 => true, + 72177 => true, + 72178 => true, + 72179 => true, + 72180 => true, + 72181 => true, + 72182 => true, + 72183 => true, + 72184 => true, + 72185 => true, + 72186 => true, + 72187 => true, + 72188 => true, + 72189 => true, + 72190 => true, + 72191 => true, + 72264 => true, + 72265 => true, + 72266 => true, + 72267 => true, + 72268 => true, + 72269 => true, + 72270 => true, + 72271 => true, + 72355 => true, + 72356 => true, + 72357 => true, + 72358 => true, + 72359 => true, + 72360 => true, + 72361 => true, + 72362 => true, + 72363 => true, + 72364 => true, + 72365 => true, + 72366 => true, + 72367 => true, + 72368 => true, + 72369 => true, + 72370 => true, + 72371 => true, + 72372 => true, + 72373 => true, + 72374 => true, + 72375 => true, + 72376 => true, + 72377 => true, + 72378 => true, + 72379 => true, + 72380 => true, + 72381 => true, + 72382 => true, + 72383 => true, + 72713 => true, + 72759 => true, + 72774 => true, + 72775 => true, + 72776 => true, + 72777 => true, + 72778 => true, + 72779 => true, + 72780 => true, + 72781 => true, + 72782 => true, + 72783 => true, + 72813 => true, + 72814 => true, + 72815 => true, + 72848 => true, + 72849 => true, + 72872 => true, + 72967 => true, + 72970 => true, + 73015 => true, + 73016 => true, + 73017 => true, + 73019 => true, + 73022 => true, + 73032 => true, + 73033 => true, + 73034 => true, + 73035 => true, + 73036 => true, + 73037 => true, + 73038 => true, + 73039 => true, + 73050 => true, + 73051 => true, + 73052 => true, + 73053 => true, + 73054 => true, + 73055 => true, + 73062 => true, + 73065 => true, + 73103 => true, + 73106 => true, + 73113 => true, + 73114 => true, + 73115 => true, + 73116 => true, + 73117 => true, + 73118 => true, + 73119 => true, + 73649 => true, + 73650 => true, + 73651 => true, + 73652 => true, + 73653 => true, + 73654 => true, + 73655 => true, + 73656 => true, + 73657 => true, + 73658 => true, + 73659 => true, + 73660 => true, + 73661 => true, + 73662 => true, + 73663 => true, + 73714 => true, + 73715 => true, + 73716 => true, + 73717 => true, + 73718 => true, + 73719 => true, + 73720 => true, + 73721 => true, + 73722 => true, + 73723 => true, + 73724 => true, + 73725 => true, + 73726 => true, + 74863 => true, + 74869 => true, + 74870 => true, + 74871 => true, + 74872 => true, + 74873 => true, + 74874 => true, + 74875 => true, + 74876 => true, + 74877 => true, + 74878 => true, + 74879 => true, + 78895 => true, + 78896 => true, + 78897 => true, + 78898 => true, + 78899 => true, + 78900 => true, + 78901 => true, + 78902 => true, + 78903 => true, + 78904 => true, + 92729 => true, + 92730 => true, + 92731 => true, + 92732 => true, + 92733 => true, + 92734 => true, + 92735 => true, + 92767 => true, + 92778 => true, + 92779 => true, + 92780 => true, + 92781 => true, + 92910 => true, + 92911 => true, + 92918 => true, + 92919 => true, + 92920 => true, + 92921 => true, + 92922 => true, + 92923 => true, + 92924 => true, + 92925 => true, + 92926 => true, + 92927 => true, + 92998 => true, + 92999 => true, + 93000 => true, + 93001 => true, + 93002 => true, + 93003 => true, + 93004 => true, + 93005 => true, + 93006 => true, + 93007 => true, + 93018 => true, + 93026 => true, + 93048 => true, + 93049 => true, + 93050 => true, + 93051 => true, + 93052 => true, + 94027 => true, + 94028 => true, + 94029 => true, + 94030 => true, + 94088 => true, + 94089 => true, + 94090 => true, + 94091 => true, + 94092 => true, + 94093 => true, + 94094 => true, + 94181 => true, + 94182 => true, + 94183 => true, + 94184 => true, + 94185 => true, + 94186 => true, + 94187 => true, + 94188 => true, + 94189 => true, + 94190 => true, + 94191 => true, + 94194 => true, + 94195 => true, + 94196 => true, + 94197 => true, + 94198 => true, + 94199 => true, + 94200 => true, + 94201 => true, + 94202 => true, + 94203 => true, + 94204 => true, + 94205 => true, + 94206 => true, + 94207 => true, + 100344 => true, + 100345 => true, + 100346 => true, + 100347 => true, + 100348 => true, + 100349 => true, + 100350 => true, + 100351 => true, + 110931 => true, + 110932 => true, + 110933 => true, + 110934 => true, + 110935 => true, + 110936 => true, + 110937 => true, + 110938 => true, + 110939 => true, + 110940 => true, + 110941 => true, + 110942 => true, + 110943 => true, + 110944 => true, + 110945 => true, + 110946 => true, + 110947 => true, + 110952 => true, + 110953 => true, + 110954 => true, + 110955 => true, + 110956 => true, + 110957 => true, + 110958 => true, + 110959 => true, + 113771 => true, + 113772 => true, + 113773 => true, + 113774 => true, + 113775 => true, + 113789 => true, + 113790 => true, + 113791 => true, + 113801 => true, + 113802 => true, + 113803 => true, + 113804 => true, + 113805 => true, + 113806 => true, + 113807 => true, + 113818 => true, + 113819 => true, + 119030 => true, + 119031 => true, + 119032 => true, + 119033 => true, + 119034 => true, + 119035 => true, + 119036 => true, + 119037 => true, + 119038 => true, + 119039 => true, + 119079 => true, + 119080 => true, + 119155 => true, + 119156 => true, + 119157 => true, + 119158 => true, + 119159 => true, + 119160 => true, + 119161 => true, + 119162 => true, + 119273 => true, + 119274 => true, + 119275 => true, + 119276 => true, + 119277 => true, + 119278 => true, + 119279 => true, + 119280 => true, + 119281 => true, + 119282 => true, + 119283 => true, + 119284 => true, + 119285 => true, + 119286 => true, + 119287 => true, + 119288 => true, + 119289 => true, + 119290 => true, + 119291 => true, + 119292 => true, + 119293 => true, + 119294 => true, + 119295 => true, + 119540 => true, + 119541 => true, + 119542 => true, + 119543 => true, + 119544 => true, + 119545 => true, + 119546 => true, + 119547 => true, + 119548 => true, + 119549 => true, + 119550 => true, + 119551 => true, + 119639 => true, + 119640 => true, + 119641 => true, + 119642 => true, + 119643 => true, + 119644 => true, + 119645 => true, + 119646 => true, + 119647 => true, + 119893 => true, + 119965 => true, + 119968 => true, + 119969 => true, + 119971 => true, + 119972 => true, + 119975 => true, + 119976 => true, + 119981 => true, + 119994 => true, + 119996 => true, + 120004 => true, + 120070 => true, + 120075 => true, + 120076 => true, + 120085 => true, + 120093 => true, + 120122 => true, + 120127 => true, + 120133 => true, + 120135 => true, + 120136 => true, + 120137 => true, + 120145 => true, + 120486 => true, + 120487 => true, + 120780 => true, + 120781 => true, + 121484 => true, + 121485 => true, + 121486 => true, + 121487 => true, + 121488 => true, + 121489 => true, + 121490 => true, + 121491 => true, + 121492 => true, + 121493 => true, + 121494 => true, + 121495 => true, + 121496 => true, + 121497 => true, + 121498 => true, + 121504 => true, + 122887 => true, + 122905 => true, + 122906 => true, + 122914 => true, + 122917 => true, + 123181 => true, + 123182 => true, + 123183 => true, + 123198 => true, + 123199 => true, + 123210 => true, + 123211 => true, + 123212 => true, + 123213 => true, + 123642 => true, + 123643 => true, + 123644 => true, + 123645 => true, + 123646 => true, + 125125 => true, + 125126 => true, + 125260 => true, + 125261 => true, + 125262 => true, + 125263 => true, + 125274 => true, + 125275 => true, + 125276 => true, + 125277 => true, + 126468 => true, + 126496 => true, + 126499 => true, + 126501 => true, + 126502 => true, + 126504 => true, + 126515 => true, + 126520 => true, + 126522 => true, + 126524 => true, + 126525 => true, + 126526 => true, + 126527 => true, + 126528 => true, + 126529 => true, + 126531 => true, + 126532 => true, + 126533 => true, + 126534 => true, + 126536 => true, + 126538 => true, + 126540 => true, + 126544 => true, + 126547 => true, + 126549 => true, + 126550 => true, + 126552 => true, + 126554 => true, + 126556 => true, + 126558 => true, + 126560 => true, + 126563 => true, + 126565 => true, + 126566 => true, + 126571 => true, + 126579 => true, + 126584 => true, + 126589 => true, + 126591 => true, + 126602 => true, + 126620 => true, + 126621 => true, + 126622 => true, + 126623 => true, + 126624 => true, + 126628 => true, + 126634 => true, + 127020 => true, + 127021 => true, + 127022 => true, + 127023 => true, + 127124 => true, + 127125 => true, + 127126 => true, + 127127 => true, + 127128 => true, + 127129 => true, + 127130 => true, + 127131 => true, + 127132 => true, + 127133 => true, + 127134 => true, + 127135 => true, + 127151 => true, + 127152 => true, + 127168 => true, + 127184 => true, + 127222 => true, + 127223 => true, + 127224 => true, + 127225 => true, + 127226 => true, + 127227 => true, + 127228 => true, + 127229 => true, + 127230 => true, + 127231 => true, + 127232 => true, + 127491 => true, + 127492 => true, + 127493 => true, + 127494 => true, + 127495 => true, + 127496 => true, + 127497 => true, + 127498 => true, + 127499 => true, + 127500 => true, + 127501 => true, + 127502 => true, + 127503 => true, + 127548 => true, + 127549 => true, + 127550 => true, + 127551 => true, + 127561 => true, + 127562 => true, + 127563 => true, + 127564 => true, + 127565 => true, + 127566 => true, + 127567 => true, + 127570 => true, + 127571 => true, + 127572 => true, + 127573 => true, + 127574 => true, + 127575 => true, + 127576 => true, + 127577 => true, + 127578 => true, + 127579 => true, + 127580 => true, + 127581 => true, + 127582 => true, + 127583 => true, + 128728 => true, + 128729 => true, + 128730 => true, + 128731 => true, + 128732 => true, + 128733 => true, + 128734 => true, + 128735 => true, + 128749 => true, + 128750 => true, + 128751 => true, + 128765 => true, + 128766 => true, + 128767 => true, + 128884 => true, + 128885 => true, + 128886 => true, + 128887 => true, + 128888 => true, + 128889 => true, + 128890 => true, + 128891 => true, + 128892 => true, + 128893 => true, + 128894 => true, + 128895 => true, + 128985 => true, + 128986 => true, + 128987 => true, + 128988 => true, + 128989 => true, + 128990 => true, + 128991 => true, + 129004 => true, + 129005 => true, + 129006 => true, + 129007 => true, + 129008 => true, + 129009 => true, + 129010 => true, + 129011 => true, + 129012 => true, + 129013 => true, + 129014 => true, + 129015 => true, + 129016 => true, + 129017 => true, + 129018 => true, + 129019 => true, + 129020 => true, + 129021 => true, + 129022 => true, + 129023 => true, + 129036 => true, + 129037 => true, + 129038 => true, + 129039 => true, + 129096 => true, + 129097 => true, + 129098 => true, + 129099 => true, + 129100 => true, + 129101 => true, + 129102 => true, + 129103 => true, + 129114 => true, + 129115 => true, + 129116 => true, + 129117 => true, + 129118 => true, + 129119 => true, + 129160 => true, + 129161 => true, + 129162 => true, + 129163 => true, + 129164 => true, + 129165 => true, + 129166 => true, + 129167 => true, + 129198 => true, + 129199 => true, + 129401 => true, + 129484 => true, + 129620 => true, + 129621 => true, + 129622 => true, + 129623 => true, + 129624 => true, + 129625 => true, + 129626 => true, + 129627 => true, + 129628 => true, + 129629 => true, + 129630 => true, + 129631 => true, + 129646 => true, + 129647 => true, + 129653 => true, + 129654 => true, + 129655 => true, + 129659 => true, + 129660 => true, + 129661 => true, + 129662 => true, + 129663 => true, + 129671 => true, + 129672 => true, + 129673 => true, + 129674 => true, + 129675 => true, + 129676 => true, + 129677 => true, + 129678 => true, + 129679 => true, + 129705 => true, + 129706 => true, + 129707 => true, + 129708 => true, + 129709 => true, + 129710 => true, + 129711 => true, + 129719 => true, + 129720 => true, + 129721 => true, + 129722 => true, + 129723 => true, + 129724 => true, + 129725 => true, + 129726 => true, + 129727 => true, + 129731 => true, + 129732 => true, + 129733 => true, + 129734 => true, + 129735 => true, + 129736 => true, + 129737 => true, + 129738 => true, + 129739 => true, + 129740 => true, + 129741 => true, + 129742 => true, + 129743 => true, + 129939 => true, + 131070 => true, + 131071 => true, + 177973 => true, + 177974 => true, + 177975 => true, + 177976 => true, + 177977 => true, + 177978 => true, + 177979 => true, + 177980 => true, + 177981 => true, + 177982 => true, + 177983 => true, + 178206 => true, + 178207 => true, + 183970 => true, + 183971 => true, + 183972 => true, + 183973 => true, + 183974 => true, + 183975 => true, + 183976 => true, + 183977 => true, + 183978 => true, + 183979 => true, + 183980 => true, + 183981 => true, + 183982 => true, + 183983 => true, + 194664 => true, + 194676 => true, + 194847 => true, + 194911 => true, + 195007 => true, + 196606 => true, + 196607 => true, + 262142 => true, + 262143 => true, + 327678 => true, + 327679 => true, + 393214 => true, + 393215 => true, + 458750 => true, + 458751 => true, + 524286 => true, + 524287 => true, + 589822 => true, + 589823 => true, + 655358 => true, + 655359 => true, + 720894 => true, + 720895 => true, + 786430 => true, + 786431 => true, + 851966 => true, + 851967 => true, + 917502 => true, + 917503 => true, + 917504 => true, + 917505 => true, + 917506 => true, + 917507 => true, + 917508 => true, + 917509 => true, + 917510 => true, + 917511 => true, + 917512 => true, + 917513 => true, + 917514 => true, + 917515 => true, + 917516 => true, + 917517 => true, + 917518 => true, + 917519 => true, + 917520 => true, + 917521 => true, + 917522 => true, + 917523 => true, + 917524 => true, + 917525 => true, + 917526 => true, + 917527 => true, + 917528 => true, + 917529 => true, + 917530 => true, + 917531 => true, + 917532 => true, + 917533 => true, + 917534 => true, + 917535 => true, + 983038 => true, + 983039 => true, + 1048574 => true, + 1048575 => true, + 1114110 => true, + 1114111 => true, +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php new file mode 100644 index 00000000..54f21cc0 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php @@ -0,0 +1,308 @@ + ' ', + 168 => ' ̈', + 175 => ' Ì„', + 180 => ' Ì', + 184 => ' ̧', + 728 => ' ̆', + 729 => ' ̇', + 730 => ' ÌŠ', + 731 => ' ̨', + 732 => ' ̃', + 733 => ' Ì‹', + 890 => ' ι', + 894 => ';', + 900 => ' Ì', + 901 => ' ̈Ì', + 8125 => ' Ì“', + 8127 => ' Ì“', + 8128 => ' Í‚', + 8129 => ' ̈͂', + 8141 => ' Ì“Ì€', + 8142 => ' Ì“Ì', + 8143 => ' Ì“Í‚', + 8157 => ' ̔̀', + 8158 => ' Ì”Ì', + 8159 => ' ̔͂', + 8173 => ' ̈̀', + 8174 => ' ̈Ì', + 8175 => '`', + 8189 => ' Ì', + 8190 => ' Ì”', + 8192 => ' ', + 8193 => ' ', + 8194 => ' ', + 8195 => ' ', + 8196 => ' ', + 8197 => ' ', + 8198 => ' ', + 8199 => ' ', + 8200 => ' ', + 8201 => ' ', + 8202 => ' ', + 8215 => ' ̳', + 8239 => ' ', + 8252 => '!!', + 8254 => ' Ì…', + 8263 => '??', + 8264 => '?!', + 8265 => '!?', + 8287 => ' ', + 8314 => '+', + 8316 => '=', + 8317 => '(', + 8318 => ')', + 8330 => '+', + 8332 => '=', + 8333 => '(', + 8334 => ')', + 8448 => 'a/c', + 8449 => 'a/s', + 8453 => 'c/o', + 8454 => 'c/u', + 9332 => '(1)', + 9333 => '(2)', + 9334 => '(3)', + 9335 => '(4)', + 9336 => '(5)', + 9337 => '(6)', + 9338 => '(7)', + 9339 => '(8)', + 9340 => '(9)', + 9341 => '(10)', + 9342 => '(11)', + 9343 => '(12)', + 9344 => '(13)', + 9345 => '(14)', + 9346 => '(15)', + 9347 => '(16)', + 9348 => '(17)', + 9349 => '(18)', + 9350 => '(19)', + 9351 => '(20)', + 9372 => '(a)', + 9373 => '(b)', + 9374 => '(c)', + 9375 => '(d)', + 9376 => '(e)', + 9377 => '(f)', + 9378 => '(g)', + 9379 => '(h)', + 9380 => '(i)', + 9381 => '(j)', + 9382 => '(k)', + 9383 => '(l)', + 9384 => '(m)', + 9385 => '(n)', + 9386 => '(o)', + 9387 => '(p)', + 9388 => '(q)', + 9389 => '(r)', + 9390 => '(s)', + 9391 => '(t)', + 9392 => '(u)', + 9393 => '(v)', + 9394 => '(w)', + 9395 => '(x)', + 9396 => '(y)', + 9397 => '(z)', + 10868 => '::=', + 10869 => '==', + 10870 => '===', + 12288 => ' ', + 12443 => ' ã‚™', + 12444 => ' ã‚š', + 12800 => '(á„€)', + 12801 => '(á„‚)', + 12802 => '(ᄃ)', + 12803 => '(á„…)', + 12804 => '(ᄆ)', + 12805 => '(ᄇ)', + 12806 => '(ᄉ)', + 12807 => '(á„‹)', + 12808 => '(á„Œ)', + 12809 => '(á„Ž)', + 12810 => '(á„)', + 12811 => '(á„)', + 12812 => '(á„‘)', + 12813 => '(á„’)', + 12814 => '(ê°€)', + 12815 => '(나)', + 12816 => '(다)', + 12817 => '(ë¼)', + 12818 => '(마)', + 12819 => '(ë°”)', + 12820 => '(사)', + 12821 => '(ì•„)', + 12822 => '(ìž)', + 12823 => '(ì°¨)', + 12824 => '(ì¹´)', + 12825 => '(타)', + 12826 => '(파)', + 12827 => '(하)', + 12828 => '(주)', + 12829 => '(오전)', + 12830 => '(오후)', + 12832 => '(一)', + 12833 => '(二)', + 12834 => '(三)', + 12835 => '(å››)', + 12836 => '(五)', + 12837 => '(å…­)', + 12838 => '(七)', + 12839 => '(å…«)', + 12840 => '(ä¹)', + 12841 => '(å)', + 12842 => '(月)', + 12843 => '(ç«)', + 12844 => '(æ°´)', + 12845 => '(木)', + 12846 => '(金)', + 12847 => '(土)', + 12848 => '(æ—¥)', + 12849 => '(æ ª)', + 12850 => '(有)', + 12851 => '(社)', + 12852 => '(å)', + 12853 => '(特)', + 12854 => '(財)', + 12855 => '(ç¥)', + 12856 => '(労)', + 12857 => '(代)', + 12858 => '(呼)', + 12859 => '(å­¦)', + 12860 => '(監)', + 12861 => '(ä¼)', + 12862 => '(資)', + 12863 => '(å”)', + 12864 => '(祭)', + 12865 => '(休)', + 12866 => '(自)', + 12867 => '(至)', + 64297 => '+', + 64606 => ' ٌّ', + 64607 => ' ÙÙ‘', + 64608 => ' ÙŽÙ‘', + 64609 => ' ÙÙ‘', + 64610 => ' ÙÙ‘', + 64611 => ' ّٰ', + 65018 => 'صلى الله عليه وسلم', + 65019 => 'جل جلاله', + 65040 => ',', + 65043 => ':', + 65044 => ';', + 65045 => '!', + 65046 => '?', + 65075 => '_', + 65076 => '_', + 65077 => '(', + 65078 => ')', + 65079 => '{', + 65080 => '}', + 65095 => '[', + 65096 => ']', + 65097 => ' Ì…', + 65098 => ' Ì…', + 65099 => ' Ì…', + 65100 => ' Ì…', + 65101 => '_', + 65102 => '_', + 65103 => '_', + 65104 => ',', + 65108 => ';', + 65109 => ':', + 65110 => '?', + 65111 => '!', + 65113 => '(', + 65114 => ')', + 65115 => '{', + 65116 => '}', + 65119 => '#', + 65120 => '&', + 65121 => '*', + 65122 => '+', + 65124 => '<', + 65125 => '>', + 65126 => '=', + 65128 => '\\', + 65129 => '$', + 65130 => '%', + 65131 => '@', + 65136 => ' Ù‹', + 65138 => ' ÙŒ', + 65140 => ' Ù', + 65142 => ' ÙŽ', + 65144 => ' Ù', + 65146 => ' Ù', + 65148 => ' Ù‘', + 65150 => ' Ù’', + 65281 => '!', + 65282 => '"', + 65283 => '#', + 65284 => '$', + 65285 => '%', + 65286 => '&', + 65287 => '\'', + 65288 => '(', + 65289 => ')', + 65290 => '*', + 65291 => '+', + 65292 => ',', + 65295 => '/', + 65306 => ':', + 65307 => ';', + 65308 => '<', + 65309 => '=', + 65310 => '>', + 65311 => '?', + 65312 => '@', + 65339 => '[', + 65340 => '\\', + 65341 => ']', + 65342 => '^', + 65343 => '_', + 65344 => '`', + 65371 => '{', + 65372 => '|', + 65373 => '}', + 65374 => '~', + 65507 => ' Ì„', + 127233 => '0,', + 127234 => '1,', + 127235 => '2,', + 127236 => '3,', + 127237 => '4,', + 127238 => '5,', + 127239 => '6,', + 127240 => '7,', + 127241 => '8,', + 127242 => '9,', + 127248 => '(a)', + 127249 => '(b)', + 127250 => '(c)', + 127251 => '(d)', + 127252 => '(e)', + 127253 => '(f)', + 127254 => '(g)', + 127255 => '(h)', + 127256 => '(i)', + 127257 => '(j)', + 127258 => '(k)', + 127259 => '(l)', + 127260 => '(m)', + 127261 => '(n)', + 127262 => '(o)', + 127263 => '(p)', + 127264 => '(q)', + 127265 => '(r)', + 127266 => '(s)', + 127267 => '(t)', + 127268 => '(u)', + 127269 => '(v)', + 127270 => '(w)', + 127271 => '(x)', + 127272 => '(y)', + 127273 => '(z)', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php new file mode 100644 index 00000000..223396ec --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php @@ -0,0 +1,71 @@ + true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true, + 30 => true, + 31 => true, + 32 => true, + 33 => true, + 34 => true, + 35 => true, + 36 => true, + 37 => true, + 38 => true, + 39 => true, + 40 => true, + 41 => true, + 42 => true, + 43 => true, + 44 => true, + 47 => true, + 58 => true, + 59 => true, + 60 => true, + 61 => true, + 62 => true, + 63 => true, + 64 => true, + 91 => true, + 92 => true, + 93 => true, + 94 => true, + 95 => true, + 96 => true, + 123 => true, + 124 => true, + 125 => true, + 126 => true, + 127 => true, + 8800 => true, + 8814 => true, + 8815 => true, +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php new file mode 100644 index 00000000..b3778441 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/ignored.php @@ -0,0 +1,273 @@ + true, + 847 => true, + 6155 => true, + 6156 => true, + 6157 => true, + 8203 => true, + 8288 => true, + 8292 => true, + 65024 => true, + 65025 => true, + 65026 => true, + 65027 => true, + 65028 => true, + 65029 => true, + 65030 => true, + 65031 => true, + 65032 => true, + 65033 => true, + 65034 => true, + 65035 => true, + 65036 => true, + 65037 => true, + 65038 => true, + 65039 => true, + 65279 => true, + 113824 => true, + 113825 => true, + 113826 => true, + 113827 => true, + 917760 => true, + 917761 => true, + 917762 => true, + 917763 => true, + 917764 => true, + 917765 => true, + 917766 => true, + 917767 => true, + 917768 => true, + 917769 => true, + 917770 => true, + 917771 => true, + 917772 => true, + 917773 => true, + 917774 => true, + 917775 => true, + 917776 => true, + 917777 => true, + 917778 => true, + 917779 => true, + 917780 => true, + 917781 => true, + 917782 => true, + 917783 => true, + 917784 => true, + 917785 => true, + 917786 => true, + 917787 => true, + 917788 => true, + 917789 => true, + 917790 => true, + 917791 => true, + 917792 => true, + 917793 => true, + 917794 => true, + 917795 => true, + 917796 => true, + 917797 => true, + 917798 => true, + 917799 => true, + 917800 => true, + 917801 => true, + 917802 => true, + 917803 => true, + 917804 => true, + 917805 => true, + 917806 => true, + 917807 => true, + 917808 => true, + 917809 => true, + 917810 => true, + 917811 => true, + 917812 => true, + 917813 => true, + 917814 => true, + 917815 => true, + 917816 => true, + 917817 => true, + 917818 => true, + 917819 => true, + 917820 => true, + 917821 => true, + 917822 => true, + 917823 => true, + 917824 => true, + 917825 => true, + 917826 => true, + 917827 => true, + 917828 => true, + 917829 => true, + 917830 => true, + 917831 => true, + 917832 => true, + 917833 => true, + 917834 => true, + 917835 => true, + 917836 => true, + 917837 => true, + 917838 => true, + 917839 => true, + 917840 => true, + 917841 => true, + 917842 => true, + 917843 => true, + 917844 => true, + 917845 => true, + 917846 => true, + 917847 => true, + 917848 => true, + 917849 => true, + 917850 => true, + 917851 => true, + 917852 => true, + 917853 => true, + 917854 => true, + 917855 => true, + 917856 => true, + 917857 => true, + 917858 => true, + 917859 => true, + 917860 => true, + 917861 => true, + 917862 => true, + 917863 => true, + 917864 => true, + 917865 => true, + 917866 => true, + 917867 => true, + 917868 => true, + 917869 => true, + 917870 => true, + 917871 => true, + 917872 => true, + 917873 => true, + 917874 => true, + 917875 => true, + 917876 => true, + 917877 => true, + 917878 => true, + 917879 => true, + 917880 => true, + 917881 => true, + 917882 => true, + 917883 => true, + 917884 => true, + 917885 => true, + 917886 => true, + 917887 => true, + 917888 => true, + 917889 => true, + 917890 => true, + 917891 => true, + 917892 => true, + 917893 => true, + 917894 => true, + 917895 => true, + 917896 => true, + 917897 => true, + 917898 => true, + 917899 => true, + 917900 => true, + 917901 => true, + 917902 => true, + 917903 => true, + 917904 => true, + 917905 => true, + 917906 => true, + 917907 => true, + 917908 => true, + 917909 => true, + 917910 => true, + 917911 => true, + 917912 => true, + 917913 => true, + 917914 => true, + 917915 => true, + 917916 => true, + 917917 => true, + 917918 => true, + 917919 => true, + 917920 => true, + 917921 => true, + 917922 => true, + 917923 => true, + 917924 => true, + 917925 => true, + 917926 => true, + 917927 => true, + 917928 => true, + 917929 => true, + 917930 => true, + 917931 => true, + 917932 => true, + 917933 => true, + 917934 => true, + 917935 => true, + 917936 => true, + 917937 => true, + 917938 => true, + 917939 => true, + 917940 => true, + 917941 => true, + 917942 => true, + 917943 => true, + 917944 => true, + 917945 => true, + 917946 => true, + 917947 => true, + 917948 => true, + 917949 => true, + 917950 => true, + 917951 => true, + 917952 => true, + 917953 => true, + 917954 => true, + 917955 => true, + 917956 => true, + 917957 => true, + 917958 => true, + 917959 => true, + 917960 => true, + 917961 => true, + 917962 => true, + 917963 => true, + 917964 => true, + 917965 => true, + 917966 => true, + 917967 => true, + 917968 => true, + 917969 => true, + 917970 => true, + 917971 => true, + 917972 => true, + 917973 => true, + 917974 => true, + 917975 => true, + 917976 => true, + 917977 => true, + 917978 => true, + 917979 => true, + 917980 => true, + 917981 => true, + 917982 => true, + 917983 => true, + 917984 => true, + 917985 => true, + 917986 => true, + 917987 => true, + 917988 => true, + 917989 => true, + 917990 => true, + 917991 => true, + 917992 => true, + 917993 => true, + 917994 => true, + 917995 => true, + 917996 => true, + 917997 => true, + 917998 => true, + 917999 => true, +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php new file mode 100644 index 00000000..9b85fe9d --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/mapped.php @@ -0,0 +1,5778 @@ + 'a', + 66 => 'b', + 67 => 'c', + 68 => 'd', + 69 => 'e', + 70 => 'f', + 71 => 'g', + 72 => 'h', + 73 => 'i', + 74 => 'j', + 75 => 'k', + 76 => 'l', + 77 => 'm', + 78 => 'n', + 79 => 'o', + 80 => 'p', + 81 => 'q', + 82 => 'r', + 83 => 's', + 84 => 't', + 85 => 'u', + 86 => 'v', + 87 => 'w', + 88 => 'x', + 89 => 'y', + 90 => 'z', + 170 => 'a', + 178 => '2', + 179 => '3', + 181 => 'μ', + 185 => '1', + 186 => 'o', + 188 => '1â„4', + 189 => '1â„2', + 190 => '3â„4', + 192 => 'à', + 193 => 'á', + 194 => 'â', + 195 => 'ã', + 196 => 'ä', + 197 => 'Ã¥', + 198 => 'æ', + 199 => 'ç', + 200 => 'è', + 201 => 'é', + 202 => 'ê', + 203 => 'ë', + 204 => 'ì', + 205 => 'í', + 206 => 'î', + 207 => 'ï', + 208 => 'ð', + 209 => 'ñ', + 210 => 'ò', + 211 => 'ó', + 212 => 'ô', + 213 => 'õ', + 214 => 'ö', + 216 => 'ø', + 217 => 'ù', + 218 => 'ú', + 219 => 'û', + 220 => 'ü', + 221 => 'ý', + 222 => 'þ', + 256 => 'Ä', + 258 => 'ă', + 260 => 'Ä…', + 262 => 'ć', + 264 => 'ĉ', + 266 => 'Ä‹', + 268 => 'Ä', + 270 => 'Ä', + 272 => 'Ä‘', + 274 => 'Ä“', + 276 => 'Ä•', + 278 => 'Ä—', + 280 => 'Ä™', + 282 => 'Ä›', + 284 => 'Ä', + 286 => 'ÄŸ', + 288 => 'Ä¡', + 290 => 'Ä£', + 292 => 'Ä¥', + 294 => 'ħ', + 296 => 'Ä©', + 298 => 'Ä«', + 300 => 'Ä­', + 302 => 'į', + 304 => 'i̇', + 306 => 'ij', + 307 => 'ij', + 308 => 'ĵ', + 310 => 'Ä·', + 313 => 'ĺ', + 315 => 'ļ', + 317 => 'ľ', + 319 => 'l·', + 320 => 'l·', + 321 => 'Å‚', + 323 => 'Å„', + 325 => 'ņ', + 327 => 'ň', + 329 => 'ʼn', + 330 => 'Å‹', + 332 => 'Å', + 334 => 'Å', + 336 => 'Å‘', + 338 => 'Å“', + 340 => 'Å•', + 342 => 'Å—', + 344 => 'Å™', + 346 => 'Å›', + 348 => 'Å', + 350 => 'ÅŸ', + 352 => 'Å¡', + 354 => 'Å£', + 356 => 'Å¥', + 358 => 'ŧ', + 360 => 'Å©', + 362 => 'Å«', + 364 => 'Å­', + 366 => 'ů', + 368 => 'ű', + 370 => 'ų', + 372 => 'ŵ', + 374 => 'Å·', + 376 => 'ÿ', + 377 => 'ź', + 379 => 'ż', + 381 => 'ž', + 383 => 's', + 385 => 'É“', + 386 => 'ƃ', + 388 => 'Æ…', + 390 => 'É”', + 391 => 'ƈ', + 393 => 'É–', + 394 => 'É—', + 395 => 'ÆŒ', + 398 => 'Ç', + 399 => 'É™', + 400 => 'É›', + 401 => 'Æ’', + 403 => 'É ', + 404 => 'É£', + 406 => 'É©', + 407 => 'ɨ', + 408 => 'Æ™', + 412 => 'ɯ', + 413 => 'ɲ', + 415 => 'ɵ', + 416 => 'Æ¡', + 418 => 'Æ£', + 420 => 'Æ¥', + 422 => 'Ê€', + 423 => 'ƨ', + 425 => 'ʃ', + 428 => 'Æ­', + 430 => 'ʈ', + 431 => 'Æ°', + 433 => 'ÊŠ', + 434 => 'Ê‹', + 435 => 'Æ´', + 437 => 'ƶ', + 439 => 'Ê’', + 440 => 'ƹ', + 444 => 'ƽ', + 452 => 'dž', + 453 => 'dž', + 454 => 'dž', + 455 => 'lj', + 456 => 'lj', + 457 => 'lj', + 458 => 'nj', + 459 => 'nj', + 460 => 'nj', + 461 => 'ÇŽ', + 463 => 'Ç', + 465 => 'Ç’', + 467 => 'Ç”', + 469 => 'Ç–', + 471 => 'ǘ', + 473 => 'Çš', + 475 => 'Çœ', + 478 => 'ÇŸ', + 480 => 'Ç¡', + 482 => 'Ç£', + 484 => 'Ç¥', + 486 => 'ǧ', + 488 => 'Ç©', + 490 => 'Ç«', + 492 => 'Ç­', + 494 => 'ǯ', + 497 => 'dz', + 498 => 'dz', + 499 => 'dz', + 500 => 'ǵ', + 502 => 'Æ•', + 503 => 'Æ¿', + 504 => 'ǹ', + 506 => 'Ç»', + 508 => 'ǽ', + 510 => 'Ç¿', + 512 => 'È', + 514 => 'ȃ', + 516 => 'È…', + 518 => 'ȇ', + 520 => 'ȉ', + 522 => 'È‹', + 524 => 'È', + 526 => 'È', + 528 => 'È‘', + 530 => 'È“', + 532 => 'È•', + 534 => 'È—', + 536 => 'È™', + 538 => 'È›', + 540 => 'È', + 542 => 'ÈŸ', + 544 => 'Æž', + 546 => 'È£', + 548 => 'È¥', + 550 => 'ȧ', + 552 => 'È©', + 554 => 'È«', + 556 => 'È­', + 558 => 'ȯ', + 560 => 'ȱ', + 562 => 'ȳ', + 570 => 'â±¥', + 571 => 'ȼ', + 573 => 'Æš', + 574 => 'ⱦ', + 577 => 'É‚', + 579 => 'Æ€', + 580 => 'ʉ', + 581 => 'ÊŒ', + 582 => 'ɇ', + 584 => 'ɉ', + 586 => 'É‹', + 588 => 'É', + 590 => 'É', + 688 => 'h', + 689 => 'ɦ', + 690 => 'j', + 691 => 'r', + 692 => 'ɹ', + 693 => 'É»', + 694 => 'Ê', + 695 => 'w', + 696 => 'y', + 736 => 'É£', + 737 => 'l', + 738 => 's', + 739 => 'x', + 740 => 'Ê•', + 832 => 'Ì€', + 833 => 'Ì', + 835 => 'Ì“', + 836 => '̈Ì', + 837 => 'ι', + 880 => 'ͱ', + 882 => 'ͳ', + 884 => 'ʹ', + 886 => 'Í·', + 895 => 'ϳ', + 902 => 'ά', + 903 => '·', + 904 => 'έ', + 905 => 'ή', + 906 => 'ί', + 908 => 'ÏŒ', + 910 => 'Ï', + 911 => 'ÏŽ', + 913 => 'α', + 914 => 'β', + 915 => 'γ', + 916 => 'δ', + 917 => 'ε', + 918 => 'ζ', + 919 => 'η', + 920 => 'θ', + 921 => 'ι', + 922 => 'κ', + 923 => 'λ', + 924 => 'μ', + 925 => 'ν', + 926 => 'ξ', + 927 => 'ο', + 928 => 'Ï€', + 929 => 'Ï', + 931 => 'σ', + 932 => 'Ï„', + 933 => 'Ï…', + 934 => 'φ', + 935 => 'χ', + 936 => 'ψ', + 937 => 'ω', + 938 => 'ÏŠ', + 939 => 'Ï‹', + 975 => 'Ï—', + 976 => 'β', + 977 => 'θ', + 978 => 'Ï…', + 979 => 'Ï', + 980 => 'Ï‹', + 981 => 'φ', + 982 => 'Ï€', + 984 => 'Ï™', + 986 => 'Ï›', + 988 => 'Ï', + 990 => 'ÏŸ', + 992 => 'Ï¡', + 994 => 'Ï£', + 996 => 'Ï¥', + 998 => 'ϧ', + 1000 => 'Ï©', + 1002 => 'Ï«', + 1004 => 'Ï­', + 1006 => 'ϯ', + 1008 => 'κ', + 1009 => 'Ï', + 1010 => 'σ', + 1012 => 'θ', + 1013 => 'ε', + 1015 => 'ϸ', + 1017 => 'σ', + 1018 => 'Ï»', + 1021 => 'Í»', + 1022 => 'ͼ', + 1023 => 'ͽ', + 1024 => 'Ñ', + 1025 => 'Ñ‘', + 1026 => 'Ñ’', + 1027 => 'Ñ“', + 1028 => 'Ñ”', + 1029 => 'Ñ•', + 1030 => 'Ñ–', + 1031 => 'Ñ—', + 1032 => 'ј', + 1033 => 'Ñ™', + 1034 => 'Ñš', + 1035 => 'Ñ›', + 1036 => 'Ñœ', + 1037 => 'Ñ', + 1038 => 'Ñž', + 1039 => 'ÑŸ', + 1040 => 'а', + 1041 => 'б', + 1042 => 'в', + 1043 => 'г', + 1044 => 'д', + 1045 => 'е', + 1046 => 'ж', + 1047 => 'з', + 1048 => 'и', + 1049 => 'й', + 1050 => 'к', + 1051 => 'л', + 1052 => 'м', + 1053 => 'н', + 1054 => 'о', + 1055 => 'п', + 1056 => 'Ñ€', + 1057 => 'Ñ', + 1058 => 'Ñ‚', + 1059 => 'у', + 1060 => 'Ñ„', + 1061 => 'Ñ…', + 1062 => 'ц', + 1063 => 'ч', + 1064 => 'ш', + 1065 => 'щ', + 1066 => 'ÑŠ', + 1067 => 'Ñ‹', + 1068 => 'ÑŒ', + 1069 => 'Ñ', + 1070 => 'ÑŽ', + 1071 => 'Ñ', + 1120 => 'Ñ¡', + 1122 => 'Ñ£', + 1124 => 'Ñ¥', + 1126 => 'ѧ', + 1128 => 'Ñ©', + 1130 => 'Ñ«', + 1132 => 'Ñ­', + 1134 => 'ѯ', + 1136 => 'ѱ', + 1138 => 'ѳ', + 1140 => 'ѵ', + 1142 => 'Ñ·', + 1144 => 'ѹ', + 1146 => 'Ñ»', + 1148 => 'ѽ', + 1150 => 'Ñ¿', + 1152 => 'Ò', + 1162 => 'Ò‹', + 1164 => 'Ò', + 1166 => 'Ò', + 1168 => 'Ò‘', + 1170 => 'Ò“', + 1172 => 'Ò•', + 1174 => 'Ò—', + 1176 => 'Ò™', + 1178 => 'Ò›', + 1180 => 'Ò', + 1182 => 'ÒŸ', + 1184 => 'Ò¡', + 1186 => 'Ò£', + 1188 => 'Ò¥', + 1190 => 'Ò§', + 1192 => 'Ò©', + 1194 => 'Ò«', + 1196 => 'Ò­', + 1198 => 'Ò¯', + 1200 => 'Ò±', + 1202 => 'Ò³', + 1204 => 'Òµ', + 1206 => 'Ò·', + 1208 => 'Ò¹', + 1210 => 'Ò»', + 1212 => 'Ò½', + 1214 => 'Ò¿', + 1217 => 'Ó‚', + 1219 => 'Ó„', + 1221 => 'Ó†', + 1223 => 'Óˆ', + 1225 => 'ÓŠ', + 1227 => 'ÓŒ', + 1229 => 'ÓŽ', + 1232 => 'Ó‘', + 1234 => 'Ó“', + 1236 => 'Ó•', + 1238 => 'Ó—', + 1240 => 'Ó™', + 1242 => 'Ó›', + 1244 => 'Ó', + 1246 => 'ÓŸ', + 1248 => 'Ó¡', + 1250 => 'Ó£', + 1252 => 'Ó¥', + 1254 => 'Ó§', + 1256 => 'Ó©', + 1258 => 'Ó«', + 1260 => 'Ó­', + 1262 => 'Ó¯', + 1264 => 'Ó±', + 1266 => 'Ó³', + 1268 => 'Óµ', + 1270 => 'Ó·', + 1272 => 'Ó¹', + 1274 => 'Ó»', + 1276 => 'Ó½', + 1278 => 'Ó¿', + 1280 => 'Ô', + 1282 => 'Ôƒ', + 1284 => 'Ô…', + 1286 => 'Ô‡', + 1288 => 'Ô‰', + 1290 => 'Ô‹', + 1292 => 'Ô', + 1294 => 'Ô', + 1296 => 'Ô‘', + 1298 => 'Ô“', + 1300 => 'Ô•', + 1302 => 'Ô—', + 1304 => 'Ô™', + 1306 => 'Ô›', + 1308 => 'Ô', + 1310 => 'ÔŸ', + 1312 => 'Ô¡', + 1314 => 'Ô£', + 1316 => 'Ô¥', + 1318 => 'Ô§', + 1320 => 'Ô©', + 1322 => 'Ô«', + 1324 => 'Ô­', + 1326 => 'Ô¯', + 1329 => 'Õ¡', + 1330 => 'Õ¢', + 1331 => 'Õ£', + 1332 => 'Õ¤', + 1333 => 'Õ¥', + 1334 => 'Õ¦', + 1335 => 'Õ§', + 1336 => 'Õ¨', + 1337 => 'Õ©', + 1338 => 'Õª', + 1339 => 'Õ«', + 1340 => 'Õ¬', + 1341 => 'Õ­', + 1342 => 'Õ®', + 1343 => 'Õ¯', + 1344 => 'Õ°', + 1345 => 'Õ±', + 1346 => 'Õ²', + 1347 => 'Õ³', + 1348 => 'Õ´', + 1349 => 'Õµ', + 1350 => 'Õ¶', + 1351 => 'Õ·', + 1352 => 'Õ¸', + 1353 => 'Õ¹', + 1354 => 'Õº', + 1355 => 'Õ»', + 1356 => 'Õ¼', + 1357 => 'Õ½', + 1358 => 'Õ¾', + 1359 => 'Õ¿', + 1360 => 'Ö€', + 1361 => 'Ö', + 1362 => 'Ö‚', + 1363 => 'Öƒ', + 1364 => 'Ö„', + 1365 => 'Ö…', + 1366 => 'Ö†', + 1415 => 'Õ¥Ö‚', + 1653 => 'اٴ', + 1654 => 'وٴ', + 1655 => 'Û‡Ù´', + 1656 => 'يٴ', + 2392 => 'क़', + 2393 => 'ख़', + 2394 => 'ग़', + 2395 => 'ज़', + 2396 => 'ड़', + 2397 => 'ढ़', + 2398 => 'फ़', + 2399 => 'य़', + 2524 => 'ড়', + 2525 => 'ঢ়', + 2527 => 'য়', + 2611 => 'ਲ਼', + 2614 => 'ਸ਼', + 2649 => 'ਖ਼', + 2650 => 'ਗ਼', + 2651 => 'ਜ਼', + 2654 => 'ਫ਼', + 2908 => 'ଡ଼', + 2909 => 'ଢ଼', + 3635 => 'à¹à¸²', + 3763 => 'à»àº²', + 3804 => 'ຫນ', + 3805 => 'ຫມ', + 3852 => '་', + 3907 => 'གྷ', + 3917 => 'ཌྷ', + 3922 => 'དྷ', + 3927 => 'བྷ', + 3932 => 'ཛྷ', + 3945 => 'ཀྵ', + 3955 => 'ཱི', + 3957 => 'ཱུ', + 3958 => 'ྲྀ', + 3959 => 'ྲཱྀ', + 3960 => 'ླྀ', + 3961 => 'ླཱྀ', + 3969 => 'ཱྀ', + 3987 => 'ྒྷ', + 3997 => 'ྜྷ', + 4002 => 'ྡྷ', + 4007 => 'ྦྷ', + 4012 => 'ྫྷ', + 4025 => 'à¾à¾µ', + 4295 => 'â´§', + 4301 => 'â´­', + 4348 => 'ნ', + 5112 => 'á°', + 5113 => 'á±', + 5114 => 'á²', + 5115 => 'á³', + 5116 => 'á´', + 5117 => 'áµ', + 7296 => 'в', + 7297 => 'д', + 7298 => 'о', + 7299 => 'Ñ', + 7300 => 'Ñ‚', + 7301 => 'Ñ‚', + 7302 => 'ÑŠ', + 7303 => 'Ñ£', + 7304 => 'ꙋ', + 7312 => 'áƒ', + 7313 => 'ბ', + 7314 => 'გ', + 7315 => 'დ', + 7316 => 'ე', + 7317 => 'ვ', + 7318 => 'ზ', + 7319 => 'თ', + 7320 => 'ი', + 7321 => 'კ', + 7322 => 'ლ', + 7323 => 'მ', + 7324 => 'ნ', + 7325 => 'áƒ', + 7326 => 'პ', + 7327 => 'ჟ', + 7328 => 'რ', + 7329 => 'ს', + 7330 => 'ტ', + 7331 => 'უ', + 7332 => 'ფ', + 7333 => 'ქ', + 7334 => 'ღ', + 7335 => 'ყ', + 7336 => 'შ', + 7337 => 'ჩ', + 7338 => 'ც', + 7339 => 'ძ', + 7340 => 'წ', + 7341 => 'ჭ', + 7342 => 'ხ', + 7343 => 'ჯ', + 7344 => 'ჰ', + 7345 => 'ჱ', + 7346 => 'ჲ', + 7347 => 'ჳ', + 7348 => 'ჴ', + 7349 => 'ჵ', + 7350 => 'ჶ', + 7351 => 'ჷ', + 7352 => 'ჸ', + 7353 => 'ჹ', + 7354 => 'ჺ', + 7357 => 'ჽ', + 7358 => 'ჾ', + 7359 => 'ჿ', + 7468 => 'a', + 7469 => 'æ', + 7470 => 'b', + 7472 => 'd', + 7473 => 'e', + 7474 => 'Ç', + 7475 => 'g', + 7476 => 'h', + 7477 => 'i', + 7478 => 'j', + 7479 => 'k', + 7480 => 'l', + 7481 => 'm', + 7482 => 'n', + 7484 => 'o', + 7485 => 'È£', + 7486 => 'p', + 7487 => 'r', + 7488 => 't', + 7489 => 'u', + 7490 => 'w', + 7491 => 'a', + 7492 => 'É', + 7493 => 'É‘', + 7494 => 'á´‚', + 7495 => 'b', + 7496 => 'd', + 7497 => 'e', + 7498 => 'É™', + 7499 => 'É›', + 7500 => 'Éœ', + 7501 => 'g', + 7503 => 'k', + 7504 => 'm', + 7505 => 'Å‹', + 7506 => 'o', + 7507 => 'É”', + 7508 => 'á´–', + 7509 => 'á´—', + 7510 => 'p', + 7511 => 't', + 7512 => 'u', + 7513 => 'á´', + 7514 => 'ɯ', + 7515 => 'v', + 7516 => 'á´¥', + 7517 => 'β', + 7518 => 'γ', + 7519 => 'δ', + 7520 => 'φ', + 7521 => 'χ', + 7522 => 'i', + 7523 => 'r', + 7524 => 'u', + 7525 => 'v', + 7526 => 'β', + 7527 => 'γ', + 7528 => 'Ï', + 7529 => 'φ', + 7530 => 'χ', + 7544 => 'н', + 7579 => 'É’', + 7580 => 'c', + 7581 => 'É•', + 7582 => 'ð', + 7583 => 'Éœ', + 7584 => 'f', + 7585 => 'ÉŸ', + 7586 => 'É¡', + 7587 => 'É¥', + 7588 => 'ɨ', + 7589 => 'É©', + 7590 => 'ɪ', + 7591 => 'áµ»', + 7592 => 'Ê', + 7593 => 'É­', + 7594 => 'ᶅ', + 7595 => 'ÊŸ', + 7596 => 'ɱ', + 7597 => 'É°', + 7598 => 'ɲ', + 7599 => 'ɳ', + 7600 => 'É´', + 7601 => 'ɵ', + 7602 => 'ɸ', + 7603 => 'Ê‚', + 7604 => 'ʃ', + 7605 => 'Æ«', + 7606 => 'ʉ', + 7607 => 'ÊŠ', + 7608 => 'á´œ', + 7609 => 'Ê‹', + 7610 => 'ÊŒ', + 7611 => 'z', + 7612 => 'Ê', + 7613 => 'Ê‘', + 7614 => 'Ê’', + 7615 => 'θ', + 7680 => 'á¸', + 7682 => 'ḃ', + 7684 => 'ḅ', + 7686 => 'ḇ', + 7688 => 'ḉ', + 7690 => 'ḋ', + 7692 => 'á¸', + 7694 => 'á¸', + 7696 => 'ḑ', + 7698 => 'ḓ', + 7700 => 'ḕ', + 7702 => 'ḗ', + 7704 => 'ḙ', + 7706 => 'ḛ', + 7708 => 'á¸', + 7710 => 'ḟ', + 7712 => 'ḡ', + 7714 => 'ḣ', + 7716 => 'ḥ', + 7718 => 'ḧ', + 7720 => 'ḩ', + 7722 => 'ḫ', + 7724 => 'ḭ', + 7726 => 'ḯ', + 7728 => 'ḱ', + 7730 => 'ḳ', + 7732 => 'ḵ', + 7734 => 'ḷ', + 7736 => 'ḹ', + 7738 => 'ḻ', + 7740 => 'ḽ', + 7742 => 'ḿ', + 7744 => 'á¹', + 7746 => 'ṃ', + 7748 => 'á¹…', + 7750 => 'ṇ', + 7752 => 'ṉ', + 7754 => 'ṋ', + 7756 => 'á¹', + 7758 => 'á¹', + 7760 => 'ṑ', + 7762 => 'ṓ', + 7764 => 'ṕ', + 7766 => 'á¹—', + 7768 => 'á¹™', + 7770 => 'á¹›', + 7772 => 'á¹', + 7774 => 'ṟ', + 7776 => 'ṡ', + 7778 => 'á¹£', + 7780 => 'á¹¥', + 7782 => 'ṧ', + 7784 => 'ṩ', + 7786 => 'ṫ', + 7788 => 'á¹­', + 7790 => 'ṯ', + 7792 => 'á¹±', + 7794 => 'á¹³', + 7796 => 'á¹µ', + 7798 => 'á¹·', + 7800 => 'á¹¹', + 7802 => 'á¹»', + 7804 => 'á¹½', + 7806 => 'ṿ', + 7808 => 'áº', + 7810 => 'ẃ', + 7812 => 'ẅ', + 7814 => 'ẇ', + 7816 => 'ẉ', + 7818 => 'ẋ', + 7820 => 'áº', + 7822 => 'áº', + 7824 => 'ẑ', + 7826 => 'ẓ', + 7828 => 'ẕ', + 7834 => 'aʾ', + 7835 => 'ṡ', + 7838 => 'ss', + 7840 => 'ạ', + 7842 => 'ả', + 7844 => 'ấ', + 7846 => 'ầ', + 7848 => 'ẩ', + 7850 => 'ẫ', + 7852 => 'ậ', + 7854 => 'ắ', + 7856 => 'ằ', + 7858 => 'ẳ', + 7860 => 'ẵ', + 7862 => 'ặ', + 7864 => 'ẹ', + 7866 => 'ẻ', + 7868 => 'ẽ', + 7870 => 'ế', + 7872 => 'á»', + 7874 => 'ể', + 7876 => 'á»…', + 7878 => 'ệ', + 7880 => 'ỉ', + 7882 => 'ị', + 7884 => 'á»', + 7886 => 'á»', + 7888 => 'ố', + 7890 => 'ồ', + 7892 => 'ổ', + 7894 => 'á»—', + 7896 => 'á»™', + 7898 => 'á»›', + 7900 => 'á»', + 7902 => 'ở', + 7904 => 'ỡ', + 7906 => 'ợ', + 7908 => 'ụ', + 7910 => 'ủ', + 7912 => 'ứ', + 7914 => 'ừ', + 7916 => 'á»­', + 7918 => 'ữ', + 7920 => 'á»±', + 7922 => 'ỳ', + 7924 => 'ỵ', + 7926 => 'á»·', + 7928 => 'ỹ', + 7930 => 'á»»', + 7932 => 'ỽ', + 7934 => 'ỿ', + 7944 => 'á¼€', + 7945 => 'á¼', + 7946 => 'ἂ', + 7947 => 'ἃ', + 7948 => 'ἄ', + 7949 => 'á¼…', + 7950 => 'ἆ', + 7951 => 'ἇ', + 7960 => 'á¼', + 7961 => 'ἑ', + 7962 => 'á¼’', + 7963 => 'ἓ', + 7964 => 'á¼”', + 7965 => 'ἕ', + 7976 => 'á¼ ', + 7977 => 'ἡ', + 7978 => 'á¼¢', + 7979 => 'á¼£', + 7980 => 'ἤ', + 7981 => 'á¼¥', + 7982 => 'ἦ', + 7983 => 'ἧ', + 7992 => 'á¼°', + 7993 => 'á¼±', + 7994 => 'á¼²', + 7995 => 'á¼³', + 7996 => 'á¼´', + 7997 => 'á¼µ', + 7998 => 'ἶ', + 7999 => 'á¼·', + 8008 => 'á½€', + 8009 => 'á½', + 8010 => 'ὂ', + 8011 => 'ὃ', + 8012 => 'ὄ', + 8013 => 'á½…', + 8025 => 'ὑ', + 8027 => 'ὓ', + 8029 => 'ὕ', + 8031 => 'á½—', + 8040 => 'á½ ', + 8041 => 'ὡ', + 8042 => 'á½¢', + 8043 => 'á½£', + 8044 => 'ὤ', + 8045 => 'á½¥', + 8046 => 'ὦ', + 8047 => 'ὧ', + 8049 => 'ά', + 8051 => 'έ', + 8053 => 'ή', + 8055 => 'ί', + 8057 => 'ÏŒ', + 8059 => 'Ï', + 8061 => 'ÏŽ', + 8064 => 'ἀι', + 8065 => 'á¼Î¹', + 8066 => 'ἂι', + 8067 => 'ἃι', + 8068 => 'ἄι', + 8069 => 'ἅι', + 8070 => 'ἆι', + 8071 => 'ἇι', + 8072 => 'ἀι', + 8073 => 'á¼Î¹', + 8074 => 'ἂι', + 8075 => 'ἃι', + 8076 => 'ἄι', + 8077 => 'ἅι', + 8078 => 'ἆι', + 8079 => 'ἇι', + 8080 => 'ἠι', + 8081 => 'ἡι', + 8082 => 'ἢι', + 8083 => 'ἣι', + 8084 => 'ἤι', + 8085 => 'ἥι', + 8086 => 'ἦι', + 8087 => 'ἧι', + 8088 => 'ἠι', + 8089 => 'ἡι', + 8090 => 'ἢι', + 8091 => 'ἣι', + 8092 => 'ἤι', + 8093 => 'ἥι', + 8094 => 'ἦι', + 8095 => 'ἧι', + 8096 => 'ὠι', + 8097 => 'ὡι', + 8098 => 'ὢι', + 8099 => 'ὣι', + 8100 => 'ὤι', + 8101 => 'ὥι', + 8102 => 'ὦι', + 8103 => 'ὧι', + 8104 => 'ὠι', + 8105 => 'ὡι', + 8106 => 'ὢι', + 8107 => 'ὣι', + 8108 => 'ὤι', + 8109 => 'ὥι', + 8110 => 'ὦι', + 8111 => 'ὧι', + 8114 => 'ὰι', + 8115 => 'αι', + 8116 => 'άι', + 8119 => 'ᾶι', + 8120 => 'á¾°', + 8121 => 'á¾±', + 8122 => 'á½°', + 8123 => 'ά', + 8124 => 'αι', + 8126 => 'ι', + 8130 => 'ὴι', + 8131 => 'ηι', + 8132 => 'ήι', + 8135 => 'ῆι', + 8136 => 'á½²', + 8137 => 'έ', + 8138 => 'á½´', + 8139 => 'ή', + 8140 => 'ηι', + 8147 => 'Î', + 8152 => 'á¿', + 8153 => 'á¿‘', + 8154 => 'ὶ', + 8155 => 'ί', + 8163 => 'ΰ', + 8168 => 'á¿ ', + 8169 => 'á¿¡', + 8170 => 'ὺ', + 8171 => 'Ï', + 8172 => 'á¿¥', + 8178 => 'ὼι', + 8179 => 'ωι', + 8180 => 'ώι', + 8183 => 'ῶι', + 8184 => 'ὸ', + 8185 => 'ÏŒ', + 8186 => 'á½¼', + 8187 => 'ÏŽ', + 8188 => 'ωι', + 8209 => 'â€', + 8243 => '′′', + 8244 => '′′′', + 8246 => '‵‵', + 8247 => '‵‵‵', + 8279 => '′′′′', + 8304 => '0', + 8305 => 'i', + 8308 => '4', + 8309 => '5', + 8310 => '6', + 8311 => '7', + 8312 => '8', + 8313 => '9', + 8315 => '−', + 8319 => 'n', + 8320 => '0', + 8321 => '1', + 8322 => '2', + 8323 => '3', + 8324 => '4', + 8325 => '5', + 8326 => '6', + 8327 => '7', + 8328 => '8', + 8329 => '9', + 8331 => '−', + 8336 => 'a', + 8337 => 'e', + 8338 => 'o', + 8339 => 'x', + 8340 => 'É™', + 8341 => 'h', + 8342 => 'k', + 8343 => 'l', + 8344 => 'm', + 8345 => 'n', + 8346 => 'p', + 8347 => 's', + 8348 => 't', + 8360 => 'rs', + 8450 => 'c', + 8451 => '°c', + 8455 => 'É›', + 8457 => '°f', + 8458 => 'g', + 8459 => 'h', + 8460 => 'h', + 8461 => 'h', + 8462 => 'h', + 8463 => 'ħ', + 8464 => 'i', + 8465 => 'i', + 8466 => 'l', + 8467 => 'l', + 8469 => 'n', + 8470 => 'no', + 8473 => 'p', + 8474 => 'q', + 8475 => 'r', + 8476 => 'r', + 8477 => 'r', + 8480 => 'sm', + 8481 => 'tel', + 8482 => 'tm', + 8484 => 'z', + 8486 => 'ω', + 8488 => 'z', + 8490 => 'k', + 8491 => 'Ã¥', + 8492 => 'b', + 8493 => 'c', + 8495 => 'e', + 8496 => 'e', + 8497 => 'f', + 8499 => 'm', + 8500 => 'o', + 8501 => '×', + 8502 => 'ב', + 8503 => '×’', + 8504 => 'ד', + 8505 => 'i', + 8507 => 'fax', + 8508 => 'Ï€', + 8509 => 'γ', + 8510 => 'γ', + 8511 => 'Ï€', + 8512 => '∑', + 8517 => 'd', + 8518 => 'd', + 8519 => 'e', + 8520 => 'i', + 8521 => 'j', + 8528 => '1â„7', + 8529 => '1â„9', + 8530 => '1â„10', + 8531 => '1â„3', + 8532 => '2â„3', + 8533 => '1â„5', + 8534 => '2â„5', + 8535 => '3â„5', + 8536 => '4â„5', + 8537 => '1â„6', + 8538 => '5â„6', + 8539 => '1â„8', + 8540 => '3â„8', + 8541 => '5â„8', + 8542 => '7â„8', + 8543 => '1â„', + 8544 => 'i', + 8545 => 'ii', + 8546 => 'iii', + 8547 => 'iv', + 8548 => 'v', + 8549 => 'vi', + 8550 => 'vii', + 8551 => 'viii', + 8552 => 'ix', + 8553 => 'x', + 8554 => 'xi', + 8555 => 'xii', + 8556 => 'l', + 8557 => 'c', + 8558 => 'd', + 8559 => 'm', + 8560 => 'i', + 8561 => 'ii', + 8562 => 'iii', + 8563 => 'iv', + 8564 => 'v', + 8565 => 'vi', + 8566 => 'vii', + 8567 => 'viii', + 8568 => 'ix', + 8569 => 'x', + 8570 => 'xi', + 8571 => 'xii', + 8572 => 'l', + 8573 => 'c', + 8574 => 'd', + 8575 => 'm', + 8585 => '0â„3', + 8748 => '∫∫', + 8749 => '∫∫∫', + 8751 => '∮∮', + 8752 => '∮∮∮', + 9001 => '〈', + 9002 => '〉', + 9312 => '1', + 9313 => '2', + 9314 => '3', + 9315 => '4', + 9316 => '5', + 9317 => '6', + 9318 => '7', + 9319 => '8', + 9320 => '9', + 9321 => '10', + 9322 => '11', + 9323 => '12', + 9324 => '13', + 9325 => '14', + 9326 => '15', + 9327 => '16', + 9328 => '17', + 9329 => '18', + 9330 => '19', + 9331 => '20', + 9398 => 'a', + 9399 => 'b', + 9400 => 'c', + 9401 => 'd', + 9402 => 'e', + 9403 => 'f', + 9404 => 'g', + 9405 => 'h', + 9406 => 'i', + 9407 => 'j', + 9408 => 'k', + 9409 => 'l', + 9410 => 'm', + 9411 => 'n', + 9412 => 'o', + 9413 => 'p', + 9414 => 'q', + 9415 => 'r', + 9416 => 's', + 9417 => 't', + 9418 => 'u', + 9419 => 'v', + 9420 => 'w', + 9421 => 'x', + 9422 => 'y', + 9423 => 'z', + 9424 => 'a', + 9425 => 'b', + 9426 => 'c', + 9427 => 'd', + 9428 => 'e', + 9429 => 'f', + 9430 => 'g', + 9431 => 'h', + 9432 => 'i', + 9433 => 'j', + 9434 => 'k', + 9435 => 'l', + 9436 => 'm', + 9437 => 'n', + 9438 => 'o', + 9439 => 'p', + 9440 => 'q', + 9441 => 'r', + 9442 => 's', + 9443 => 't', + 9444 => 'u', + 9445 => 'v', + 9446 => 'w', + 9447 => 'x', + 9448 => 'y', + 9449 => 'z', + 9450 => '0', + 10764 => '∫∫∫∫', + 10972 => 'â«Ì¸', + 11264 => 'â°°', + 11265 => 'â°±', + 11266 => 'â°²', + 11267 => 'â°³', + 11268 => 'â°´', + 11269 => 'â°µ', + 11270 => 'â°¶', + 11271 => 'â°·', + 11272 => 'â°¸', + 11273 => 'â°¹', + 11274 => 'â°º', + 11275 => 'â°»', + 11276 => 'â°¼', + 11277 => 'â°½', + 11278 => 'â°¾', + 11279 => 'â°¿', + 11280 => 'â±€', + 11281 => 'â±', + 11282 => 'ⱂ', + 11283 => 'ⱃ', + 11284 => 'ⱄ', + 11285 => 'â±…', + 11286 => 'ⱆ', + 11287 => 'ⱇ', + 11288 => 'ⱈ', + 11289 => 'ⱉ', + 11290 => 'ⱊ', + 11291 => 'ⱋ', + 11292 => 'ⱌ', + 11293 => 'â±', + 11294 => 'ⱎ', + 11295 => 'â±', + 11296 => 'â±', + 11297 => 'ⱑ', + 11298 => 'â±’', + 11299 => 'ⱓ', + 11300 => 'â±”', + 11301 => 'ⱕ', + 11302 => 'â±–', + 11303 => 'â±—', + 11304 => 'ⱘ', + 11305 => 'â±™', + 11306 => 'ⱚ', + 11307 => 'â±›', + 11308 => 'ⱜ', + 11309 => 'â±', + 11310 => 'ⱞ', + 11360 => 'ⱡ', + 11362 => 'É«', + 11363 => 'áµ½', + 11364 => 'ɽ', + 11367 => 'ⱨ', + 11369 => 'ⱪ', + 11371 => 'ⱬ', + 11373 => 'É‘', + 11374 => 'ɱ', + 11375 => 'É', + 11376 => 'É’', + 11378 => 'â±³', + 11381 => 'ⱶ', + 11388 => 'j', + 11389 => 'v', + 11390 => 'È¿', + 11391 => 'É€', + 11392 => 'â²', + 11394 => 'ⲃ', + 11396 => 'â²…', + 11398 => 'ⲇ', + 11400 => 'ⲉ', + 11402 => 'ⲋ', + 11404 => 'â²', + 11406 => 'â²', + 11408 => 'ⲑ', + 11410 => 'ⲓ', + 11412 => 'ⲕ', + 11414 => 'â²—', + 11416 => 'â²™', + 11418 => 'â²›', + 11420 => 'â²', + 11422 => 'ⲟ', + 11424 => 'ⲡ', + 11426 => 'â²£', + 11428 => 'â²¥', + 11430 => 'ⲧ', + 11432 => 'ⲩ', + 11434 => 'ⲫ', + 11436 => 'â²­', + 11438 => 'ⲯ', + 11440 => 'â²±', + 11442 => 'â²³', + 11444 => 'â²µ', + 11446 => 'â²·', + 11448 => 'â²¹', + 11450 => 'â²»', + 11452 => 'â²½', + 11454 => 'ⲿ', + 11456 => 'â³', + 11458 => 'ⳃ', + 11460 => 'â³…', + 11462 => 'ⳇ', + 11464 => 'ⳉ', + 11466 => 'ⳋ', + 11468 => 'â³', + 11470 => 'â³', + 11472 => 'ⳑ', + 11474 => 'ⳓ', + 11476 => 'ⳕ', + 11478 => 'â³—', + 11480 => 'â³™', + 11482 => 'â³›', + 11484 => 'â³', + 11486 => 'ⳟ', + 11488 => 'ⳡ', + 11490 => 'â³£', + 11499 => 'ⳬ', + 11501 => 'â³®', + 11506 => 'â³³', + 11631 => 'ⵡ', + 11935 => 'æ¯', + 12019 => '龟', + 12032 => '一', + 12033 => '丨', + 12034 => '丶', + 12035 => '丿', + 12036 => 'ä¹™', + 12037 => '亅', + 12038 => '二', + 12039 => '亠', + 12040 => '人', + 12041 => 'å„¿', + 12042 => 'å…¥', + 12043 => 'å…«', + 12044 => '冂', + 12045 => '冖', + 12046 => '冫', + 12047 => '几', + 12048 => '凵', + 12049 => '刀', + 12050 => '力', + 12051 => '勹', + 12052 => '匕', + 12053 => '匚', + 12054 => '匸', + 12055 => 'å', + 12056 => 'åœ', + 12057 => 'å©', + 12058 => '厂', + 12059 => '厶', + 12060 => 'åˆ', + 12061 => 'å£', + 12062 => 'å›—', + 12063 => '土', + 12064 => '士', + 12065 => '夂', + 12066 => '夊', + 12067 => '夕', + 12068 => '大', + 12069 => '女', + 12070 => 'å­', + 12071 => '宀', + 12072 => '寸', + 12073 => 'å°', + 12074 => 'å°¢', + 12075 => 'å°¸', + 12076 => 'å±®', + 12077 => 'å±±', + 12078 => 'å·›', + 12079 => 'å·¥', + 12080 => 'å·±', + 12081 => 'å·¾', + 12082 => 'å¹²', + 12083 => '幺', + 12084 => '广', + 12085 => 'å»´', + 12086 => '廾', + 12087 => '弋', + 12088 => '弓', + 12089 => 'å½', + 12090 => '彡', + 12091 => 'å½³', + 12092 => '心', + 12093 => '戈', + 12094 => '戶', + 12095 => '手', + 12096 => '支', + 12097 => 'æ”´', + 12098 => 'æ–‡', + 12099 => 'æ–—', + 12100 => 'æ–¤', + 12101 => 'æ–¹', + 12102 => 'æ— ', + 12103 => 'æ—¥', + 12104 => 'æ›°', + 12105 => '月', + 12106 => '木', + 12107 => '欠', + 12108 => 'æ­¢', + 12109 => 'æ­¹', + 12110 => '殳', + 12111 => '毋', + 12112 => '比', + 12113 => '毛', + 12114 => 'æ°', + 12115 => 'æ°”', + 12116 => 'æ°´', + 12117 => 'ç«', + 12118 => '爪', + 12119 => '父', + 12120 => '爻', + 12121 => '爿', + 12122 => '片', + 12123 => '牙', + 12124 => '牛', + 12125 => '犬', + 12126 => '玄', + 12127 => '玉', + 12128 => 'ç“œ', + 12129 => '瓦', + 12130 => '甘', + 12131 => '生', + 12132 => '用', + 12133 => 'ç”°', + 12134 => 'ç–‹', + 12135 => 'ç–’', + 12136 => '癶', + 12137 => '白', + 12138 => 'çš®', + 12139 => 'çš¿', + 12140 => 'ç›®', + 12141 => '矛', + 12142 => '矢', + 12143 => '石', + 12144 => '示', + 12145 => '禸', + 12146 => '禾', + 12147 => 'ç©´', + 12148 => 'ç«‹', + 12149 => '竹', + 12150 => 'ç±³', + 12151 => '糸', + 12152 => '缶', + 12153 => '网', + 12154 => '羊', + 12155 => 'ç¾½', + 12156 => 'è€', + 12157 => '而', + 12158 => '耒', + 12159 => '耳', + 12160 => 'è¿', + 12161 => '肉', + 12162 => '臣', + 12163 => '自', + 12164 => '至', + 12165 => '臼', + 12166 => '舌', + 12167 => '舛', + 12168 => '舟', + 12169 => '艮', + 12170 => '色', + 12171 => '艸', + 12172 => 'è™', + 12173 => '虫', + 12174 => 'è¡€', + 12175 => 'è¡Œ', + 12176 => 'è¡£', + 12177 => '襾', + 12178 => '見', + 12179 => '角', + 12180 => '言', + 12181 => 'è°·', + 12182 => '豆', + 12183 => '豕', + 12184 => '豸', + 12185 => 'è²', + 12186 => '赤', + 12187 => 'èµ°', + 12188 => '足', + 12189 => '身', + 12190 => '車', + 12191 => 'è¾›', + 12192 => 'è¾°', + 12193 => 'è¾µ', + 12194 => 'é‚‘', + 12195 => 'é…‰', + 12196 => '釆', + 12197 => '里', + 12198 => '金', + 12199 => 'é•·', + 12200 => 'é–€', + 12201 => '阜', + 12202 => '隶', + 12203 => 'éš¹', + 12204 => '雨', + 12205 => 'é‘', + 12206 => 'éž', + 12207 => 'é¢', + 12208 => 'é©', + 12209 => '韋', + 12210 => '韭', + 12211 => '音', + 12212 => 'é ', + 12213 => '風', + 12214 => '飛', + 12215 => '食', + 12216 => '首', + 12217 => '香', + 12218 => '馬', + 12219 => '骨', + 12220 => '高', + 12221 => 'é«Ÿ', + 12222 => '鬥', + 12223 => '鬯', + 12224 => '鬲', + 12225 => '鬼', + 12226 => 'é­š', + 12227 => 'é³¥', + 12228 => 'é¹µ', + 12229 => '鹿', + 12230 => '麥', + 12231 => '麻', + 12232 => '黃', + 12233 => 'é»', + 12234 => '黑', + 12235 => '黹', + 12236 => '黽', + 12237 => '鼎', + 12238 => '鼓', + 12239 => 'é¼ ', + 12240 => 'é¼»', + 12241 => '齊', + 12242 => 'é½’', + 12243 => 'é¾', + 12244 => '龜', + 12245 => 'é¾ ', + 12290 => '.', + 12342 => '〒', + 12344 => 'å', + 12345 => 'å„', + 12346 => 'å…', + 12447 => 'より', + 12543 => 'コト', + 12593 => 'á„€', + 12594 => 'á„', + 12595 => 'ᆪ', + 12596 => 'á„‚', + 12597 => 'ᆬ', + 12598 => 'ᆭ', + 12599 => 'ᄃ', + 12600 => 'á„„', + 12601 => 'á„…', + 12602 => 'ᆰ', + 12603 => 'ᆱ', + 12604 => 'ᆲ', + 12605 => 'ᆳ', + 12606 => 'ᆴ', + 12607 => 'ᆵ', + 12608 => 'á„š', + 12609 => 'ᄆ', + 12610 => 'ᄇ', + 12611 => 'ᄈ', + 12612 => 'á„¡', + 12613 => 'ᄉ', + 12614 => 'á„Š', + 12615 => 'á„‹', + 12616 => 'á„Œ', + 12617 => 'á„', + 12618 => 'á„Ž', + 12619 => 'á„', + 12620 => 'á„', + 12621 => 'á„‘', + 12622 => 'á„’', + 12623 => 'á…¡', + 12624 => 'á…¢', + 12625 => 'á…£', + 12626 => 'á…¤', + 12627 => 'á…¥', + 12628 => 'á…¦', + 12629 => 'á…§', + 12630 => 'á…¨', + 12631 => 'á…©', + 12632 => 'á…ª', + 12633 => 'á…«', + 12634 => 'á…¬', + 12635 => 'á…­', + 12636 => 'á…®', + 12637 => 'á…¯', + 12638 => 'á…°', + 12639 => 'á…±', + 12640 => 'á…²', + 12641 => 'á…³', + 12642 => 'á…´', + 12643 => 'á…µ', + 12645 => 'á„”', + 12646 => 'á„•', + 12647 => 'ᇇ', + 12648 => 'ᇈ', + 12649 => 'ᇌ', + 12650 => 'ᇎ', + 12651 => 'ᇓ', + 12652 => 'ᇗ', + 12653 => 'ᇙ', + 12654 => 'á„œ', + 12655 => 'á‡', + 12656 => 'ᇟ', + 12657 => 'á„', + 12658 => 'á„ž', + 12659 => 'á„ ', + 12660 => 'á„¢', + 12661 => 'á„£', + 12662 => 'ᄧ', + 12663 => 'á„©', + 12664 => 'á„«', + 12665 => 'ᄬ', + 12666 => 'á„­', + 12667 => 'á„®', + 12668 => 'ᄯ', + 12669 => 'ᄲ', + 12670 => 'ᄶ', + 12671 => 'á…€', + 12672 => 'á…‡', + 12673 => 'á…Œ', + 12674 => 'ᇱ', + 12675 => 'ᇲ', + 12676 => 'á…—', + 12677 => 'á…˜', + 12678 => 'á…™', + 12679 => 'ᆄ', + 12680 => 'ᆅ', + 12681 => 'ᆈ', + 12682 => 'ᆑ', + 12683 => 'ᆒ', + 12684 => 'ᆔ', + 12685 => 'ᆞ', + 12686 => 'ᆡ', + 12690 => '一', + 12691 => '二', + 12692 => '三', + 12693 => 'å››', + 12694 => '上', + 12695 => '中', + 12696 => '下', + 12697 => '甲', + 12698 => 'ä¹™', + 12699 => '丙', + 12700 => 'ä¸', + 12701 => '天', + 12702 => '地', + 12703 => '人', + 12868 => 'å•', + 12869 => 'å¹¼', + 12870 => 'æ–‡', + 12871 => 'ç®', + 12880 => 'pte', + 12881 => '21', + 12882 => '22', + 12883 => '23', + 12884 => '24', + 12885 => '25', + 12886 => '26', + 12887 => '27', + 12888 => '28', + 12889 => '29', + 12890 => '30', + 12891 => '31', + 12892 => '32', + 12893 => '33', + 12894 => '34', + 12895 => '35', + 12896 => 'á„€', + 12897 => 'á„‚', + 12898 => 'ᄃ', + 12899 => 'á„…', + 12900 => 'ᄆ', + 12901 => 'ᄇ', + 12902 => 'ᄉ', + 12903 => 'á„‹', + 12904 => 'á„Œ', + 12905 => 'á„Ž', + 12906 => 'á„', + 12907 => 'á„', + 12908 => 'á„‘', + 12909 => 'á„’', + 12910 => 'ê°€', + 12911 => '나', + 12912 => '다', + 12913 => 'ë¼', + 12914 => '마', + 12915 => 'ë°”', + 12916 => '사', + 12917 => 'ì•„', + 12918 => 'ìž', + 12919 => 'ì°¨', + 12920 => 'ì¹´', + 12921 => '타', + 12922 => '파', + 12923 => '하', + 12924 => '참고', + 12925 => '주ì˜', + 12926 => 'ìš°', + 12928 => '一', + 12929 => '二', + 12930 => '三', + 12931 => 'å››', + 12932 => '五', + 12933 => 'å…­', + 12934 => '七', + 12935 => 'å…«', + 12936 => 'ä¹', + 12937 => 'å', + 12938 => '月', + 12939 => 'ç«', + 12940 => 'æ°´', + 12941 => '木', + 12942 => '金', + 12943 => '土', + 12944 => 'æ—¥', + 12945 => 'æ ª', + 12946 => '有', + 12947 => '社', + 12948 => 'å', + 12949 => '特', + 12950 => '財', + 12951 => 'ç¥', + 12952 => '労', + 12953 => '秘', + 12954 => 'ç”·', + 12955 => '女', + 12956 => 'é©', + 12957 => '優', + 12958 => 'å°', + 12959 => '注', + 12960 => 'é …', + 12961 => '休', + 12962 => '写', + 12963 => 'æ­£', + 12964 => '上', + 12965 => '中', + 12966 => '下', + 12967 => 'å·¦', + 12968 => 'å³', + 12969 => '医', + 12970 => 'å®—', + 12971 => 'å­¦', + 12972 => '監', + 12973 => 'ä¼', + 12974 => '資', + 12975 => 'å”', + 12976 => '夜', + 12977 => '36', + 12978 => '37', + 12979 => '38', + 12980 => '39', + 12981 => '40', + 12982 => '41', + 12983 => '42', + 12984 => '43', + 12985 => '44', + 12986 => '45', + 12987 => '46', + 12988 => '47', + 12989 => '48', + 12990 => '49', + 12991 => '50', + 12992 => '1月', + 12993 => '2月', + 12994 => '3月', + 12995 => '4月', + 12996 => '5月', + 12997 => '6月', + 12998 => '7月', + 12999 => '8月', + 13000 => '9月', + 13001 => '10月', + 13002 => '11月', + 13003 => '12月', + 13004 => 'hg', + 13005 => 'erg', + 13006 => 'ev', + 13007 => 'ltd', + 13008 => 'ã‚¢', + 13009 => 'イ', + 13010 => 'ウ', + 13011 => 'エ', + 13012 => 'オ', + 13013 => 'ã‚«', + 13014 => 'ã‚­', + 13015 => 'ク', + 13016 => 'ケ', + 13017 => 'コ', + 13018 => 'サ', + 13019 => 'ã‚·', + 13020 => 'ス', + 13021 => 'ã‚»', + 13022 => 'ソ', + 13023 => 'ã‚¿', + 13024 => 'ãƒ', + 13025 => 'ツ', + 13026 => 'テ', + 13027 => 'ト', + 13028 => 'ナ', + 13029 => 'ニ', + 13030 => 'ヌ', + 13031 => 'ãƒ', + 13032 => 'ノ', + 13033 => 'ãƒ', + 13034 => 'ヒ', + 13035 => 'フ', + 13036 => 'ヘ', + 13037 => 'ホ', + 13038 => 'マ', + 13039 => 'ミ', + 13040 => 'ム', + 13041 => 'メ', + 13042 => 'モ', + 13043 => 'ヤ', + 13044 => 'ユ', + 13045 => 'ヨ', + 13046 => 'ラ', + 13047 => 'リ', + 13048 => 'ル', + 13049 => 'レ', + 13050 => 'ロ', + 13051 => 'ワ', + 13052 => 'ヰ', + 13053 => 'ヱ', + 13054 => 'ヲ', + 13055 => '令和', + 13056 => 'アパート', + 13057 => 'アルファ', + 13058 => 'アンペア', + 13059 => 'アール', + 13060 => 'イニング', + 13061 => 'インãƒ', + 13062 => 'ウォン', + 13063 => 'エスクード', + 13064 => 'エーカー', + 13065 => 'オンス', + 13066 => 'オーム', + 13067 => 'カイリ', + 13068 => 'カラット', + 13069 => 'カロリー', + 13070 => 'ガロン', + 13071 => 'ガンマ', + 13072 => 'ギガ', + 13073 => 'ギニー', + 13074 => 'キュリー', + 13075 => 'ギルダー', + 13076 => 'キロ', + 13077 => 'キログラム', + 13078 => 'キロメートル', + 13079 => 'キロワット', + 13080 => 'グラム', + 13081 => 'グラムトン', + 13082 => 'クルゼイロ', + 13083 => 'クローãƒ', + 13084 => 'ケース', + 13085 => 'コルナ', + 13086 => 'コーãƒ', + 13087 => 'サイクル', + 13088 => 'サンãƒãƒ¼ãƒ ', + 13089 => 'シリング', + 13090 => 'センãƒ', + 13091 => 'セント', + 13092 => 'ダース', + 13093 => 'デシ', + 13094 => 'ドル', + 13095 => 'トン', + 13096 => 'ナノ', + 13097 => 'ノット', + 13098 => 'ãƒã‚¤ãƒ„', + 13099 => 'パーセント', + 13100 => 'パーツ', + 13101 => 'ãƒãƒ¼ãƒ¬ãƒ«', + 13102 => 'ピアストル', + 13103 => 'ピクル', + 13104 => 'ピコ', + 13105 => 'ビル', + 13106 => 'ファラッド', + 13107 => 'フィート', + 13108 => 'ブッシェル', + 13109 => 'フラン', + 13110 => 'ヘクタール', + 13111 => 'ペソ', + 13112 => 'ペニヒ', + 13113 => 'ヘルツ', + 13114 => 'ペンス', + 13115 => 'ページ', + 13116 => 'ベータ', + 13117 => 'ãƒã‚¤ãƒ³ãƒˆ', + 13118 => 'ボルト', + 13119 => 'ホン', + 13120 => 'ãƒãƒ³ãƒ‰', + 13121 => 'ホール', + 13122 => 'ホーン', + 13123 => 'マイクロ', + 13124 => 'マイル', + 13125 => 'マッãƒ', + 13126 => 'マルク', + 13127 => 'マンション', + 13128 => 'ミクロン', + 13129 => 'ミリ', + 13130 => 'ミリãƒãƒ¼ãƒ«', + 13131 => 'メガ', + 13132 => 'メガトン', + 13133 => 'メートル', + 13134 => 'ヤード', + 13135 => 'ヤール', + 13136 => 'ユアン', + 13137 => 'リットル', + 13138 => 'リラ', + 13139 => 'ルピー', + 13140 => 'ルーブル', + 13141 => 'レム', + 13142 => 'レントゲン', + 13143 => 'ワット', + 13144 => '0点', + 13145 => '1点', + 13146 => '2点', + 13147 => '3点', + 13148 => '4点', + 13149 => '5点', + 13150 => '6点', + 13151 => '7点', + 13152 => '8点', + 13153 => '9点', + 13154 => '10点', + 13155 => '11点', + 13156 => '12点', + 13157 => '13点', + 13158 => '14点', + 13159 => '15点', + 13160 => '16点', + 13161 => '17点', + 13162 => '18点', + 13163 => '19点', + 13164 => '20点', + 13165 => '21点', + 13166 => '22点', + 13167 => '23点', + 13168 => '24点', + 13169 => 'hpa', + 13170 => 'da', + 13171 => 'au', + 13172 => 'bar', + 13173 => 'ov', + 13174 => 'pc', + 13175 => 'dm', + 13176 => 'dm2', + 13177 => 'dm3', + 13178 => 'iu', + 13179 => 'å¹³æˆ', + 13180 => '昭和', + 13181 => '大正', + 13182 => '明治', + 13183 => 'æ ªå¼ä¼šç¤¾', + 13184 => 'pa', + 13185 => 'na', + 13186 => 'μa', + 13187 => 'ma', + 13188 => 'ka', + 13189 => 'kb', + 13190 => 'mb', + 13191 => 'gb', + 13192 => 'cal', + 13193 => 'kcal', + 13194 => 'pf', + 13195 => 'nf', + 13196 => 'μf', + 13197 => 'μg', + 13198 => 'mg', + 13199 => 'kg', + 13200 => 'hz', + 13201 => 'khz', + 13202 => 'mhz', + 13203 => 'ghz', + 13204 => 'thz', + 13205 => 'μl', + 13206 => 'ml', + 13207 => 'dl', + 13208 => 'kl', + 13209 => 'fm', + 13210 => 'nm', + 13211 => 'μm', + 13212 => 'mm', + 13213 => 'cm', + 13214 => 'km', + 13215 => 'mm2', + 13216 => 'cm2', + 13217 => 'm2', + 13218 => 'km2', + 13219 => 'mm3', + 13220 => 'cm3', + 13221 => 'm3', + 13222 => 'km3', + 13223 => 'm∕s', + 13224 => 'm∕s2', + 13225 => 'pa', + 13226 => 'kpa', + 13227 => 'mpa', + 13228 => 'gpa', + 13229 => 'rad', + 13230 => 'rad∕s', + 13231 => 'rad∕s2', + 13232 => 'ps', + 13233 => 'ns', + 13234 => 'μs', + 13235 => 'ms', + 13236 => 'pv', + 13237 => 'nv', + 13238 => 'μv', + 13239 => 'mv', + 13240 => 'kv', + 13241 => 'mv', + 13242 => 'pw', + 13243 => 'nw', + 13244 => 'μw', + 13245 => 'mw', + 13246 => 'kw', + 13247 => 'mw', + 13248 => 'kω', + 13249 => 'mω', + 13251 => 'bq', + 13252 => 'cc', + 13253 => 'cd', + 13254 => 'c∕kg', + 13256 => 'db', + 13257 => 'gy', + 13258 => 'ha', + 13259 => 'hp', + 13260 => 'in', + 13261 => 'kk', + 13262 => 'km', + 13263 => 'kt', + 13264 => 'lm', + 13265 => 'ln', + 13266 => 'log', + 13267 => 'lx', + 13268 => 'mb', + 13269 => 'mil', + 13270 => 'mol', + 13271 => 'ph', + 13273 => 'ppm', + 13274 => 'pr', + 13275 => 'sr', + 13276 => 'sv', + 13277 => 'wb', + 13278 => 'v∕m', + 13279 => 'a∕m', + 13280 => '1æ—¥', + 13281 => '2æ—¥', + 13282 => '3æ—¥', + 13283 => '4æ—¥', + 13284 => '5æ—¥', + 13285 => '6æ—¥', + 13286 => '7æ—¥', + 13287 => '8æ—¥', + 13288 => '9æ—¥', + 13289 => '10æ—¥', + 13290 => '11æ—¥', + 13291 => '12æ—¥', + 13292 => '13æ—¥', + 13293 => '14æ—¥', + 13294 => '15æ—¥', + 13295 => '16æ—¥', + 13296 => '17æ—¥', + 13297 => '18æ—¥', + 13298 => '19æ—¥', + 13299 => '20æ—¥', + 13300 => '21æ—¥', + 13301 => '22æ—¥', + 13302 => '23æ—¥', + 13303 => '24æ—¥', + 13304 => '25æ—¥', + 13305 => '26æ—¥', + 13306 => '27æ—¥', + 13307 => '28æ—¥', + 13308 => '29æ—¥', + 13309 => '30æ—¥', + 13310 => '31æ—¥', + 13311 => 'gal', + 42560 => 'ê™', + 42562 => 'ꙃ', + 42564 => 'ê™…', + 42566 => 'ꙇ', + 42568 => 'ꙉ', + 42570 => 'ꙋ', + 42572 => 'ê™', + 42574 => 'ê™', + 42576 => 'ꙑ', + 42578 => 'ꙓ', + 42580 => 'ꙕ', + 42582 => 'ê™—', + 42584 => 'ê™™', + 42586 => 'ê™›', + 42588 => 'ê™', + 42590 => 'ꙟ', + 42592 => 'ꙡ', + 42594 => 'ꙣ', + 42596 => 'ꙥ', + 42598 => 'ꙧ', + 42600 => 'ꙩ', + 42602 => 'ꙫ', + 42604 => 'ê™­', + 42624 => 'êš', + 42626 => 'ꚃ', + 42628 => 'êš…', + 42630 => 'ꚇ', + 42632 => 'ꚉ', + 42634 => 'êš‹', + 42636 => 'êš', + 42638 => 'êš', + 42640 => 'êš‘', + 42642 => 'êš“', + 42644 => 'êš•', + 42646 => 'êš—', + 42648 => 'êš™', + 42650 => 'êš›', + 42652 => 'ÑŠ', + 42653 => 'ÑŒ', + 42786 => 'ꜣ', + 42788 => 'ꜥ', + 42790 => 'ꜧ', + 42792 => 'ꜩ', + 42794 => 'ꜫ', + 42796 => 'ꜭ', + 42798 => 'ꜯ', + 42802 => 'ꜳ', + 42804 => 'ꜵ', + 42806 => 'ꜷ', + 42808 => 'ꜹ', + 42810 => 'ꜻ', + 42812 => 'ꜽ', + 42814 => 'ꜿ', + 42816 => 'ê', + 42818 => 'êƒ', + 42820 => 'ê…', + 42822 => 'ê‡', + 42824 => 'ê‰', + 42826 => 'ê‹', + 42828 => 'ê', + 42830 => 'ê', + 42832 => 'ê‘', + 42834 => 'ê“', + 42836 => 'ê•', + 42838 => 'ê—', + 42840 => 'ê™', + 42842 => 'ê›', + 42844 => 'ê', + 42846 => 'êŸ', + 42848 => 'ê¡', + 42850 => 'ê£', + 42852 => 'ê¥', + 42854 => 'ê§', + 42856 => 'ê©', + 42858 => 'ê«', + 42860 => 'ê­', + 42862 => 'ê¯', + 42864 => 'ê¯', + 42873 => 'êº', + 42875 => 'ê¼', + 42877 => 'áµ¹', + 42878 => 'ê¿', + 42880 => 'êž', + 42882 => 'ꞃ', + 42884 => 'êž…', + 42886 => 'ꞇ', + 42891 => 'ꞌ', + 42893 => 'É¥', + 42896 => 'êž‘', + 42898 => 'êž“', + 42902 => 'êž—', + 42904 => 'êž™', + 42906 => 'êž›', + 42908 => 'êž', + 42910 => 'ꞟ', + 42912 => 'êž¡', + 42914 => 'ꞣ', + 42916 => 'ꞥ', + 42918 => 'ꞧ', + 42920 => 'êž©', + 42922 => 'ɦ', + 42923 => 'Éœ', + 42924 => 'É¡', + 42925 => 'ɬ', + 42926 => 'ɪ', + 42928 => 'Êž', + 42929 => 'ʇ', + 42930 => 'Ê', + 42931 => 'ê­“', + 42932 => 'êžµ', + 42934 => 'êž·', + 42936 => 'êž¹', + 42938 => 'êž»', + 42940 => 'êž½', + 42942 => 'êž¿', + 42946 => 'ꟃ', + 42948 => 'êž”', + 42949 => 'Ê‚', + 42950 => 'ᶎ', + 42951 => 'ꟈ', + 42953 => 'ꟊ', + 42997 => 'ꟶ', + 43000 => 'ħ', + 43001 => 'Å“', + 43868 => 'ꜧ', + 43869 => 'ꬷ', + 43870 => 'É«', + 43871 => 'ê­’', + 43881 => 'Ê', + 43888 => 'Ꭰ', + 43889 => 'Ꭱ', + 43890 => 'Ꭲ', + 43891 => 'Ꭳ', + 43892 => 'Ꭴ', + 43893 => 'Ꭵ', + 43894 => 'Ꭶ', + 43895 => 'Ꭷ', + 43896 => 'Ꭸ', + 43897 => 'Ꭹ', + 43898 => 'Ꭺ', + 43899 => 'Ꭻ', + 43900 => 'Ꭼ', + 43901 => 'Ꭽ', + 43902 => 'Ꭾ', + 43903 => 'Ꭿ', + 43904 => 'Ꮀ', + 43905 => 'Ꮁ', + 43906 => 'Ꮂ', + 43907 => 'Ꮃ', + 43908 => 'Ꮄ', + 43909 => 'Ꮅ', + 43910 => 'Ꮆ', + 43911 => 'Ꮇ', + 43912 => 'Ꮈ', + 43913 => 'Ꮉ', + 43914 => 'Ꮊ', + 43915 => 'Ꮋ', + 43916 => 'Ꮌ', + 43917 => 'Ꮍ', + 43918 => 'Ꮎ', + 43919 => 'Ꮏ', + 43920 => 'á€', + 43921 => 'á', + 43922 => 'á‚', + 43923 => 'áƒ', + 43924 => 'á„', + 43925 => 'á…', + 43926 => 'á†', + 43927 => 'á‡', + 43928 => 'áˆ', + 43929 => 'á‰', + 43930 => 'áŠ', + 43931 => 'á‹', + 43932 => 'áŒ', + 43933 => 'á', + 43934 => 'áŽ', + 43935 => 'á', + 43936 => 'á', + 43937 => 'á‘', + 43938 => 'á’', + 43939 => 'á“', + 43940 => 'á”', + 43941 => 'á•', + 43942 => 'á–', + 43943 => 'á—', + 43944 => 'á˜', + 43945 => 'á™', + 43946 => 'áš', + 43947 => 'á›', + 43948 => 'áœ', + 43949 => 'á', + 43950 => 'áž', + 43951 => 'áŸ', + 43952 => 'á ', + 43953 => 'á¡', + 43954 => 'á¢', + 43955 => 'á£', + 43956 => 'á¤', + 43957 => 'á¥', + 43958 => 'á¦', + 43959 => 'á§', + 43960 => 'á¨', + 43961 => 'á©', + 43962 => 'áª', + 43963 => 'á«', + 43964 => 'á¬', + 43965 => 'á­', + 43966 => 'á®', + 43967 => 'á¯', + 63744 => '豈', + 63745 => 'æ›´', + 63746 => '車', + 63747 => '賈', + 63748 => '滑', + 63749 => '串', + 63750 => 'å¥', + 63751 => '龜', + 63752 => '龜', + 63753 => '契', + 63754 => '金', + 63755 => 'å–‡', + 63756 => '奈', + 63757 => '懶', + 63758 => '癩', + 63759 => 'ç¾…', + 63760 => '蘿', + 63761 => '螺', + 63762 => '裸', + 63763 => 'é‚', + 63764 => '樂', + 63765 => 'æ´›', + 63766 => '烙', + 63767 => 'çž', + 63768 => 'è½', + 63769 => 'é…ª', + 63770 => '駱', + 63771 => '亂', + 63772 => 'åµ', + 63773 => '欄', + 63774 => '爛', + 63775 => '蘭', + 63776 => '鸞', + 63777 => 'åµ', + 63778 => 'æ¿«', + 63779 => 'è—', + 63780 => '襤', + 63781 => '拉', + 63782 => '臘', + 63783 => 'è Ÿ', + 63784 => '廊', + 63785 => '朗', + 63786 => '浪', + 63787 => '狼', + 63788 => '郎', + 63789 => '來', + 63790 => '冷', + 63791 => 'å‹ž', + 63792 => 'æ“„', + 63793 => 'æ«“', + 63794 => 'çˆ', + 63795 => '盧', + 63796 => 'è€', + 63797 => '蘆', + 63798 => '虜', + 63799 => 'è·¯', + 63800 => '露', + 63801 => 'é­¯', + 63802 => 'é·º', + 63803 => '碌', + 63804 => '祿', + 63805 => '綠', + 63806 => 'è‰', + 63807 => '錄', + 63808 => '鹿', + 63809 => 'è«–', + 63810 => '壟', + 63811 => '弄', + 63812 => 'ç± ', + 63813 => 'è¾', + 63814 => '牢', + 63815 => '磊', + 63816 => '賂', + 63817 => 'é›·', + 63818 => '壘', + 63819 => 'å±¢', + 63820 => '樓', + 63821 => 'æ·š', + 63822 => 'æ¼', + 63823 => 'ç´¯', + 63824 => '縷', + 63825 => '陋', + 63826 => 'å‹’', + 63827 => 'è‚‹', + 63828 => '凜', + 63829 => '凌', + 63830 => '稜', + 63831 => '綾', + 63832 => 'è±', + 63833 => '陵', + 63834 => '讀', + 63835 => 'æ‹', + 63836 => '樂', + 63837 => '諾', + 63838 => '丹', + 63839 => '寧', + 63840 => '怒', + 63841 => '率', + 63842 => 'ç•°', + 63843 => '北', + 63844 => '磻', + 63845 => '便', + 63846 => '復', + 63847 => 'ä¸', + 63848 => '泌', + 63849 => '數', + 63850 => 'ç´¢', + 63851 => 'åƒ', + 63852 => 'å¡ž', + 63853 => 'çœ', + 63854 => '葉', + 63855 => '說', + 63856 => '殺', + 63857 => 'è¾°', + 63858 => '沈', + 63859 => '拾', + 63860 => 'è‹¥', + 63861 => '掠', + 63862 => 'ç•¥', + 63863 => '亮', + 63864 => 'å…©', + 63865 => '凉', + 63866 => 'æ¢', + 63867 => '糧', + 63868 => '良', + 63869 => 'è«’', + 63870 => 'é‡', + 63871 => '勵', + 63872 => 'å‘‚', + 63873 => '女', + 63874 => '廬', + 63875 => 'æ—…', + 63876 => '濾', + 63877 => '礪', + 63878 => 'é–­', + 63879 => '驪', + 63880 => '麗', + 63881 => '黎', + 63882 => '力', + 63883 => '曆', + 63884 => 'æ­·', + 63885 => 'è½¢', + 63886 => 'å¹´', + 63887 => 'æ†', + 63888 => '戀', + 63889 => 'æ’š', + 63890 => 'æ¼£', + 63891 => 'ç…‰', + 63892 => 'ç’‰', + 63893 => '秊', + 63894 => 'ç·´', + 63895 => 'è¯', + 63896 => '輦', + 63897 => 'è“®', + 63898 => '連', + 63899 => 'éŠ', + 63900 => '列', + 63901 => '劣', + 63902 => 'å’½', + 63903 => '烈', + 63904 => '裂', + 63905 => '說', + 63906 => '廉', + 63907 => '念', + 63908 => 'æ»', + 63909 => 'æ®®', + 63910 => 'ç°¾', + 63911 => 'çµ', + 63912 => '令', + 63913 => '囹', + 63914 => '寧', + 63915 => '嶺', + 63916 => '怜', + 63917 => '玲', + 63918 => 'ç‘©', + 63919 => '羚', + 63920 => 'è†', + 63921 => '鈴', + 63922 => '零', + 63923 => 'éˆ', + 63924 => 'é ˜', + 63925 => '例', + 63926 => '禮', + 63927 => '醴', + 63928 => '隸', + 63929 => '惡', + 63930 => '了', + 63931 => '僚', + 63932 => '寮', + 63933 => 'å°¿', + 63934 => 'æ–™', + 63935 => '樂', + 63936 => '燎', + 63937 => '療', + 63938 => '蓼', + 63939 => 'é¼', + 63940 => 'é¾', + 63941 => '暈', + 63942 => '阮', + 63943 => '劉', + 63944 => 'æ»', + 63945 => '柳', + 63946 => 'æµ', + 63947 => '溜', + 63948 => 'ç‰', + 63949 => 'ç•™', + 63950 => 'ç¡«', + 63951 => 'ç´', + 63952 => 'é¡ž', + 63953 => 'å…­', + 63954 => '戮', + 63955 => '陸', + 63956 => '倫', + 63957 => 'å´™', + 63958 => 'æ·ª', + 63959 => '輪', + 63960 => '律', + 63961 => 'æ…„', + 63962 => 'æ —', + 63963 => '率', + 63964 => '隆', + 63965 => '利', + 63966 => 'å', + 63967 => 'å±¥', + 63968 => '易', + 63969 => 'æŽ', + 63970 => '梨', + 63971 => 'æ³¥', + 63972 => 'ç†', + 63973 => 'ç—¢', + 63974 => 'ç½¹', + 63975 => 'è£', + 63976 => '裡', + 63977 => '里', + 63978 => '離', + 63979 => '匿', + 63980 => '溺', + 63981 => 'å', + 63982 => 'ç‡', + 63983 => 'ç’˜', + 63984 => 'è—º', + 63985 => '隣', + 63986 => 'é±—', + 63987 => '麟', + 63988 => 'æž—', + 63989 => 'æ·‹', + 63990 => '臨', + 63991 => 'ç«‹', + 63992 => '笠', + 63993 => 'ç²’', + 63994 => 'ç‹€', + 63995 => 'ç‚™', + 63996 => 'è­˜', + 63997 => '什', + 63998 => '茶', + 63999 => '刺', + 64000 => '切', + 64001 => '度', + 64002 => 'æ‹“', + 64003 => 'ç³–', + 64004 => 'å®…', + 64005 => 'æ´ž', + 64006 => 'æš´', + 64007 => 'è¼»', + 64008 => 'è¡Œ', + 64009 => 'é™', + 64010 => '見', + 64011 => '廓', + 64012 => 'å…€', + 64013 => 'å—€', + 64016 => 'å¡š', + 64018 => 'æ™´', + 64021 => '凞', + 64022 => '猪', + 64023 => '益', + 64024 => '礼', + 64025 => '神', + 64026 => '祥', + 64027 => 'ç¦', + 64028 => 'é–', + 64029 => 'ç²¾', + 64030 => 'ç¾½', + 64032 => '蘒', + 64034 => '諸', + 64037 => '逸', + 64038 => '都', + 64042 => '飯', + 64043 => '飼', + 64044 => '館', + 64045 => '鶴', + 64046 => '郞', + 64047 => 'éš·', + 64048 => 'ä¾®', + 64049 => '僧', + 64050 => 'å…', + 64051 => '勉', + 64052 => '勤', + 64053 => 'å‘', + 64054 => 'å–', + 64055 => '嘆', + 64056 => '器', + 64057 => 'å¡€', + 64058 => '墨', + 64059 => '層', + 64060 => 'å±®', + 64061 => 'æ‚”', + 64062 => 'æ…¨', + 64063 => '憎', + 64064 => '懲', + 64065 => 'æ•', + 64066 => 'æ—¢', + 64067 => 'æš‘', + 64068 => '梅', + 64069 => 'æµ·', + 64070 => '渚', + 64071 => 'æ¼¢', + 64072 => 'ç…®', + 64073 => '爫', + 64074 => 'ç¢', + 64075 => '碑', + 64076 => '社', + 64077 => '祉', + 64078 => '祈', + 64079 => 'ç¥', + 64080 => '祖', + 64081 => 'ç¥', + 64082 => 'ç¦', + 64083 => '禎', + 64084 => 'ç©€', + 64085 => 'çª', + 64086 => '節', + 64087 => 'ç·´', + 64088 => '縉', + 64089 => 'ç¹', + 64090 => 'ç½²', + 64091 => '者', + 64092 => '臭', + 64093 => '艹', + 64094 => '艹', + 64095 => 'è‘—', + 64096 => 'è¤', + 64097 => '視', + 64098 => 'è¬', + 64099 => '謹', + 64100 => '賓', + 64101 => 'è´ˆ', + 64102 => '辶', + 64103 => '逸', + 64104 => '難', + 64105 => '響', + 64106 => 'é »', + 64107 => 'æµ', + 64108 => '𤋮', + 64109 => '舘', + 64112 => '並', + 64113 => '况', + 64114 => 'å…¨', + 64115 => 'ä¾€', + 64116 => 'å……', + 64117 => '冀', + 64118 => '勇', + 64119 => '勺', + 64120 => 'å–', + 64121 => 'å••', + 64122 => 'å–™', + 64123 => 'å—¢', + 64124 => 'å¡š', + 64125 => '墳', + 64126 => '奄', + 64127 => '奔', + 64128 => 'å©¢', + 64129 => '嬨', + 64130 => 'å»’', + 64131 => 'å»™', + 64132 => '彩', + 64133 => 'å¾­', + 64134 => '惘', + 64135 => 'æ…Ž', + 64136 => '愈', + 64137 => '憎', + 64138 => 'æ… ', + 64139 => '懲', + 64140 => '戴', + 64141 => 'æ„', + 64142 => 'æœ', + 64143 => 'æ‘’', + 64144 => 'æ•–', + 64145 => 'æ™´', + 64146 => '朗', + 64147 => '望', + 64148 => 'æ–', + 64149 => 'æ­¹', + 64150 => '殺', + 64151 => 'æµ', + 64152 => 'æ»›', + 64153 => '滋', + 64154 => 'æ¼¢', + 64155 => '瀞', + 64156 => 'ç…®', + 64157 => '瞧', + 64158 => '爵', + 64159 => '犯', + 64160 => '猪', + 64161 => '瑱', + 64162 => '甆', + 64163 => 'ç”»', + 64164 => 'ç˜', + 64165 => '瘟', + 64166 => '益', + 64167 => 'ç››', + 64168 => 'ç›´', + 64169 => 'çŠ', + 64170 => 'ç€', + 64171 => '磌', + 64172 => '窱', + 64173 => '節', + 64174 => 'ç±»', + 64175 => 'çµ›', + 64176 => 'ç·´', + 64177 => 'ç¼¾', + 64178 => '者', + 64179 => 'è’', + 64180 => 'è¯', + 64181 => 'è¹', + 64182 => 'è¥', + 64183 => '覆', + 64184 => '視', + 64185 => '調', + 64186 => '諸', + 64187 => 'è«‹', + 64188 => 'è¬', + 64189 => '諾', + 64190 => 'è«­', + 64191 => '謹', + 64192 => '變', + 64193 => 'è´ˆ', + 64194 => '輸', + 64195 => 'é²', + 64196 => '醙', + 64197 => '鉶', + 64198 => '陼', + 64199 => '難', + 64200 => 'é–', + 64201 => '韛', + 64202 => '響', + 64203 => 'é ‹', + 64204 => 'é »', + 64205 => '鬒', + 64206 => '龜', + 64207 => '𢡊', + 64208 => '𢡄', + 64209 => 'ð£•', + 64210 => 'ã®', + 64211 => '䀘', + 64212 => '䀹', + 64213 => '𥉉', + 64214 => 'ð¥³', + 64215 => '𧻓', + 64216 => '齃', + 64217 => '龎', + 64256 => 'ff', + 64257 => 'fi', + 64258 => 'fl', + 64259 => 'ffi', + 64260 => 'ffl', + 64261 => 'st', + 64262 => 'st', + 64275 => 'Õ´Õ¶', + 64276 => 'Õ´Õ¥', + 64277 => 'Õ´Õ«', + 64278 => 'Õ¾Õ¶', + 64279 => 'Õ´Õ­', + 64285 => '×™Ö´', + 64287 => 'ײַ', + 64288 => '×¢', + 64289 => '×', + 64290 => 'ד', + 64291 => '×”', + 64292 => '×›', + 64293 => 'ל', + 64294 => '×', + 64295 => 'ר', + 64296 => 'ת', + 64298 => 'ש×', + 64299 => 'שׂ', + 64300 => 'שּ×', + 64301 => 'שּׂ', + 64302 => '×Ö·', + 64303 => '×Ö¸', + 64304 => '×Ö¼', + 64305 => 'בּ', + 64306 => '×’Ö¼', + 64307 => 'דּ', + 64308 => '×”Ö¼', + 64309 => 'וּ', + 64310 => '×–Ö¼', + 64312 => 'טּ', + 64313 => '×™Ö¼', + 64314 => 'ךּ', + 64315 => '×›Ö¼', + 64316 => 'לּ', + 64318 => 'מּ', + 64320 => '× Ö¼', + 64321 => 'סּ', + 64323 => '×£Ö¼', + 64324 => 'פּ', + 64326 => 'צּ', + 64327 => 'קּ', + 64328 => 'רּ', + 64329 => 'שּ', + 64330 => 'תּ', + 64331 => 'וֹ', + 64332 => 'בֿ', + 64333 => '×›Ö¿', + 64334 => 'פֿ', + 64335 => '×ל', + 64336 => 'Ù±', + 64337 => 'Ù±', + 64338 => 'Ù»', + 64339 => 'Ù»', + 64340 => 'Ù»', + 64341 => 'Ù»', + 64342 => 'Ù¾', + 64343 => 'Ù¾', + 64344 => 'Ù¾', + 64345 => 'Ù¾', + 64346 => 'Ú€', + 64347 => 'Ú€', + 64348 => 'Ú€', + 64349 => 'Ú€', + 64350 => 'Ùº', + 64351 => 'Ùº', + 64352 => 'Ùº', + 64353 => 'Ùº', + 64354 => 'Ù¿', + 64355 => 'Ù¿', + 64356 => 'Ù¿', + 64357 => 'Ù¿', + 64358 => 'Ù¹', + 64359 => 'Ù¹', + 64360 => 'Ù¹', + 64361 => 'Ù¹', + 64362 => 'Ú¤', + 64363 => 'Ú¤', + 64364 => 'Ú¤', + 64365 => 'Ú¤', + 64366 => 'Ú¦', + 64367 => 'Ú¦', + 64368 => 'Ú¦', + 64369 => 'Ú¦', + 64370 => 'Ú„', + 64371 => 'Ú„', + 64372 => 'Ú„', + 64373 => 'Ú„', + 64374 => 'Úƒ', + 64375 => 'Úƒ', + 64376 => 'Úƒ', + 64377 => 'Úƒ', + 64378 => 'Ú†', + 64379 => 'Ú†', + 64380 => 'Ú†', + 64381 => 'Ú†', + 64382 => 'Ú‡', + 64383 => 'Ú‡', + 64384 => 'Ú‡', + 64385 => 'Ú‡', + 64386 => 'Ú', + 64387 => 'Ú', + 64388 => 'ÚŒ', + 64389 => 'ÚŒ', + 64390 => 'ÚŽ', + 64391 => 'ÚŽ', + 64392 => 'Úˆ', + 64393 => 'Úˆ', + 64394 => 'Ú˜', + 64395 => 'Ú˜', + 64396 => 'Ú‘', + 64397 => 'Ú‘', + 64398 => 'Ú©', + 64399 => 'Ú©', + 64400 => 'Ú©', + 64401 => 'Ú©', + 64402 => 'Ú¯', + 64403 => 'Ú¯', + 64404 => 'Ú¯', + 64405 => 'Ú¯', + 64406 => 'Ú³', + 64407 => 'Ú³', + 64408 => 'Ú³', + 64409 => 'Ú³', + 64410 => 'Ú±', + 64411 => 'Ú±', + 64412 => 'Ú±', + 64413 => 'Ú±', + 64414 => 'Úº', + 64415 => 'Úº', + 64416 => 'Ú»', + 64417 => 'Ú»', + 64418 => 'Ú»', + 64419 => 'Ú»', + 64420 => 'Û€', + 64421 => 'Û€', + 64422 => 'Û', + 64423 => 'Û', + 64424 => 'Û', + 64425 => 'Û', + 64426 => 'Ú¾', + 64427 => 'Ú¾', + 64428 => 'Ú¾', + 64429 => 'Ú¾', + 64430 => 'Û’', + 64431 => 'Û’', + 64432 => 'Û“', + 64433 => 'Û“', + 64467 => 'Ú­', + 64468 => 'Ú­', + 64469 => 'Ú­', + 64470 => 'Ú­', + 64471 => 'Û‡', + 64472 => 'Û‡', + 64473 => 'Û†', + 64474 => 'Û†', + 64475 => 'Ûˆ', + 64476 => 'Ûˆ', + 64477 => 'Û‡Ù´', + 64478 => 'Û‹', + 64479 => 'Û‹', + 64480 => 'Û…', + 64481 => 'Û…', + 64482 => 'Û‰', + 64483 => 'Û‰', + 64484 => 'Û', + 64485 => 'Û', + 64486 => 'Û', + 64487 => 'Û', + 64488 => 'Ù‰', + 64489 => 'Ù‰', + 64490 => 'ئا', + 64491 => 'ئا', + 64492 => 'ئە', + 64493 => 'ئە', + 64494 => 'ئو', + 64495 => 'ئو', + 64496 => 'ئۇ', + 64497 => 'ئۇ', + 64498 => 'ئۆ', + 64499 => 'ئۆ', + 64500 => 'ئۈ', + 64501 => 'ئۈ', + 64502 => 'ئÛ', + 64503 => 'ئÛ', + 64504 => 'ئÛ', + 64505 => 'ئى', + 64506 => 'ئى', + 64507 => 'ئى', + 64508 => 'ÛŒ', + 64509 => 'ÛŒ', + 64510 => 'ÛŒ', + 64511 => 'ÛŒ', + 64512 => 'ئج', + 64513 => 'ئح', + 64514 => 'ئم', + 64515 => 'ئى', + 64516 => 'ئي', + 64517 => 'بج', + 64518 => 'بح', + 64519 => 'بخ', + 64520 => 'بم', + 64521 => 'بى', + 64522 => 'بي', + 64523 => 'تج', + 64524 => 'تح', + 64525 => 'تخ', + 64526 => 'تم', + 64527 => 'تى', + 64528 => 'تي', + 64529 => 'ثج', + 64530 => 'ثم', + 64531 => 'ثى', + 64532 => 'ثي', + 64533 => 'جح', + 64534 => 'جم', + 64535 => 'حج', + 64536 => 'حم', + 64537 => 'خج', + 64538 => 'خح', + 64539 => 'خم', + 64540 => 'سج', + 64541 => 'سح', + 64542 => 'سخ', + 64543 => 'سم', + 64544 => 'صح', + 64545 => 'صم', + 64546 => 'ضج', + 64547 => 'ضح', + 64548 => 'ضخ', + 64549 => 'ضم', + 64550 => 'طح', + 64551 => 'طم', + 64552 => 'ظم', + 64553 => 'عج', + 64554 => 'عم', + 64555 => 'غج', + 64556 => 'غم', + 64557 => 'Ùج', + 64558 => 'ÙØ­', + 64559 => 'ÙØ®', + 64560 => 'ÙÙ…', + 64561 => 'ÙÙ‰', + 64562 => 'ÙÙŠ', + 64563 => 'قح', + 64564 => 'قم', + 64565 => 'قى', + 64566 => 'قي', + 64567 => 'كا', + 64568 => 'كج', + 64569 => 'كح', + 64570 => 'كخ', + 64571 => 'كل', + 64572 => 'كم', + 64573 => 'كى', + 64574 => 'كي', + 64575 => 'لج', + 64576 => 'لح', + 64577 => 'لخ', + 64578 => 'لم', + 64579 => 'لى', + 64580 => 'لي', + 64581 => 'مج', + 64582 => 'مح', + 64583 => 'مخ', + 64584 => 'مم', + 64585 => 'مى', + 64586 => 'مي', + 64587 => 'نج', + 64588 => 'نح', + 64589 => 'نخ', + 64590 => 'نم', + 64591 => 'نى', + 64592 => 'ني', + 64593 => 'هج', + 64594 => 'هم', + 64595 => 'هى', + 64596 => 'هي', + 64597 => 'يج', + 64598 => 'يح', + 64599 => 'يخ', + 64600 => 'يم', + 64601 => 'يى', + 64602 => 'يي', + 64603 => 'ذٰ', + 64604 => 'رٰ', + 64605 => 'ىٰ', + 64612 => 'ئر', + 64613 => 'ئز', + 64614 => 'ئم', + 64615 => 'ئن', + 64616 => 'ئى', + 64617 => 'ئي', + 64618 => 'بر', + 64619 => 'بز', + 64620 => 'بم', + 64621 => 'بن', + 64622 => 'بى', + 64623 => 'بي', + 64624 => 'تر', + 64625 => 'تز', + 64626 => 'تم', + 64627 => 'تن', + 64628 => 'تى', + 64629 => 'تي', + 64630 => 'ثر', + 64631 => 'ثز', + 64632 => 'ثم', + 64633 => 'ثن', + 64634 => 'ثى', + 64635 => 'ثي', + 64636 => 'ÙÙ‰', + 64637 => 'ÙÙŠ', + 64638 => 'قى', + 64639 => 'قي', + 64640 => 'كا', + 64641 => 'كل', + 64642 => 'كم', + 64643 => 'كى', + 64644 => 'كي', + 64645 => 'لم', + 64646 => 'لى', + 64647 => 'لي', + 64648 => 'ما', + 64649 => 'مم', + 64650 => 'نر', + 64651 => 'نز', + 64652 => 'نم', + 64653 => 'نن', + 64654 => 'نى', + 64655 => 'ني', + 64656 => 'ىٰ', + 64657 => 'ير', + 64658 => 'يز', + 64659 => 'يم', + 64660 => 'ين', + 64661 => 'يى', + 64662 => 'يي', + 64663 => 'ئج', + 64664 => 'ئح', + 64665 => 'ئخ', + 64666 => 'ئم', + 64667 => 'ئه', + 64668 => 'بج', + 64669 => 'بح', + 64670 => 'بخ', + 64671 => 'بم', + 64672 => 'به', + 64673 => 'تج', + 64674 => 'تح', + 64675 => 'تخ', + 64676 => 'تم', + 64677 => 'ته', + 64678 => 'ثم', + 64679 => 'جح', + 64680 => 'جم', + 64681 => 'حج', + 64682 => 'حم', + 64683 => 'خج', + 64684 => 'خم', + 64685 => 'سج', + 64686 => 'سح', + 64687 => 'سخ', + 64688 => 'سم', + 64689 => 'صح', + 64690 => 'صخ', + 64691 => 'صم', + 64692 => 'ضج', + 64693 => 'ضح', + 64694 => 'ضخ', + 64695 => 'ضم', + 64696 => 'طح', + 64697 => 'ظم', + 64698 => 'عج', + 64699 => 'عم', + 64700 => 'غج', + 64701 => 'غم', + 64702 => 'Ùج', + 64703 => 'ÙØ­', + 64704 => 'ÙØ®', + 64705 => 'ÙÙ…', + 64706 => 'قح', + 64707 => 'قم', + 64708 => 'كج', + 64709 => 'كح', + 64710 => 'كخ', + 64711 => 'كل', + 64712 => 'كم', + 64713 => 'لج', + 64714 => 'لح', + 64715 => 'لخ', + 64716 => 'لم', + 64717 => 'له', + 64718 => 'مج', + 64719 => 'مح', + 64720 => 'مخ', + 64721 => 'مم', + 64722 => 'نج', + 64723 => 'نح', + 64724 => 'نخ', + 64725 => 'نم', + 64726 => 'نه', + 64727 => 'هج', + 64728 => 'هم', + 64729 => 'هٰ', + 64730 => 'يج', + 64731 => 'يح', + 64732 => 'يخ', + 64733 => 'يم', + 64734 => 'يه', + 64735 => 'ئم', + 64736 => 'ئه', + 64737 => 'بم', + 64738 => 'به', + 64739 => 'تم', + 64740 => 'ته', + 64741 => 'ثم', + 64742 => 'ثه', + 64743 => 'سم', + 64744 => 'سه', + 64745 => 'شم', + 64746 => 'شه', + 64747 => 'كل', + 64748 => 'كم', + 64749 => 'لم', + 64750 => 'نم', + 64751 => 'نه', + 64752 => 'يم', + 64753 => 'يه', + 64754 => 'Ù€ÙŽÙ‘', + 64755 => 'Ù€ÙÙ‘', + 64756 => 'Ù€ÙÙ‘', + 64757 => 'طى', + 64758 => 'طي', + 64759 => 'عى', + 64760 => 'عي', + 64761 => 'غى', + 64762 => 'غي', + 64763 => 'سى', + 64764 => 'سي', + 64765 => 'شى', + 64766 => 'شي', + 64767 => 'حى', + 64768 => 'حي', + 64769 => 'جى', + 64770 => 'جي', + 64771 => 'خى', + 64772 => 'خي', + 64773 => 'صى', + 64774 => 'صي', + 64775 => 'ضى', + 64776 => 'ضي', + 64777 => 'شج', + 64778 => 'شح', + 64779 => 'شخ', + 64780 => 'شم', + 64781 => 'شر', + 64782 => 'سر', + 64783 => 'صر', + 64784 => 'ضر', + 64785 => 'طى', + 64786 => 'طي', + 64787 => 'عى', + 64788 => 'عي', + 64789 => 'غى', + 64790 => 'غي', + 64791 => 'سى', + 64792 => 'سي', + 64793 => 'شى', + 64794 => 'شي', + 64795 => 'حى', + 64796 => 'حي', + 64797 => 'جى', + 64798 => 'جي', + 64799 => 'خى', + 64800 => 'خي', + 64801 => 'صى', + 64802 => 'صي', + 64803 => 'ضى', + 64804 => 'ضي', + 64805 => 'شج', + 64806 => 'شح', + 64807 => 'شخ', + 64808 => 'شم', + 64809 => 'شر', + 64810 => 'سر', + 64811 => 'صر', + 64812 => 'ضر', + 64813 => 'شج', + 64814 => 'شح', + 64815 => 'شخ', + 64816 => 'شم', + 64817 => 'سه', + 64818 => 'شه', + 64819 => 'طم', + 64820 => 'سج', + 64821 => 'سح', + 64822 => 'سخ', + 64823 => 'شج', + 64824 => 'شح', + 64825 => 'شخ', + 64826 => 'طم', + 64827 => 'ظم', + 64828 => 'اً', + 64829 => 'اً', + 64848 => 'تجم', + 64849 => 'تحج', + 64850 => 'تحج', + 64851 => 'تحم', + 64852 => 'تخم', + 64853 => 'تمج', + 64854 => 'تمح', + 64855 => 'تمخ', + 64856 => 'جمح', + 64857 => 'جمح', + 64858 => 'حمي', + 64859 => 'حمى', + 64860 => 'سحج', + 64861 => 'سجح', + 64862 => 'سجى', + 64863 => 'سمح', + 64864 => 'سمح', + 64865 => 'سمج', + 64866 => 'سمم', + 64867 => 'سمم', + 64868 => 'صحح', + 64869 => 'صحح', + 64870 => 'صمم', + 64871 => 'شحم', + 64872 => 'شحم', + 64873 => 'شجي', + 64874 => 'شمخ', + 64875 => 'شمخ', + 64876 => 'شمم', + 64877 => 'شمم', + 64878 => 'ضحى', + 64879 => 'ضخم', + 64880 => 'ضخم', + 64881 => 'طمح', + 64882 => 'طمح', + 64883 => 'طمم', + 64884 => 'طمي', + 64885 => 'عجم', + 64886 => 'عمم', + 64887 => 'عمم', + 64888 => 'عمى', + 64889 => 'غمم', + 64890 => 'غمي', + 64891 => 'غمى', + 64892 => 'Ùخم', + 64893 => 'Ùخم', + 64894 => 'قمح', + 64895 => 'قمم', + 64896 => 'لحم', + 64897 => 'لحي', + 64898 => 'لحى', + 64899 => 'لجج', + 64900 => 'لجج', + 64901 => 'لخم', + 64902 => 'لخم', + 64903 => 'لمح', + 64904 => 'لمح', + 64905 => 'محج', + 64906 => 'محم', + 64907 => 'محي', + 64908 => 'مجح', + 64909 => 'مجم', + 64910 => 'مخج', + 64911 => 'مخم', + 64914 => 'مجخ', + 64915 => 'همج', + 64916 => 'همم', + 64917 => 'نحم', + 64918 => 'نحى', + 64919 => 'نجم', + 64920 => 'نجم', + 64921 => 'نجى', + 64922 => 'نمي', + 64923 => 'نمى', + 64924 => 'يمم', + 64925 => 'يمم', + 64926 => 'بخي', + 64927 => 'تجي', + 64928 => 'تجى', + 64929 => 'تخي', + 64930 => 'تخى', + 64931 => 'تمي', + 64932 => 'تمى', + 64933 => 'جمي', + 64934 => 'جحى', + 64935 => 'جمى', + 64936 => 'سخى', + 64937 => 'صحي', + 64938 => 'شحي', + 64939 => 'ضحي', + 64940 => 'لجي', + 64941 => 'لمي', + 64942 => 'يحي', + 64943 => 'يجي', + 64944 => 'يمي', + 64945 => 'ممي', + 64946 => 'قمي', + 64947 => 'نحي', + 64948 => 'قمح', + 64949 => 'لحم', + 64950 => 'عمي', + 64951 => 'كمي', + 64952 => 'نجح', + 64953 => 'مخي', + 64954 => 'لجم', + 64955 => 'كمم', + 64956 => 'لجم', + 64957 => 'نجح', + 64958 => 'جحي', + 64959 => 'حجي', + 64960 => 'مجي', + 64961 => 'Ùمي', + 64962 => 'بحي', + 64963 => 'كمم', + 64964 => 'عجم', + 64965 => 'صمم', + 64966 => 'سخي', + 64967 => 'نجي', + 65008 => 'صلے', + 65009 => 'قلے', + 65010 => 'الله', + 65011 => 'اكبر', + 65012 => 'محمد', + 65013 => 'صلعم', + 65014 => 'رسول', + 65015 => 'عليه', + 65016 => 'وسلم', + 65017 => 'صلى', + 65020 => 'ریال', + 65041 => 'ã€', + 65047 => '〖', + 65048 => '〗', + 65073 => '—', + 65074 => '–', + 65081 => '〔', + 65082 => '〕', + 65083 => 'ã€', + 65084 => '】', + 65085 => '《', + 65086 => '》', + 65087 => '〈', + 65088 => '〉', + 65089 => '「', + 65090 => 'ã€', + 65091 => '『', + 65092 => 'ã€', + 65105 => 'ã€', + 65112 => '—', + 65117 => '〔', + 65118 => '〕', + 65123 => '-', + 65137 => 'ـً', + 65143 => 'Ù€ÙŽ', + 65145 => 'Ù€Ù', + 65147 => 'Ù€Ù', + 65149 => 'ـّ', + 65151 => 'ـْ', + 65152 => 'Ø¡', + 65153 => 'Ø¢', + 65154 => 'Ø¢', + 65155 => 'Ø£', + 65156 => 'Ø£', + 65157 => 'ؤ', + 65158 => 'ؤ', + 65159 => 'Ø¥', + 65160 => 'Ø¥', + 65161 => 'ئ', + 65162 => 'ئ', + 65163 => 'ئ', + 65164 => 'ئ', + 65165 => 'ا', + 65166 => 'ا', + 65167 => 'ب', + 65168 => 'ب', + 65169 => 'ب', + 65170 => 'ب', + 65171 => 'Ø©', + 65172 => 'Ø©', + 65173 => 'ت', + 65174 => 'ت', + 65175 => 'ت', + 65176 => 'ت', + 65177 => 'Ø«', + 65178 => 'Ø«', + 65179 => 'Ø«', + 65180 => 'Ø«', + 65181 => 'ج', + 65182 => 'ج', + 65183 => 'ج', + 65184 => 'ج', + 65185 => 'Ø­', + 65186 => 'Ø­', + 65187 => 'Ø­', + 65188 => 'Ø­', + 65189 => 'Ø®', + 65190 => 'Ø®', + 65191 => 'Ø®', + 65192 => 'Ø®', + 65193 => 'د', + 65194 => 'د', + 65195 => 'Ø°', + 65196 => 'Ø°', + 65197 => 'ر', + 65198 => 'ر', + 65199 => 'ز', + 65200 => 'ز', + 65201 => 'س', + 65202 => 'س', + 65203 => 'س', + 65204 => 'س', + 65205 => 'Ø´', + 65206 => 'Ø´', + 65207 => 'Ø´', + 65208 => 'Ø´', + 65209 => 'ص', + 65210 => 'ص', + 65211 => 'ص', + 65212 => 'ص', + 65213 => 'ض', + 65214 => 'ض', + 65215 => 'ض', + 65216 => 'ض', + 65217 => 'Ø·', + 65218 => 'Ø·', + 65219 => 'Ø·', + 65220 => 'Ø·', + 65221 => 'ظ', + 65222 => 'ظ', + 65223 => 'ظ', + 65224 => 'ظ', + 65225 => 'ع', + 65226 => 'ع', + 65227 => 'ع', + 65228 => 'ع', + 65229 => 'غ', + 65230 => 'غ', + 65231 => 'غ', + 65232 => 'غ', + 65233 => 'Ù', + 65234 => 'Ù', + 65235 => 'Ù', + 65236 => 'Ù', + 65237 => 'Ù‚', + 65238 => 'Ù‚', + 65239 => 'Ù‚', + 65240 => 'Ù‚', + 65241 => 'Ùƒ', + 65242 => 'Ùƒ', + 65243 => 'Ùƒ', + 65244 => 'Ùƒ', + 65245 => 'Ù„', + 65246 => 'Ù„', + 65247 => 'Ù„', + 65248 => 'Ù„', + 65249 => 'Ù…', + 65250 => 'Ù…', + 65251 => 'Ù…', + 65252 => 'Ù…', + 65253 => 'Ù†', + 65254 => 'Ù†', + 65255 => 'Ù†', + 65256 => 'Ù†', + 65257 => 'Ù‡', + 65258 => 'Ù‡', + 65259 => 'Ù‡', + 65260 => 'Ù‡', + 65261 => 'Ùˆ', + 65262 => 'Ùˆ', + 65263 => 'Ù‰', + 65264 => 'Ù‰', + 65265 => 'ÙŠ', + 65266 => 'ÙŠ', + 65267 => 'ÙŠ', + 65268 => 'ÙŠ', + 65269 => 'لآ', + 65270 => 'لآ', + 65271 => 'لأ', + 65272 => 'لأ', + 65273 => 'لإ', + 65274 => 'لإ', + 65275 => 'لا', + 65276 => 'لا', + 65293 => '-', + 65294 => '.', + 65296 => '0', + 65297 => '1', + 65298 => '2', + 65299 => '3', + 65300 => '4', + 65301 => '5', + 65302 => '6', + 65303 => '7', + 65304 => '8', + 65305 => '9', + 65313 => 'a', + 65314 => 'b', + 65315 => 'c', + 65316 => 'd', + 65317 => 'e', + 65318 => 'f', + 65319 => 'g', + 65320 => 'h', + 65321 => 'i', + 65322 => 'j', + 65323 => 'k', + 65324 => 'l', + 65325 => 'm', + 65326 => 'n', + 65327 => 'o', + 65328 => 'p', + 65329 => 'q', + 65330 => 'r', + 65331 => 's', + 65332 => 't', + 65333 => 'u', + 65334 => 'v', + 65335 => 'w', + 65336 => 'x', + 65337 => 'y', + 65338 => 'z', + 65345 => 'a', + 65346 => 'b', + 65347 => 'c', + 65348 => 'd', + 65349 => 'e', + 65350 => 'f', + 65351 => 'g', + 65352 => 'h', + 65353 => 'i', + 65354 => 'j', + 65355 => 'k', + 65356 => 'l', + 65357 => 'm', + 65358 => 'n', + 65359 => 'o', + 65360 => 'p', + 65361 => 'q', + 65362 => 'r', + 65363 => 's', + 65364 => 't', + 65365 => 'u', + 65366 => 'v', + 65367 => 'w', + 65368 => 'x', + 65369 => 'y', + 65370 => 'z', + 65375 => '⦅', + 65376 => '⦆', + 65377 => '.', + 65378 => '「', + 65379 => 'ã€', + 65380 => 'ã€', + 65381 => '・', + 65382 => 'ヲ', + 65383 => 'ã‚¡', + 65384 => 'ã‚£', + 65385 => 'ã‚¥', + 65386 => 'ェ', + 65387 => 'ã‚©', + 65388 => 'ャ', + 65389 => 'ュ', + 65390 => 'ョ', + 65391 => 'ッ', + 65392 => 'ー', + 65393 => 'ã‚¢', + 65394 => 'イ', + 65395 => 'ウ', + 65396 => 'エ', + 65397 => 'オ', + 65398 => 'ã‚«', + 65399 => 'ã‚­', + 65400 => 'ク', + 65401 => 'ケ', + 65402 => 'コ', + 65403 => 'サ', + 65404 => 'ã‚·', + 65405 => 'ス', + 65406 => 'ã‚»', + 65407 => 'ソ', + 65408 => 'ã‚¿', + 65409 => 'ãƒ', + 65410 => 'ツ', + 65411 => 'テ', + 65412 => 'ト', + 65413 => 'ナ', + 65414 => 'ニ', + 65415 => 'ヌ', + 65416 => 'ãƒ', + 65417 => 'ノ', + 65418 => 'ãƒ', + 65419 => 'ヒ', + 65420 => 'フ', + 65421 => 'ヘ', + 65422 => 'ホ', + 65423 => 'マ', + 65424 => 'ミ', + 65425 => 'ム', + 65426 => 'メ', + 65427 => 'モ', + 65428 => 'ヤ', + 65429 => 'ユ', + 65430 => 'ヨ', + 65431 => 'ラ', + 65432 => 'リ', + 65433 => 'ル', + 65434 => 'レ', + 65435 => 'ロ', + 65436 => 'ワ', + 65437 => 'ン', + 65438 => 'ã‚™', + 65439 => 'ã‚š', + 65441 => 'á„€', + 65442 => 'á„', + 65443 => 'ᆪ', + 65444 => 'á„‚', + 65445 => 'ᆬ', + 65446 => 'ᆭ', + 65447 => 'ᄃ', + 65448 => 'á„„', + 65449 => 'á„…', + 65450 => 'ᆰ', + 65451 => 'ᆱ', + 65452 => 'ᆲ', + 65453 => 'ᆳ', + 65454 => 'ᆴ', + 65455 => 'ᆵ', + 65456 => 'á„š', + 65457 => 'ᄆ', + 65458 => 'ᄇ', + 65459 => 'ᄈ', + 65460 => 'á„¡', + 65461 => 'ᄉ', + 65462 => 'á„Š', + 65463 => 'á„‹', + 65464 => 'á„Œ', + 65465 => 'á„', + 65466 => 'á„Ž', + 65467 => 'á„', + 65468 => 'á„', + 65469 => 'á„‘', + 65470 => 'á„’', + 65474 => 'á…¡', + 65475 => 'á…¢', + 65476 => 'á…£', + 65477 => 'á…¤', + 65478 => 'á…¥', + 65479 => 'á…¦', + 65482 => 'á…§', + 65483 => 'á…¨', + 65484 => 'á…©', + 65485 => 'á…ª', + 65486 => 'á…«', + 65487 => 'á…¬', + 65490 => 'á…­', + 65491 => 'á…®', + 65492 => 'á…¯', + 65493 => 'á…°', + 65494 => 'á…±', + 65495 => 'á…²', + 65498 => 'á…³', + 65499 => 'á…´', + 65500 => 'á…µ', + 65504 => '¢', + 65505 => '£', + 65506 => '¬', + 65508 => '¦', + 65509 => 'Â¥', + 65510 => 'â‚©', + 65512 => '│', + 65513 => 'â†', + 65514 => '↑', + 65515 => '→', + 65516 => '↓', + 65517 => 'â– ', + 65518 => 'â—‹', + 66560 => 'ð¨', + 66561 => 'ð©', + 66562 => 'ðª', + 66563 => 'ð«', + 66564 => 'ð¬', + 66565 => 'ð­', + 66566 => 'ð®', + 66567 => 'ð¯', + 66568 => 'ð°', + 66569 => 'ð±', + 66570 => 'ð²', + 66571 => 'ð³', + 66572 => 'ð´', + 66573 => 'ðµ', + 66574 => 'ð¶', + 66575 => 'ð·', + 66576 => 'ð¸', + 66577 => 'ð¹', + 66578 => 'ðº', + 66579 => 'ð»', + 66580 => 'ð¼', + 66581 => 'ð½', + 66582 => 'ð¾', + 66583 => 'ð¿', + 66584 => 'ð‘€', + 66585 => 'ð‘', + 66586 => 'ð‘‚', + 66587 => 'ð‘ƒ', + 66588 => 'ð‘„', + 66589 => 'ð‘…', + 66590 => 'ð‘†', + 66591 => 'ð‘‡', + 66592 => 'ð‘ˆ', + 66593 => 'ð‘‰', + 66594 => 'ð‘Š', + 66595 => 'ð‘‹', + 66596 => 'ð‘Œ', + 66597 => 'ð‘', + 66598 => 'ð‘Ž', + 66599 => 'ð‘', + 66736 => 'ð“˜', + 66737 => 'ð“™', + 66738 => 'ð“š', + 66739 => 'ð“›', + 66740 => 'ð“œ', + 66741 => 'ð“', + 66742 => 'ð“ž', + 66743 => 'ð“Ÿ', + 66744 => 'ð“ ', + 66745 => 'ð“¡', + 66746 => 'ð“¢', + 66747 => 'ð“£', + 66748 => 'ð“¤', + 66749 => 'ð“¥', + 66750 => 'ð“¦', + 66751 => 'ð“§', + 66752 => 'ð“¨', + 66753 => 'ð“©', + 66754 => 'ð“ª', + 66755 => 'ð“«', + 66756 => 'ð“¬', + 66757 => 'ð“­', + 66758 => 'ð“®', + 66759 => 'ð“¯', + 66760 => 'ð“°', + 66761 => 'ð“±', + 66762 => 'ð“²', + 66763 => 'ð“³', + 66764 => 'ð“´', + 66765 => 'ð“µ', + 66766 => 'ð“¶', + 66767 => 'ð“·', + 66768 => 'ð“¸', + 66769 => 'ð“¹', + 66770 => 'ð“º', + 66771 => 'ð“»', + 68736 => 'ð³€', + 68737 => 'ð³', + 68738 => 'ð³‚', + 68739 => 'ð³ƒ', + 68740 => 'ð³„', + 68741 => 'ð³…', + 68742 => 'ð³†', + 68743 => 'ð³‡', + 68744 => 'ð³ˆ', + 68745 => 'ð³‰', + 68746 => 'ð³Š', + 68747 => 'ð³‹', + 68748 => 'ð³Œ', + 68749 => 'ð³', + 68750 => 'ð³Ž', + 68751 => 'ð³', + 68752 => 'ð³', + 68753 => 'ð³‘', + 68754 => 'ð³’', + 68755 => 'ð³“', + 68756 => 'ð³”', + 68757 => 'ð³•', + 68758 => 'ð³–', + 68759 => 'ð³—', + 68760 => 'ð³˜', + 68761 => 'ð³™', + 68762 => 'ð³š', + 68763 => 'ð³›', + 68764 => 'ð³œ', + 68765 => 'ð³', + 68766 => 'ð³ž', + 68767 => 'ð³Ÿ', + 68768 => 'ð³ ', + 68769 => 'ð³¡', + 68770 => 'ð³¢', + 68771 => 'ð³£', + 68772 => 'ð³¤', + 68773 => 'ð³¥', + 68774 => 'ð³¦', + 68775 => 'ð³§', + 68776 => 'ð³¨', + 68777 => 'ð³©', + 68778 => 'ð³ª', + 68779 => 'ð³«', + 68780 => 'ð³¬', + 68781 => 'ð³­', + 68782 => 'ð³®', + 68783 => 'ð³¯', + 68784 => 'ð³°', + 68785 => 'ð³±', + 68786 => 'ð³²', + 71840 => 'ð‘£€', + 71841 => 'ð‘£', + 71842 => '𑣂', + 71843 => '𑣃', + 71844 => '𑣄', + 71845 => 'ð‘£…', + 71846 => '𑣆', + 71847 => '𑣇', + 71848 => '𑣈', + 71849 => '𑣉', + 71850 => '𑣊', + 71851 => '𑣋', + 71852 => '𑣌', + 71853 => 'ð‘£', + 71854 => '𑣎', + 71855 => 'ð‘£', + 71856 => 'ð‘£', + 71857 => '𑣑', + 71858 => 'ð‘£’', + 71859 => '𑣓', + 71860 => 'ð‘£”', + 71861 => '𑣕', + 71862 => 'ð‘£–', + 71863 => 'ð‘£—', + 71864 => '𑣘', + 71865 => 'ð‘£™', + 71866 => '𑣚', + 71867 => 'ð‘£›', + 71868 => '𑣜', + 71869 => 'ð‘£', + 71870 => '𑣞', + 71871 => '𑣟', + 93760 => 'ð–¹ ', + 93761 => '𖹡', + 93762 => 'ð–¹¢', + 93763 => 'ð–¹£', + 93764 => '𖹤', + 93765 => 'ð–¹¥', + 93766 => '𖹦', + 93767 => '𖹧', + 93768 => '𖹨', + 93769 => '𖹩', + 93770 => '𖹪', + 93771 => '𖹫', + 93772 => '𖹬', + 93773 => 'ð–¹­', + 93774 => 'ð–¹®', + 93775 => '𖹯', + 93776 => 'ð–¹°', + 93777 => 'ð–¹±', + 93778 => 'ð–¹²', + 93779 => 'ð–¹³', + 93780 => 'ð–¹´', + 93781 => 'ð–¹µ', + 93782 => '𖹶', + 93783 => 'ð–¹·', + 93784 => '𖹸', + 93785 => 'ð–¹¹', + 93786 => '𖹺', + 93787 => 'ð–¹»', + 93788 => 'ð–¹¼', + 93789 => 'ð–¹½', + 93790 => 'ð–¹¾', + 93791 => '𖹿', + 119134 => 'ð…—ð…¥', + 119135 => 'ð…˜ð…¥', + 119136 => 'ð…˜ð…¥ð…®', + 119137 => 'ð…˜ð…¥ð…¯', + 119138 => 'ð…˜ð…¥ð…°', + 119139 => 'ð…˜ð…¥ð…±', + 119140 => 'ð…˜ð…¥ð…²', + 119227 => 'ð†¹ð…¥', + 119228 => 'ð†ºð…¥', + 119229 => 'ð†¹ð…¥ð…®', + 119230 => 'ð†ºð…¥ð…®', + 119231 => 'ð†¹ð…¥ð…¯', + 119232 => 'ð†ºð…¥ð…¯', + 119808 => 'a', + 119809 => 'b', + 119810 => 'c', + 119811 => 'd', + 119812 => 'e', + 119813 => 'f', + 119814 => 'g', + 119815 => 'h', + 119816 => 'i', + 119817 => 'j', + 119818 => 'k', + 119819 => 'l', + 119820 => 'm', + 119821 => 'n', + 119822 => 'o', + 119823 => 'p', + 119824 => 'q', + 119825 => 'r', + 119826 => 's', + 119827 => 't', + 119828 => 'u', + 119829 => 'v', + 119830 => 'w', + 119831 => 'x', + 119832 => 'y', + 119833 => 'z', + 119834 => 'a', + 119835 => 'b', + 119836 => 'c', + 119837 => 'd', + 119838 => 'e', + 119839 => 'f', + 119840 => 'g', + 119841 => 'h', + 119842 => 'i', + 119843 => 'j', + 119844 => 'k', + 119845 => 'l', + 119846 => 'm', + 119847 => 'n', + 119848 => 'o', + 119849 => 'p', + 119850 => 'q', + 119851 => 'r', + 119852 => 's', + 119853 => 't', + 119854 => 'u', + 119855 => 'v', + 119856 => 'w', + 119857 => 'x', + 119858 => 'y', + 119859 => 'z', + 119860 => 'a', + 119861 => 'b', + 119862 => 'c', + 119863 => 'd', + 119864 => 'e', + 119865 => 'f', + 119866 => 'g', + 119867 => 'h', + 119868 => 'i', + 119869 => 'j', + 119870 => 'k', + 119871 => 'l', + 119872 => 'm', + 119873 => 'n', + 119874 => 'o', + 119875 => 'p', + 119876 => 'q', + 119877 => 'r', + 119878 => 's', + 119879 => 't', + 119880 => 'u', + 119881 => 'v', + 119882 => 'w', + 119883 => 'x', + 119884 => 'y', + 119885 => 'z', + 119886 => 'a', + 119887 => 'b', + 119888 => 'c', + 119889 => 'd', + 119890 => 'e', + 119891 => 'f', + 119892 => 'g', + 119894 => 'i', + 119895 => 'j', + 119896 => 'k', + 119897 => 'l', + 119898 => 'm', + 119899 => 'n', + 119900 => 'o', + 119901 => 'p', + 119902 => 'q', + 119903 => 'r', + 119904 => 's', + 119905 => 't', + 119906 => 'u', + 119907 => 'v', + 119908 => 'w', + 119909 => 'x', + 119910 => 'y', + 119911 => 'z', + 119912 => 'a', + 119913 => 'b', + 119914 => 'c', + 119915 => 'd', + 119916 => 'e', + 119917 => 'f', + 119918 => 'g', + 119919 => 'h', + 119920 => 'i', + 119921 => 'j', + 119922 => 'k', + 119923 => 'l', + 119924 => 'm', + 119925 => 'n', + 119926 => 'o', + 119927 => 'p', + 119928 => 'q', + 119929 => 'r', + 119930 => 's', + 119931 => 't', + 119932 => 'u', + 119933 => 'v', + 119934 => 'w', + 119935 => 'x', + 119936 => 'y', + 119937 => 'z', + 119938 => 'a', + 119939 => 'b', + 119940 => 'c', + 119941 => 'd', + 119942 => 'e', + 119943 => 'f', + 119944 => 'g', + 119945 => 'h', + 119946 => 'i', + 119947 => 'j', + 119948 => 'k', + 119949 => 'l', + 119950 => 'm', + 119951 => 'n', + 119952 => 'o', + 119953 => 'p', + 119954 => 'q', + 119955 => 'r', + 119956 => 's', + 119957 => 't', + 119958 => 'u', + 119959 => 'v', + 119960 => 'w', + 119961 => 'x', + 119962 => 'y', + 119963 => 'z', + 119964 => 'a', + 119966 => 'c', + 119967 => 'd', + 119970 => 'g', + 119973 => 'j', + 119974 => 'k', + 119977 => 'n', + 119978 => 'o', + 119979 => 'p', + 119980 => 'q', + 119982 => 's', + 119983 => 't', + 119984 => 'u', + 119985 => 'v', + 119986 => 'w', + 119987 => 'x', + 119988 => 'y', + 119989 => 'z', + 119990 => 'a', + 119991 => 'b', + 119992 => 'c', + 119993 => 'd', + 119995 => 'f', + 119997 => 'h', + 119998 => 'i', + 119999 => 'j', + 120000 => 'k', + 120001 => 'l', + 120002 => 'm', + 120003 => 'n', + 120005 => 'p', + 120006 => 'q', + 120007 => 'r', + 120008 => 's', + 120009 => 't', + 120010 => 'u', + 120011 => 'v', + 120012 => 'w', + 120013 => 'x', + 120014 => 'y', + 120015 => 'z', + 120016 => 'a', + 120017 => 'b', + 120018 => 'c', + 120019 => 'd', + 120020 => 'e', + 120021 => 'f', + 120022 => 'g', + 120023 => 'h', + 120024 => 'i', + 120025 => 'j', + 120026 => 'k', + 120027 => 'l', + 120028 => 'm', + 120029 => 'n', + 120030 => 'o', + 120031 => 'p', + 120032 => 'q', + 120033 => 'r', + 120034 => 's', + 120035 => 't', + 120036 => 'u', + 120037 => 'v', + 120038 => 'w', + 120039 => 'x', + 120040 => 'y', + 120041 => 'z', + 120042 => 'a', + 120043 => 'b', + 120044 => 'c', + 120045 => 'd', + 120046 => 'e', + 120047 => 'f', + 120048 => 'g', + 120049 => 'h', + 120050 => 'i', + 120051 => 'j', + 120052 => 'k', + 120053 => 'l', + 120054 => 'm', + 120055 => 'n', + 120056 => 'o', + 120057 => 'p', + 120058 => 'q', + 120059 => 'r', + 120060 => 's', + 120061 => 't', + 120062 => 'u', + 120063 => 'v', + 120064 => 'w', + 120065 => 'x', + 120066 => 'y', + 120067 => 'z', + 120068 => 'a', + 120069 => 'b', + 120071 => 'd', + 120072 => 'e', + 120073 => 'f', + 120074 => 'g', + 120077 => 'j', + 120078 => 'k', + 120079 => 'l', + 120080 => 'm', + 120081 => 'n', + 120082 => 'o', + 120083 => 'p', + 120084 => 'q', + 120086 => 's', + 120087 => 't', + 120088 => 'u', + 120089 => 'v', + 120090 => 'w', + 120091 => 'x', + 120092 => 'y', + 120094 => 'a', + 120095 => 'b', + 120096 => 'c', + 120097 => 'd', + 120098 => 'e', + 120099 => 'f', + 120100 => 'g', + 120101 => 'h', + 120102 => 'i', + 120103 => 'j', + 120104 => 'k', + 120105 => 'l', + 120106 => 'm', + 120107 => 'n', + 120108 => 'o', + 120109 => 'p', + 120110 => 'q', + 120111 => 'r', + 120112 => 's', + 120113 => 't', + 120114 => 'u', + 120115 => 'v', + 120116 => 'w', + 120117 => 'x', + 120118 => 'y', + 120119 => 'z', + 120120 => 'a', + 120121 => 'b', + 120123 => 'd', + 120124 => 'e', + 120125 => 'f', + 120126 => 'g', + 120128 => 'i', + 120129 => 'j', + 120130 => 'k', + 120131 => 'l', + 120132 => 'm', + 120134 => 'o', + 120138 => 's', + 120139 => 't', + 120140 => 'u', + 120141 => 'v', + 120142 => 'w', + 120143 => 'x', + 120144 => 'y', + 120146 => 'a', + 120147 => 'b', + 120148 => 'c', + 120149 => 'd', + 120150 => 'e', + 120151 => 'f', + 120152 => 'g', + 120153 => 'h', + 120154 => 'i', + 120155 => 'j', + 120156 => 'k', + 120157 => 'l', + 120158 => 'm', + 120159 => 'n', + 120160 => 'o', + 120161 => 'p', + 120162 => 'q', + 120163 => 'r', + 120164 => 's', + 120165 => 't', + 120166 => 'u', + 120167 => 'v', + 120168 => 'w', + 120169 => 'x', + 120170 => 'y', + 120171 => 'z', + 120172 => 'a', + 120173 => 'b', + 120174 => 'c', + 120175 => 'd', + 120176 => 'e', + 120177 => 'f', + 120178 => 'g', + 120179 => 'h', + 120180 => 'i', + 120181 => 'j', + 120182 => 'k', + 120183 => 'l', + 120184 => 'm', + 120185 => 'n', + 120186 => 'o', + 120187 => 'p', + 120188 => 'q', + 120189 => 'r', + 120190 => 's', + 120191 => 't', + 120192 => 'u', + 120193 => 'v', + 120194 => 'w', + 120195 => 'x', + 120196 => 'y', + 120197 => 'z', + 120198 => 'a', + 120199 => 'b', + 120200 => 'c', + 120201 => 'd', + 120202 => 'e', + 120203 => 'f', + 120204 => 'g', + 120205 => 'h', + 120206 => 'i', + 120207 => 'j', + 120208 => 'k', + 120209 => 'l', + 120210 => 'm', + 120211 => 'n', + 120212 => 'o', + 120213 => 'p', + 120214 => 'q', + 120215 => 'r', + 120216 => 's', + 120217 => 't', + 120218 => 'u', + 120219 => 'v', + 120220 => 'w', + 120221 => 'x', + 120222 => 'y', + 120223 => 'z', + 120224 => 'a', + 120225 => 'b', + 120226 => 'c', + 120227 => 'd', + 120228 => 'e', + 120229 => 'f', + 120230 => 'g', + 120231 => 'h', + 120232 => 'i', + 120233 => 'j', + 120234 => 'k', + 120235 => 'l', + 120236 => 'm', + 120237 => 'n', + 120238 => 'o', + 120239 => 'p', + 120240 => 'q', + 120241 => 'r', + 120242 => 's', + 120243 => 't', + 120244 => 'u', + 120245 => 'v', + 120246 => 'w', + 120247 => 'x', + 120248 => 'y', + 120249 => 'z', + 120250 => 'a', + 120251 => 'b', + 120252 => 'c', + 120253 => 'd', + 120254 => 'e', + 120255 => 'f', + 120256 => 'g', + 120257 => 'h', + 120258 => 'i', + 120259 => 'j', + 120260 => 'k', + 120261 => 'l', + 120262 => 'm', + 120263 => 'n', + 120264 => 'o', + 120265 => 'p', + 120266 => 'q', + 120267 => 'r', + 120268 => 's', + 120269 => 't', + 120270 => 'u', + 120271 => 'v', + 120272 => 'w', + 120273 => 'x', + 120274 => 'y', + 120275 => 'z', + 120276 => 'a', + 120277 => 'b', + 120278 => 'c', + 120279 => 'd', + 120280 => 'e', + 120281 => 'f', + 120282 => 'g', + 120283 => 'h', + 120284 => 'i', + 120285 => 'j', + 120286 => 'k', + 120287 => 'l', + 120288 => 'm', + 120289 => 'n', + 120290 => 'o', + 120291 => 'p', + 120292 => 'q', + 120293 => 'r', + 120294 => 's', + 120295 => 't', + 120296 => 'u', + 120297 => 'v', + 120298 => 'w', + 120299 => 'x', + 120300 => 'y', + 120301 => 'z', + 120302 => 'a', + 120303 => 'b', + 120304 => 'c', + 120305 => 'd', + 120306 => 'e', + 120307 => 'f', + 120308 => 'g', + 120309 => 'h', + 120310 => 'i', + 120311 => 'j', + 120312 => 'k', + 120313 => 'l', + 120314 => 'm', + 120315 => 'n', + 120316 => 'o', + 120317 => 'p', + 120318 => 'q', + 120319 => 'r', + 120320 => 's', + 120321 => 't', + 120322 => 'u', + 120323 => 'v', + 120324 => 'w', + 120325 => 'x', + 120326 => 'y', + 120327 => 'z', + 120328 => 'a', + 120329 => 'b', + 120330 => 'c', + 120331 => 'd', + 120332 => 'e', + 120333 => 'f', + 120334 => 'g', + 120335 => 'h', + 120336 => 'i', + 120337 => 'j', + 120338 => 'k', + 120339 => 'l', + 120340 => 'm', + 120341 => 'n', + 120342 => 'o', + 120343 => 'p', + 120344 => 'q', + 120345 => 'r', + 120346 => 's', + 120347 => 't', + 120348 => 'u', + 120349 => 'v', + 120350 => 'w', + 120351 => 'x', + 120352 => 'y', + 120353 => 'z', + 120354 => 'a', + 120355 => 'b', + 120356 => 'c', + 120357 => 'd', + 120358 => 'e', + 120359 => 'f', + 120360 => 'g', + 120361 => 'h', + 120362 => 'i', + 120363 => 'j', + 120364 => 'k', + 120365 => 'l', + 120366 => 'm', + 120367 => 'n', + 120368 => 'o', + 120369 => 'p', + 120370 => 'q', + 120371 => 'r', + 120372 => 's', + 120373 => 't', + 120374 => 'u', + 120375 => 'v', + 120376 => 'w', + 120377 => 'x', + 120378 => 'y', + 120379 => 'z', + 120380 => 'a', + 120381 => 'b', + 120382 => 'c', + 120383 => 'd', + 120384 => 'e', + 120385 => 'f', + 120386 => 'g', + 120387 => 'h', + 120388 => 'i', + 120389 => 'j', + 120390 => 'k', + 120391 => 'l', + 120392 => 'm', + 120393 => 'n', + 120394 => 'o', + 120395 => 'p', + 120396 => 'q', + 120397 => 'r', + 120398 => 's', + 120399 => 't', + 120400 => 'u', + 120401 => 'v', + 120402 => 'w', + 120403 => 'x', + 120404 => 'y', + 120405 => 'z', + 120406 => 'a', + 120407 => 'b', + 120408 => 'c', + 120409 => 'd', + 120410 => 'e', + 120411 => 'f', + 120412 => 'g', + 120413 => 'h', + 120414 => 'i', + 120415 => 'j', + 120416 => 'k', + 120417 => 'l', + 120418 => 'm', + 120419 => 'n', + 120420 => 'o', + 120421 => 'p', + 120422 => 'q', + 120423 => 'r', + 120424 => 's', + 120425 => 't', + 120426 => 'u', + 120427 => 'v', + 120428 => 'w', + 120429 => 'x', + 120430 => 'y', + 120431 => 'z', + 120432 => 'a', + 120433 => 'b', + 120434 => 'c', + 120435 => 'd', + 120436 => 'e', + 120437 => 'f', + 120438 => 'g', + 120439 => 'h', + 120440 => 'i', + 120441 => 'j', + 120442 => 'k', + 120443 => 'l', + 120444 => 'm', + 120445 => 'n', + 120446 => 'o', + 120447 => 'p', + 120448 => 'q', + 120449 => 'r', + 120450 => 's', + 120451 => 't', + 120452 => 'u', + 120453 => 'v', + 120454 => 'w', + 120455 => 'x', + 120456 => 'y', + 120457 => 'z', + 120458 => 'a', + 120459 => 'b', + 120460 => 'c', + 120461 => 'd', + 120462 => 'e', + 120463 => 'f', + 120464 => 'g', + 120465 => 'h', + 120466 => 'i', + 120467 => 'j', + 120468 => 'k', + 120469 => 'l', + 120470 => 'm', + 120471 => 'n', + 120472 => 'o', + 120473 => 'p', + 120474 => 'q', + 120475 => 'r', + 120476 => 's', + 120477 => 't', + 120478 => 'u', + 120479 => 'v', + 120480 => 'w', + 120481 => 'x', + 120482 => 'y', + 120483 => 'z', + 120484 => 'ı', + 120485 => 'È·', + 120488 => 'α', + 120489 => 'β', + 120490 => 'γ', + 120491 => 'δ', + 120492 => 'ε', + 120493 => 'ζ', + 120494 => 'η', + 120495 => 'θ', + 120496 => 'ι', + 120497 => 'κ', + 120498 => 'λ', + 120499 => 'μ', + 120500 => 'ν', + 120501 => 'ξ', + 120502 => 'ο', + 120503 => 'Ï€', + 120504 => 'Ï', + 120505 => 'θ', + 120506 => 'σ', + 120507 => 'Ï„', + 120508 => 'Ï…', + 120509 => 'φ', + 120510 => 'χ', + 120511 => 'ψ', + 120512 => 'ω', + 120513 => '∇', + 120514 => 'α', + 120515 => 'β', + 120516 => 'γ', + 120517 => 'δ', + 120518 => 'ε', + 120519 => 'ζ', + 120520 => 'η', + 120521 => 'θ', + 120522 => 'ι', + 120523 => 'κ', + 120524 => 'λ', + 120525 => 'μ', + 120526 => 'ν', + 120527 => 'ξ', + 120528 => 'ο', + 120529 => 'Ï€', + 120530 => 'Ï', + 120531 => 'σ', + 120532 => 'σ', + 120533 => 'Ï„', + 120534 => 'Ï…', + 120535 => 'φ', + 120536 => 'χ', + 120537 => 'ψ', + 120538 => 'ω', + 120539 => '∂', + 120540 => 'ε', + 120541 => 'θ', + 120542 => 'κ', + 120543 => 'φ', + 120544 => 'Ï', + 120545 => 'Ï€', + 120546 => 'α', + 120547 => 'β', + 120548 => 'γ', + 120549 => 'δ', + 120550 => 'ε', + 120551 => 'ζ', + 120552 => 'η', + 120553 => 'θ', + 120554 => 'ι', + 120555 => 'κ', + 120556 => 'λ', + 120557 => 'μ', + 120558 => 'ν', + 120559 => 'ξ', + 120560 => 'ο', + 120561 => 'Ï€', + 120562 => 'Ï', + 120563 => 'θ', + 120564 => 'σ', + 120565 => 'Ï„', + 120566 => 'Ï…', + 120567 => 'φ', + 120568 => 'χ', + 120569 => 'ψ', + 120570 => 'ω', + 120571 => '∇', + 120572 => 'α', + 120573 => 'β', + 120574 => 'γ', + 120575 => 'δ', + 120576 => 'ε', + 120577 => 'ζ', + 120578 => 'η', + 120579 => 'θ', + 120580 => 'ι', + 120581 => 'κ', + 120582 => 'λ', + 120583 => 'μ', + 120584 => 'ν', + 120585 => 'ξ', + 120586 => 'ο', + 120587 => 'Ï€', + 120588 => 'Ï', + 120589 => 'σ', + 120590 => 'σ', + 120591 => 'Ï„', + 120592 => 'Ï…', + 120593 => 'φ', + 120594 => 'χ', + 120595 => 'ψ', + 120596 => 'ω', + 120597 => '∂', + 120598 => 'ε', + 120599 => 'θ', + 120600 => 'κ', + 120601 => 'φ', + 120602 => 'Ï', + 120603 => 'Ï€', + 120604 => 'α', + 120605 => 'β', + 120606 => 'γ', + 120607 => 'δ', + 120608 => 'ε', + 120609 => 'ζ', + 120610 => 'η', + 120611 => 'θ', + 120612 => 'ι', + 120613 => 'κ', + 120614 => 'λ', + 120615 => 'μ', + 120616 => 'ν', + 120617 => 'ξ', + 120618 => 'ο', + 120619 => 'Ï€', + 120620 => 'Ï', + 120621 => 'θ', + 120622 => 'σ', + 120623 => 'Ï„', + 120624 => 'Ï…', + 120625 => 'φ', + 120626 => 'χ', + 120627 => 'ψ', + 120628 => 'ω', + 120629 => '∇', + 120630 => 'α', + 120631 => 'β', + 120632 => 'γ', + 120633 => 'δ', + 120634 => 'ε', + 120635 => 'ζ', + 120636 => 'η', + 120637 => 'θ', + 120638 => 'ι', + 120639 => 'κ', + 120640 => 'λ', + 120641 => 'μ', + 120642 => 'ν', + 120643 => 'ξ', + 120644 => 'ο', + 120645 => 'Ï€', + 120646 => 'Ï', + 120647 => 'σ', + 120648 => 'σ', + 120649 => 'Ï„', + 120650 => 'Ï…', + 120651 => 'φ', + 120652 => 'χ', + 120653 => 'ψ', + 120654 => 'ω', + 120655 => '∂', + 120656 => 'ε', + 120657 => 'θ', + 120658 => 'κ', + 120659 => 'φ', + 120660 => 'Ï', + 120661 => 'Ï€', + 120662 => 'α', + 120663 => 'β', + 120664 => 'γ', + 120665 => 'δ', + 120666 => 'ε', + 120667 => 'ζ', + 120668 => 'η', + 120669 => 'θ', + 120670 => 'ι', + 120671 => 'κ', + 120672 => 'λ', + 120673 => 'μ', + 120674 => 'ν', + 120675 => 'ξ', + 120676 => 'ο', + 120677 => 'Ï€', + 120678 => 'Ï', + 120679 => 'θ', + 120680 => 'σ', + 120681 => 'Ï„', + 120682 => 'Ï…', + 120683 => 'φ', + 120684 => 'χ', + 120685 => 'ψ', + 120686 => 'ω', + 120687 => '∇', + 120688 => 'α', + 120689 => 'β', + 120690 => 'γ', + 120691 => 'δ', + 120692 => 'ε', + 120693 => 'ζ', + 120694 => 'η', + 120695 => 'θ', + 120696 => 'ι', + 120697 => 'κ', + 120698 => 'λ', + 120699 => 'μ', + 120700 => 'ν', + 120701 => 'ξ', + 120702 => 'ο', + 120703 => 'Ï€', + 120704 => 'Ï', + 120705 => 'σ', + 120706 => 'σ', + 120707 => 'Ï„', + 120708 => 'Ï…', + 120709 => 'φ', + 120710 => 'χ', + 120711 => 'ψ', + 120712 => 'ω', + 120713 => '∂', + 120714 => 'ε', + 120715 => 'θ', + 120716 => 'κ', + 120717 => 'φ', + 120718 => 'Ï', + 120719 => 'Ï€', + 120720 => 'α', + 120721 => 'β', + 120722 => 'γ', + 120723 => 'δ', + 120724 => 'ε', + 120725 => 'ζ', + 120726 => 'η', + 120727 => 'θ', + 120728 => 'ι', + 120729 => 'κ', + 120730 => 'λ', + 120731 => 'μ', + 120732 => 'ν', + 120733 => 'ξ', + 120734 => 'ο', + 120735 => 'Ï€', + 120736 => 'Ï', + 120737 => 'θ', + 120738 => 'σ', + 120739 => 'Ï„', + 120740 => 'Ï…', + 120741 => 'φ', + 120742 => 'χ', + 120743 => 'ψ', + 120744 => 'ω', + 120745 => '∇', + 120746 => 'α', + 120747 => 'β', + 120748 => 'γ', + 120749 => 'δ', + 120750 => 'ε', + 120751 => 'ζ', + 120752 => 'η', + 120753 => 'θ', + 120754 => 'ι', + 120755 => 'κ', + 120756 => 'λ', + 120757 => 'μ', + 120758 => 'ν', + 120759 => 'ξ', + 120760 => 'ο', + 120761 => 'Ï€', + 120762 => 'Ï', + 120763 => 'σ', + 120764 => 'σ', + 120765 => 'Ï„', + 120766 => 'Ï…', + 120767 => 'φ', + 120768 => 'χ', + 120769 => 'ψ', + 120770 => 'ω', + 120771 => '∂', + 120772 => 'ε', + 120773 => 'θ', + 120774 => 'κ', + 120775 => 'φ', + 120776 => 'Ï', + 120777 => 'Ï€', + 120778 => 'Ï', + 120779 => 'Ï', + 120782 => '0', + 120783 => '1', + 120784 => '2', + 120785 => '3', + 120786 => '4', + 120787 => '5', + 120788 => '6', + 120789 => '7', + 120790 => '8', + 120791 => '9', + 120792 => '0', + 120793 => '1', + 120794 => '2', + 120795 => '3', + 120796 => '4', + 120797 => '5', + 120798 => '6', + 120799 => '7', + 120800 => '8', + 120801 => '9', + 120802 => '0', + 120803 => '1', + 120804 => '2', + 120805 => '3', + 120806 => '4', + 120807 => '5', + 120808 => '6', + 120809 => '7', + 120810 => '8', + 120811 => '9', + 120812 => '0', + 120813 => '1', + 120814 => '2', + 120815 => '3', + 120816 => '4', + 120817 => '5', + 120818 => '6', + 120819 => '7', + 120820 => '8', + 120821 => '9', + 120822 => '0', + 120823 => '1', + 120824 => '2', + 120825 => '3', + 120826 => '4', + 120827 => '5', + 120828 => '6', + 120829 => '7', + 120830 => '8', + 120831 => '9', + 125184 => '𞤢', + 125185 => '𞤣', + 125186 => '𞤤', + 125187 => '𞤥', + 125188 => '𞤦', + 125189 => '𞤧', + 125190 => '𞤨', + 125191 => '𞤩', + 125192 => '𞤪', + 125193 => '𞤫', + 125194 => '𞤬', + 125195 => '𞤭', + 125196 => '𞤮', + 125197 => '𞤯', + 125198 => '𞤰', + 125199 => '𞤱', + 125200 => '𞤲', + 125201 => '𞤳', + 125202 => '𞤴', + 125203 => '𞤵', + 125204 => '𞤶', + 125205 => '𞤷', + 125206 => '𞤸', + 125207 => '𞤹', + 125208 => '𞤺', + 125209 => '𞤻', + 125210 => '𞤼', + 125211 => '𞤽', + 125212 => '𞤾', + 125213 => '𞤿', + 125214 => '𞥀', + 125215 => 'ðž¥', + 125216 => '𞥂', + 125217 => '𞥃', + 126464 => 'ا', + 126465 => 'ب', + 126466 => 'ج', + 126467 => 'د', + 126469 => 'Ùˆ', + 126470 => 'ز', + 126471 => 'Ø­', + 126472 => 'Ø·', + 126473 => 'ÙŠ', + 126474 => 'Ùƒ', + 126475 => 'Ù„', + 126476 => 'Ù…', + 126477 => 'Ù†', + 126478 => 'س', + 126479 => 'ع', + 126480 => 'Ù', + 126481 => 'ص', + 126482 => 'Ù‚', + 126483 => 'ر', + 126484 => 'Ø´', + 126485 => 'ت', + 126486 => 'Ø«', + 126487 => 'Ø®', + 126488 => 'Ø°', + 126489 => 'ض', + 126490 => 'ظ', + 126491 => 'غ', + 126492 => 'Ù®', + 126493 => 'Úº', + 126494 => 'Ú¡', + 126495 => 'Ù¯', + 126497 => 'ب', + 126498 => 'ج', + 126500 => 'Ù‡', + 126503 => 'Ø­', + 126505 => 'ÙŠ', + 126506 => 'Ùƒ', + 126507 => 'Ù„', + 126508 => 'Ù…', + 126509 => 'Ù†', + 126510 => 'س', + 126511 => 'ع', + 126512 => 'Ù', + 126513 => 'ص', + 126514 => 'Ù‚', + 126516 => 'Ø´', + 126517 => 'ت', + 126518 => 'Ø«', + 126519 => 'Ø®', + 126521 => 'ض', + 126523 => 'غ', + 126530 => 'ج', + 126535 => 'Ø­', + 126537 => 'ÙŠ', + 126539 => 'Ù„', + 126541 => 'Ù†', + 126542 => 'س', + 126543 => 'ع', + 126545 => 'ص', + 126546 => 'Ù‚', + 126548 => 'Ø´', + 126551 => 'Ø®', + 126553 => 'ض', + 126555 => 'غ', + 126557 => 'Úº', + 126559 => 'Ù¯', + 126561 => 'ب', + 126562 => 'ج', + 126564 => 'Ù‡', + 126567 => 'Ø­', + 126568 => 'Ø·', + 126569 => 'ÙŠ', + 126570 => 'Ùƒ', + 126572 => 'Ù…', + 126573 => 'Ù†', + 126574 => 'س', + 126575 => 'ع', + 126576 => 'Ù', + 126577 => 'ص', + 126578 => 'Ù‚', + 126580 => 'Ø´', + 126581 => 'ت', + 126582 => 'Ø«', + 126583 => 'Ø®', + 126585 => 'ض', + 126586 => 'ظ', + 126587 => 'غ', + 126588 => 'Ù®', + 126590 => 'Ú¡', + 126592 => 'ا', + 126593 => 'ب', + 126594 => 'ج', + 126595 => 'د', + 126596 => 'Ù‡', + 126597 => 'Ùˆ', + 126598 => 'ز', + 126599 => 'Ø­', + 126600 => 'Ø·', + 126601 => 'ÙŠ', + 126603 => 'Ù„', + 126604 => 'Ù…', + 126605 => 'Ù†', + 126606 => 'س', + 126607 => 'ع', + 126608 => 'Ù', + 126609 => 'ص', + 126610 => 'Ù‚', + 126611 => 'ر', + 126612 => 'Ø´', + 126613 => 'ت', + 126614 => 'Ø«', + 126615 => 'Ø®', + 126616 => 'Ø°', + 126617 => 'ض', + 126618 => 'ظ', + 126619 => 'غ', + 126625 => 'ب', + 126626 => 'ج', + 126627 => 'د', + 126629 => 'Ùˆ', + 126630 => 'ز', + 126631 => 'Ø­', + 126632 => 'Ø·', + 126633 => 'ÙŠ', + 126635 => 'Ù„', + 126636 => 'Ù…', + 126637 => 'Ù†', + 126638 => 'س', + 126639 => 'ع', + 126640 => 'Ù', + 126641 => 'ص', + 126642 => 'Ù‚', + 126643 => 'ر', + 126644 => 'Ø´', + 126645 => 'ت', + 126646 => 'Ø«', + 126647 => 'Ø®', + 126648 => 'Ø°', + 126649 => 'ض', + 126650 => 'ظ', + 126651 => 'غ', + 127274 => '〔s〕', + 127275 => 'c', + 127276 => 'r', + 127277 => 'cd', + 127278 => 'wz', + 127280 => 'a', + 127281 => 'b', + 127282 => 'c', + 127283 => 'd', + 127284 => 'e', + 127285 => 'f', + 127286 => 'g', + 127287 => 'h', + 127288 => 'i', + 127289 => 'j', + 127290 => 'k', + 127291 => 'l', + 127292 => 'm', + 127293 => 'n', + 127294 => 'o', + 127295 => 'p', + 127296 => 'q', + 127297 => 'r', + 127298 => 's', + 127299 => 't', + 127300 => 'u', + 127301 => 'v', + 127302 => 'w', + 127303 => 'x', + 127304 => 'y', + 127305 => 'z', + 127306 => 'hv', + 127307 => 'mv', + 127308 => 'sd', + 127309 => 'ss', + 127310 => 'ppv', + 127311 => 'wc', + 127338 => 'mc', + 127339 => 'md', + 127340 => 'mr', + 127376 => 'dj', + 127488 => 'ã»ã‹', + 127489 => 'ココ', + 127490 => 'サ', + 127504 => '手', + 127505 => 'å­—', + 127506 => 'åŒ', + 127507 => 'デ', + 127508 => '二', + 127509 => '多', + 127510 => '解', + 127511 => '天', + 127512 => '交', + 127513 => '映', + 127514 => 'ç„¡', + 127515 => 'æ–™', + 127516 => 'å‰', + 127517 => '後', + 127518 => 'å†', + 127519 => 'æ–°', + 127520 => 'åˆ', + 127521 => '終', + 127522 => '生', + 127523 => '販', + 127524 => '声', + 127525 => 'å¹', + 127526 => 'æ¼”', + 127527 => '投', + 127528 => 'æ•', + 127529 => '一', + 127530 => '三', + 127531 => 'éŠ', + 127532 => 'å·¦', + 127533 => '中', + 127534 => 'å³', + 127535 => '指', + 127536 => 'èµ°', + 127537 => '打', + 127538 => 'ç¦', + 127539 => '空', + 127540 => 'åˆ', + 127541 => '満', + 127542 => '有', + 127543 => '月', + 127544 => '申', + 127545 => '割', + 127546 => 'å–¶', + 127547 => 'é…', + 127552 => '〔本〕', + 127553 => '〔三〕', + 127554 => '〔二〕', + 127555 => '〔安〕', + 127556 => '〔点〕', + 127557 => '〔打〕', + 127558 => '〔盗〕', + 127559 => '〔å‹ã€•', + 127560 => '〔敗〕', + 127568 => 'å¾—', + 127569 => 'å¯', + 130032 => '0', + 130033 => '1', + 130034 => '2', + 130035 => '3', + 130036 => '4', + 130037 => '5', + 130038 => '6', + 130039 => '7', + 130040 => '8', + 130041 => '9', + 194560 => '丽', + 194561 => '丸', + 194562 => 'ä¹', + 194563 => 'ð „¢', + 194564 => 'ä½ ', + 194565 => 'ä¾®', + 194566 => 'ä¾»', + 194567 => '倂', + 194568 => 'åº', + 194569 => 'å‚™', + 194570 => '僧', + 194571 => 'åƒ', + 194572 => 'ã’ž', + 194573 => '𠘺', + 194574 => 'å…', + 194575 => 'å…”', + 194576 => 'å…¤', + 194577 => 'å…·', + 194578 => '𠔜', + 194579 => 'ã’¹', + 194580 => 'å…§', + 194581 => 'å†', + 194582 => 'ð •‹', + 194583 => '冗', + 194584 => '冤', + 194585 => '仌', + 194586 => '冬', + 194587 => '况', + 194588 => '𩇟', + 194589 => '凵', + 194590 => '刃', + 194591 => 'ã“Ÿ', + 194592 => '刻', + 194593 => '剆', + 194594 => '割', + 194595 => '剷', + 194596 => '㔕', + 194597 => '勇', + 194598 => '勉', + 194599 => '勤', + 194600 => '勺', + 194601 => '包', + 194602 => '匆', + 194603 => '北', + 194604 => 'å‰', + 194605 => 'å‘', + 194606 => 'åš', + 194607 => 'å³', + 194608 => 'å½', + 194609 => 'å¿', + 194610 => 'å¿', + 194611 => 'å¿', + 194612 => '𠨬', + 194613 => 'ç°', + 194614 => 'åŠ', + 194615 => 'åŸ', + 194616 => 'ð ­£', + 194617 => 'å«', + 194618 => 'å±', + 194619 => 'å†', + 194620 => 'å’ž', + 194621 => 'å¸', + 194622 => '呈', + 194623 => '周', + 194624 => 'å’¢', + 194625 => '哶', + 194626 => 'å”', + 194627 => 'å•“', + 194628 => 'å•£', + 194629 => 'å–„', + 194630 => 'å–„', + 194631 => 'å–™', + 194632 => 'å–«', + 194633 => 'å–³', + 194634 => 'å—‚', + 194635 => '圖', + 194636 => '嘆', + 194637 => '圗', + 194638 => '噑', + 194639 => 'å™´', + 194640 => '切', + 194641 => '壮', + 194642 => '城', + 194643 => '埴', + 194644 => 'å ', + 194645 => 'åž‹', + 194646 => 'å ²', + 194647 => 'å ±', + 194648 => '墬', + 194649 => '𡓤', + 194650 => '売', + 194651 => '壷', + 194652 => '夆', + 194653 => '多', + 194654 => '夢', + 194655 => '奢', + 194656 => '𡚨', + 194657 => '𡛪', + 194658 => '姬', + 194659 => '娛', + 194660 => '娧', + 194661 => '姘', + 194662 => '婦', + 194663 => 'ã›®', + 194665 => '嬈', + 194666 => '嬾', + 194667 => '嬾', + 194668 => '𡧈', + 194669 => '寃', + 194670 => '寘', + 194671 => '寧', + 194672 => '寳', + 194673 => '𡬘', + 194674 => '寿', + 194675 => 'å°†', + 194677 => 'å°¢', + 194678 => 'ãž', + 194679 => 'å± ', + 194680 => 'å±®', + 194681 => 'å³€', + 194682 => 'å²', + 194683 => 'ð¡·¤', + 194684 => '嵃', + 194685 => 'ð¡·¦', + 194686 => 'åµ®', + 194687 => '嵫', + 194688 => 'åµ¼', + 194689 => 'å·¡', + 194690 => 'å·¢', + 194691 => 'ã ¯', + 194692 => 'å·½', + 194693 => '帨', + 194694 => '帽', + 194695 => '幩', + 194696 => 'ã¡¢', + 194697 => '𢆃', + 194698 => '㡼', + 194699 => '庰', + 194700 => '庳', + 194701 => '庶', + 194702 => '廊', + 194703 => '𪎒', + 194704 => '廾', + 194705 => '𢌱', + 194706 => '𢌱', + 194707 => 'èˆ', + 194708 => 'å¼¢', + 194709 => 'å¼¢', + 194710 => '㣇', + 194711 => '𣊸', + 194712 => '𦇚', + 194713 => 'å½¢', + 194714 => '彫', + 194715 => '㣣', + 194716 => '徚', + 194717 => 'å¿', + 194718 => 'å¿—', + 194719 => '忹', + 194720 => 'æ‚', + 194721 => '㤺', + 194722 => '㤜', + 194723 => 'æ‚”', + 194724 => '𢛔', + 194725 => '惇', + 194726 => 'æ…ˆ', + 194727 => 'æ…Œ', + 194728 => 'æ…Ž', + 194729 => 'æ…Œ', + 194730 => 'æ…º', + 194731 => '憎', + 194732 => '憲', + 194733 => '憤', + 194734 => '憯', + 194735 => '懞', + 194736 => '懲', + 194737 => '懶', + 194738 => 'æˆ', + 194739 => '戛', + 194740 => 'æ‰', + 194741 => '抱', + 194742 => 'æ‹”', + 194743 => 'æ', + 194744 => '𢬌', + 194745 => '挽', + 194746 => '拼', + 194747 => 'æ¨', + 194748 => '掃', + 194749 => 'æ¤', + 194750 => '𢯱', + 194751 => 'æ¢', + 194752 => 'æ…', + 194753 => '掩', + 194754 => '㨮', + 194755 => 'æ‘©', + 194756 => '摾', + 194757 => 'æ’', + 194758 => 'æ‘·', + 194759 => '㩬', + 194760 => 'æ•', + 194761 => '敬', + 194762 => '𣀊', + 194763 => 'æ—£', + 194764 => '書', + 194765 => '晉', + 194766 => '㬙', + 194767 => 'æš‘', + 194768 => '㬈', + 194769 => '㫤', + 194770 => '冒', + 194771 => '冕', + 194772 => '最', + 194773 => 'æšœ', + 194774 => 'è‚­', + 194775 => 'ä™', + 194776 => '朗', + 194777 => '望', + 194778 => '朡', + 194779 => 'æž', + 194780 => 'æ“', + 194781 => 'ð£ƒ', + 194782 => 'ã­‰', + 194783 => '柺', + 194784 => 'æž…', + 194785 => 'æ¡’', + 194786 => '梅', + 194787 => '𣑭', + 194788 => '梎', + 194789 => 'æ Ÿ', + 194790 => '椔', + 194791 => 'ã®', + 194792 => '楂', + 194793 => '榣', + 194794 => '槪', + 194795 => '檨', + 194796 => '𣚣', + 194797 => 'æ«›', + 194798 => 'ã°˜', + 194799 => '次', + 194800 => '𣢧', + 194801 => 'æ­”', + 194802 => '㱎', + 194803 => 'æ­²', + 194804 => '殟', + 194805 => '殺', + 194806 => 'æ®»', + 194807 => 'ð£ª', + 194808 => 'ð¡´‹', + 194809 => '𣫺', + 194810 => '汎', + 194811 => '𣲼', + 194812 => '沿', + 194813 => 'æ³', + 194814 => '汧', + 194815 => 'æ´–', + 194816 => 'æ´¾', + 194817 => 'æµ·', + 194818 => 'æµ', + 194819 => '浩', + 194820 => '浸', + 194821 => '涅', + 194822 => '𣴞', + 194823 => 'æ´´', + 194824 => '港', + 194825 => 'æ¹®', + 194826 => 'ã´³', + 194827 => '滋', + 194828 => '滇', + 194829 => '𣻑', + 194830 => 'æ·¹', + 194831 => 'æ½®', + 194832 => '𣽞', + 194833 => '𣾎', + 194834 => '濆', + 194835 => '瀹', + 194836 => '瀞', + 194837 => '瀛', + 194838 => '㶖', + 194839 => 'çŠ', + 194840 => 'ç½', + 194841 => 'ç·', + 194842 => 'ç‚­', + 194843 => '𠔥', + 194844 => 'ç……', + 194845 => '𤉣', + 194846 => '熜', + 194848 => '爨', + 194849 => '爵', + 194850 => 'ç‰', + 194851 => '𤘈', + 194852 => '犀', + 194853 => '犕', + 194854 => '𤜵', + 194855 => '𤠔', + 194856 => 'çº', + 194857 => '王', + 194858 => '㺬', + 194859 => '玥', + 194860 => '㺸', + 194861 => '㺸', + 194862 => '瑇', + 194863 => 'ç‘œ', + 194864 => '瑱', + 194865 => 'ç’…', + 194866 => 'ç“Š', + 194867 => 'ã¼›', + 194868 => '甤', + 194869 => '𤰶', + 194870 => '甾', + 194871 => '𤲒', + 194872 => 'ç•°', + 194873 => '𢆟', + 194874 => 'ç˜', + 194875 => '𤾡', + 194876 => '𤾸', + 194877 => 'ð¥„', + 194878 => '㿼', + 194879 => '䀈', + 194880 => 'ç›´', + 194881 => '𥃳', + 194882 => '𥃲', + 194883 => '𥄙', + 194884 => '𥄳', + 194885 => '眞', + 194886 => '真', + 194887 => '真', + 194888 => 'çŠ', + 194889 => '䀹', + 194890 => 'çž‹', + 194891 => 'ä†', + 194892 => 'ä‚–', + 194893 => 'ð¥', + 194894 => 'ç¡Ž', + 194895 => '碌', + 194896 => '磌', + 194897 => '䃣', + 194898 => '𥘦', + 194899 => '祖', + 194900 => '𥚚', + 194901 => '𥛅', + 194902 => 'ç¦', + 194903 => '秫', + 194904 => '䄯', + 194905 => 'ç©€', + 194906 => 'ç©Š', + 194907 => 'ç©', + 194908 => '𥥼', + 194909 => '𥪧', + 194910 => '𥪧', + 194912 => '䈂', + 194913 => '𥮫', + 194914 => '篆', + 194915 => '築', + 194916 => '䈧', + 194917 => '𥲀', + 194918 => 'ç³’', + 194919 => '䊠', + 194920 => '糨', + 194921 => 'ç³£', + 194922 => 'ç´€', + 194923 => '𥾆', + 194924 => 'çµ£', + 194925 => 'äŒ', + 194926 => 'ç·‡', + 194927 => '縂', + 194928 => 'ç¹…', + 194929 => '䌴', + 194930 => '𦈨', + 194931 => '𦉇', + 194932 => 'ä™', + 194933 => '𦋙', + 194934 => '罺', + 194935 => '𦌾', + 194936 => '羕', + 194937 => '翺', + 194938 => '者', + 194939 => '𦓚', + 194940 => '𦔣', + 194941 => 'è ', + 194942 => '𦖨', + 194943 => 'è°', + 194944 => 'ð£Ÿ', + 194945 => 'ä•', + 194946 => '育', + 194947 => '脃', + 194948 => 'ä‹', + 194949 => '脾', + 194950 => '媵', + 194951 => '𦞧', + 194952 => '𦞵', + 194953 => '𣎓', + 194954 => '𣎜', + 194955 => 'èˆ', + 194956 => '舄', + 194957 => '辞', + 194958 => 'ä‘«', + 194959 => '芑', + 194960 => '芋', + 194961 => 'èŠ', + 194962 => '劳', + 194963 => '花', + 194964 => '芳', + 194965 => '芽', + 194966 => '苦', + 194967 => '𦬼', + 194968 => 'è‹¥', + 194969 => 'èŒ', + 194970 => 'è£', + 194971 => '莭', + 194972 => '茣', + 194973 => '莽', + 194974 => 'è§', + 194975 => 'è‘—', + 194976 => 'è“', + 194977 => 'èŠ', + 194978 => 'èŒ', + 194979 => 'èœ', + 194980 => '𦰶', + 194981 => '𦵫', + 194982 => '𦳕', + 194983 => '䔫', + 194984 => '蓱', + 194985 => '蓳', + 194986 => 'è”–', + 194987 => 'ð§Š', + 194988 => '蕤', + 194989 => '𦼬', + 194990 => 'ä•', + 194991 => 'ä•¡', + 194992 => '𦾱', + 194993 => '𧃒', + 194994 => 'ä•«', + 194995 => 'è™', + 194996 => '虜', + 194997 => '虧', + 194998 => '虩', + 194999 => 'èš©', + 195000 => '蚈', + 195001 => '蜎', + 195002 => '蛢', + 195003 => 'è¹', + 195004 => '蜨', + 195005 => 'è«', + 195006 => '螆', + 195008 => '蟡', + 195009 => 'è ', + 195010 => 'ä—¹', + 195011 => 'è¡ ', + 195012 => 'è¡£', + 195013 => '𧙧', + 195014 => '裗', + 195015 => '裞', + 195016 => '䘵', + 195017 => '裺', + 195018 => 'ã’»', + 195019 => '𧢮', + 195020 => '𧥦', + 195021 => 'äš¾', + 195022 => '䛇', + 195023 => '誠', + 195024 => 'è«­', + 195025 => '變', + 195026 => '豕', + 195027 => '𧲨', + 195028 => '貫', + 195029 => 'è³', + 195030 => 'è´›', + 195031 => 'èµ·', + 195032 => '𧼯', + 195033 => 'ð  „', + 195034 => 'è·‹', + 195035 => '趼', + 195036 => 'è·°', + 195037 => '𠣞', + 195038 => 'è»”', + 195039 => '輸', + 195040 => '𨗒', + 195041 => '𨗭', + 195042 => 'é‚”', + 195043 => '郱', + 195044 => 'é„‘', + 195045 => '𨜮', + 195046 => 'é„›', + 195047 => '鈸', + 195048 => 'é‹—', + 195049 => '鋘', + 195050 => '鉼', + 195051 => 'é¹', + 195052 => 'é•', + 195053 => '𨯺', + 195054 => 'é–‹', + 195055 => '䦕', + 195056 => 'é–·', + 195057 => '𨵷', + 195058 => '䧦', + 195059 => '雃', + 195060 => '嶲', + 195061 => '霣', + 195062 => 'ð©……', + 195063 => '𩈚', + 195064 => 'ä©®', + 195065 => '䩶', + 195066 => '韠', + 195067 => 'ð©Š', + 195068 => '䪲', + 195069 => 'ð©’–', + 195070 => 'é ‹', + 195071 => 'é ‹', + 195072 => 'é ©', + 195073 => 'ð©–¶', + 195074 => '飢', + 195075 => '䬳', + 195076 => '餩', + 195077 => '馧', + 195078 => '駂', + 195079 => '駾', + 195080 => '䯎', + 195081 => '𩬰', + 195082 => '鬒', + 195083 => 'é±€', + 195084 => 'é³½', + 195085 => '䳎', + 195086 => 'ä³­', + 195087 => '鵧', + 195088 => '𪃎', + 195089 => '䳸', + 195090 => '𪄅', + 195091 => '𪈎', + 195092 => '𪊑', + 195093 => '麻', + 195094 => 'äµ–', + 195095 => '黹', + 195096 => '黾', + 195097 => 'é¼…', + 195098 => 'é¼', + 195099 => 'é¼–', + 195100 => 'é¼»', + 195101 => '𪘀', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php new file mode 100644 index 00000000..1958e37e --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/Resources/unidata/virama.php @@ -0,0 +1,65 @@ + 9, + 2509 => 9, + 2637 => 9, + 2765 => 9, + 2893 => 9, + 3021 => 9, + 3149 => 9, + 3277 => 9, + 3387 => 9, + 3388 => 9, + 3405 => 9, + 3530 => 9, + 3642 => 9, + 3770 => 9, + 3972 => 9, + 4153 => 9, + 4154 => 9, + 5908 => 9, + 5940 => 9, + 6098 => 9, + 6752 => 9, + 6980 => 9, + 7082 => 9, + 7083 => 9, + 7154 => 9, + 7155 => 9, + 11647 => 9, + 43014 => 9, + 43052 => 9, + 43204 => 9, + 43347 => 9, + 43456 => 9, + 43766 => 9, + 44013 => 9, + 68159 => 9, + 69702 => 9, + 69759 => 9, + 69817 => 9, + 69939 => 9, + 69940 => 9, + 70080 => 9, + 70197 => 9, + 70378 => 9, + 70477 => 9, + 70722 => 9, + 70850 => 9, + 71103 => 9, + 71231 => 9, + 71350 => 9, + 71467 => 9, + 71737 => 9, + 71997 => 9, + 71998 => 9, + 72160 => 9, + 72244 => 9, + 72263 => 9, + 72345 => 9, + 72767 => 9, + 73028 => 9, + 73029 => 9, + 73111 => 9, +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/bootstrap.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/bootstrap.php new file mode 100644 index 00000000..57c78356 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/bootstrap.php @@ -0,0 +1,145 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (extension_loaded('intl')) { + return; +} + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_2003')) { + define('INTL_IDNA_VARIANT_2003', 0); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (\PHP_VERSION_ID < 70400) { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } + } +} else { + if (!function_exists('idn_to_ascii')) { + function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } + } + if (!function_exists('idn_to_utf8')) { + function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/bootstrap80.php b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/bootstrap80.php new file mode 100644 index 00000000..a42ab81a --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/bootstrap80.php @@ -0,0 +1,125 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Idn as p; + +if (!defined('U_IDNA_PROHIBITED_ERROR')) { + define('U_IDNA_PROHIBITED_ERROR', 66560); +} +if (!defined('U_IDNA_ERROR_START')) { + define('U_IDNA_ERROR_START', 66560); +} +if (!defined('U_IDNA_UNASSIGNED_ERROR')) { + define('U_IDNA_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { + define('U_IDNA_CHECK_BIDI_ERROR', 66562); +} +if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { + define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); +} +if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { + define('U_IDNA_ACE_PREFIX_ERROR', 66564); +} +if (!defined('U_IDNA_VERIFICATION_ERROR')) { + define('U_IDNA_VERIFICATION_ERROR', 66565); +} +if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { + define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); +} +if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { + define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); +} +if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { + define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); +} +if (!defined('U_IDNA_ERROR_LIMIT')) { + define('U_IDNA_ERROR_LIMIT', 66569); +} +if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { + define('U_STRINGPREP_PROHIBITED_ERROR', 66560); +} +if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { + define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); +} +if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { + define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); +} +if (!defined('IDNA_DEFAULT')) { + define('IDNA_DEFAULT', 0); +} +if (!defined('IDNA_ALLOW_UNASSIGNED')) { + define('IDNA_ALLOW_UNASSIGNED', 1); +} +if (!defined('IDNA_USE_STD3_RULES')) { + define('IDNA_USE_STD3_RULES', 2); +} +if (!defined('IDNA_CHECK_BIDI')) { + define('IDNA_CHECK_BIDI', 4); +} +if (!defined('IDNA_CHECK_CONTEXTJ')) { + define('IDNA_CHECK_CONTEXTJ', 8); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { + define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); +} +if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { + define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); +} +if (!defined('INTL_IDNA_VARIANT_UTS46')) { + define('INTL_IDNA_VARIANT_UTS46', 1); +} +if (!defined('IDNA_ERROR_EMPTY_LABEL')) { + define('IDNA_ERROR_EMPTY_LABEL', 1); +} +if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { + define('IDNA_ERROR_LABEL_TOO_LONG', 2); +} +if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { + define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); +} +if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { + define('IDNA_ERROR_LEADING_HYPHEN', 8); +} +if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { + define('IDNA_ERROR_TRAILING_HYPHEN', 16); +} +if (!defined('IDNA_ERROR_HYPHEN_3_4')) { + define('IDNA_ERROR_HYPHEN_3_4', 32); +} +if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { + define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); +} +if (!defined('IDNA_ERROR_DISALLOWED')) { + define('IDNA_ERROR_DISALLOWED', 128); +} +if (!defined('IDNA_ERROR_PUNYCODE')) { + define('IDNA_ERROR_PUNYCODE', 256); +} +if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { + define('IDNA_ERROR_LABEL_HAS_DOT', 512); +} +if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { + define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); +} +if (!defined('IDNA_ERROR_BIDI')) { + define('IDNA_ERROR_BIDI', 2048); +} +if (!defined('IDNA_ERROR_CONTEXTJ')) { + define('IDNA_ERROR_CONTEXTJ', 4096); +} + +if (!function_exists('idn_to_ascii')) { + function idn_to_ascii(?string $domain, ?int $flags = 0, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); } +} +if (!function_exists('idn_to_utf8')) { + function idn_to_utf8(?string $domain, ?int $flags = 0, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-idn/composer.json b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/composer.json new file mode 100644 index 00000000..c5a2a462 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-idn/composer.json @@ -0,0 +1,44 @@ +{ + "name": "symfony/polyfill-intl-idn", + "type": "library", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "idn"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Idn\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/LICENSE b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/LICENSE new file mode 100644 index 00000000..4cd8bdd3 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Normalizer.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Normalizer.php new file mode 100644 index 00000000..4443c232 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Normalizer.php @@ -0,0 +1,310 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Intl\Normalizer; + +/** + * Normalizer is a PHP fallback implementation of the Normalizer class provided by the intl extension. + * + * It has been validated with Unicode 6.3 Normalization Conformance Test. + * See http://www.unicode.org/reports/tr15/ for detailed info about Unicode normalizations. + * + * @author Nicolas Grekas + * + * @internal + */ +class Normalizer +{ + public const FORM_D = \Normalizer::FORM_D; + public const FORM_KD = \Normalizer::FORM_KD; + public const FORM_C = \Normalizer::FORM_C; + public const FORM_KC = \Normalizer::FORM_KC; + public const NFD = \Normalizer::NFD; + public const NFKD = \Normalizer::NFKD; + public const NFC = \Normalizer::NFC; + public const NFKC = \Normalizer::NFKC; + + private static $C; + private static $D; + private static $KD; + private static $cC; + private static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + private static $ASCII = "\x20\x65\x69\x61\x73\x6E\x74\x72\x6F\x6C\x75\x64\x5D\x5B\x63\x6D\x70\x27\x0A\x67\x7C\x68\x76\x2E\x66\x62\x2C\x3A\x3D\x2D\x71\x31\x30\x43\x32\x2A\x79\x78\x29\x28\x4C\x39\x41\x53\x2F\x50\x22\x45\x6A\x4D\x49\x6B\x33\x3E\x35\x54\x3C\x44\x34\x7D\x42\x7B\x38\x46\x77\x52\x36\x37\x55\x47\x4E\x3B\x4A\x7A\x56\x23\x48\x4F\x57\x5F\x26\x21\x4B\x3F\x58\x51\x25\x59\x5C\x09\x5A\x2B\x7E\x5E\x24\x40\x60\x7F\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F"; + + public static function isNormalized(string $s, int $form = self::FORM_C) + { + if (!\in_array($form, [self::NFD, self::NFKD, self::NFC, self::NFKC])) { + return false; + } + if (!isset($s[strspn($s, self::$ASCII)])) { + return true; + } + if (self::NFC == $form && preg_match('//u', $s) && !preg_match('/[^\x00-\x{2FF}]/u', $s)) { + return true; + } + + return self::normalize($s, $form) === $s; + } + + public static function normalize(string $s, int $form = self::FORM_C) + { + if (!preg_match('//u', $s)) { + return false; + } + + switch ($form) { + case self::NFC: $C = true; $K = false; break; + case self::NFD: $C = false; $K = false; break; + case self::NFKC: $C = true; $K = true; break; + case self::NFKD: $C = false; $K = true; break; + default: + if (\defined('Normalizer::NONE') && \Normalizer::NONE == $form) { + return $s; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError('normalizer_normalize(): Argument #2 ($form) must be a a valid normalization form'); + } + + if ('' === $s) { + return ''; + } + + if ($K && null === self::$KD) { + self::$KD = self::getData('compatibilityDecomposition'); + } + + if (null === self::$D) { + self::$D = self::getData('canonicalDecomposition'); + self::$cC = self::getData('combiningClass'); + } + + if (null !== $mbEncoding = (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) ? mb_internal_encoding() : null) { + mb_internal_encoding('8bit'); + } + + $r = self::decompose($s, $K); + + if ($C) { + if (null === self::$C) { + self::$C = self::getData('canonicalComposition'); + } + + $r = self::recompose($r); + } + if (null !== $mbEncoding) { + mb_internal_encoding($mbEncoding); + } + + return $r; + } + + private static function recompose($s) + { + $ASCII = self::$ASCII; + $compMap = self::$C; + $combClass = self::$cC; + $ulenMask = self::$ulenMask; + + $result = $tail = ''; + + $i = $s[0] < "\x80" ? 1 : $ulenMask[$s[0] & "\xF0"]; + $len = \strlen($s); + + $lastUchr = substr($s, 0, $i); + $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0; + + while ($i < $len) { + if ($s[$i] < "\x80") { + // ASCII chars + + if ($tail) { + $lastUchr .= $tail; + $tail = ''; + } + + if ($j = strspn($s, $ASCII, $i + 1)) { + $lastUchr .= substr($s, $i, $j); + $i += $j; + } + + $result .= $lastUchr; + $lastUchr = $s[$i]; + $lastUcls = 0; + ++$i; + continue; + } + + $ulen = $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + + if ($lastUchr < "\xE1\x84\x80" || "\xE1\x84\x92" < $lastUchr + || $uchr < "\xE1\x85\xA1" || "\xE1\x85\xB5" < $uchr + || $lastUcls) { + // Table lookup and combining chars composition + + $ucls = $combClass[$uchr] ?? 0; + + if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { + $lastUchr = $compMap[$lastUchr.$uchr]; + } elseif ($lastUcls = $ucls) { + $tail .= $uchr; + } else { + if ($tail) { + $lastUchr .= $tail; + $tail = ''; + } + + $result .= $lastUchr; + $lastUchr = $uchr; + } + } else { + // Hangul chars + + $L = \ord($lastUchr[2]) - 0x80; + $V = \ord($uchr[2]) - 0xA1; + $T = 0; + + $uchr = substr($s, $i + $ulen, 3); + + if ("\xE1\x86\xA7" <= $uchr && $uchr <= "\xE1\x87\x82") { + $T = \ord($uchr[2]) - 0xA7; + 0 > $T && $T += 0x40; + $ulen += 3; + } + + $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; + $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); + } + + $i += $ulen; + } + + return $result.$lastUchr.$tail; + } + + private static function decompose($s, $c) + { + $result = ''; + + $ASCII = self::$ASCII; + $decompMap = self::$D; + $combClass = self::$cC; + $ulenMask = self::$ulenMask; + if ($c) { + $compatMap = self::$KD; + } + + $c = []; + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + if ($s[$i] < "\x80") { + // ASCII chars + + if ($c) { + ksort($c); + $result .= implode('', $c); + $c = []; + } + + $j = 1 + strspn($s, $ASCII, $i + 1); + $result .= substr($s, $i, $j); + $i += $j; + continue; + } + + $ulen = $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if ($uchr < "\xEA\xB0\x80" || "\xED\x9E\xA3" < $uchr) { + // Table lookup + + if ($uchr !== $j = $compatMap[$uchr] ?? ($decompMap[$uchr] ?? $uchr)) { + $uchr = $j; + + $j = \strlen($uchr); + $ulen = $uchr[0] < "\x80" ? 1 : $ulenMask[$uchr[0] & "\xF0"]; + + if ($ulen != $j) { + // Put trailing chars in $s + + $j -= $ulen; + $i -= $j; + + if (0 > $i) { + $s = str_repeat(' ', -$i).$s; + $len -= $i; + $i = 0; + } + + while ($j--) { + $s[$i + $j] = $uchr[$ulen + $j]; + } + + $uchr = substr($uchr, 0, $ulen); + } + } + if (isset($combClass[$uchr])) { + // Combining chars, for sorting + + if (!isset($c[$combClass[$uchr]])) { + $c[$combClass[$uchr]] = ''; + } + $c[$combClass[$uchr]] .= $uchr; + continue; + } + } else { + // Hangul chars + + $uchr = unpack('C*', $uchr); + $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; + + $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) + ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); + + if ($j %= 28) { + $uchr .= $j < 25 + ? ("\xE1\x86".\chr(0xA7 + $j)) + : ("\xE1\x87".\chr(0x67 + $j)); + } + } + if ($c) { + ksort($c); + $result .= implode('', $c); + $c = []; + } + + $result .= $uchr; + } + + if ($c) { + ksort($c); + $result .= implode('', $c); + } + + return $result; + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/README.md b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/README.md new file mode 100644 index 00000000..15060c5f --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/README.md @@ -0,0 +1,14 @@ +Symfony Polyfill / Intl: Normalizer +=================================== + +This component provides a fallback implementation for the +[`Normalizer`](https://php.net/Normalizer) class provided +by the [Intl](https://php.net/intl) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php new file mode 100644 index 00000000..0fdfc890 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php @@ -0,0 +1,17 @@ + 'À', + 'AÌ' => 'Ã', + 'AÌ‚' => 'Â', + 'Ã' => 'Ã', + 'Ä' => 'Ä', + 'AÌŠ' => 'Ã…', + 'Ç' => 'Ç', + 'EÌ€' => 'È', + 'EÌ' => 'É', + 'EÌ‚' => 'Ê', + 'Ë' => 'Ë', + 'IÌ€' => 'ÃŒ', + 'IÌ' => 'Ã', + 'IÌ‚' => 'ÃŽ', + 'Ï' => 'Ã', + 'Ñ' => 'Ñ', + 'OÌ€' => 'Ã’', + 'OÌ' => 'Ó', + 'OÌ‚' => 'Ô', + 'Õ' => 'Õ', + 'Ö' => 'Ö', + 'UÌ€' => 'Ù', + 'UÌ' => 'Ú', + 'UÌ‚' => 'Û', + 'Ü' => 'Ãœ', + 'YÌ' => 'Ã', + 'aÌ€' => 'à', + 'aÌ' => 'á', + 'aÌ‚' => 'â', + 'ã' => 'ã', + 'ä' => 'ä', + 'aÌŠ' => 'Ã¥', + 'ç' => 'ç', + 'eÌ€' => 'è', + 'eÌ' => 'é', + 'eÌ‚' => 'ê', + 'ë' => 'ë', + 'iÌ€' => 'ì', + 'iÌ' => 'í', + 'iÌ‚' => 'î', + 'ï' => 'ï', + 'ñ' => 'ñ', + 'oÌ€' => 'ò', + 'oÌ' => 'ó', + 'oÌ‚' => 'ô', + 'õ' => 'õ', + 'ö' => 'ö', + 'uÌ€' => 'ù', + 'uÌ' => 'ú', + 'uÌ‚' => 'û', + 'ü' => 'ü', + 'yÌ' => 'ý', + 'ÿ' => 'ÿ', + 'AÌ„' => 'Ä€', + 'aÌ„' => 'Ä', + 'Ă' => 'Ä‚', + 'ă' => 'ă', + 'Ą' => 'Ä„', + 'ą' => 'Ä…', + 'CÌ' => 'Ć', + 'cÌ' => 'ć', + 'CÌ‚' => 'Ĉ', + 'cÌ‚' => 'ĉ', + 'Ċ' => 'ÄŠ', + 'ċ' => 'Ä‹', + 'CÌŒ' => 'ÄŒ', + 'cÌŒ' => 'Ä', + 'DÌŒ' => 'ÄŽ', + 'dÌŒ' => 'Ä', + 'EÌ„' => 'Ä’', + 'eÌ„' => 'Ä“', + 'Ĕ' => 'Ä”', + 'ĕ' => 'Ä•', + 'Ė' => 'Ä–', + 'ė' => 'Ä—', + 'Ę' => 'Ę', + 'ę' => 'Ä™', + 'EÌŒ' => 'Äš', + 'eÌŒ' => 'Ä›', + 'GÌ‚' => 'Äœ', + 'gÌ‚' => 'Ä', + 'Ğ' => 'Äž', + 'ğ' => 'ÄŸ', + 'Ġ' => 'Ä ', + 'ġ' => 'Ä¡', + 'Ģ' => 'Ä¢', + 'ģ' => 'Ä£', + 'HÌ‚' => 'Ĥ', + 'hÌ‚' => 'Ä¥', + 'Ĩ' => 'Ĩ', + 'ĩ' => 'Ä©', + 'IÌ„' => 'Ī', + 'iÌ„' => 'Ä«', + 'Ĭ' => 'Ĭ', + 'ĭ' => 'Ä­', + 'Į' => 'Ä®', + 'į' => 'į', + 'İ' => 'Ä°', + 'JÌ‚' => 'Ä´', + 'jÌ‚' => 'ĵ', + 'Ķ' => 'Ķ', + 'ķ' => 'Ä·', + 'LÌ' => 'Ĺ', + 'lÌ' => 'ĺ', + 'Ļ' => 'Ä»', + 'ļ' => 'ļ', + 'LÌŒ' => 'Ľ', + 'lÌŒ' => 'ľ', + 'NÌ' => 'Ń', + 'nÌ' => 'Å„', + 'Ņ' => 'Å…', + 'ņ' => 'ņ', + 'NÌŒ' => 'Ň', + 'nÌŒ' => 'ň', + 'OÌ„' => 'ÅŒ', + 'oÌ„' => 'Å', + 'Ŏ' => 'ÅŽ', + 'ŏ' => 'Å', + 'OÌ‹' => 'Å', + 'oÌ‹' => 'Å‘', + 'RÌ' => 'Å”', + 'rÌ' => 'Å•', + 'Ŗ' => 'Å–', + 'ŗ' => 'Å—', + 'RÌŒ' => 'Ř', + 'rÌŒ' => 'Å™', + 'SÌ' => 'Åš', + 'sÌ' => 'Å›', + 'SÌ‚' => 'Åœ', + 'sÌ‚' => 'Å', + 'Ş' => 'Åž', + 'ş' => 'ÅŸ', + 'SÌŒ' => 'Å ', + 'sÌŒ' => 'Å¡', + 'Ţ' => 'Å¢', + 'ţ' => 'Å£', + 'TÌŒ' => 'Ť', + 'tÌŒ' => 'Å¥', + 'Ũ' => 'Ũ', + 'ũ' => 'Å©', + 'UÌ„' => 'Ū', + 'uÌ„' => 'Å«', + 'Ŭ' => 'Ŭ', + 'ŭ' => 'Å­', + 'UÌŠ' => 'Å®', + 'uÌŠ' => 'ů', + 'UÌ‹' => 'Å°', + 'uÌ‹' => 'ű', + 'Ų' => 'Ų', + 'ų' => 'ų', + 'WÌ‚' => 'Å´', + 'wÌ‚' => 'ŵ', + 'YÌ‚' => 'Ŷ', + 'yÌ‚' => 'Å·', + 'Ÿ' => 'Ÿ', + 'ZÌ' => 'Ź', + 'zÌ' => 'ź', + 'Ż' => 'Å»', + 'ż' => 'ż', + 'ZÌŒ' => 'Ž', + 'zÌŒ' => 'ž', + 'OÌ›' => 'Æ ', + 'oÌ›' => 'Æ¡', + 'UÌ›' => 'Ư', + 'uÌ›' => 'Æ°', + 'AÌŒ' => 'Ç', + 'aÌŒ' => 'ÇŽ', + 'IÌŒ' => 'Ç', + 'iÌŒ' => 'Ç', + 'OÌŒ' => 'Ç‘', + 'oÌŒ' => 'Ç’', + 'UÌŒ' => 'Ç“', + 'uÌŒ' => 'Ç”', + 'Ǖ' => 'Ç•', + 'ǖ' => 'Ç–', + 'ÃœÌ' => 'Ç—', + 'üÌ' => 'ǘ', + 'Ǚ' => 'Ç™', + 'ǚ' => 'Çš', + 'Ǜ' => 'Ç›', + 'ǜ' => 'Çœ', + 'Ǟ' => 'Çž', + 'ǟ' => 'ÇŸ', + 'Ǡ' => 'Ç ', + 'ǡ' => 'Ç¡', + 'Ǣ' => 'Ç¢', + 'ǣ' => 'Ç£', + 'GÌŒ' => 'Ǧ', + 'gÌŒ' => 'ǧ', + 'KÌŒ' => 'Ǩ', + 'kÌŒ' => 'Ç©', + 'Ǫ' => 'Ǫ', + 'ǫ' => 'Ç«', + 'Ǭ' => 'Ǭ', + 'Ç«Ì„' => 'Ç­', + 'Æ·ÌŒ' => 'Ç®', + 'Ê’ÌŒ' => 'ǯ', + 'jÌŒ' => 'Ç°', + 'GÌ' => 'Ç´', + 'gÌ' => 'ǵ', + 'NÌ€' => 'Ǹ', + 'nÌ€' => 'ǹ', + 'Ã…Ì' => 'Ǻ', + 'Ã¥Ì' => 'Ç»', + 'ÆÌ' => 'Ǽ', + 'æÌ' => 'ǽ', + 'ØÌ' => 'Ǿ', + 'øÌ' => 'Ç¿', + 'AÌ' => 'È€', + 'aÌ' => 'È', + 'AÌ‘' => 'È‚', + 'aÌ‘' => 'ȃ', + 'EÌ' => 'È„', + 'eÌ' => 'È…', + 'EÌ‘' => 'Ȇ', + 'eÌ‘' => 'ȇ', + 'IÌ' => 'Ȉ', + 'iÌ' => 'ȉ', + 'IÌ‘' => 'ÈŠ', + 'iÌ‘' => 'È‹', + 'OÌ' => 'ÈŒ', + 'oÌ' => 'È', + 'OÌ‘' => 'ÈŽ', + 'oÌ‘' => 'È', + 'RÌ' => 'È', + 'rÌ' => 'È‘', + 'RÌ‘' => 'È’', + 'rÌ‘' => 'È“', + 'UÌ' => 'È”', + 'uÌ' => 'È•', + 'UÌ‘' => 'È–', + 'uÌ‘' => 'È—', + 'Ș' => 'Ș', + 'ș' => 'È™', + 'Ț' => 'Èš', + 'ț' => 'È›', + 'HÌŒ' => 'Èž', + 'hÌŒ' => 'ÈŸ', + 'Ȧ' => 'Ȧ', + 'ȧ' => 'ȧ', + 'Ȩ' => 'Ȩ', + 'ȩ' => 'È©', + 'Ȫ' => 'Ȫ', + 'ȫ' => 'È«', + 'Ȭ' => 'Ȭ', + 'ȭ' => 'È­', + 'Ȯ' => 'È®', + 'ȯ' => 'ȯ', + 'Ȱ' => 'È°', + 'ȱ' => 'ȱ', + 'YÌ„' => 'Ȳ', + 'yÌ„' => 'ȳ', + '¨Ì' => 'Î…', + 'ΑÌ' => 'Ά', + 'ΕÌ' => 'Έ', + 'ΗÌ' => 'Ή', + 'ΙÌ' => 'Ί', + 'ΟÌ' => 'ÎŒ', + 'Î¥Ì' => 'ÎŽ', + 'ΩÌ' => 'Î', + 'ÏŠÌ' => 'Î', + 'Ϊ' => 'Ϊ', + 'Ϋ' => 'Ϋ', + 'αÌ' => 'ά', + 'εÌ' => 'έ', + 'ηÌ' => 'ή', + 'ιÌ' => 'ί', + 'Ï‹Ì' => 'ΰ', + 'ϊ' => 'ÏŠ', + 'ϋ' => 'Ï‹', + 'οÌ' => 'ÏŒ', + 'Ï…Ì' => 'Ï', + 'ωÌ' => 'ÏŽ', + 'Ï’Ì' => 'Ï“', + 'ϔ' => 'Ï”', + 'Ѐ' => 'Ѐ', + 'Ё' => 'Ð', + 'ГÌ' => 'Ѓ', + 'Ї' => 'Ї', + 'КÌ' => 'ÐŒ', + 'Ѝ' => 'Ð', + 'Ў' => 'ÐŽ', + 'Й' => 'Й', + 'й' => 'й', + 'ѐ' => 'Ñ', + 'ё' => 'Ñ‘', + 'гÌ' => 'Ñ“', + 'ї' => 'Ñ—', + 'кÌ' => 'Ñœ', + 'ѝ' => 'Ñ', + 'ў' => 'Ñž', + 'Ñ´Ì' => 'Ѷ', + 'ѵÌ' => 'Ñ·', + 'Ӂ' => 'Ó', + 'ӂ' => 'Ó‚', + 'Ð̆' => 'Ó', + 'ӑ' => 'Ó‘', + 'Ð̈' => 'Ó’', + 'ӓ' => 'Ó“', + 'Ӗ' => 'Ó–', + 'ӗ' => 'Ó—', + 'Ӛ' => 'Óš', + 'ӛ' => 'Ó›', + 'Ӝ' => 'Óœ', + 'ӝ' => 'Ó', + 'Ӟ' => 'Óž', + 'ӟ' => 'ÓŸ', + 'Ӣ' => 'Ó¢', + 'ӣ' => 'Ó£', + 'Ӥ' => 'Ó¤', + 'ӥ' => 'Ó¥', + 'Ӧ' => 'Ó¦', + 'ӧ' => 'Ó§', + 'Ӫ' => 'Óª', + 'ӫ' => 'Ó«', + 'Ӭ' => 'Ó¬', + 'Ñ̈' => 'Ó­', + 'Ӯ' => 'Ó®', + 'ӯ' => 'Ó¯', + 'Ӱ' => 'Ó°', + 'ӱ' => 'Ó±', + 'Ӳ' => 'Ó²', + 'ӳ' => 'Ó³', + 'Ӵ' => 'Ó´', + 'ӵ' => 'Óµ', + 'Ӹ' => 'Ó¸', + 'ӹ' => 'Ó¹', + 'آ' => 'Ø¢', + 'أ' => 'Ø£', + 'ÙˆÙ”' => 'ؤ', + 'إ' => 'Ø¥', + 'ÙŠÙ”' => 'ئ', + 'Û•Ù”' => 'Û€', + 'ÛÙ”' => 'Û‚', + 'Û’Ù”' => 'Û“', + 'ऩ' => 'ऩ', + 'ऱ' => 'ऱ', + 'ऴ' => 'ऴ', + 'ো' => 'ো', + 'ৌ' => 'ৌ', + 'ୈ' => 'à­ˆ', + 'ୋ' => 'à­‹', + 'ୌ' => 'à­Œ', + 'ஔ' => 'à®”', + 'ொ' => 'ொ', + 'ோ' => 'ோ', + 'ௌ' => 'ௌ', + 'ై' => 'ై', + 'ೀ' => 'à³€', + 'ೇ' => 'ೇ', + 'ೈ' => 'ೈ', + 'ೊ' => 'ೊ', + 'ೋ' => 'ೋ', + 'ൊ' => 'ൊ', + 'ോ' => 'ോ', + 'ൌ' => 'ൌ', + 'ේ' => 'à·š', + 'à·™à·' => 'à·œ', + 'ෝ' => 'à·', + 'ෞ' => 'à·ž', + 'ဦ' => 'ဦ', + 'ᬆ' => 'ᬆ', + 'ᬈ' => 'ᬈ', + 'ᬊ' => 'ᬊ', + 'ᬌ' => 'ᬌ', + 'á¬á¬µ' => 'ᬎ', + 'ᬒ' => 'ᬒ', + 'ᬻ' => 'ᬻ', + 'ᬽ' => 'ᬽ', + 'ᭀ' => 'á­€', + 'ᭁ' => 'á­', + 'ᭃ' => 'á­ƒ', + 'AÌ¥' => 'Ḁ', + 'aÌ¥' => 'á¸', + 'Ḃ' => 'Ḃ', + 'ḃ' => 'ḃ', + 'BÌ£' => 'Ḅ', + 'bÌ£' => 'ḅ', + 'Ḇ' => 'Ḇ', + 'ḇ' => 'ḇ', + 'ÇÌ' => 'Ḉ', + 'çÌ' => 'ḉ', + 'Ḋ' => 'Ḋ', + 'ḋ' => 'ḋ', + 'DÌ£' => 'Ḍ', + 'dÌ£' => 'á¸', + 'Ḏ' => 'Ḏ', + 'ḏ' => 'á¸', + 'Ḑ' => 'á¸', + 'ḑ' => 'ḑ', + 'DÌ­' => 'Ḓ', + 'dÌ­' => 'ḓ', + 'Ä’Ì€' => 'Ḕ', + 'Ä“Ì€' => 'ḕ', + 'Ä’Ì' => 'Ḗ', + 'Ä“Ì' => 'ḗ', + 'EÌ­' => 'Ḙ', + 'eÌ­' => 'ḙ', + 'EÌ°' => 'Ḛ', + 'eÌ°' => 'ḛ', + 'Ḝ' => 'Ḝ', + 'ḝ' => 'á¸', + 'Ḟ' => 'Ḟ', + 'ḟ' => 'ḟ', + 'GÌ„' => 'Ḡ', + 'gÌ„' => 'ḡ', + 'Ḣ' => 'Ḣ', + 'ḣ' => 'ḣ', + 'HÌ£' => 'Ḥ', + 'hÌ£' => 'ḥ', + 'Ḧ' => 'Ḧ', + 'ḧ' => 'ḧ', + 'Ḩ' => 'Ḩ', + 'ḩ' => 'ḩ', + 'HÌ®' => 'Ḫ', + 'hÌ®' => 'ḫ', + 'IÌ°' => 'Ḭ', + 'iÌ°' => 'ḭ', + 'ÃÌ' => 'Ḯ', + 'ïÌ' => 'ḯ', + 'KÌ' => 'Ḱ', + 'kÌ' => 'ḱ', + 'KÌ£' => 'Ḳ', + 'kÌ£' => 'ḳ', + 'Ḵ' => 'Ḵ', + 'ḵ' => 'ḵ', + 'LÌ£' => 'Ḷ', + 'lÌ£' => 'ḷ', + 'Ḹ' => 'Ḹ', + 'ḹ' => 'ḹ', + 'Ḻ' => 'Ḻ', + 'ḻ' => 'ḻ', + 'LÌ­' => 'Ḽ', + 'lÌ­' => 'ḽ', + 'MÌ' => 'Ḿ', + 'mÌ' => 'ḿ', + 'Ṁ' => 'á¹€', + 'ṁ' => 'á¹', + 'MÌ£' => 'Ṃ', + 'mÌ£' => 'ṃ', + 'Ṅ' => 'Ṅ', + 'ṅ' => 'á¹…', + 'NÌ£' => 'Ṇ', + 'nÌ£' => 'ṇ', + 'Ṉ' => 'Ṉ', + 'ṉ' => 'ṉ', + 'NÌ­' => 'Ṋ', + 'nÌ­' => 'ṋ', + 'ÕÌ' => 'Ṍ', + 'õÌ' => 'á¹', + 'Ṏ' => 'Ṏ', + 'ṏ' => 'á¹', + 'Ṑ' => 'á¹', + 'ÅÌ€' => 'ṑ', + 'ÅŒÌ' => 'á¹’', + 'ÅÌ' => 'ṓ', + 'PÌ' => 'á¹”', + 'pÌ' => 'ṕ', + 'Ṗ' => 'á¹–', + 'ṗ' => 'á¹—', + 'Ṙ' => 'Ṙ', + 'ṙ' => 'á¹™', + 'RÌ£' => 'Ṛ', + 'rÌ£' => 'á¹›', + 'Ṝ' => 'Ṝ', + 'ṝ' => 'á¹', + 'Ṟ' => 'Ṟ', + 'ṟ' => 'ṟ', + 'Ṡ' => 'á¹ ', + 'ṡ' => 'ṡ', + 'SÌ£' => 'á¹¢', + 'sÌ£' => 'á¹£', + 'Ṥ' => 'Ṥ', + 'ṥ' => 'á¹¥', + 'Ṧ' => 'Ṧ', + 'ṧ' => 'ṧ', + 'Ṩ' => 'Ṩ', + 'ṩ' => 'ṩ', + 'Ṫ' => 'Ṫ', + 'ṫ' => 'ṫ', + 'TÌ£' => 'Ṭ', + 'tÌ£' => 'á¹­', + 'Ṯ' => 'á¹®', + 'ṯ' => 'ṯ', + 'TÌ­' => 'á¹°', + 'tÌ­' => 'á¹±', + 'Ṳ' => 'á¹²', + 'ṳ' => 'á¹³', + 'UÌ°' => 'á¹´', + 'uÌ°' => 'á¹µ', + 'UÌ­' => 'Ṷ', + 'uÌ­' => 'á¹·', + 'ŨÌ' => 'Ṹ', + 'Å©Ì' => 'á¹¹', + 'Ṻ' => 'Ṻ', + 'ṻ' => 'á¹»', + 'Ṽ' => 'á¹¼', + 'ṽ' => 'á¹½', + 'VÌ£' => 'á¹¾', + 'vÌ£' => 'ṿ', + 'WÌ€' => 'Ẁ', + 'wÌ€' => 'áº', + 'WÌ' => 'Ẃ', + 'wÌ' => 'ẃ', + 'Ẅ' => 'Ẅ', + 'ẅ' => 'ẅ', + 'Ẇ' => 'Ẇ', + 'ẇ' => 'ẇ', + 'WÌ£' => 'Ẉ', + 'wÌ£' => 'ẉ', + 'Ẋ' => 'Ẋ', + 'ẋ' => 'ẋ', + 'Ẍ' => 'Ẍ', + 'ẍ' => 'áº', + 'Ẏ' => 'Ẏ', + 'ẏ' => 'áº', + 'ZÌ‚' => 'áº', + 'zÌ‚' => 'ẑ', + 'ZÌ£' => 'Ẓ', + 'zÌ£' => 'ẓ', + 'Ẕ' => 'Ẕ', + 'ẕ' => 'ẕ', + 'ẖ' => 'ẖ', + 'ẗ' => 'ẗ', + 'wÌŠ' => 'ẘ', + 'yÌŠ' => 'ẙ', + 'ẛ' => 'ẛ', + 'AÌ£' => 'Ạ', + 'aÌ£' => 'ạ', + 'Ả' => 'Ả', + 'ả' => 'ả', + 'ÂÌ' => 'Ấ', + 'âÌ' => 'ấ', + 'Ầ' => 'Ầ', + 'ầ' => 'ầ', + 'Ẩ' => 'Ẩ', + 'ẩ' => 'ẩ', + 'Ẫ' => 'Ẫ', + 'ẫ' => 'ẫ', + 'Ậ' => 'Ậ', + 'ậ' => 'ậ', + 'Ä‚Ì' => 'Ắ', + 'ăÌ' => 'ắ', + 'Ä‚Ì€' => 'Ằ', + 'ằ' => 'ằ', + 'Ẳ' => 'Ẳ', + 'ẳ' => 'ẳ', + 'Ẵ' => 'Ẵ', + 'ẵ' => 'ẵ', + 'Ặ' => 'Ặ', + 'ặ' => 'ặ', + 'EÌ£' => 'Ẹ', + 'eÌ£' => 'ẹ', + 'Ẻ' => 'Ẻ', + 'ẻ' => 'ẻ', + 'Ẽ' => 'Ẽ', + 'ẽ' => 'ẽ', + 'ÊÌ' => 'Ế', + 'êÌ' => 'ế', + 'Ề' => 'Ề', + 'ề' => 'á»', + 'Ể' => 'Ể', + 'ể' => 'ể', + 'Ễ' => 'Ễ', + 'ễ' => 'á»…', + 'Ệ' => 'Ệ', + 'ệ' => 'ệ', + 'Ỉ' => 'Ỉ', + 'ỉ' => 'ỉ', + 'IÌ£' => 'Ị', + 'iÌ£' => 'ị', + 'OÌ£' => 'Ọ', + 'oÌ£' => 'á»', + 'Ỏ' => 'Ỏ', + 'ỏ' => 'á»', + 'ÔÌ' => 'á»', + 'ôÌ' => 'ố', + 'Ồ' => 'á»’', + 'ồ' => 'ồ', + 'Ổ' => 'á»”', + 'ổ' => 'ổ', + 'Ỗ' => 'á»–', + 'ỗ' => 'á»—', + 'Ộ' => 'Ộ', + 'á»Ì‚' => 'á»™', + 'Æ Ì' => 'Ớ', + 'Æ¡Ì' => 'á»›', + 'Ờ' => 'Ờ', + 'Æ¡Ì€' => 'á»', + 'Ở' => 'Ở', + 'ở' => 'ở', + 'Ỡ' => 'á» ', + 'ỡ' => 'ỡ', + 'Ợ' => 'Ợ', + 'Æ¡Ì£' => 'ợ', + 'UÌ£' => 'Ụ', + 'uÌ£' => 'ụ', + 'Ủ' => 'Ủ', + 'ủ' => 'ủ', + 'ƯÌ' => 'Ứ', + 'Æ°Ì' => 'ứ', + 'Ừ' => 'Ừ', + 'Æ°Ì€' => 'ừ', + 'Ử' => 'Ử', + 'ử' => 'á»­', + 'Ữ' => 'á»®', + 'ữ' => 'ữ', + 'Ự' => 'á»°', + 'Æ°Ì£' => 'á»±', + 'YÌ€' => 'Ỳ', + 'yÌ€' => 'ỳ', + 'YÌ£' => 'á»´', + 'yÌ£' => 'ỵ', + 'Ỷ' => 'Ỷ', + 'ỷ' => 'á»·', + 'Ỹ' => 'Ỹ', + 'ỹ' => 'ỹ', + 'ἀ' => 'á¼€', + 'ἁ' => 'á¼', + 'ἂ' => 'ἂ', + 'á¼Ì€' => 'ἃ', + 'á¼€Ì' => 'ἄ', + 'á¼Ì' => 'á¼…', + 'ἆ' => 'ἆ', + 'á¼Í‚' => 'ἇ', + 'Ἀ' => 'Ἀ', + 'Ἁ' => 'Ἁ', + 'Ἂ' => 'Ἂ', + 'Ἃ' => 'Ἃ', + 'ἈÌ' => 'Ἄ', + 'ἉÌ' => 'á¼', + 'Ἆ' => 'Ἆ', + 'Ἇ' => 'á¼', + 'ἐ' => 'á¼', + 'ἑ' => 'ἑ', + 'á¼Ì€' => 'á¼’', + 'ἓ' => 'ἓ', + 'á¼Ì' => 'á¼”', + 'ἑÌ' => 'ἕ', + 'Ἐ' => 'Ἐ', + 'Ἑ' => 'á¼™', + 'Ἒ' => 'Ἒ', + 'Ἓ' => 'á¼›', + 'ἘÌ' => 'Ἔ', + 'á¼™Ì' => 'á¼', + 'ἠ' => 'á¼ ', + 'ἡ' => 'ἡ', + 'ἢ' => 'á¼¢', + 'ἣ' => 'á¼£', + 'á¼ Ì' => 'ἤ', + 'ἡÌ' => 'á¼¥', + 'á¼ Í‚' => 'ἦ', + 'ἧ' => 'ἧ', + 'Ἠ' => 'Ἠ', + 'Ἡ' => 'Ἡ', + 'Ἢ' => 'Ἢ', + 'Ἣ' => 'Ἣ', + 'ἨÌ' => 'Ἤ', + 'ἩÌ' => 'á¼­', + 'Ἦ' => 'á¼®', + 'Ἧ' => 'Ἧ', + 'ἰ' => 'á¼°', + 'ἱ' => 'á¼±', + 'á¼°Ì€' => 'á¼²', + 'ἳ' => 'á¼³', + 'á¼°Ì' => 'á¼´', + 'á¼±Ì' => 'á¼µ', + 'á¼°Í‚' => 'ἶ', + 'ἷ' => 'á¼·', + 'Ἰ' => 'Ἰ', + 'Ἱ' => 'á¼¹', + 'Ἲ' => 'Ἲ', + 'Ἳ' => 'á¼»', + 'ἸÌ' => 'á¼¼', + 'á¼¹Ì' => 'á¼½', + 'Ἶ' => 'á¼¾', + 'Ἷ' => 'Ἷ', + 'ὀ' => 'á½€', + 'ὁ' => 'á½', + 'ὂ' => 'ὂ', + 'á½Ì€' => 'ὃ', + 'á½€Ì' => 'ὄ', + 'á½Ì' => 'á½…', + 'Ὀ' => 'Ὀ', + 'Ὁ' => 'Ὁ', + 'Ὂ' => 'Ὂ', + 'Ὃ' => 'Ὃ', + 'ὈÌ' => 'Ὄ', + 'ὉÌ' => 'á½', + 'Ï…Ì“' => 'á½', + 'Ï…Ì”' => 'ὑ', + 'á½Ì€' => 'á½’', + 'ὓ' => 'ὓ', + 'á½Ì' => 'á½”', + 'ὑÌ' => 'ὕ', + 'á½Í‚' => 'á½–', + 'ὗ' => 'á½—', + 'Ὑ' => 'á½™', + 'Ὓ' => 'á½›', + 'á½™Ì' => 'á½', + 'Ὗ' => 'Ὗ', + 'ὠ' => 'á½ ', + 'ὡ' => 'ὡ', + 'ὢ' => 'á½¢', + 'ὣ' => 'á½£', + 'á½ Ì' => 'ὤ', + 'ὡÌ' => 'á½¥', + 'á½ Í‚' => 'ὦ', + 'ὧ' => 'ὧ', + 'Ὠ' => 'Ὠ', + 'Ὡ' => 'Ὡ', + 'Ὢ' => 'Ὢ', + 'Ὣ' => 'Ὣ', + 'ὨÌ' => 'Ὤ', + 'ὩÌ' => 'á½­', + 'Ὦ' => 'á½®', + 'Ὧ' => 'Ὧ', + 'ὰ' => 'á½°', + 'ὲ' => 'á½²', + 'ὴ' => 'á½´', + 'ὶ' => 'ὶ', + 'ὸ' => 'ὸ', + 'Ï…Ì€' => 'ὺ', + 'ὼ' => 'á½¼', + 'ᾀ' => 'á¾€', + 'á¼Í…' => 'á¾', + 'ᾂ' => 'ᾂ', + 'ᾃ' => 'ᾃ', + 'ᾄ' => 'ᾄ', + 'á¼…Í…' => 'á¾…', + 'ᾆ' => 'ᾆ', + 'ᾇ' => 'ᾇ', + 'ᾈ' => 'ᾈ', + 'ᾉ' => 'ᾉ', + 'ᾊ' => 'ᾊ', + 'ᾋ' => 'ᾋ', + 'ᾌ' => 'ᾌ', + 'á¼Í…' => 'á¾', + 'ᾎ' => 'ᾎ', + 'á¼Í…' => 'á¾', + 'á¼ Í…' => 'á¾', + 'ᾑ' => 'ᾑ', + 'ᾒ' => 'á¾’', + 'ᾓ' => 'ᾓ', + 'ᾔ' => 'á¾”', + 'ᾕ' => 'ᾕ', + 'ᾖ' => 'á¾–', + 'ᾗ' => 'á¾—', + 'ᾘ' => 'ᾘ', + 'ᾙ' => 'á¾™', + 'ᾚ' => 'ᾚ', + 'ᾛ' => 'á¾›', + 'ᾜ' => 'ᾜ', + 'á¼­Í…' => 'á¾', + 'ᾞ' => 'ᾞ', + 'ᾟ' => 'ᾟ', + 'á½ Í…' => 'á¾ ', + 'ᾡ' => 'ᾡ', + 'ᾢ' => 'á¾¢', + 'ᾣ' => 'á¾£', + 'ᾤ' => 'ᾤ', + 'ᾥ' => 'á¾¥', + 'ᾦ' => 'ᾦ', + 'ᾧ' => 'ᾧ', + 'ᾨ' => 'ᾨ', + 'ᾩ' => 'ᾩ', + 'ᾪ' => 'ᾪ', + 'ᾫ' => 'ᾫ', + 'ᾬ' => 'ᾬ', + 'á½­Í…' => 'á¾­', + 'ᾮ' => 'á¾®', + 'ᾯ' => 'ᾯ', + 'ᾰ' => 'á¾°', + 'ᾱ' => 'á¾±', + 'á½°Í…' => 'á¾²', + 'ᾳ' => 'á¾³', + 'ᾴ' => 'á¾´', + 'ᾶ' => 'ᾶ', + 'ᾷ' => 'á¾·', + 'Ᾰ' => 'Ᾰ', + 'Ᾱ' => 'á¾¹', + 'Ὰ' => 'Ὰ', + 'ᾼ' => 'á¾¼', + '῁' => 'á¿', + 'á½´Í…' => 'á¿‚', + 'ῃ' => 'ῃ', + 'ῄ' => 'á¿„', + 'ῆ' => 'ῆ', + 'ῇ' => 'ῇ', + 'Ὲ' => 'Ὲ', + 'Ὴ' => 'á¿Š', + 'ῌ' => 'á¿Œ', + '῍' => 'á¿', + '᾿Ì' => 'á¿Ž', + '῏' => 'á¿', + 'ῐ' => 'á¿', + 'ῑ' => 'á¿‘', + 'ÏŠÌ€' => 'á¿’', + 'ῖ' => 'á¿–', + 'ÏŠÍ‚' => 'á¿—', + 'Ῐ' => 'Ῐ', + 'Ῑ' => 'á¿™', + 'Ὶ' => 'á¿š', + '῝' => 'á¿', + '῾Ì' => 'á¿ž', + '῟' => 'á¿Ÿ', + 'ῠ' => 'á¿ ', + 'Ï…Ì„' => 'á¿¡', + 'Ï‹Ì€' => 'á¿¢', + 'ÏÌ“' => 'ῤ', + 'ÏÌ”' => 'á¿¥', + 'Ï…Í‚' => 'ῦ', + 'Ï‹Í‚' => 'ῧ', + 'Ῠ' => 'Ῠ', + 'Ῡ' => 'á¿©', + 'Ὺ' => 'Ὺ', + 'Ῥ' => 'Ῥ', + '῭' => 'á¿­', + 'ῲ' => 'ῲ', + 'ῳ' => 'ῳ', + 'ÏŽÍ…' => 'á¿´', + 'ῶ' => 'ῶ', + 'ῷ' => 'á¿·', + 'Ὸ' => 'Ὸ', + 'Ὼ' => 'Ὼ', + 'ῼ' => 'ῼ', + 'â†Ì¸' => '↚', + '↛' => '↛', + '↮' => '↮', + 'â‡Ì¸' => 'â‡', + '⇎' => '⇎', + '⇏' => 'â‡', + '∄' => '∄', + '∉' => '∉', + '∌' => '∌', + '∤' => '∤', + '∦' => '∦', + '≁' => 'â‰', + '≄' => '≄', + '≇' => '≇', + '≉' => '≉', + '≠' => '≠', + '≢' => '≢', + 'â‰Ì¸' => '≭', + '≮' => '≮', + '≯' => '≯', + '≰' => '≰', + '≱' => '≱', + '≴' => '≴', + '≵' => '≵', + '≸' => '≸', + '≹' => '≹', + '⊀' => '⊀', + '⊁' => 'âŠ', + '⊄' => '⊄', + '⊅' => '⊅', + '⊈' => '⊈', + '⊉' => '⊉', + '⊬' => '⊬', + '⊭' => '⊭', + '⊮' => '⊮', + '⊯' => '⊯', + '⋠' => 'â‹ ', + '⋡' => 'â‹¡', + '⋢' => 'â‹¢', + '⋣' => 'â‹£', + '⋪' => '⋪', + '⋫' => 'â‹«', + '⋬' => '⋬', + '⋭' => 'â‹­', + 'ã‹ã‚™' => 'ãŒ', + 'ãã‚™' => 'ãŽ', + 'ãã‚™' => 'ã', + 'ã‘ã‚™' => 'ã’', + 'ã“ã‚™' => 'ã”', + 'ã•ã‚™' => 'ã–', + 'ã—ã‚™' => 'ã˜', + 'ã™ã‚™' => 'ãš', + 'ã›ã‚™' => 'ãœ', + 'ãã‚™' => 'ãž', + 'ãŸã‚™' => 'ã ', + 'ã¡ã‚™' => 'ã¢', + 'ã¤ã‚™' => 'ã¥', + 'ã¦ã‚™' => 'ã§', + 'ã¨ã‚™' => 'ã©', + 'ã¯ã‚™' => 'ã°', + 'ã¯ã‚š' => 'ã±', + 'ã²ã‚™' => 'ã³', + 'ã²ã‚š' => 'ã´', + 'ãµã‚™' => 'ã¶', + 'ãµã‚š' => 'ã·', + 'ã¸ã‚™' => 'ã¹', + 'ã¸ã‚š' => 'ãº', + 'ã»ã‚™' => 'ã¼', + 'ã»ã‚š' => 'ã½', + 'ã†ã‚™' => 'ã‚”', + 'ã‚ã‚™' => 'ã‚ž', + 'ã‚«ã‚™' => 'ガ', + 'ã‚­ã‚™' => 'ã‚®', + 'グ' => 'ã‚°', + 'ゲ' => 'ゲ', + 'ゴ' => 'ã‚´', + 'ザ' => 'ザ', + 'ã‚·ã‚™' => 'ジ', + 'ズ' => 'ズ', + 'ゼ' => 'ゼ', + 'ゾ' => 'ゾ', + 'ã‚¿ã‚™' => 'ダ', + 'ãƒã‚™' => 'ヂ', + 'ヅ' => 'ヅ', + 'デ' => 'デ', + 'ド' => 'ド', + 'ãƒã‚™' => 'ãƒ', + 'ãƒã‚š' => 'パ', + 'ビ' => 'ビ', + 'ピ' => 'ピ', + 'ブ' => 'ブ', + 'プ' => 'プ', + 'ベ' => 'ベ', + 'ペ' => 'ペ', + 'ボ' => 'ボ', + 'ポ' => 'ãƒ', + 'ヴ' => 'ヴ', + 'ヷ' => 'ヷ', + 'ヸ' => 'ヸ', + 'ヹ' => 'ヹ', + 'ヺ' => 'ヺ', + 'ヾ' => 'ヾ', + '𑂚' => 'ð‘‚š', + '𑂜' => 'ð‘‚œ', + '𑂫' => 'ð‘‚«', + '𑄮' => 'ð‘„®', + '𑄯' => '𑄯', + 'ð‘‡ð‘Œ¾' => 'ð‘‹', + 'ð‘‡ð‘—' => 'ð‘Œ', + '𑒻' => 'ð‘’»', + '𑒼' => 'ð‘’¼', + '𑒾' => 'ð‘’¾', + '𑖺' => 'ð‘–º', + '𑖻' => 'ð‘–»', + '𑤸' => '𑤸', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php new file mode 100644 index 00000000..5a3e8e09 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/canonicalDecomposition.php @@ -0,0 +1,2065 @@ + 'AÌ€', + 'Ã' => 'AÌ', + 'Â' => 'AÌ‚', + 'Ã' => 'Ã', + 'Ä' => 'Ä', + 'Ã…' => 'AÌŠ', + 'Ç' => 'Ç', + 'È' => 'EÌ€', + 'É' => 'EÌ', + 'Ê' => 'EÌ‚', + 'Ë' => 'Ë', + 'ÃŒ' => 'IÌ€', + 'Ã' => 'IÌ', + 'ÃŽ' => 'IÌ‚', + 'Ã' => 'Ï', + 'Ñ' => 'Ñ', + 'Ã’' => 'OÌ€', + 'Ó' => 'OÌ', + 'Ô' => 'OÌ‚', + 'Õ' => 'Õ', + 'Ö' => 'Ö', + 'Ù' => 'UÌ€', + 'Ú' => 'UÌ', + 'Û' => 'UÌ‚', + 'Ãœ' => 'Ü', + 'Ã' => 'YÌ', + 'à' => 'aÌ€', + 'á' => 'aÌ', + 'â' => 'aÌ‚', + 'ã' => 'ã', + 'ä' => 'ä', + 'Ã¥' => 'aÌŠ', + 'ç' => 'ç', + 'è' => 'eÌ€', + 'é' => 'eÌ', + 'ê' => 'eÌ‚', + 'ë' => 'ë', + 'ì' => 'iÌ€', + 'í' => 'iÌ', + 'î' => 'iÌ‚', + 'ï' => 'ï', + 'ñ' => 'ñ', + 'ò' => 'oÌ€', + 'ó' => 'oÌ', + 'ô' => 'oÌ‚', + 'õ' => 'õ', + 'ö' => 'ö', + 'ù' => 'uÌ€', + 'ú' => 'uÌ', + 'û' => 'uÌ‚', + 'ü' => 'ü', + 'ý' => 'yÌ', + 'ÿ' => 'ÿ', + 'Ä€' => 'AÌ„', + 'Ä' => 'aÌ„', + 'Ä‚' => 'Ă', + 'ă' => 'ă', + 'Ä„' => 'Ą', + 'Ä…' => 'ą', + 'Ć' => 'CÌ', + 'ć' => 'cÌ', + 'Ĉ' => 'CÌ‚', + 'ĉ' => 'cÌ‚', + 'ÄŠ' => 'Ċ', + 'Ä‹' => 'ċ', + 'ÄŒ' => 'CÌŒ', + 'Ä' => 'cÌŒ', + 'ÄŽ' => 'DÌŒ', + 'Ä' => 'dÌŒ', + 'Ä’' => 'EÌ„', + 'Ä“' => 'eÌ„', + 'Ä”' => 'Ĕ', + 'Ä•' => 'ĕ', + 'Ä–' => 'Ė', + 'Ä—' => 'ė', + 'Ę' => 'Ę', + 'Ä™' => 'ę', + 'Äš' => 'EÌŒ', + 'Ä›' => 'eÌŒ', + 'Äœ' => 'GÌ‚', + 'Ä' => 'gÌ‚', + 'Äž' => 'Ğ', + 'ÄŸ' => 'ğ', + 'Ä ' => 'Ġ', + 'Ä¡' => 'ġ', + 'Ä¢' => 'Ģ', + 'Ä£' => 'ģ', + 'Ĥ' => 'HÌ‚', + 'Ä¥' => 'hÌ‚', + 'Ĩ' => 'Ĩ', + 'Ä©' => 'ĩ', + 'Ī' => 'IÌ„', + 'Ä«' => 'iÌ„', + 'Ĭ' => 'Ĭ', + 'Ä­' => 'ĭ', + 'Ä®' => 'Į', + 'į' => 'į', + 'Ä°' => 'İ', + 'Ä´' => 'JÌ‚', + 'ĵ' => 'jÌ‚', + 'Ķ' => 'Ķ', + 'Ä·' => 'ķ', + 'Ĺ' => 'LÌ', + 'ĺ' => 'lÌ', + 'Ä»' => 'Ļ', + 'ļ' => 'ļ', + 'Ľ' => 'LÌŒ', + 'ľ' => 'lÌŒ', + 'Ń' => 'NÌ', + 'Å„' => 'nÌ', + 'Å…' => 'Ņ', + 'ņ' => 'ņ', + 'Ň' => 'NÌŒ', + 'ň' => 'nÌŒ', + 'ÅŒ' => 'OÌ„', + 'Å' => 'oÌ„', + 'ÅŽ' => 'Ŏ', + 'Å' => 'ŏ', + 'Å' => 'OÌ‹', + 'Å‘' => 'oÌ‹', + 'Å”' => 'RÌ', + 'Å•' => 'rÌ', + 'Å–' => 'Ŗ', + 'Å—' => 'ŗ', + 'Ř' => 'RÌŒ', + 'Å™' => 'rÌŒ', + 'Åš' => 'SÌ', + 'Å›' => 'sÌ', + 'Åœ' => 'SÌ‚', + 'Å' => 'sÌ‚', + 'Åž' => 'Ş', + 'ÅŸ' => 'ş', + 'Å ' => 'SÌŒ', + 'Å¡' => 'sÌŒ', + 'Å¢' => 'Ţ', + 'Å£' => 'ţ', + 'Ť' => 'TÌŒ', + 'Å¥' => 'tÌŒ', + 'Ũ' => 'Ũ', + 'Å©' => 'ũ', + 'Ū' => 'UÌ„', + 'Å«' => 'uÌ„', + 'Ŭ' => 'Ŭ', + 'Å­' => 'ŭ', + 'Å®' => 'UÌŠ', + 'ů' => 'uÌŠ', + 'Å°' => 'UÌ‹', + 'ű' => 'uÌ‹', + 'Ų' => 'Ų', + 'ų' => 'ų', + 'Å´' => 'WÌ‚', + 'ŵ' => 'wÌ‚', + 'Ŷ' => 'YÌ‚', + 'Å·' => 'yÌ‚', + 'Ÿ' => 'Ÿ', + 'Ź' => 'ZÌ', + 'ź' => 'zÌ', + 'Å»' => 'Ż', + 'ż' => 'ż', + 'Ž' => 'ZÌŒ', + 'ž' => 'zÌŒ', + 'Æ ' => 'OÌ›', + 'Æ¡' => 'oÌ›', + 'Ư' => 'UÌ›', + 'Æ°' => 'uÌ›', + 'Ç' => 'AÌŒ', + 'ÇŽ' => 'aÌŒ', + 'Ç' => 'IÌŒ', + 'Ç' => 'iÌŒ', + 'Ç‘' => 'OÌŒ', + 'Ç’' => 'oÌŒ', + 'Ç“' => 'UÌŒ', + 'Ç”' => 'uÌŒ', + 'Ç•' => 'Ǖ', + 'Ç–' => 'ǖ', + 'Ç—' => 'ÜÌ', + 'ǘ' => 'üÌ', + 'Ç™' => 'Ǚ', + 'Çš' => 'ǚ', + 'Ç›' => 'Ǜ', + 'Çœ' => 'ǜ', + 'Çž' => 'Ǟ', + 'ÇŸ' => 'ǟ', + 'Ç ' => 'Ǡ', + 'Ç¡' => 'ǡ', + 'Ç¢' => 'Ǣ', + 'Ç£' => 'ǣ', + 'Ǧ' => 'GÌŒ', + 'ǧ' => 'gÌŒ', + 'Ǩ' => 'KÌŒ', + 'Ç©' => 'kÌŒ', + 'Ǫ' => 'Ǫ', + 'Ç«' => 'ǫ', + 'Ǭ' => 'Ǭ', + 'Ç­' => 'ǭ', + 'Ç®' => 'Æ·ÌŒ', + 'ǯ' => 'Ê’ÌŒ', + 'Ç°' => 'jÌŒ', + 'Ç´' => 'GÌ', + 'ǵ' => 'gÌ', + 'Ǹ' => 'NÌ€', + 'ǹ' => 'nÌ€', + 'Ǻ' => 'AÌŠÌ', + 'Ç»' => 'aÌŠÌ', + 'Ǽ' => 'ÆÌ', + 'ǽ' => 'æÌ', + 'Ǿ' => 'ØÌ', + 'Ç¿' => 'øÌ', + 'È€' => 'AÌ', + 'È' => 'aÌ', + 'È‚' => 'AÌ‘', + 'ȃ' => 'aÌ‘', + 'È„' => 'EÌ', + 'È…' => 'eÌ', + 'Ȇ' => 'EÌ‘', + 'ȇ' => 'eÌ‘', + 'Ȉ' => 'IÌ', + 'ȉ' => 'iÌ', + 'ÈŠ' => 'IÌ‘', + 'È‹' => 'iÌ‘', + 'ÈŒ' => 'OÌ', + 'È' => 'oÌ', + 'ÈŽ' => 'OÌ‘', + 'È' => 'oÌ‘', + 'È' => 'RÌ', + 'È‘' => 'rÌ', + 'È’' => 'RÌ‘', + 'È“' => 'rÌ‘', + 'È”' => 'UÌ', + 'È•' => 'uÌ', + 'È–' => 'UÌ‘', + 'È—' => 'uÌ‘', + 'Ș' => 'Ș', + 'È™' => 'ș', + 'Èš' => 'Ț', + 'È›' => 'ț', + 'Èž' => 'HÌŒ', + 'ÈŸ' => 'hÌŒ', + 'Ȧ' => 'Ȧ', + 'ȧ' => 'ȧ', + 'Ȩ' => 'Ȩ', + 'È©' => 'ȩ', + 'Ȫ' => 'Ȫ', + 'È«' => 'ȫ', + 'Ȭ' => 'Ȭ', + 'È­' => 'ȭ', + 'È®' => 'Ȯ', + 'ȯ' => 'ȯ', + 'È°' => 'Ȱ', + 'ȱ' => 'ȱ', + 'Ȳ' => 'YÌ„', + 'ȳ' => 'yÌ„', + 'Í€' => 'Ì€', + 'Í' => 'Ì', + '̓' => 'Ì“', + 'Í„' => '̈Ì', + 'Í´' => 'ʹ', + ';' => ';', + 'Î…' => '¨Ì', + 'Ά' => 'ΑÌ', + '·' => '·', + 'Έ' => 'ΕÌ', + 'Ή' => 'ΗÌ', + 'Ί' => 'ΙÌ', + 'ÎŒ' => 'ΟÌ', + 'ÎŽ' => 'Î¥Ì', + 'Î' => 'ΩÌ', + 'Î' => 'ϊÌ', + 'Ϊ' => 'Ϊ', + 'Ϋ' => 'Ϋ', + 'ά' => 'αÌ', + 'έ' => 'εÌ', + 'ή' => 'ηÌ', + 'ί' => 'ιÌ', + 'ΰ' => 'ϋÌ', + 'ÏŠ' => 'ϊ', + 'Ï‹' => 'ϋ', + 'ÏŒ' => 'οÌ', + 'Ï' => 'Ï…Ì', + 'ÏŽ' => 'ωÌ', + 'Ï“' => 'Ï’Ì', + 'Ï”' => 'ϔ', + 'Ѐ' => 'Ѐ', + 'Ð' => 'Ё', + 'Ѓ' => 'ГÌ', + 'Ї' => 'Ї', + 'ÐŒ' => 'КÌ', + 'Ð' => 'Ѝ', + 'ÐŽ' => 'Ў', + 'Й' => 'Й', + 'й' => 'й', + 'Ñ' => 'ѐ', + 'Ñ‘' => 'ё', + 'Ñ“' => 'гÌ', + 'Ñ—' => 'ї', + 'Ñœ' => 'кÌ', + 'Ñ' => 'ѝ', + 'Ñž' => 'ў', + 'Ѷ' => 'Ñ´Ì', + 'Ñ·' => 'ѵÌ', + 'Ó' => 'Ӂ', + 'Ó‚' => 'ӂ', + 'Ó' => 'Ð̆', + 'Ó‘' => 'ӑ', + 'Ó’' => 'Ð̈', + 'Ó“' => 'ӓ', + 'Ó–' => 'Ӗ', + 'Ó—' => 'ӗ', + 'Óš' => 'Ӛ', + 'Ó›' => 'ӛ', + 'Óœ' => 'Ӝ', + 'Ó' => 'ӝ', + 'Óž' => 'Ӟ', + 'ÓŸ' => 'ӟ', + 'Ó¢' => 'Ӣ', + 'Ó£' => 'ӣ', + 'Ó¤' => 'Ӥ', + 'Ó¥' => 'ӥ', + 'Ó¦' => 'Ӧ', + 'Ó§' => 'ӧ', + 'Óª' => 'Ӫ', + 'Ó«' => 'ӫ', + 'Ó¬' => 'Ӭ', + 'Ó­' => 'Ñ̈', + 'Ó®' => 'Ӯ', + 'Ó¯' => 'ӯ', + 'Ó°' => 'Ӱ', + 'Ó±' => 'ӱ', + 'Ó²' => 'Ӳ', + 'Ó³' => 'ӳ', + 'Ó´' => 'Ӵ', + 'Óµ' => 'ӵ', + 'Ó¸' => 'Ӹ', + 'Ó¹' => 'ӹ', + 'Ø¢' => 'آ', + 'Ø£' => 'أ', + 'ؤ' => 'ÙˆÙ”', + 'Ø¥' => 'إ', + 'ئ' => 'ÙŠÙ”', + 'Û€' => 'Û•Ù”', + 'Û‚' => 'ÛÙ”', + 'Û“' => 'Û’Ù”', + 'ऩ' => 'ऩ', + 'ऱ' => 'ऱ', + 'ऴ' => 'ऴ', + 'क़' => 'क़', + 'ख़' => 'ख़', + 'ग़' => 'ग़', + 'ज़' => 'ज़', + 'ड़' => 'ड़', + 'à¥' => 'ढ़', + 'फ़' => 'फ़', + 'य़' => 'य़', + 'ো' => 'ো', + 'ৌ' => 'ৌ', + 'ড়' => 'ড়', + 'à§' => 'ঢ়', + 'য়' => 'য়', + 'ਲ਼' => 'ਲ਼', + 'ਸ਼' => 'ਸ਼', + 'à©™' => 'ਖ਼', + 'à©š' => 'ਗ਼', + 'à©›' => 'ਜ਼', + 'à©ž' => 'ਫ਼', + 'à­ˆ' => 'ୈ', + 'à­‹' => 'ୋ', + 'à­Œ' => 'ୌ', + 'à­œ' => 'ଡ଼', + 'à­' => 'ଢ଼', + 'à®”' => 'ஔ', + 'ொ' => 'ொ', + 'ோ' => 'ோ', + 'ௌ' => 'ௌ', + 'ై' => 'ై', + 'à³€' => 'ೀ', + 'ೇ' => 'ೇ', + 'ೈ' => 'ೈ', + 'ೊ' => 'ೊ', + 'ೋ' => 'ೋ', + 'ൊ' => 'ൊ', + 'ോ' => 'ോ', + 'ൌ' => 'ൌ', + 'à·š' => 'ේ', + 'à·œ' => 'à·™à·', + 'à·' => 'à·™à·à·Š', + 'à·ž' => 'ෞ', + 'གྷ' => 'གྷ', + 'à½' => 'ཌྷ', + 'དྷ' => 'དྷ', + 'བྷ' => 'བྷ', + 'ཛྷ' => 'ཛྷ', + 'ཀྵ' => 'ཀྵ', + 'ཱི' => 'ཱི', + 'ཱུ' => 'ཱུ', + 'ྲྀ' => 'ྲྀ', + 'ླྀ' => 'ླྀ', + 'à¾' => 'ཱྀ', + 'ྒྷ' => 'ྒྷ', + 'à¾' => 'ྜྷ', + 'ྡྷ' => 'ྡྷ', + 'ྦྷ' => 'ྦྷ', + 'ྫྷ' => 'ྫྷ', + 'ྐྵ' => 'à¾à¾µ', + 'ဦ' => 'ဦ', + 'ᬆ' => 'ᬆ', + 'ᬈ' => 'ᬈ', + 'ᬊ' => 'ᬊ', + 'ᬌ' => 'ᬌ', + 'ᬎ' => 'á¬á¬µ', + 'ᬒ' => 'ᬒ', + 'ᬻ' => 'ᬻ', + 'ᬽ' => 'ᬽ', + 'á­€' => 'ᭀ', + 'á­' => 'ᭁ', + 'á­ƒ' => 'ᭃ', + 'Ḁ' => 'AÌ¥', + 'á¸' => 'aÌ¥', + 'Ḃ' => 'Ḃ', + 'ḃ' => 'ḃ', + 'Ḅ' => 'BÌ£', + 'ḅ' => 'bÌ£', + 'Ḇ' => 'Ḇ', + 'ḇ' => 'ḇ', + 'Ḉ' => 'ÇÌ', + 'ḉ' => 'çÌ', + 'Ḋ' => 'Ḋ', + 'ḋ' => 'ḋ', + 'Ḍ' => 'DÌ£', + 'á¸' => 'dÌ£', + 'Ḏ' => 'Ḏ', + 'á¸' => 'ḏ', + 'á¸' => 'Ḑ', + 'ḑ' => 'ḑ', + 'Ḓ' => 'DÌ­', + 'ḓ' => 'dÌ­', + 'Ḕ' => 'EÌ„Ì€', + 'ḕ' => 'eÌ„Ì€', + 'Ḗ' => 'EÌ„Ì', + 'ḗ' => 'eÌ„Ì', + 'Ḙ' => 'EÌ­', + 'ḙ' => 'eÌ­', + 'Ḛ' => 'EÌ°', + 'ḛ' => 'eÌ°', + 'Ḝ' => 'Ḝ', + 'á¸' => 'ḝ', + 'Ḟ' => 'Ḟ', + 'ḟ' => 'ḟ', + 'Ḡ' => 'GÌ„', + 'ḡ' => 'gÌ„', + 'Ḣ' => 'Ḣ', + 'ḣ' => 'ḣ', + 'Ḥ' => 'HÌ£', + 'ḥ' => 'hÌ£', + 'Ḧ' => 'Ḧ', + 'ḧ' => 'ḧ', + 'Ḩ' => 'Ḩ', + 'ḩ' => 'ḩ', + 'Ḫ' => 'HÌ®', + 'ḫ' => 'hÌ®', + 'Ḭ' => 'IÌ°', + 'ḭ' => 'iÌ°', + 'Ḯ' => 'ÏÌ', + 'ḯ' => 'ïÌ', + 'Ḱ' => 'KÌ', + 'ḱ' => 'kÌ', + 'Ḳ' => 'KÌ£', + 'ḳ' => 'kÌ£', + 'Ḵ' => 'Ḵ', + 'ḵ' => 'ḵ', + 'Ḷ' => 'LÌ£', + 'ḷ' => 'lÌ£', + 'Ḹ' => 'Ḹ', + 'ḹ' => 'ḹ', + 'Ḻ' => 'Ḻ', + 'ḻ' => 'ḻ', + 'Ḽ' => 'LÌ­', + 'ḽ' => 'lÌ­', + 'Ḿ' => 'MÌ', + 'ḿ' => 'mÌ', + 'á¹€' => 'Ṁ', + 'á¹' => 'ṁ', + 'Ṃ' => 'MÌ£', + 'ṃ' => 'mÌ£', + 'Ṅ' => 'Ṅ', + 'á¹…' => 'ṅ', + 'Ṇ' => 'NÌ£', + 'ṇ' => 'nÌ£', + 'Ṉ' => 'Ṉ', + 'ṉ' => 'ṉ', + 'Ṋ' => 'NÌ­', + 'ṋ' => 'nÌ­', + 'Ṍ' => 'ÕÌ', + 'á¹' => 'õÌ', + 'Ṏ' => 'Ṏ', + 'á¹' => 'ṏ', + 'á¹' => 'OÌ„Ì€', + 'ṑ' => 'oÌ„Ì€', + 'á¹’' => 'OÌ„Ì', + 'ṓ' => 'oÌ„Ì', + 'á¹”' => 'PÌ', + 'ṕ' => 'pÌ', + 'á¹–' => 'Ṗ', + 'á¹—' => 'ṗ', + 'Ṙ' => 'Ṙ', + 'á¹™' => 'ṙ', + 'Ṛ' => 'RÌ£', + 'á¹›' => 'rÌ£', + 'Ṝ' => 'Ṝ', + 'á¹' => 'ṝ', + 'Ṟ' => 'Ṟ', + 'ṟ' => 'ṟ', + 'á¹ ' => 'Ṡ', + 'ṡ' => 'ṡ', + 'á¹¢' => 'SÌ£', + 'á¹£' => 'sÌ£', + 'Ṥ' => 'SÌ̇', + 'á¹¥' => 'sÌ̇', + 'Ṧ' => 'Ṧ', + 'ṧ' => 'ṧ', + 'Ṩ' => 'Ṩ', + 'ṩ' => 'ṩ', + 'Ṫ' => 'Ṫ', + 'ṫ' => 'ṫ', + 'Ṭ' => 'TÌ£', + 'á¹­' => 'tÌ£', + 'á¹®' => 'Ṯ', + 'ṯ' => 'ṯ', + 'á¹°' => 'TÌ­', + 'á¹±' => 'tÌ­', + 'á¹²' => 'Ṳ', + 'á¹³' => 'ṳ', + 'á¹´' => 'UÌ°', + 'á¹µ' => 'uÌ°', + 'Ṷ' => 'UÌ­', + 'á¹·' => 'uÌ­', + 'Ṹ' => 'ŨÌ', + 'á¹¹' => 'ũÌ', + 'Ṻ' => 'Ṻ', + 'á¹»' => 'ṻ', + 'á¹¼' => 'Ṽ', + 'á¹½' => 'ṽ', + 'á¹¾' => 'VÌ£', + 'ṿ' => 'vÌ£', + 'Ẁ' => 'WÌ€', + 'áº' => 'wÌ€', + 'Ẃ' => 'WÌ', + 'ẃ' => 'wÌ', + 'Ẅ' => 'Ẅ', + 'ẅ' => 'ẅ', + 'Ẇ' => 'Ẇ', + 'ẇ' => 'ẇ', + 'Ẉ' => 'WÌ£', + 'ẉ' => 'wÌ£', + 'Ẋ' => 'Ẋ', + 'ẋ' => 'ẋ', + 'Ẍ' => 'Ẍ', + 'áº' => 'ẍ', + 'Ẏ' => 'Ẏ', + 'áº' => 'ẏ', + 'áº' => 'ZÌ‚', + 'ẑ' => 'zÌ‚', + 'Ẓ' => 'ZÌ£', + 'ẓ' => 'zÌ£', + 'Ẕ' => 'Ẕ', + 'ẕ' => 'ẕ', + 'ẖ' => 'ẖ', + 'ẗ' => 'ẗ', + 'ẘ' => 'wÌŠ', + 'ẙ' => 'yÌŠ', + 'ẛ' => 'ẛ', + 'Ạ' => 'AÌ£', + 'ạ' => 'aÌ£', + 'Ả' => 'Ả', + 'ả' => 'ả', + 'Ấ' => 'AÌ‚Ì', + 'ấ' => 'aÌ‚Ì', + 'Ầ' => 'AÌ‚Ì€', + 'ầ' => 'aÌ‚Ì€', + 'Ẩ' => 'Ẩ', + 'ẩ' => 'ẩ', + 'Ẫ' => 'Ẫ', + 'ẫ' => 'ẫ', + 'Ậ' => 'Ậ', + 'ậ' => 'ậ', + 'Ắ' => 'ĂÌ', + 'ắ' => 'ăÌ', + 'Ằ' => 'Ằ', + 'ằ' => 'ằ', + 'Ẳ' => 'Ẳ', + 'ẳ' => 'ẳ', + 'Ẵ' => 'Ẵ', + 'ẵ' => 'ẵ', + 'Ặ' => 'Ặ', + 'ặ' => 'ặ', + 'Ẹ' => 'EÌ£', + 'ẹ' => 'eÌ£', + 'Ẻ' => 'Ẻ', + 'ẻ' => 'ẻ', + 'Ẽ' => 'Ẽ', + 'ẽ' => 'ẽ', + 'Ế' => 'EÌ‚Ì', + 'ế' => 'eÌ‚Ì', + 'Ề' => 'EÌ‚Ì€', + 'á»' => 'eÌ‚Ì€', + 'Ể' => 'Ể', + 'ể' => 'ể', + 'Ễ' => 'Ễ', + 'á»…' => 'ễ', + 'Ệ' => 'Ệ', + 'ệ' => 'ệ', + 'Ỉ' => 'Ỉ', + 'ỉ' => 'ỉ', + 'Ị' => 'IÌ£', + 'ị' => 'iÌ£', + 'Ọ' => 'OÌ£', + 'á»' => 'oÌ£', + 'Ỏ' => 'Ỏ', + 'á»' => 'ỏ', + 'á»' => 'OÌ‚Ì', + 'ố' => 'oÌ‚Ì', + 'á»’' => 'OÌ‚Ì€', + 'ồ' => 'oÌ‚Ì€', + 'á»”' => 'Ổ', + 'ổ' => 'ổ', + 'á»–' => 'Ỗ', + 'á»—' => 'ỗ', + 'Ộ' => 'Ộ', + 'á»™' => 'ộ', + 'Ớ' => 'OÌ›Ì', + 'á»›' => 'oÌ›Ì', + 'Ờ' => 'Ờ', + 'á»' => 'ờ', + 'Ở' => 'Ở', + 'ở' => 'ở', + 'á» ' => 'Ỡ', + 'ỡ' => 'ỡ', + 'Ợ' => 'Ợ', + 'ợ' => 'ợ', + 'Ụ' => 'UÌ£', + 'ụ' => 'uÌ£', + 'Ủ' => 'Ủ', + 'ủ' => 'ủ', + 'Ứ' => 'UÌ›Ì', + 'ứ' => 'uÌ›Ì', + 'Ừ' => 'Ừ', + 'ừ' => 'ừ', + 'Ử' => 'Ử', + 'á»­' => 'ử', + 'á»®' => 'Ữ', + 'ữ' => 'ữ', + 'á»°' => 'Ự', + 'á»±' => 'ự', + 'Ỳ' => 'YÌ€', + 'ỳ' => 'yÌ€', + 'á»´' => 'YÌ£', + 'ỵ' => 'yÌ£', + 'Ỷ' => 'Ỷ', + 'á»·' => 'ỷ', + 'Ỹ' => 'Ỹ', + 'ỹ' => 'ỹ', + 'á¼€' => 'ἀ', + 'á¼' => 'ἁ', + 'ἂ' => 'ἂ', + 'ἃ' => 'ἃ', + 'ἄ' => 'ἀÌ', + 'á¼…' => 'ἁÌ', + 'ἆ' => 'ἆ', + 'ἇ' => 'ἇ', + 'Ἀ' => 'Ἀ', + 'Ἁ' => 'Ἁ', + 'Ἂ' => 'Ἂ', + 'Ἃ' => 'Ἃ', + 'Ἄ' => 'ἈÌ', + 'á¼' => 'ἉÌ', + 'Ἆ' => 'Ἆ', + 'á¼' => 'Ἇ', + 'á¼' => 'ἐ', + 'ἑ' => 'ἑ', + 'á¼’' => 'ἒ', + 'ἓ' => 'ἓ', + 'á¼”' => 'ἐÌ', + 'ἕ' => 'ἑÌ', + 'Ἐ' => 'Ἐ', + 'á¼™' => 'Ἑ', + 'Ἒ' => 'Ἒ', + 'á¼›' => 'Ἓ', + 'Ἔ' => 'ἘÌ', + 'á¼' => 'ἙÌ', + 'á¼ ' => 'ἠ', + 'ἡ' => 'ἡ', + 'á¼¢' => 'ἢ', + 'á¼£' => 'ἣ', + 'ἤ' => 'ἠÌ', + 'á¼¥' => 'ἡÌ', + 'ἦ' => 'ἦ', + 'ἧ' => 'ἧ', + 'Ἠ' => 'Ἠ', + 'Ἡ' => 'Ἡ', + 'Ἢ' => 'Ἢ', + 'Ἣ' => 'Ἣ', + 'Ἤ' => 'ἨÌ', + 'á¼­' => 'ἩÌ', + 'á¼®' => 'Ἦ', + 'Ἧ' => 'Ἧ', + 'á¼°' => 'ἰ', + 'á¼±' => 'ἱ', + 'á¼²' => 'ἲ', + 'á¼³' => 'ἳ', + 'á¼´' => 'ἰÌ', + 'á¼µ' => 'ἱÌ', + 'ἶ' => 'ἶ', + 'á¼·' => 'ἷ', + 'Ἰ' => 'Ἰ', + 'á¼¹' => 'Ἱ', + 'Ἲ' => 'Ἲ', + 'á¼»' => 'Ἳ', + 'á¼¼' => 'ἸÌ', + 'á¼½' => 'ἹÌ', + 'á¼¾' => 'Ἶ', + 'Ἷ' => 'Ἷ', + 'á½€' => 'ὀ', + 'á½' => 'ὁ', + 'ὂ' => 'ὂ', + 'ὃ' => 'ὃ', + 'ὄ' => 'ὀÌ', + 'á½…' => 'ὁÌ', + 'Ὀ' => 'Ὀ', + 'Ὁ' => 'Ὁ', + 'Ὂ' => 'Ὂ', + 'Ὃ' => 'Ὃ', + 'Ὄ' => 'ὈÌ', + 'á½' => 'ὉÌ', + 'á½' => 'Ï…Ì“', + 'ὑ' => 'Ï…Ì”', + 'á½’' => 'Ï…Ì“Ì€', + 'ὓ' => 'ὓ', + 'á½”' => 'Ï…Ì“Ì', + 'ὕ' => 'Ï…Ì”Ì', + 'á½–' => 'Ï…Ì“Í‚', + 'á½—' => 'ὗ', + 'á½™' => 'Ὑ', + 'á½›' => 'Ὓ', + 'á½' => 'ὙÌ', + 'Ὗ' => 'Ὗ', + 'á½ ' => 'ὠ', + 'ὡ' => 'ὡ', + 'á½¢' => 'ὢ', + 'á½£' => 'ὣ', + 'ὤ' => 'ὠÌ', + 'á½¥' => 'ὡÌ', + 'ὦ' => 'ὦ', + 'ὧ' => 'ὧ', + 'Ὠ' => 'Ὠ', + 'Ὡ' => 'Ὡ', + 'Ὢ' => 'Ὢ', + 'Ὣ' => 'Ὣ', + 'Ὤ' => 'ὨÌ', + 'á½­' => 'ὩÌ', + 'á½®' => 'Ὦ', + 'Ὧ' => 'Ὧ', + 'á½°' => 'ὰ', + 'á½±' => 'αÌ', + 'á½²' => 'ὲ', + 'á½³' => 'εÌ', + 'á½´' => 'ὴ', + 'á½µ' => 'ηÌ', + 'ὶ' => 'ὶ', + 'á½·' => 'ιÌ', + 'ὸ' => 'ὸ', + 'á½¹' => 'οÌ', + 'ὺ' => 'Ï…Ì€', + 'á½»' => 'Ï…Ì', + 'á½¼' => 'ὼ', + 'á½½' => 'ωÌ', + 'á¾€' => 'ᾀ', + 'á¾' => 'ᾁ', + 'ᾂ' => 'ᾂ', + 'ᾃ' => 'ᾃ', + 'ᾄ' => 'ἀÌÍ…', + 'á¾…' => 'ἁÌÍ…', + 'ᾆ' => 'ᾆ', + 'ᾇ' => 'ᾇ', + 'ᾈ' => 'ᾈ', + 'ᾉ' => 'ᾉ', + 'ᾊ' => 'ᾊ', + 'ᾋ' => 'ᾋ', + 'ᾌ' => 'ἈÌÍ…', + 'á¾' => 'ἉÌÍ…', + 'ᾎ' => 'ᾎ', + 'á¾' => 'ᾏ', + 'á¾' => 'ᾐ', + 'ᾑ' => 'ᾑ', + 'á¾’' => 'ᾒ', + 'ᾓ' => 'ᾓ', + 'á¾”' => 'ἠÌÍ…', + 'ᾕ' => 'ἡÌÍ…', + 'á¾–' => 'ᾖ', + 'á¾—' => 'ᾗ', + 'ᾘ' => 'ᾘ', + 'á¾™' => 'ᾙ', + 'ᾚ' => 'ᾚ', + 'á¾›' => 'ᾛ', + 'ᾜ' => 'ἨÌÍ…', + 'á¾' => 'ἩÌÍ…', + 'ᾞ' => 'ᾞ', + 'ᾟ' => 'ᾟ', + 'á¾ ' => 'ᾠ', + 'ᾡ' => 'ᾡ', + 'á¾¢' => 'ᾢ', + 'á¾£' => 'ᾣ', + 'ᾤ' => 'ὠÌÍ…', + 'á¾¥' => 'ὡÌÍ…', + 'ᾦ' => 'ᾦ', + 'ᾧ' => 'ᾧ', + 'ᾨ' => 'ᾨ', + 'ᾩ' => 'ᾩ', + 'ᾪ' => 'ᾪ', + 'ᾫ' => 'ᾫ', + 'ᾬ' => 'ὨÌÍ…', + 'á¾­' => 'ὩÌÍ…', + 'á¾®' => 'ᾮ', + 'ᾯ' => 'ᾯ', + 'á¾°' => 'ᾰ', + 'á¾±' => 'ᾱ', + 'á¾²' => 'ᾲ', + 'á¾³' => 'ᾳ', + 'á¾´' => 'αÌÍ…', + 'ᾶ' => 'ᾶ', + 'á¾·' => 'ᾷ', + 'Ᾰ' => 'Ᾰ', + 'á¾¹' => 'Ᾱ', + 'Ὰ' => 'Ὰ', + 'á¾»' => 'ΑÌ', + 'á¾¼' => 'ᾼ', + 'á¾¾' => 'ι', + 'á¿' => '῁', + 'á¿‚' => 'ῂ', + 'ῃ' => 'ῃ', + 'á¿„' => 'ηÌÍ…', + 'ῆ' => 'ῆ', + 'ῇ' => 'ῇ', + 'Ὲ' => 'Ὲ', + 'Έ' => 'ΕÌ', + 'á¿Š' => 'Ὴ', + 'á¿‹' => 'ΗÌ', + 'á¿Œ' => 'ῌ', + 'á¿' => '῍', + 'á¿Ž' => '᾿Ì', + 'á¿' => '῏', + 'á¿' => 'ῐ', + 'á¿‘' => 'ῑ', + 'á¿’' => 'ῒ', + 'á¿“' => 'ϊÌ', + 'á¿–' => 'ῖ', + 'á¿—' => 'ῗ', + 'Ῐ' => 'Ῐ', + 'á¿™' => 'Ῑ', + 'á¿š' => 'Ὶ', + 'á¿›' => 'ΙÌ', + 'á¿' => '῝', + 'á¿ž' => '῾Ì', + 'á¿Ÿ' => '῟', + 'á¿ ' => 'ῠ', + 'á¿¡' => 'Ï…Ì„', + 'á¿¢' => 'ῢ', + 'á¿£' => 'ϋÌ', + 'ῤ' => 'ÏÌ“', + 'á¿¥' => 'ÏÌ”', + 'ῦ' => 'Ï…Í‚', + 'ῧ' => 'ῧ', + 'Ῠ' => 'Ῠ', + 'á¿©' => 'Ῡ', + 'Ὺ' => 'Ὺ', + 'á¿«' => 'Î¥Ì', + 'Ῥ' => 'Ῥ', + 'á¿­' => '῭', + 'á¿®' => '¨Ì', + '`' => '`', + 'ῲ' => 'ῲ', + 'ῳ' => 'ῳ', + 'á¿´' => 'ωÌÍ…', + 'ῶ' => 'ῶ', + 'á¿·' => 'ῷ', + 'Ὸ' => 'Ὸ', + 'Ό' => 'ΟÌ', + 'Ὼ' => 'Ὼ', + 'á¿»' => 'ΩÌ', + 'ῼ' => 'ῼ', + '´' => '´', + ' ' => ' ', + 'â€' => ' ', + 'Ω' => 'Ω', + 'K' => 'K', + 'â„«' => 'AÌŠ', + '↚' => 'â†Ì¸', + '↛' => '↛', + '↮' => '↮', + 'â‡' => 'â‡Ì¸', + '⇎' => '⇎', + 'â‡' => '⇏', + '∄' => '∄', + '∉' => '∉', + '∌' => '∌', + '∤' => '∤', + '∦' => '∦', + 'â‰' => '≁', + '≄' => '≄', + '≇' => '≇', + '≉' => '≉', + '≠' => '≠', + '≢' => '≢', + '≭' => 'â‰Ì¸', + '≮' => '≮', + '≯' => '≯', + '≰' => '≰', + '≱' => '≱', + '≴' => '≴', + '≵' => '≵', + '≸' => '≸', + '≹' => '≹', + '⊀' => '⊀', + 'âŠ' => '⊁', + '⊄' => '⊄', + '⊅' => '⊅', + '⊈' => '⊈', + '⊉' => '⊉', + '⊬' => '⊬', + '⊭' => '⊭', + '⊮' => '⊮', + '⊯' => '⊯', + 'â‹ ' => '⋠', + 'â‹¡' => '⋡', + 'â‹¢' => '⋢', + 'â‹£' => '⋣', + '⋪' => '⋪', + 'â‹«' => '⋫', + '⋬' => '⋬', + 'â‹­' => '⋭', + '〈' => '〈', + '〉' => '〉', + 'â«œ' => 'â«Ì¸', + 'ãŒ' => 'ã‹ã‚™', + 'ãŽ' => 'ãã‚™', + 'ã' => 'ãã‚™', + 'ã’' => 'ã‘ã‚™', + 'ã”' => 'ã“ã‚™', + 'ã–' => 'ã•ã‚™', + 'ã˜' => 'ã—ã‚™', + 'ãš' => 'ã™ã‚™', + 'ãœ' => 'ã›ã‚™', + 'ãž' => 'ãã‚™', + 'ã ' => 'ãŸã‚™', + 'ã¢' => 'ã¡ã‚™', + 'ã¥' => 'ã¤ã‚™', + 'ã§' => 'ã¦ã‚™', + 'ã©' => 'ã¨ã‚™', + 'ã°' => 'ã¯ã‚™', + 'ã±' => 'ã¯ã‚š', + 'ã³' => 'ã²ã‚™', + 'ã´' => 'ã²ã‚š', + 'ã¶' => 'ãµã‚™', + 'ã·' => 'ãµã‚š', + 'ã¹' => 'ã¸ã‚™', + 'ãº' => 'ã¸ã‚š', + 'ã¼' => 'ã»ã‚™', + 'ã½' => 'ã»ã‚š', + 'ã‚”' => 'ã†ã‚™', + 'ã‚ž' => 'ã‚ã‚™', + 'ガ' => 'ã‚«ã‚™', + 'ã‚®' => 'ã‚­ã‚™', + 'ã‚°' => 'グ', + 'ゲ' => 'ゲ', + 'ã‚´' => 'ゴ', + 'ザ' => 'ザ', + 'ジ' => 'ã‚·ã‚™', + 'ズ' => 'ズ', + 'ゼ' => 'ゼ', + 'ゾ' => 'ゾ', + 'ダ' => 'ã‚¿ã‚™', + 'ヂ' => 'ãƒã‚™', + 'ヅ' => 'ヅ', + 'デ' => 'デ', + 'ド' => 'ド', + 'ãƒ' => 'ãƒã‚™', + 'パ' => 'ãƒã‚š', + 'ビ' => 'ビ', + 'ピ' => 'ピ', + 'ブ' => 'ブ', + 'プ' => 'プ', + 'ベ' => 'ベ', + 'ペ' => 'ペ', + 'ボ' => 'ボ', + 'ãƒ' => 'ポ', + 'ヴ' => 'ヴ', + 'ヷ' => 'ヷ', + 'ヸ' => 'ヸ', + 'ヹ' => 'ヹ', + 'ヺ' => 'ヺ', + 'ヾ' => 'ヾ', + '豈' => '豈', + 'ï¤' => 'æ›´', + '車' => '車', + '賈' => '賈', + '滑' => '滑', + '串' => '串', + '句' => 'å¥', + '龜' => '龜', + '龜' => '龜', + '契' => '契', + '金' => '金', + '喇' => 'å–‡', + '奈' => '奈', + 'ï¤' => '懶', + '癩' => '癩', + 'ï¤' => 'ç¾…', + 'ï¤' => '蘿', + '螺' => '螺', + '裸' => '裸', + '邏' => 'é‚', + '樂' => '樂', + '洛' => 'æ´›', + '烙' => '烙', + '珞' => 'çž', + '落' => 'è½', + '酪' => 'é…ª', + '駱' => '駱', + '亂' => '亂', + '卵' => 'åµ', + 'ï¤' => '欄', + '爛' => '爛', + '蘭' => '蘭', + '鸞' => '鸞', + '嵐' => 'åµ', + '濫' => 'æ¿«', + '藍' => 'è—', + '襤' => '襤', + '拉' => '拉', + '臘' => '臘', + '蠟' => 'è Ÿ', + '廊' => '廊', + '朗' => '朗', + '浪' => '浪', + '狼' => '狼', + '郎' => '郎', + '來' => '來', + '冷' => '冷', + '勞' => 'å‹ž', + '擄' => 'æ“„', + '櫓' => 'æ«“', + '爐' => 'çˆ', + '盧' => '盧', + '老' => 'è€', + '蘆' => '蘆', + '虜' => '虜', + '路' => 'è·¯', + '露' => '露', + '魯' => 'é­¯', + '鷺' => 'é·º', + '碌' => '碌', + '祿' => '祿', + '綠' => '綠', + '菉' => 'è‰', + '錄' => '錄', + '鹿' => '鹿', + 'ï¥' => 'è«–', + '壟' => '壟', + '弄' => '弄', + '籠' => 'ç± ', + '聾' => 'è¾', + '牢' => '牢', + '磊' => '磊', + '賂' => '賂', + '雷' => 'é›·', + '壘' => '壘', + '屢' => 'å±¢', + '樓' => '樓', + 'ï¥' => 'æ·š', + '漏' => 'æ¼', + 'ï¥' => 'ç´¯', + 'ï¥' => '縷', + '陋' => '陋', + '勒' => 'å‹’', + '肋' => 'è‚‹', + '凜' => '凜', + '凌' => '凌', + '稜' => '稜', + '綾' => '綾', + '菱' => 'è±', + '陵' => '陵', + '讀' => '讀', + '拏' => 'æ‹', + '樂' => '樂', + 'ï¥' => '諾', + '丹' => '丹', + '寧' => '寧', + '怒' => '怒', + '率' => '率', + '異' => 'ç•°', + '北' => '北', + '磻' => '磻', + '便' => '便', + '復' => '復', + '不' => 'ä¸', + '泌' => '泌', + '數' => '數', + '索' => 'ç´¢', + '參' => 'åƒ', + '塞' => 'å¡ž', + '省' => 'çœ', + '葉' => '葉', + '說' => '說', + '殺' => '殺', + '辰' => 'è¾°', + '沈' => '沈', + '拾' => '拾', + '若' => 'è‹¥', + '掠' => '掠', + '略' => 'ç•¥', + '亮' => '亮', + '兩' => 'å…©', + '凉' => '凉', + '梁' => 'æ¢', + '糧' => '糧', + '良' => '良', + '諒' => 'è«’', + '量' => 'é‡', + '勵' => '勵', + '呂' => 'å‘‚', + 'ï¦' => '女', + '廬' => '廬', + '旅' => 'æ—…', + '濾' => '濾', + '礪' => '礪', + '閭' => 'é–­', + '驪' => '驪', + '麗' => '麗', + '黎' => '黎', + '力' => '力', + '曆' => '曆', + '歷' => 'æ­·', + 'ï¦' => 'è½¢', + '年' => 'å¹´', + 'ï¦' => 'æ†', + 'ï¦' => '戀', + '撚' => 'æ’š', + '漣' => 'æ¼£', + '煉' => 'ç…‰', + '璉' => 'ç’‰', + '秊' => '秊', + '練' => 'ç·´', + '聯' => 'è¯', + '輦' => '輦', + '蓮' => 'è“®', + '連' => '連', + '鍊' => 'éŠ', + '列' => '列', + 'ï¦' => '劣', + '咽' => 'å’½', + '烈' => '烈', + '裂' => '裂', + '說' => '說', + '廉' => '廉', + '念' => '念', + '捻' => 'æ»', + '殮' => 'æ®®', + '簾' => 'ç°¾', + '獵' => 'çµ', + '令' => '令', + '囹' => '囹', + '寧' => '寧', + '嶺' => '嶺', + '怜' => '怜', + '玲' => '玲', + '瑩' => 'ç‘©', + '羚' => '羚', + '聆' => 'è†', + '鈴' => '鈴', + '零' => '零', + '靈' => 'éˆ', + '領' => 'é ˜', + '例' => '例', + '禮' => '禮', + '醴' => '醴', + '隸' => '隸', + '惡' => '惡', + '了' => '了', + '僚' => '僚', + '寮' => '寮', + '尿' => 'å°¿', + '料' => 'æ–™', + '樂' => '樂', + '燎' => '燎', + 'ï§' => '療', + '蓼' => '蓼', + '遼' => 'é¼', + '龍' => 'é¾', + '暈' => '暈', + '阮' => '阮', + '劉' => '劉', + '杻' => 'æ»', + '柳' => '柳', + '流' => 'æµ', + '溜' => '溜', + '琉' => 'ç‰', + 'ï§' => 'ç•™', + '硫' => 'ç¡«', + 'ï§' => 'ç´', + 'ï§' => 'é¡ž', + '六' => 'å…­', + '戮' => '戮', + '陸' => '陸', + '倫' => '倫', + '崙' => 'å´™', + '淪' => 'æ·ª', + '輪' => '輪', + '律' => '律', + '慄' => 'æ…„', + '栗' => 'æ —', + '率' => '率', + '隆' => '隆', + 'ï§' => '利', + '吏' => 'å', + '履' => 'å±¥', + '易' => '易', + '李' => 'æŽ', + '梨' => '梨', + '泥' => 'æ³¥', + '理' => 'ç†', + '痢' => 'ç—¢', + '罹' => 'ç½¹', + '裏' => 'è£', + '裡' => '裡', + '里' => '里', + '離' => '離', + '匿' => '匿', + '溺' => '溺', + '吝' => 'å', + '燐' => 'ç‡', + '璘' => 'ç’˜', + '藺' => 'è—º', + '隣' => '隣', + '鱗' => 'é±—', + '麟' => '麟', + '林' => 'æž—', + '淋' => 'æ·‹', + '臨' => '臨', + '立' => 'ç«‹', + '笠' => '笠', + '粒' => 'ç²’', + '狀' => 'ç‹€', + '炙' => 'ç‚™', + '識' => 'è­˜', + '什' => '什', + '茶' => '茶', + '刺' => '刺', + '切' => '切', + 'ï¨' => '度', + '拓' => 'æ‹“', + '糖' => 'ç³–', + '宅' => 'å®…', + '洞' => 'æ´ž', + '暴' => 'æš´', + '輻' => 'è¼»', + '行' => 'è¡Œ', + '降' => 'é™', + '見' => '見', + '廓' => '廓', + '兀' => 'å…€', + 'ï¨' => 'å—€', + 'ï¨' => 'å¡š', + '晴' => 'æ™´', + '凞' => '凞', + '猪' => '猪', + '益' => '益', + '礼' => '礼', + '神' => '神', + '祥' => '祥', + '福' => 'ç¦', + '靖' => 'é–', + 'ï¨' => 'ç²¾', + '羽' => 'ç¾½', + '蘒' => '蘒', + '諸' => '諸', + '逸' => '逸', + '都' => '都', + '飯' => '飯', + '飼' => '飼', + '館' => '館', + '鶴' => '鶴', + '郞' => '郞', + '隷' => 'éš·', + '侮' => 'ä¾®', + '僧' => '僧', + '免' => 'å…', + '勉' => '勉', + '勤' => '勤', + '卑' => 'å‘', + '喝' => 'å–', + '嘆' => '嘆', + '器' => '器', + '塀' => 'å¡€', + '墨' => '墨', + '層' => '層', + '屮' => 'å±®', + '悔' => 'æ‚”', + '慨' => 'æ…¨', + '憎' => '憎', + 'ï©€' => '懲', + 'ï©' => 'æ•', + 'ï©‚' => 'æ—¢', + '暑' => 'æš‘', + 'ï©„' => '梅', + 'ï©…' => 'æµ·', + '渚' => '渚', + '漢' => 'æ¼¢', + '煮' => 'ç…®', + '爫' => '爫', + 'ï©Š' => 'ç¢', + 'ï©‹' => '碑', + 'ï©Œ' => '社', + 'ï©' => '祉', + 'ï©Ž' => '祈', + 'ï©' => 'ç¥', + 'ï©' => '祖', + 'ï©‘' => 'ç¥', + 'ï©’' => 'ç¦', + 'ï©“' => '禎', + 'ï©”' => 'ç©€', + 'ï©•' => 'çª', + 'ï©–' => '節', + 'ï©—' => 'ç·´', + '縉' => '縉', + 'ï©™' => 'ç¹', + 'ï©š' => 'ç½²', + 'ï©›' => '者', + 'ï©œ' => '臭', + 'ï©' => '艹', + 'ï©ž' => '艹', + 'ï©Ÿ' => 'è‘—', + 'ï© ' => 'è¤', + 'ï©¡' => '視', + 'ï©¢' => 'è¬', + 'ï©£' => '謹', + '賓' => '賓', + 'ï©¥' => 'è´ˆ', + '辶' => '辶', + '逸' => '逸', + '難' => '難', + 'ï©©' => '響', + '頻' => 'é »', + 'ï©«' => 'æµ', + '𤋮' => '𤋮', + 'ï©­' => '舘', + 'ï©°' => '並', + '况' => '况', + '全' => 'å…¨', + '侀' => 'ä¾€', + 'ï©´' => 'å……', + '冀' => '冀', + '勇' => '勇', + 'ï©·' => '勺', + '喝' => 'å–', + '啕' => 'å••', + '喙' => 'å–™', + 'ï©»' => 'å—¢', + '塚' => 'å¡š', + '墳' => '墳', + '奄' => '奄', + 'ï©¿' => '奔', + '婢' => 'å©¢', + 'ïª' => '嬨', + '廒' => 'å»’', + '廙' => 'å»™', + '彩' => '彩', + '徭' => 'å¾­', + '惘' => '惘', + '慎' => 'æ…Ž', + '愈' => '愈', + '憎' => '憎', + '慠' => 'æ… ', + '懲' => '懲', + '戴' => '戴', + 'ïª' => 'æ„', + '搜' => 'æœ', + 'ïª' => 'æ‘’', + 'ïª' => 'æ•–', + '晴' => 'æ™´', + '朗' => '朗', + '望' => '望', + '杖' => 'æ–', + '歹' => 'æ­¹', + '殺' => '殺', + '流' => 'æµ', + '滛' => 'æ»›', + '滋' => '滋', + '漢' => 'æ¼¢', + '瀞' => '瀞', + '煮' => 'ç…®', + 'ïª' => '瞧', + '爵' => '爵', + '犯' => '犯', + '猪' => '猪', + '瑱' => '瑱', + '甆' => '甆', + '画' => 'ç”»', + '瘝' => 'ç˜', + '瘟' => '瘟', + '益' => '益', + '盛' => 'ç››', + '直' => 'ç›´', + '睊' => 'çŠ', + '着' => 'ç€', + '磌' => '磌', + '窱' => '窱', + '節' => '節', + '类' => 'ç±»', + '絛' => 'çµ›', + '練' => 'ç·´', + '缾' => 'ç¼¾', + '者' => '者', + '荒' => 'è’', + '華' => 'è¯', + '蝹' => 'è¹', + '襁' => 'è¥', + '覆' => '覆', + '視' => '視', + '調' => '調', + '諸' => '諸', + '請' => 'è«‹', + '謁' => 'è¬', + '諾' => '諾', + '諭' => 'è«­', + '謹' => '謹', + 'ï«€' => '變', + 'ï«' => 'è´ˆ', + 'ï«‚' => '輸', + '遲' => 'é²', + 'ï«„' => '醙', + 'ï«…' => '鉶', + '陼' => '陼', + '難' => '難', + '靖' => 'é–', + '韛' => '韛', + 'ï«Š' => '響', + 'ï«‹' => 'é ‹', + 'ï«Œ' => 'é »', + 'ï«' => '鬒', + 'ï«Ž' => '龜', + 'ï«' => '𢡊', + 'ï«' => '𢡄', + 'ï«‘' => 'ð£•', + 'ï«’' => 'ã®', + 'ï«“' => '䀘', + 'ï«”' => '䀹', + 'ï«•' => '𥉉', + 'ï«–' => 'ð¥³', + 'ï«—' => '𧻓', + '齃' => '齃', + 'ï«™' => '龎', + 'ï¬' => '×™Ö´', + 'ײַ' => 'ײַ', + 'שׁ' => 'ש×', + 'שׂ' => 'שׂ', + 'שּׁ' => 'שּ×', + 'שּׂ' => 'שּׂ', + 'אַ' => '×Ö·', + 'אָ' => '×Ö¸', + 'אּ' => '×Ö¼', + 'בּ' => 'בּ', + 'גּ' => '×’Ö¼', + 'דּ' => 'דּ', + 'הּ' => '×”Ö¼', + 'וּ' => 'וּ', + 'זּ' => '×–Ö¼', + 'טּ' => 'טּ', + 'יּ' => '×™Ö¼', + 'ךּ' => 'ךּ', + 'כּ' => '×›Ö¼', + 'לּ' => 'לּ', + 'מּ' => 'מּ', + 'ï­€' => '× Ö¼', + 'ï­' => 'סּ', + 'ï­ƒ' => '×£Ö¼', + 'ï­„' => 'פּ', + 'ï­†' => 'צּ', + 'ï­‡' => 'קּ', + 'ï­ˆ' => 'רּ', + 'ï­‰' => 'שּ', + 'ï­Š' => 'תּ', + 'ï­‹' => 'וֹ', + 'ï­Œ' => 'בֿ', + 'ï­' => '×›Ö¿', + 'ï­Ž' => 'פֿ', + 'ð‘‚š' => '𑂚', + 'ð‘‚œ' => '𑂜', + 'ð‘‚«' => '𑂫', + 'ð‘„®' => '𑄮', + '𑄯' => '𑄯', + 'ð‘‹' => 'ð‘‡ð‘Œ¾', + 'ð‘Œ' => 'ð‘‡ð‘—', + 'ð‘’»' => '𑒻', + 'ð‘’¼' => '𑒼', + 'ð‘’¾' => '𑒾', + 'ð‘–º' => '𑖺', + 'ð‘–»' => '𑖻', + '𑤸' => '𑤸', + 'ð…ž' => 'ð…—ð…¥', + 'ð…Ÿ' => 'ð…˜ð…¥', + 'ð… ' => 'ð…˜ð…¥ð…®', + 'ð…¡' => 'ð…˜ð…¥ð…¯', + 'ð…¢' => 'ð…˜ð…¥ð…°', + 'ð…£' => 'ð…˜ð…¥ð…±', + 'ð…¤' => 'ð…˜ð…¥ð…²', + 'ð†»' => 'ð†¹ð…¥', + 'ð†¼' => 'ð†ºð…¥', + 'ð†½' => 'ð†¹ð…¥ð…®', + 'ð†¾' => 'ð†ºð…¥ð…®', + 'ð†¿' => 'ð†¹ð…¥ð…¯', + 'ð‡€' => 'ð†ºð…¥ð…¯', + '丽' => '丽', + 'ð¯ ' => '丸', + '乁' => 'ä¹', + '𠄢' => 'ð „¢', + '你' => 'ä½ ', + '侮' => 'ä¾®', + '侻' => 'ä¾»', + '倂' => '倂', + '偺' => 'åº', + '備' => 'å‚™', + '僧' => '僧', + '像' => 'åƒ', + '㒞' => 'ã’ž', + 'ð¯ ' => '𠘺', + '免' => 'å…', + 'ð¯ ' => 'å…”', + 'ð¯ ' => 'å…¤', + '具' => 'å…·', + '𠔜' => '𠔜', + '㒹' => 'ã’¹', + '內' => 'å…§', + '再' => 'å†', + '𠕋' => 'ð •‹', + '冗' => '冗', + '冤' => '冤', + '仌' => '仌', + '冬' => '冬', + '况' => '况', + '𩇟' => '𩇟', + 'ð¯ ' => '凵', + '刃' => '刃', + '㓟' => 'ã“Ÿ', + '刻' => '刻', + '剆' => '剆', + '割' => '割', + '剷' => '剷', + '㔕' => '㔕', + '勇' => '勇', + '勉' => '勉', + '勤' => '勤', + '勺' => '勺', + '包' => '包', + '匆' => '匆', + '北' => '北', + '卉' => 'å‰', + '卑' => 'å‘', + '博' => 'åš', + '即' => 'å³', + '卽' => 'å½', + '卿' => 'å¿', + '卿' => 'å¿', + '卿' => 'å¿', + '𠨬' => '𠨬', + '灰' => 'ç°', + '及' => 'åŠ', + '叟' => 'åŸ', + '𠭣' => 'ð ­£', + '叫' => 'å«', + '叱' => 'å±', + '吆' => 'å†', + '咞' => 'å’ž', + '吸' => 'å¸', + '呈' => '呈', + '周' => '周', + '咢' => 'å’¢', + 'ð¯¡' => '哶', + '唐' => 'å”', + '啓' => 'å•“', + '啣' => 'å•£', + '善' => 'å–„', + '善' => 'å–„', + '喙' => 'å–™', + '喫' => 'å–«', + '喳' => 'å–³', + '嗂' => 'å—‚', + '圖' => '圖', + '嘆' => '嘆', + 'ð¯¡' => '圗', + '噑' => '噑', + 'ð¯¡' => 'å™´', + 'ð¯¡' => '切', + '壮' => '壮', + '城' => '城', + '埴' => '埴', + '堍' => 'å ', + '型' => 'åž‹', + '堲' => 'å ²', + '報' => 'å ±', + '墬' => '墬', + '𡓤' => '𡓤', + '売' => '売', + '壷' => '壷', + '夆' => '夆', + 'ð¯¡' => '多', + '夢' => '夢', + '奢' => '奢', + '𡚨' => '𡚨', + '𡛪' => '𡛪', + '姬' => '姬', + '娛' => '娛', + '娧' => '娧', + '姘' => '姘', + '婦' => '婦', + '㛮' => 'ã›®', + '㛼' => '㛼', + '嬈' => '嬈', + '嬾' => '嬾', + '嬾' => '嬾', + '𡧈' => '𡧈', + '寃' => '寃', + '寘' => '寘', + '寧' => '寧', + '寳' => '寳', + '𡬘' => '𡬘', + '寿' => '寿', + '将' => 'å°†', + '当' => '当', + '尢' => 'å°¢', + '㞁' => 'ãž', + '屠' => 'å± ', + '屮' => 'å±®', + '峀' => 'å³€', + '岍' => 'å²', + '𡷤' => 'ð¡·¤', + '嵃' => '嵃', + '𡷦' => 'ð¡·¦', + '嵮' => 'åµ®', + '嵫' => '嵫', + '嵼' => 'åµ¼', + 'ð¯¢' => 'å·¡', + '巢' => 'å·¢', + '㠯' => 'ã ¯', + '巽' => 'å·½', + '帨' => '帨', + '帽' => '帽', + '幩' => '幩', + '㡢' => 'ã¡¢', + '𢆃' => '𢆃', + '㡼' => '㡼', + '庰' => '庰', + '庳' => '庳', + 'ð¯¢' => '庶', + '廊' => '廊', + 'ð¯¢' => '𪎒', + 'ð¯¢' => '廾', + '𢌱' => '𢌱', + '𢌱' => '𢌱', + '舁' => 'èˆ', + '弢' => 'å¼¢', + '弢' => 'å¼¢', + '㣇' => '㣇', + '𣊸' => '𣊸', + '𦇚' => '𦇚', + '形' => 'å½¢', + '彫' => '彫', + '㣣' => '㣣', + '徚' => '徚', + 'ð¯¢' => 'å¿', + '志' => 'å¿—', + '忹' => '忹', + '悁' => 'æ‚', + '㤺' => '㤺', + '㤜' => '㤜', + '悔' => 'æ‚”', + '𢛔' => '𢛔', + '惇' => '惇', + '慈' => 'æ…ˆ', + '慌' => 'æ…Œ', + '慎' => 'æ…Ž', + '慌' => 'æ…Œ', + '慺' => 'æ…º', + '憎' => '憎', + '憲' => '憲', + '憤' => '憤', + '憯' => '憯', + '懞' => '懞', + '懲' => '懲', + '懶' => '懶', + '成' => 'æˆ', + '戛' => '戛', + '扝' => 'æ‰', + '抱' => '抱', + '拔' => 'æ‹”', + '捐' => 'æ', + '𢬌' => '𢬌', + '挽' => '挽', + '拼' => '拼', + '捨' => 'æ¨', + '掃' => '掃', + '揤' => 'æ¤', + '𢯱' => '𢯱', + '搢' => 'æ¢', + '揅' => 'æ…', + 'ð¯£' => '掩', + '㨮' => '㨮', + '摩' => 'æ‘©', + '摾' => '摾', + '撝' => 'æ’', + '摷' => 'æ‘·', + '㩬' => '㩬', + '敏' => 'æ•', + '敬' => '敬', + '𣀊' => '𣀊', + '旣' => 'æ—£', + '書' => '書', + 'ð¯£' => '晉', + '㬙' => '㬙', + 'ð¯£' => 'æš‘', + 'ð¯£' => '㬈', + '㫤' => '㫤', + '冒' => '冒', + '冕' => '冕', + '最' => '最', + '暜' => 'æšœ', + '肭' => 'è‚­', + '䏙' => 'ä™', + '朗' => '朗', + '望' => '望', + '朡' => '朡', + '杞' => 'æž', + '杓' => 'æ“', + 'ð¯£' => 'ð£ƒ', + '㭉' => 'ã­‰', + '柺' => '柺', + '枅' => 'æž…', + '桒' => 'æ¡’', + '梅' => '梅', + '𣑭' => '𣑭', + '梎' => '梎', + '栟' => 'æ Ÿ', + '椔' => '椔', + '㮝' => 'ã®', + '楂' => '楂', + '榣' => '榣', + '槪' => '槪', + '檨' => '檨', + '𣚣' => '𣚣', + '櫛' => 'æ«›', + '㰘' => 'ã°˜', + '次' => '次', + '𣢧' => '𣢧', + '歔' => 'æ­”', + '㱎' => '㱎', + '歲' => 'æ­²', + '殟' => '殟', + '殺' => '殺', + '殻' => 'æ®»', + '𣪍' => 'ð£ª', + '𡴋' => 'ð¡´‹', + '𣫺' => '𣫺', + '汎' => '汎', + '𣲼' => '𣲼', + '沿' => '沿', + '泍' => 'æ³', + '汧' => '汧', + '洖' => 'æ´–', + '派' => 'æ´¾', + 'ð¯¤' => 'æµ·', + '流' => 'æµ', + '浩' => '浩', + '浸' => '浸', + '涅' => '涅', + '𣴞' => '𣴞', + '洴' => 'æ´´', + '港' => '港', + '湮' => 'æ¹®', + '㴳' => 'ã´³', + '滋' => '滋', + '滇' => '滇', + 'ð¯¤' => '𣻑', + '淹' => 'æ·¹', + 'ð¯¤' => 'æ½®', + 'ð¯¤' => '𣽞', + '𣾎' => '𣾎', + '濆' => '濆', + '瀹' => '瀹', + '瀞' => '瀞', + '瀛' => '瀛', + '㶖' => '㶖', + '灊' => 'çŠ', + '災' => 'ç½', + '灷' => 'ç·', + '炭' => 'ç‚­', + '𠔥' => '𠔥', + '煅' => 'ç……', + 'ð¯¤' => '𤉣', + '熜' => '熜', + '𤎫' => '𤎫', + '爨' => '爨', + '爵' => '爵', + '牐' => 'ç‰', + '𤘈' => '𤘈', + '犀' => '犀', + '犕' => '犕', + '𤜵' => '𤜵', + '𤠔' => '𤠔', + '獺' => 'çº', + '王' => '王', + '㺬' => '㺬', + '玥' => '玥', + '㺸' => '㺸', + '㺸' => '㺸', + '瑇' => '瑇', + '瑜' => 'ç‘œ', + '瑱' => '瑱', + '璅' => 'ç’…', + '瓊' => 'ç“Š', + '㼛' => 'ã¼›', + '甤' => '甤', + '𤰶' => '𤰶', + '甾' => '甾', + '𤲒' => '𤲒', + '異' => 'ç•°', + '𢆟' => '𢆟', + '瘐' => 'ç˜', + '𤾡' => '𤾡', + '𤾸' => '𤾸', + '𥁄' => 'ð¥„', + '㿼' => '㿼', + '䀈' => '䀈', + '直' => 'ç›´', + 'ð¯¥' => '𥃳', + '𥃲' => '𥃲', + '𥄙' => '𥄙', + '𥄳' => '𥄳', + '眞' => '眞', + '真' => '真', + '真' => '真', + '睊' => 'çŠ', + '䀹' => '䀹', + '瞋' => 'çž‹', + '䁆' => 'ä†', + '䂖' => 'ä‚–', + 'ð¯¥' => 'ð¥', + '硎' => 'ç¡Ž', + 'ð¯¥' => '碌', + 'ð¯¥' => '磌', + '䃣' => '䃣', + '𥘦' => '𥘦', + '祖' => '祖', + '𥚚' => '𥚚', + '𥛅' => '𥛅', + '福' => 'ç¦', + '秫' => '秫', + '䄯' => '䄯', + '穀' => 'ç©€', + '穊' => 'ç©Š', + '穏' => 'ç©', + '𥥼' => '𥥼', + 'ð¯¥' => '𥪧', + '𥪧' => '𥪧', + '竮' => 'ç«®', + '䈂' => '䈂', + '𥮫' => '𥮫', + '篆' => '篆', + '築' => '築', + '䈧' => '䈧', + '𥲀' => '𥲀', + '糒' => 'ç³’', + '䊠' => '䊠', + '糨' => '糨', + '糣' => 'ç³£', + '紀' => 'ç´€', + '𥾆' => '𥾆', + '絣' => 'çµ£', + '䌁' => 'äŒ', + '緇' => 'ç·‡', + '縂' => '縂', + '繅' => 'ç¹…', + '䌴' => '䌴', + '𦈨' => '𦈨', + '𦉇' => '𦉇', + '䍙' => 'ä™', + '𦋙' => '𦋙', + '罺' => '罺', + '𦌾' => '𦌾', + '羕' => '羕', + '翺' => '翺', + '者' => '者', + '𦓚' => '𦓚', + '𦔣' => '𦔣', + '聠' => 'è ', + '𦖨' => '𦖨', + '聰' => 'è°', + '𣍟' => 'ð£Ÿ', + 'ð¯¦' => 'ä•', + '育' => '育', + '脃' => '脃', + '䐋' => 'ä‹', + '脾' => '脾', + '媵' => '媵', + '𦞧' => '𦞧', + '𦞵' => '𦞵', + '𣎓' => '𣎓', + '𣎜' => '𣎜', + '舁' => 'èˆ', + '舄' => '舄', + 'ð¯¦' => '辞', + '䑫' => 'ä‘«', + 'ð¯¦' => '芑', + 'ð¯¦' => '芋', + '芝' => 'èŠ', + '劳' => '劳', + '花' => '花', + '芳' => '芳', + '芽' => '芽', + '苦' => '苦', + '𦬼' => '𦬼', + '若' => 'è‹¥', + '茝' => 'èŒ', + '荣' => 'è£', + '莭' => '莭', + '茣' => '茣', + 'ð¯¦' => '莽', + '菧' => 'è§', + '著' => 'è‘—', + '荓' => 'è“', + '菊' => 'èŠ', + '菌' => 'èŒ', + '菜' => 'èœ', + '𦰶' => '𦰶', + '𦵫' => '𦵫', + '𦳕' => '𦳕', + '䔫' => '䔫', + '蓱' => '蓱', + '蓳' => '蓳', + '蔖' => 'è”–', + '𧏊' => 'ð§Š', + '蕤' => '蕤', + '𦼬' => '𦼬', + '䕝' => 'ä•', + '䕡' => 'ä•¡', + '𦾱' => '𦾱', + '𧃒' => '𧃒', + '䕫' => 'ä•«', + '虐' => 'è™', + '虜' => '虜', + '虧' => '虧', + '虩' => '虩', + '蚩' => 'èš©', + '蚈' => '蚈', + '蜎' => '蜎', + '蛢' => '蛢', + '蝹' => 'è¹', + '蜨' => '蜨', + '蝫' => 'è«', + '螆' => '螆', + '䗗' => 'ä——', + '蟡' => '蟡', + 'ð¯§' => 'è ', + '䗹' => 'ä—¹', + '衠' => 'è¡ ', + '衣' => 'è¡£', + '𧙧' => '𧙧', + '裗' => '裗', + '裞' => '裞', + '䘵' => '䘵', + '裺' => '裺', + '㒻' => 'ã’»', + '𧢮' => '𧢮', + '𧥦' => '𧥦', + 'ð¯§' => 'äš¾', + '䛇' => '䛇', + 'ð¯§' => '誠', + 'ð¯§' => 'è«­', + '變' => '變', + '豕' => '豕', + '𧲨' => '𧲨', + '貫' => '貫', + '賁' => 'è³', + '贛' => 'è´›', + '起' => 'èµ·', + '𧼯' => '𧼯', + '𠠄' => 'ð  „', + '跋' => 'è·‹', + '趼' => '趼', + '跰' => 'è·°', + 'ð¯§' => '𠣞', + '軔' => 'è»”', + '輸' => '輸', + '𨗒' => '𨗒', + '𨗭' => '𨗭', + '邔' => 'é‚”', + '郱' => '郱', + '鄑' => 'é„‘', + '𨜮' => '𨜮', + '鄛' => 'é„›', + '鈸' => '鈸', + '鋗' => 'é‹—', + '鋘' => '鋘', + '鉼' => '鉼', + '鏹' => 'é¹', + '鐕' => 'é•', + '𨯺' => '𨯺', + '開' => 'é–‹', + '䦕' => '䦕', + '閷' => 'é–·', + '𨵷' => '𨵷', + '䧦' => '䧦', + '雃' => '雃', + '嶲' => '嶲', + '霣' => '霣', + '𩅅' => 'ð©……', + '𩈚' => '𩈚', + '䩮' => 'ä©®', + '䩶' => '䩶', + '韠' => '韠', + '𩐊' => 'ð©Š', + '䪲' => '䪲', + '𩒖' => 'ð©’–', + '頋' => 'é ‹', + '頋' => 'é ‹', + '頩' => 'é ©', + 'ð¯¨' => 'ð©–¶', + '飢' => '飢', + '䬳' => '䬳', + '餩' => '餩', + '馧' => '馧', + '駂' => '駂', + '駾' => '駾', + '䯎' => '䯎', + '𩬰' => '𩬰', + '鬒' => '鬒', + '鱀' => 'é±€', + '鳽' => 'é³½', + 'ð¯¨' => '䳎', + '䳭' => 'ä³­', + 'ð¯¨' => '鵧', + 'ð¯¨' => '𪃎', + '䳸' => '䳸', + '𪄅' => '𪄅', + '𪈎' => '𪈎', + '𪊑' => '𪊑', + '麻' => '麻', + '䵖' => 'äµ–', + '黹' => '黹', + '黾' => '黾', + '鼅' => 'é¼…', + '鼏' => 'é¼', + '鼖' => 'é¼–', + '鼻' => 'é¼»', + 'ð¯¨' => '𪘀', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php new file mode 100644 index 00000000..ec90f36e --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/combiningClass.php @@ -0,0 +1,876 @@ + 230, + 'Ì' => 230, + 'Ì‚' => 230, + '̃' => 230, + 'Ì„' => 230, + 'Ì…' => 230, + '̆' => 230, + '̇' => 230, + '̈' => 230, + '̉' => 230, + 'ÌŠ' => 230, + 'Ì‹' => 230, + 'ÌŒ' => 230, + 'Ì' => 230, + 'ÌŽ' => 230, + 'Ì' => 230, + 'Ì' => 230, + 'Ì‘' => 230, + 'Ì’' => 230, + 'Ì“' => 230, + 'Ì”' => 230, + 'Ì•' => 232, + 'Ì–' => 220, + 'Ì—' => 220, + '̘' => 220, + 'Ì™' => 220, + 'Ìš' => 232, + 'Ì›' => 216, + 'Ìœ' => 220, + 'Ì' => 220, + 'Ìž' => 220, + 'ÌŸ' => 220, + 'Ì ' => 220, + 'Ì¡' => 202, + 'Ì¢' => 202, + 'Ì£' => 220, + '̤' => 220, + 'Ì¥' => 220, + '̦' => 220, + '̧' => 202, + '̨' => 202, + 'Ì©' => 220, + '̪' => 220, + 'Ì«' => 220, + '̬' => 220, + 'Ì­' => 220, + 'Ì®' => 220, + '̯' => 220, + 'Ì°' => 220, + '̱' => 220, + '̲' => 220, + '̳' => 220, + 'Ì´' => 1, + '̵' => 1, + '̶' => 1, + 'Ì·' => 1, + '̸' => 1, + '̹' => 220, + '̺' => 220, + 'Ì»' => 220, + '̼' => 220, + '̽' => 230, + '̾' => 230, + 'Ì¿' => 230, + 'Í€' => 230, + 'Í' => 230, + 'Í‚' => 230, + '̓' => 230, + 'Í„' => 230, + 'Í…' => 240, + '͆' => 230, + '͇' => 220, + '͈' => 220, + '͉' => 220, + 'ÍŠ' => 230, + 'Í‹' => 230, + 'ÍŒ' => 230, + 'Í' => 220, + 'ÍŽ' => 220, + 'Í' => 230, + 'Í‘' => 230, + 'Í’' => 230, + 'Í“' => 220, + 'Í”' => 220, + 'Í•' => 220, + 'Í–' => 220, + 'Í—' => 230, + '͘' => 232, + 'Í™' => 220, + 'Íš' => 220, + 'Í›' => 230, + 'Íœ' => 233, + 'Í' => 234, + 'Íž' => 234, + 'ÍŸ' => 233, + 'Í ' => 234, + 'Í¡' => 234, + 'Í¢' => 233, + 'Í£' => 230, + 'ͤ' => 230, + 'Í¥' => 230, + 'ͦ' => 230, + 'ͧ' => 230, + 'ͨ' => 230, + 'Í©' => 230, + 'ͪ' => 230, + 'Í«' => 230, + 'ͬ' => 230, + 'Í­' => 230, + 'Í®' => 230, + 'ͯ' => 230, + 'Òƒ' => 230, + 'Ò„' => 230, + 'Ò…' => 230, + 'Ò†' => 230, + 'Ò‡' => 230, + 'Ö‘' => 220, + 'Ö’' => 230, + 'Ö“' => 230, + 'Ö”' => 230, + 'Ö•' => 230, + 'Ö–' => 220, + 'Ö—' => 230, + 'Ö˜' => 230, + 'Ö™' => 230, + 'Öš' => 222, + 'Ö›' => 220, + 'Öœ' => 230, + 'Ö' => 230, + 'Öž' => 230, + 'ÖŸ' => 230, + 'Ö ' => 230, + 'Ö¡' => 230, + 'Ö¢' => 220, + 'Ö£' => 220, + 'Ö¤' => 220, + 'Ö¥' => 220, + 'Ö¦' => 220, + 'Ö§' => 220, + 'Ö¨' => 230, + 'Ö©' => 230, + 'Öª' => 220, + 'Ö«' => 230, + 'Ö¬' => 230, + 'Ö­' => 222, + 'Ö®' => 228, + 'Ö¯' => 230, + 'Ö°' => 10, + 'Ö±' => 11, + 'Ö²' => 12, + 'Ö³' => 13, + 'Ö´' => 14, + 'Öµ' => 15, + 'Ö¶' => 16, + 'Ö·' => 17, + 'Ö¸' => 18, + 'Ö¹' => 19, + 'Öº' => 19, + 'Ö»' => 20, + 'Ö¼' => 21, + 'Ö½' => 22, + 'Ö¿' => 23, + '×' => 24, + 'ׂ' => 25, + 'ׄ' => 230, + '×…' => 220, + 'ׇ' => 18, + 'Ø' => 230, + 'Ø‘' => 230, + 'Ø’' => 230, + 'Ø“' => 230, + 'Ø”' => 230, + 'Ø•' => 230, + 'Ø–' => 230, + 'Ø—' => 230, + 'ؘ' => 30, + 'Ø™' => 31, + 'Øš' => 32, + 'Ù‹' => 27, + 'ÙŒ' => 28, + 'Ù' => 29, + 'ÙŽ' => 30, + 'Ù' => 31, + 'Ù' => 32, + 'Ù‘' => 33, + 'Ù’' => 34, + 'Ù“' => 230, + 'Ù”' => 230, + 'Ù•' => 220, + 'Ù–' => 220, + 'Ù—' => 230, + 'Ù˜' => 230, + 'Ù™' => 230, + 'Ùš' => 230, + 'Ù›' => 230, + 'Ùœ' => 220, + 'Ù' => 230, + 'Ùž' => 230, + 'ÙŸ' => 220, + 'Ù°' => 35, + 'Û–' => 230, + 'Û—' => 230, + 'Û˜' => 230, + 'Û™' => 230, + 'Ûš' => 230, + 'Û›' => 230, + 'Ûœ' => 230, + 'ÛŸ' => 230, + 'Û ' => 230, + 'Û¡' => 230, + 'Û¢' => 230, + 'Û£' => 220, + 'Û¤' => 230, + 'Û§' => 230, + 'Û¨' => 230, + 'Ûª' => 220, + 'Û«' => 230, + 'Û¬' => 230, + 'Û­' => 220, + 'Ü‘' => 36, + 'Ü°' => 230, + 'ܱ' => 220, + 'ܲ' => 230, + 'ܳ' => 230, + 'Ü´' => 220, + 'ܵ' => 230, + 'ܶ' => 230, + 'Ü·' => 220, + 'ܸ' => 220, + 'ܹ' => 220, + 'ܺ' => 230, + 'Ü»' => 220, + 'ܼ' => 220, + 'ܽ' => 230, + 'ܾ' => 220, + 'Ü¿' => 230, + 'Ý€' => 230, + 'Ý' => 230, + 'Ý‚' => 220, + '݃' => 230, + 'Ý„' => 220, + 'Ý…' => 230, + '݆' => 220, + '݇' => 230, + '݈' => 220, + '݉' => 230, + 'ÝŠ' => 230, + 'ß«' => 230, + '߬' => 230, + 'ß­' => 230, + 'ß®' => 230, + '߯' => 230, + 'ß°' => 230, + 'ß±' => 230, + 'ß²' => 220, + 'ß³' => 230, + 'ß½' => 220, + 'à –' => 230, + 'à —' => 230, + 'à ˜' => 230, + 'à ™' => 230, + 'à ›' => 230, + 'à œ' => 230, + 'à ' => 230, + 'à ž' => 230, + 'à Ÿ' => 230, + 'à  ' => 230, + 'à ¡' => 230, + 'à ¢' => 230, + 'à £' => 230, + 'à ¥' => 230, + 'à ¦' => 230, + 'à §' => 230, + 'à ©' => 230, + 'à ª' => 230, + 'à «' => 230, + 'à ¬' => 230, + 'à ­' => 230, + 'à¡™' => 220, + 'à¡š' => 220, + 'à¡›' => 220, + '࣓' => 220, + 'ࣔ' => 230, + 'ࣕ' => 230, + 'ࣖ' => 230, + 'ࣗ' => 230, + 'ࣘ' => 230, + 'ࣙ' => 230, + 'ࣚ' => 230, + 'ࣛ' => 230, + 'ࣜ' => 230, + 'à£' => 230, + 'ࣞ' => 230, + 'ࣟ' => 230, + '࣠' => 230, + '࣡' => 230, + 'ࣣ' => 220, + 'ࣤ' => 230, + 'ࣥ' => 230, + 'ࣦ' => 220, + 'ࣧ' => 230, + 'ࣨ' => 230, + 'ࣩ' => 220, + '࣪' => 230, + '࣫' => 230, + '࣬' => 230, + '࣭' => 220, + '࣮' => 220, + '࣯' => 220, + 'ࣰ' => 27, + 'ࣱ' => 28, + 'ࣲ' => 29, + 'ࣳ' => 230, + 'ࣴ' => 230, + 'ࣵ' => 230, + 'ࣶ' => 220, + 'ࣷ' => 230, + 'ࣸ' => 230, + 'ࣹ' => 220, + 'ࣺ' => 220, + 'ࣻ' => 230, + 'ࣼ' => 230, + 'ࣽ' => 230, + 'ࣾ' => 230, + 'ࣿ' => 230, + '़' => 7, + 'à¥' => 9, + '॑' => 230, + '॒' => 220, + '॓' => 230, + '॔' => 230, + '়' => 7, + 'à§' => 9, + '৾' => 230, + '਼' => 7, + 'à©' => 9, + '઼' => 7, + 'à«' => 9, + '଼' => 7, + 'à­' => 9, + 'à¯' => 9, + 'à±' => 9, + 'ౕ' => 84, + 'à±–' => 91, + '಼' => 7, + 'à³' => 9, + 'à´»' => 9, + 'à´¼' => 9, + 'àµ' => 9, + 'à·Š' => 9, + 'ุ' => 103, + 'ู' => 103, + 'ฺ' => 9, + '่' => 107, + '้' => 107, + '๊' => 107, + '๋' => 107, + 'ຸ' => 118, + 'ູ' => 118, + '຺' => 9, + '່' => 122, + '້' => 122, + '໊' => 122, + '໋' => 122, + '༘' => 220, + '༙' => 220, + '༵' => 220, + '༷' => 220, + '༹' => 216, + 'ཱ' => 129, + 'ི' => 130, + 'ུ' => 132, + 'ེ' => 130, + 'ཻ' => 130, + 'ོ' => 130, + 'ཽ' => 130, + 'ྀ' => 130, + 'ྂ' => 230, + 'ྃ' => 230, + '྄' => 9, + '྆' => 230, + '྇' => 230, + '࿆' => 220, + '့' => 7, + '္' => 9, + '်' => 9, + 'á‚' => 220, + 'á' => 230, + 'áž' => 230, + 'áŸ' => 230, + '᜔' => 9, + '᜴' => 9, + '្' => 9, + 'áŸ' => 230, + 'ᢩ' => 228, + '᤹' => 222, + '᤺' => 230, + '᤻' => 220, + 'ᨗ' => 230, + 'ᨘ' => 220, + 'á© ' => 9, + '᩵' => 230, + '᩶' => 230, + 'á©·' => 230, + '᩸' => 230, + '᩹' => 230, + '᩺' => 230, + 'á©»' => 230, + '᩼' => 230, + 'á©¿' => 220, + '᪰' => 230, + '᪱' => 230, + '᪲' => 230, + '᪳' => 230, + '᪴' => 230, + '᪵' => 220, + '᪶' => 220, + '᪷' => 220, + '᪸' => 220, + '᪹' => 220, + '᪺' => 220, + '᪻' => 230, + '᪼' => 230, + '᪽' => 220, + 'ᪿ' => 220, + 'á«€' => 220, + '᬴' => 7, + 'á­„' => 9, + 'á­«' => 230, + 'á­¬' => 220, + 'á­­' => 230, + 'á­®' => 230, + 'á­¯' => 230, + 'á­°' => 230, + 'á­±' => 230, + 'á­²' => 230, + 'á­³' => 230, + '᮪' => 9, + '᮫' => 9, + '᯦' => 7, + '᯲' => 9, + '᯳' => 9, + 'á°·' => 7, + 'á³' => 230, + '᳑' => 230, + 'á³’' => 230, + 'á³”' => 1, + '᳕' => 220, + 'á³–' => 220, + 'á³—' => 220, + '᳘' => 220, + 'á³™' => 220, + '᳚' => 230, + 'á³›' => 230, + '᳜' => 220, + 'á³' => 220, + '᳞' => 220, + '᳟' => 220, + 'á³ ' => 230, + 'á³¢' => 1, + 'á³£' => 1, + '᳤' => 1, + 'á³¥' => 1, + '᳦' => 1, + '᳧' => 1, + '᳨' => 1, + 'á³­' => 220, + 'á³´' => 230, + '᳸' => 230, + 'á³¹' => 230, + 'á·€' => 230, + 'á·' => 230, + 'á·‚' => 220, + 'á·ƒ' => 230, + 'á·„' => 230, + 'á·…' => 230, + 'á·†' => 230, + 'á·‡' => 230, + 'á·ˆ' => 230, + 'á·‰' => 230, + 'á·Š' => 220, + 'á·‹' => 230, + 'á·Œ' => 230, + 'á·' => 234, + 'á·Ž' => 214, + 'á·' => 220, + 'á·' => 202, + 'á·‘' => 230, + 'á·’' => 230, + 'á·“' => 230, + 'á·”' => 230, + 'á·•' => 230, + 'á·–' => 230, + 'á·—' => 230, + 'á·˜' => 230, + 'á·™' => 230, + 'á·š' => 230, + 'á·›' => 230, + 'á·œ' => 230, + 'á·' => 230, + 'á·ž' => 230, + 'á·Ÿ' => 230, + 'á· ' => 230, + 'á·¡' => 230, + 'á·¢' => 230, + 'á·£' => 230, + 'á·¤' => 230, + 'á·¥' => 230, + 'á·¦' => 230, + 'á·§' => 230, + 'á·¨' => 230, + 'á·©' => 230, + 'á·ª' => 230, + 'á·«' => 230, + 'á·¬' => 230, + 'á·­' => 230, + 'á·®' => 230, + 'á·¯' => 230, + 'á·°' => 230, + 'á·±' => 230, + 'á·²' => 230, + 'á·³' => 230, + 'á·´' => 230, + 'á·µ' => 230, + 'á·¶' => 232, + 'á··' => 228, + 'á·¸' => 228, + 'á·¹' => 220, + 'á·»' => 230, + 'á·¼' => 233, + 'á·½' => 220, + 'á·¾' => 230, + 'á·¿' => 220, + 'âƒ' => 230, + '⃑' => 230, + '⃒' => 1, + '⃓' => 1, + '⃔' => 230, + '⃕' => 230, + '⃖' => 230, + '⃗' => 230, + '⃘' => 1, + '⃙' => 1, + '⃚' => 1, + '⃛' => 230, + '⃜' => 230, + '⃡' => 230, + '⃥' => 1, + '⃦' => 1, + '⃧' => 230, + '⃨' => 220, + '⃩' => 230, + '⃪' => 1, + '⃫' => 1, + '⃬' => 220, + '⃭' => 220, + '⃮' => 220, + '⃯' => 220, + '⃰' => 230, + '⳯' => 230, + 'â³°' => 230, + 'â³±' => 230, + '⵿' => 9, + 'â· ' => 230, + 'â·¡' => 230, + 'â·¢' => 230, + 'â·£' => 230, + 'â·¤' => 230, + 'â·¥' => 230, + 'â·¦' => 230, + 'â·§' => 230, + 'â·¨' => 230, + 'â·©' => 230, + 'â·ª' => 230, + 'â·«' => 230, + 'â·¬' => 230, + 'â·­' => 230, + 'â·®' => 230, + 'â·¯' => 230, + 'â·°' => 230, + 'â·±' => 230, + 'â·²' => 230, + 'â·³' => 230, + 'â·´' => 230, + 'â·µ' => 230, + 'â·¶' => 230, + 'â··' => 230, + 'â·¸' => 230, + 'â·¹' => 230, + 'â·º' => 230, + 'â·»' => 230, + 'â·¼' => 230, + 'â·½' => 230, + 'â·¾' => 230, + 'â·¿' => 230, + '〪' => 218, + '〫' => 228, + '〬' => 232, + '〭' => 222, + '〮' => 224, + '〯' => 224, + 'ã‚™' => 8, + 'ã‚š' => 8, + '꙯' => 230, + 'ê™´' => 230, + 'ꙵ' => 230, + 'ꙶ' => 230, + 'ê™·' => 230, + 'ꙸ' => 230, + 'ꙹ' => 230, + 'ꙺ' => 230, + 'ê™»' => 230, + '꙼' => 230, + '꙽' => 230, + 'êšž' => 230, + 'ꚟ' => 230, + 'ê›°' => 230, + 'ê›±' => 230, + 'ê †' => 9, + 'ê ¬' => 9, + '꣄' => 9, + '꣠' => 230, + '꣡' => 230, + '꣢' => 230, + '꣣' => 230, + '꣤' => 230, + '꣥' => 230, + '꣦' => 230, + '꣧' => 230, + '꣨' => 230, + '꣩' => 230, + '꣪' => 230, + '꣫' => 230, + '꣬' => 230, + '꣭' => 230, + '꣮' => 230, + '꣯' => 230, + '꣰' => 230, + '꣱' => 230, + '꤫' => 220, + '꤬' => 220, + '꤭' => 220, + '꥓' => 9, + '꦳' => 7, + '꧀' => 9, + 'ꪰ' => 230, + 'ꪲ' => 230, + 'ꪳ' => 230, + 'ꪴ' => 220, + 'ꪷ' => 230, + 'ꪸ' => 230, + 'ꪾ' => 230, + '꪿' => 230, + 'ê«' => 230, + '꫶' => 9, + '꯭' => 9, + 'ﬞ' => 26, + '︠' => 230, + '︡' => 230, + '︢' => 230, + '︣' => 230, + '︤' => 230, + '︥' => 230, + '︦' => 230, + '︧' => 220, + '︨' => 220, + '︩' => 220, + '︪' => 220, + '︫' => 220, + '︬' => 220, + '︭' => 220, + '︮' => 230, + '︯' => 230, + 'ð‡½' => 220, + 'ð‹ ' => 220, + 'ð¶' => 230, + 'ð·' => 230, + 'ð¸' => 230, + 'ð¹' => 230, + 'ðº' => 230, + 'ð¨' => 220, + 'ð¨' => 230, + 'ð¨¸' => 230, + 'ð¨¹' => 1, + 'ð¨º' => 220, + 'ð¨¿' => 9, + 'ð«¥' => 230, + 'ð«¦' => 220, + 'ð´¤' => 230, + 'ð´¥' => 230, + 'ð´¦' => 230, + 'ð´§' => 230, + 'ðº«' => 230, + 'ðº¬' => 230, + 'ð½†' => 220, + 'ð½‡' => 220, + 'ð½ˆ' => 230, + 'ð½‰' => 230, + 'ð½Š' => 230, + 'ð½‹' => 220, + 'ð½Œ' => 230, + 'ð½' => 220, + 'ð½Ž' => 220, + 'ð½' => 220, + 'ð½' => 220, + 'ð‘†' => 9, + 'ð‘¿' => 9, + 'ð‘‚¹' => 9, + '𑂺' => 7, + 'ð‘„€' => 230, + 'ð‘„' => 230, + 'ð‘„‚' => 230, + 'ð‘„³' => 9, + 'ð‘„´' => 9, + 'ð‘…³' => 7, + '𑇀' => 9, + '𑇊' => 7, + '𑈵' => 9, + '𑈶' => 7, + 'ð‘‹©' => 7, + '𑋪' => 9, + '𑌻' => 7, + '𑌼' => 7, + 'ð‘' => 9, + 'ð‘¦' => 230, + 'ð‘§' => 230, + 'ð‘¨' => 230, + 'ð‘©' => 230, + 'ð‘ª' => 230, + 'ð‘«' => 230, + 'ð‘¬' => 230, + 'ð‘°' => 230, + 'ð‘±' => 230, + 'ð‘²' => 230, + 'ð‘³' => 230, + 'ð‘´' => 230, + 'ð‘‘‚' => 9, + '𑑆' => 7, + 'ð‘‘ž' => 230, + 'ð‘“‚' => 9, + '𑓃' => 7, + 'ð‘–¿' => 9, + 'ð‘—€' => 7, + '𑘿' => 9, + '𑚶' => 9, + 'ð‘š·' => 7, + '𑜫' => 9, + 'ð‘ ¹' => 9, + 'ð‘ º' => 7, + '𑤽' => 9, + '𑤾' => 9, + '𑥃' => 7, + '𑧠' => 9, + '𑨴' => 9, + '𑩇' => 9, + '𑪙' => 9, + 'ð‘°¿' => 9, + '𑵂' => 7, + '𑵄' => 9, + '𑵅' => 9, + '𑶗' => 9, + 'ð–«°' => 1, + 'ð–«±' => 1, + 'ð–«²' => 1, + 'ð–«³' => 1, + 'ð–«´' => 1, + 'ð–¬°' => 230, + '𖬱' => 230, + '𖬲' => 230, + '𖬳' => 230, + 'ð–¬´' => 230, + '𖬵' => 230, + '𖬶' => 230, + 'ð–¿°' => 6, + 'ð–¿±' => 6, + '𛲞' => 1, + 'ð…¥' => 216, + 'ð…¦' => 216, + 'ð…§' => 1, + 'ð…¨' => 1, + 'ð…©' => 1, + 'ð…­' => 226, + 'ð…®' => 216, + 'ð…¯' => 216, + 'ð…°' => 216, + 'ð…±' => 216, + 'ð…²' => 216, + 'ð…»' => 220, + 'ð…¼' => 220, + 'ð…½' => 220, + 'ð…¾' => 220, + 'ð…¿' => 220, + 'ð†€' => 220, + 'ð†' => 220, + 'ð†‚' => 220, + 'ð†…' => 230, + 'ð††' => 230, + 'ð†‡' => 230, + 'ð†ˆ' => 230, + 'ð†‰' => 230, + 'ð†Š' => 220, + 'ð†‹' => 220, + 'ð†ª' => 230, + 'ð†«' => 230, + 'ð†¬' => 230, + 'ð†­' => 230, + 'ð‰‚' => 230, + 'ð‰ƒ' => 230, + 'ð‰„' => 230, + '𞀀' => 230, + 'ðž€' => 230, + '𞀂' => 230, + '𞀃' => 230, + '𞀄' => 230, + '𞀅' => 230, + '𞀆' => 230, + '𞀈' => 230, + '𞀉' => 230, + '𞀊' => 230, + '𞀋' => 230, + '𞀌' => 230, + 'ðž€' => 230, + '𞀎' => 230, + 'ðž€' => 230, + 'ðž€' => 230, + '𞀑' => 230, + '𞀒' => 230, + '𞀓' => 230, + '𞀔' => 230, + '𞀕' => 230, + '𞀖' => 230, + '𞀗' => 230, + '𞀘' => 230, + '𞀛' => 230, + '𞀜' => 230, + 'ðž€' => 230, + '𞀞' => 230, + '𞀟' => 230, + '𞀠' => 230, + '𞀡' => 230, + '𞀣' => 230, + '𞀤' => 230, + '𞀦' => 230, + '𞀧' => 230, + '𞀨' => 230, + '𞀩' => 230, + '𞀪' => 230, + 'ðž„°' => 230, + '𞄱' => 230, + '𞄲' => 230, + '𞄳' => 230, + 'ðž„´' => 230, + '𞄵' => 230, + '𞄶' => 230, + '𞋬' => 230, + 'ðž‹­' => 230, + 'ðž‹®' => 230, + '𞋯' => 230, + 'ðž£' => 220, + '𞣑' => 220, + '𞣒' => 220, + '𞣓' => 220, + '𞣔' => 220, + '𞣕' => 220, + '𞣖' => 220, + '𞥄' => 230, + '𞥅' => 230, + '𞥆' => 230, + '𞥇' => 230, + '𞥈' => 230, + '𞥉' => 230, + '𞥊' => 7, +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php new file mode 100644 index 00000000..15749028 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/Resources/unidata/compatibilityDecomposition.php @@ -0,0 +1,3695 @@ + ' ', + '¨' => ' ̈', + 'ª' => 'a', + '¯' => ' Ì„', + '²' => '2', + '³' => '3', + '´' => ' Ì', + 'µ' => 'μ', + '¸' => ' ̧', + '¹' => '1', + 'º' => 'o', + '¼' => '1â„4', + '½' => '1â„2', + '¾' => '3â„4', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ä¿' => 'L·', + 'Å€' => 'l·', + 'ʼn' => 'ʼn', + 'Å¿' => 's', + 'Ç„' => 'DZÌŒ', + 'Ç…' => 'DzÌŒ', + 'dž' => 'dzÌŒ', + 'LJ' => 'LJ', + 'Lj' => 'Lj', + 'lj' => 'lj', + 'ÇŠ' => 'NJ', + 'Ç‹' => 'Nj', + 'ÇŒ' => 'nj', + 'DZ' => 'DZ', + 'Dz' => 'Dz', + 'dz' => 'dz', + 'Ê°' => 'h', + 'ʱ' => 'ɦ', + 'ʲ' => 'j', + 'ʳ' => 'r', + 'Ê´' => 'ɹ', + 'ʵ' => 'É»', + 'ʶ' => 'Ê', + 'Ê·' => 'w', + 'ʸ' => 'y', + '˘' => ' ̆', + 'Ë™' => ' ̇', + 'Ëš' => ' ÌŠ', + 'Ë›' => ' ̨', + 'Ëœ' => ' ̃', + 'Ë' => ' Ì‹', + 'Ë ' => 'É£', + 'Ë¡' => 'l', + 'Ë¢' => 's', + 'Ë£' => 'x', + 'ˤ' => 'Ê•', + 'ͺ' => ' Í…', + '΄' => ' Ì', + 'Î…' => ' ̈Ì', + 'Ï' => 'β', + 'Ï‘' => 'θ', + 'Ï’' => 'Î¥', + 'Ï“' => 'Î¥Ì', + 'Ï”' => 'Ϋ', + 'Ï•' => 'φ', + 'Ï–' => 'Ï€', + 'Ï°' => 'κ', + 'ϱ' => 'Ï', + 'ϲ' => 'Ï‚', + 'Ï´' => 'Θ', + 'ϵ' => 'ε', + 'Ϲ' => 'Σ', + 'Ö‡' => 'Õ¥Ö‚', + 'Ùµ' => 'اٴ', + 'Ù¶' => 'وٴ', + 'Ù·' => 'Û‡Ù´', + 'Ù¸' => 'يٴ', + 'ำ' => 'à¹à¸²', + 'ຳ' => 'à»àº²', + 'ໜ' => 'ຫນ', + 'à»' => 'ຫມ', + '༌' => '་', + 'ཷ' => 'ྲཱྀ', + 'ཹ' => 'ླཱྀ', + 'ჼ' => 'ნ', + 'á´¬' => 'A', + 'á´­' => 'Æ', + 'á´®' => 'B', + 'á´°' => 'D', + 'á´±' => 'E', + 'á´²' => 'ÆŽ', + 'á´³' => 'G', + 'á´´' => 'H', + 'á´µ' => 'I', + 'á´¶' => 'J', + 'á´·' => 'K', + 'á´¸' => 'L', + 'á´¹' => 'M', + 'á´º' => 'N', + 'á´¼' => 'O', + 'á´½' => 'È¢', + 'á´¾' => 'P', + 'á´¿' => 'R', + 'áµ€' => 'T', + 'áµ' => 'U', + 'ᵂ' => 'W', + 'ᵃ' => 'a', + 'ᵄ' => 'É', + 'áµ…' => 'É‘', + 'ᵆ' => 'á´‚', + 'ᵇ' => 'b', + 'ᵈ' => 'd', + 'ᵉ' => 'e', + 'ᵊ' => 'É™', + 'ᵋ' => 'É›', + 'ᵌ' => 'Éœ', + 'áµ' => 'g', + 'áµ' => 'k', + 'áµ' => 'm', + 'ᵑ' => 'Å‹', + 'áµ’' => 'o', + 'ᵓ' => 'É”', + 'áµ”' => 'á´–', + 'ᵕ' => 'á´—', + 'áµ–' => 'p', + 'áµ—' => 't', + 'ᵘ' => 'u', + 'áµ™' => 'á´', + 'ᵚ' => 'ɯ', + 'áµ›' => 'v', + 'ᵜ' => 'á´¥', + 'áµ' => 'β', + 'ᵞ' => 'γ', + 'ᵟ' => 'δ', + 'áµ ' => 'φ', + 'ᵡ' => 'χ', + 'áµ¢' => 'i', + 'áµ£' => 'r', + 'ᵤ' => 'u', + 'áµ¥' => 'v', + 'ᵦ' => 'β', + 'ᵧ' => 'γ', + 'ᵨ' => 'Ï', + 'ᵩ' => 'φ', + 'ᵪ' => 'χ', + 'ᵸ' => 'н', + 'ᶛ' => 'É’', + 'ᶜ' => 'c', + 'á¶' => 'É•', + 'ᶞ' => 'ð', + 'ᶟ' => 'Éœ', + 'ᶠ' => 'f', + 'ᶡ' => 'ÉŸ', + 'ᶢ' => 'É¡', + 'ᶣ' => 'É¥', + 'ᶤ' => 'ɨ', + 'ᶥ' => 'É©', + 'ᶦ' => 'ɪ', + 'ᶧ' => 'áµ»', + 'ᶨ' => 'Ê', + 'ᶩ' => 'É­', + 'ᶪ' => 'ᶅ', + 'ᶫ' => 'ÊŸ', + 'ᶬ' => 'ɱ', + 'ᶭ' => 'É°', + 'ᶮ' => 'ɲ', + 'ᶯ' => 'ɳ', + 'ᶰ' => 'É´', + 'ᶱ' => 'ɵ', + 'ᶲ' => 'ɸ', + 'ᶳ' => 'Ê‚', + 'ᶴ' => 'ʃ', + 'ᶵ' => 'Æ«', + 'ᶶ' => 'ʉ', + 'ᶷ' => 'ÊŠ', + 'ᶸ' => 'á´œ', + 'ᶹ' => 'Ê‹', + 'ᶺ' => 'ÊŒ', + 'ᶻ' => 'z', + 'ᶼ' => 'Ê', + 'ᶽ' => 'Ê‘', + 'ᶾ' => 'Ê’', + 'ᶿ' => 'θ', + 'ẚ' => 'aʾ', + 'ẛ' => 'ṡ', + 'á¾½' => ' Ì“', + '᾿' => ' Ì“', + 'á¿€' => ' Í‚', + 'á¿' => ' ̈͂', + 'á¿' => ' Ì“Ì€', + 'á¿Ž' => ' Ì“Ì', + 'á¿' => ' Ì“Í‚', + 'á¿' => ' ̔̀', + 'á¿ž' => ' Ì”Ì', + 'á¿Ÿ' => ' ̔͂', + 'á¿­' => ' ̈̀', + 'á¿®' => ' ̈Ì', + '´' => ' Ì', + '῾' => ' Ì”', + ' ' => ' ', + 'â€' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + ' ' => ' ', + '‑' => 'â€', + '‗' => ' ̳', + '․' => '.', + '‥' => '..', + '…' => '...', + ' ' => ' ', + '″' => '′′', + '‴' => '′′′', + '‶' => '‵‵', + '‷' => '‵‵‵', + '‼' => '!!', + '‾' => ' Ì…', + 'â‡' => '??', + 'âˆ' => '?!', + 'â‰' => '!?', + 'â—' => '′′′′', + 'âŸ' => ' ', + 'â°' => '0', + 'â±' => 'i', + 'â´' => '4', + 'âµ' => '5', + 'â¶' => '6', + 'â·' => '7', + 'â¸' => '8', + 'â¹' => '9', + 'âº' => '+', + 'â»' => '−', + 'â¼' => '=', + 'â½' => '(', + 'â¾' => ')', + 'â¿' => 'n', + 'â‚€' => '0', + 'â‚' => '1', + 'â‚‚' => '2', + '₃' => '3', + 'â‚„' => '4', + 'â‚…' => '5', + '₆' => '6', + '₇' => '7', + '₈' => '8', + '₉' => '9', + 'â‚Š' => '+', + 'â‚‹' => '−', + 'â‚Œ' => '=', + 'â‚' => '(', + 'â‚Ž' => ')', + 'â‚' => 'a', + 'â‚‘' => 'e', + 'â‚’' => 'o', + 'â‚“' => 'x', + 'â‚”' => 'É™', + 'â‚•' => 'h', + 'â‚–' => 'k', + 'â‚—' => 'l', + 'ₘ' => 'm', + 'â‚™' => 'n', + 'â‚š' => 'p', + 'â‚›' => 's', + 'â‚œ' => 't', + '₨' => 'Rs', + 'â„€' => 'a/c', + 'â„' => 'a/s', + 'â„‚' => 'C', + '℃' => '°C', + 'â„…' => 'c/o', + '℆' => 'c/u', + 'ℇ' => 'Æ', + '℉' => '°F', + 'â„Š' => 'g', + 'â„‹' => 'H', + 'â„Œ' => 'H', + 'â„' => 'H', + 'â„Ž' => 'h', + 'â„' => 'ħ', + 'â„' => 'I', + 'â„‘' => 'I', + 'â„’' => 'L', + 'â„“' => 'l', + 'â„•' => 'N', + 'â„–' => 'No', + 'â„™' => 'P', + 'â„š' => 'Q', + 'â„›' => 'R', + 'â„œ' => 'R', + 'â„' => 'R', + 'â„ ' => 'SM', + 'â„¡' => 'TEL', + 'â„¢' => 'TM', + 'ℤ' => 'Z', + 'ℨ' => 'Z', + 'ℬ' => 'B', + 'â„­' => 'C', + 'ℯ' => 'e', + 'â„°' => 'E', + 'ℱ' => 'F', + 'ℳ' => 'M', + 'â„´' => 'o', + 'ℵ' => '×', + 'ℶ' => 'ב', + 'â„·' => '×’', + 'ℸ' => 'ד', + 'ℹ' => 'i', + 'â„»' => 'FAX', + 'ℼ' => 'Ï€', + 'ℽ' => 'γ', + 'ℾ' => 'Γ', + 'â„¿' => 'Π', + 'â…€' => '∑', + 'â……' => 'D', + 'â…†' => 'd', + 'â…‡' => 'e', + 'â…ˆ' => 'i', + 'â…‰' => 'j', + 'â…' => '1â„7', + 'â…‘' => '1â„9', + 'â…’' => '1â„10', + 'â…“' => '1â„3', + 'â…”' => '2â„3', + 'â…•' => '1â„5', + 'â…–' => '2â„5', + 'â…—' => '3â„5', + 'â…˜' => '4â„5', + 'â…™' => '1â„6', + 'â…š' => '5â„6', + 'â…›' => '1â„8', + 'â…œ' => '3â„8', + 'â…' => '5â„8', + 'â…ž' => '7â„8', + 'â…Ÿ' => '1â„', + 'â… ' => 'I', + 'â…¡' => 'II', + 'â…¢' => 'III', + 'â…£' => 'IV', + 'â…¤' => 'V', + 'â…¥' => 'VI', + 'â…¦' => 'VII', + 'â…§' => 'VIII', + 'â…¨' => 'IX', + 'â…©' => 'X', + 'â…ª' => 'XI', + 'â…«' => 'XII', + 'â…¬' => 'L', + 'â…­' => 'C', + 'â…®' => 'D', + 'â…¯' => 'M', + 'â…°' => 'i', + 'â…±' => 'ii', + 'â…²' => 'iii', + 'â…³' => 'iv', + 'â…´' => 'v', + 'â…µ' => 'vi', + 'â…¶' => 'vii', + 'â…·' => 'viii', + 'â…¸' => 'ix', + 'â…¹' => 'x', + 'â…º' => 'xi', + 'â…»' => 'xii', + 'â…¼' => 'l', + 'â…½' => 'c', + 'â…¾' => 'd', + 'â…¿' => 'm', + '↉' => '0â„3', + '∬' => '∫∫', + '∭' => '∫∫∫', + '∯' => '∮∮', + '∰' => '∮∮∮', + 'â‘ ' => '1', + 'â‘¡' => '2', + 'â‘¢' => '3', + 'â‘£' => '4', + '⑤' => '5', + 'â‘¥' => '6', + '⑦' => '7', + '⑧' => '8', + '⑨' => '9', + 'â‘©' => '10', + '⑪' => '11', + 'â‘«' => '12', + '⑬' => '13', + 'â‘­' => '14', + 'â‘®' => '15', + '⑯' => '16', + 'â‘°' => '17', + '⑱' => '18', + '⑲' => '19', + '⑳' => '20', + 'â‘´' => '(1)', + '⑵' => '(2)', + '⑶' => '(3)', + 'â‘·' => '(4)', + '⑸' => '(5)', + '⑹' => '(6)', + '⑺' => '(7)', + 'â‘»' => '(8)', + '⑼' => '(9)', + '⑽' => '(10)', + '⑾' => '(11)', + 'â‘¿' => '(12)', + 'â’€' => '(13)', + 'â’' => '(14)', + 'â’‚' => '(15)', + 'â’ƒ' => '(16)', + 'â’„' => '(17)', + 'â’…' => '(18)', + 'â’†' => '(19)', + 'â’‡' => '(20)', + 'â’ˆ' => '1.', + 'â’‰' => '2.', + 'â’Š' => '3.', + 'â’‹' => '4.', + 'â’Œ' => '5.', + 'â’' => '6.', + 'â’Ž' => '7.', + 'â’' => '8.', + 'â’' => '9.', + 'â’‘' => '10.', + 'â’’' => '11.', + 'â’“' => '12.', + 'â’”' => '13.', + 'â’•' => '14.', + 'â’–' => '15.', + 'â’—' => '16.', + 'â’˜' => '17.', + 'â’™' => '18.', + 'â’š' => '19.', + 'â’›' => '20.', + 'â’œ' => '(a)', + 'â’' => '(b)', + 'â’ž' => '(c)', + 'â’Ÿ' => '(d)', + 'â’ ' => '(e)', + 'â’¡' => '(f)', + 'â’¢' => '(g)', + 'â’£' => '(h)', + 'â’¤' => '(i)', + 'â’¥' => '(j)', + 'â’¦' => '(k)', + 'â’§' => '(l)', + 'â’¨' => '(m)', + 'â’©' => '(n)', + 'â’ª' => '(o)', + 'â’«' => '(p)', + 'â’¬' => '(q)', + 'â’­' => '(r)', + 'â’®' => '(s)', + 'â’¯' => '(t)', + 'â’°' => '(u)', + 'â’±' => '(v)', + 'â’²' => '(w)', + 'â’³' => '(x)', + 'â’´' => '(y)', + 'â’µ' => '(z)', + 'â’¶' => 'A', + 'â’·' => 'B', + 'â’¸' => 'C', + 'â’¹' => 'D', + 'â’º' => 'E', + 'â’»' => 'F', + 'â’¼' => 'G', + 'â’½' => 'H', + 'â’¾' => 'I', + 'â’¿' => 'J', + 'â“€' => 'K', + 'â“' => 'L', + 'â“‚' => 'M', + 'Ⓝ' => 'N', + 'â“„' => 'O', + 'â“…' => 'P', + 'Ⓠ' => 'Q', + 'Ⓡ' => 'R', + 'Ⓢ' => 'S', + 'Ⓣ' => 'T', + 'â“Š' => 'U', + 'â“‹' => 'V', + 'â“Œ' => 'W', + 'â“' => 'X', + 'â“Ž' => 'Y', + 'â“' => 'Z', + 'â“' => 'a', + 'â“‘' => 'b', + 'â“’' => 'c', + 'â““' => 'd', + 'â“”' => 'e', + 'â“•' => 'f', + 'â“–' => 'g', + 'â“—' => 'h', + 'ⓘ' => 'i', + 'â“™' => 'j', + 'â“š' => 'k', + 'â“›' => 'l', + 'â“œ' => 'm', + 'â“' => 'n', + 'â“ž' => 'o', + 'â“Ÿ' => 'p', + 'â“ ' => 'q', + 'â“¡' => 'r', + 'â“¢' => 's', + 'â“£' => 't', + 'ⓤ' => 'u', + 'â“¥' => 'v', + 'ⓦ' => 'w', + 'ⓧ' => 'x', + 'ⓨ' => 'y', + 'â“©' => 'z', + '⓪' => '0', + '⨌' => '∫∫∫∫', + 'â©´' => '::=', + '⩵' => '==', + '⩶' => '===', + 'â±¼' => 'j', + 'â±½' => 'V', + 'ⵯ' => 'ⵡ', + '⺟' => 'æ¯', + '⻳' => '龟', + 'â¼€' => '一', + 'â¼' => '丨', + '⼂' => '丶', + '⼃' => '丿', + '⼄' => 'ä¹™', + 'â¼…' => '亅', + '⼆' => '二', + '⼇' => '亠', + '⼈' => '人', + '⼉' => 'å„¿', + '⼊' => 'å…¥', + '⼋' => 'å…«', + '⼌' => '冂', + 'â¼' => '冖', + '⼎' => '冫', + 'â¼' => '几', + 'â¼' => '凵', + '⼑' => '刀', + 'â¼’' => '力', + '⼓' => '勹', + 'â¼”' => '匕', + '⼕' => '匚', + 'â¼–' => '匸', + 'â¼—' => 'å', + '⼘' => 'åœ', + 'â¼™' => 'å©', + '⼚' => '厂', + 'â¼›' => '厶', + '⼜' => 'åˆ', + 'â¼' => 'å£', + '⼞' => 'å›—', + '⼟' => '土', + 'â¼ ' => '士', + '⼡' => '夂', + 'â¼¢' => '夊', + 'â¼£' => '夕', + '⼤' => '大', + 'â¼¥' => '女', + '⼦' => 'å­', + '⼧' => '宀', + '⼨' => '寸', + '⼩' => 'å°', + '⼪' => 'å°¢', + '⼫' => 'å°¸', + '⼬' => 'å±®', + 'â¼­' => 'å±±', + 'â¼®' => 'å·›', + '⼯' => 'å·¥', + 'â¼°' => 'å·±', + 'â¼±' => 'å·¾', + 'â¼²' => 'å¹²', + 'â¼³' => '幺', + 'â¼´' => '广', + 'â¼µ' => 'å»´', + '⼶' => '廾', + 'â¼·' => '弋', + '⼸' => '弓', + 'â¼¹' => 'å½', + '⼺' => '彡', + 'â¼»' => 'å½³', + 'â¼¼' => '心', + 'â¼½' => '戈', + 'â¼¾' => '戶', + '⼿' => '手', + 'â½€' => '支', + 'â½' => 'æ”´', + '⽂' => 'æ–‡', + '⽃' => 'æ–—', + '⽄' => 'æ–¤', + 'â½…' => 'æ–¹', + '⽆' => 'æ— ', + '⽇' => 'æ—¥', + '⽈' => 'æ›°', + '⽉' => '月', + '⽊' => '木', + '⽋' => '欠', + '⽌' => 'æ­¢', + 'â½' => 'æ­¹', + '⽎' => '殳', + 'â½' => '毋', + 'â½' => '比', + '⽑' => '毛', + 'â½’' => 'æ°', + '⽓' => 'æ°”', + 'â½”' => 'æ°´', + '⽕' => 'ç«', + 'â½–' => '爪', + 'â½—' => '父', + '⽘' => '爻', + 'â½™' => '爿', + '⽚' => '片', + 'â½›' => '牙', + '⽜' => '牛', + 'â½' => '犬', + '⽞' => '玄', + '⽟' => '玉', + 'â½ ' => 'ç“œ', + '⽡' => '瓦', + 'â½¢' => '甘', + 'â½£' => '生', + '⽤' => '用', + 'â½¥' => 'ç”°', + '⽦' => 'ç–‹', + '⽧' => 'ç–’', + '⽨' => '癶', + '⽩' => '白', + '⽪' => 'çš®', + '⽫' => 'çš¿', + '⽬' => 'ç›®', + 'â½­' => '矛', + 'â½®' => '矢', + '⽯' => '石', + 'â½°' => '示', + 'â½±' => '禸', + 'â½²' => '禾', + 'â½³' => 'ç©´', + 'â½´' => 'ç«‹', + 'â½µ' => '竹', + '⽶' => 'ç±³', + 'â½·' => '糸', + '⽸' => '缶', + 'â½¹' => '网', + '⽺' => '羊', + 'â½»' => 'ç¾½', + 'â½¼' => 'è€', + 'â½½' => '而', + 'â½¾' => '耒', + '⽿' => '耳', + 'â¾€' => 'è¿', + 'â¾' => '肉', + '⾂' => '臣', + '⾃' => '自', + '⾄' => '至', + 'â¾…' => '臼', + '⾆' => '舌', + '⾇' => '舛', + '⾈' => '舟', + '⾉' => '艮', + '⾊' => '色', + '⾋' => '艸', + '⾌' => 'è™', + 'â¾' => '虫', + '⾎' => 'è¡€', + 'â¾' => 'è¡Œ', + 'â¾' => 'è¡£', + '⾑' => '襾', + 'â¾’' => '見', + '⾓' => '角', + 'â¾”' => '言', + '⾕' => 'è°·', + 'â¾–' => '豆', + 'â¾—' => '豕', + '⾘' => '豸', + 'â¾™' => 'è²', + '⾚' => '赤', + 'â¾›' => 'èµ°', + '⾜' => '足', + 'â¾' => '身', + '⾞' => '車', + '⾟' => 'è¾›', + 'â¾ ' => 'è¾°', + '⾡' => 'è¾µ', + 'â¾¢' => 'é‚‘', + 'â¾£' => 'é…‰', + '⾤' => '釆', + 'â¾¥' => '里', + '⾦' => '金', + '⾧' => 'é•·', + '⾨' => 'é–€', + '⾩' => '阜', + '⾪' => '隶', + '⾫' => 'éš¹', + '⾬' => '雨', + 'â¾­' => 'é‘', + 'â¾®' => 'éž', + '⾯' => 'é¢', + 'â¾°' => 'é©', + 'â¾±' => '韋', + 'â¾²' => '韭', + 'â¾³' => '音', + 'â¾´' => 'é ', + 'â¾µ' => '風', + '⾶' => '飛', + 'â¾·' => '食', + '⾸' => '首', + 'â¾¹' => '香', + '⾺' => '馬', + 'â¾»' => '骨', + 'â¾¼' => '高', + 'â¾½' => 'é«Ÿ', + 'â¾¾' => '鬥', + '⾿' => '鬯', + 'â¿€' => '鬲', + 'â¿' => '鬼', + 'â¿‚' => 'é­š', + '⿃' => 'é³¥', + 'â¿„' => 'é¹µ', + 'â¿…' => '鹿', + '⿆' => '麥', + '⿇' => '麻', + '⿈' => '黃', + '⿉' => 'é»', + 'â¿Š' => '黑', + 'â¿‹' => '黹', + 'â¿Œ' => '黽', + 'â¿' => '鼎', + 'â¿Ž' => '鼓', + 'â¿' => 'é¼ ', + 'â¿' => 'é¼»', + 'â¿‘' => '齊', + 'â¿’' => 'é½’', + 'â¿“' => 'é¾', + 'â¿”' => '龜', + 'â¿•' => 'é¾ ', + ' ' => ' ', + '〶' => '〒', + '〸' => 'å', + '〹' => 'å„', + '〺' => 'å…', + 'ã‚›' => ' ã‚™', + 'ã‚œ' => ' ã‚š', + 'ã‚Ÿ' => 'より', + 'ヿ' => 'コト', + 'ㄱ' => 'á„€', + 'ㄲ' => 'á„', + 'ㄳ' => 'ᆪ', + 'ã„´' => 'á„‚', + 'ㄵ' => 'ᆬ', + 'ㄶ' => 'ᆭ', + 'ã„·' => 'ᄃ', + 'ㄸ' => 'á„„', + 'ㄹ' => 'á„…', + 'ㄺ' => 'ᆰ', + 'ã„»' => 'ᆱ', + 'ㄼ' => 'ᆲ', + 'ㄽ' => 'ᆳ', + 'ㄾ' => 'ᆴ', + 'ã„¿' => 'ᆵ', + 'ã…€' => 'á„š', + 'ã…' => 'ᄆ', + 'ã…‚' => 'ᄇ', + 'ã…ƒ' => 'ᄈ', + 'ã…„' => 'á„¡', + 'ã……' => 'ᄉ', + 'ã…†' => 'á„Š', + 'ã…‡' => 'á„‹', + 'ã…ˆ' => 'á„Œ', + 'ã…‰' => 'á„', + 'ã…Š' => 'á„Ž', + 'ã…‹' => 'á„', + 'ã…Œ' => 'á„', + 'ã…' => 'á„‘', + 'ã…Ž' => 'á„’', + 'ã…' => 'á…¡', + 'ã…' => 'á…¢', + 'ã…‘' => 'á…£', + 'ã…’' => 'á…¤', + 'ã…“' => 'á…¥', + 'ã…”' => 'á…¦', + 'ã…•' => 'á…§', + 'ã…–' => 'á…¨', + 'ã…—' => 'á…©', + 'ã…˜' => 'á…ª', + 'ã…™' => 'á…«', + 'ã…š' => 'á…¬', + 'ã…›' => 'á…­', + 'ã…œ' => 'á…®', + 'ã…' => 'á…¯', + 'ã…ž' => 'á…°', + 'ã…Ÿ' => 'á…±', + 'ã… ' => 'á…²', + 'ã…¡' => 'á…³', + 'ã…¢' => 'á…´', + 'ã…£' => 'á…µ', + 'ã…¤' => 'á… ', + 'ã…¥' => 'á„”', + 'ã…¦' => 'á„•', + 'ã…§' => 'ᇇ', + 'ã…¨' => 'ᇈ', + 'ã…©' => 'ᇌ', + 'ã…ª' => 'ᇎ', + 'ã…«' => 'ᇓ', + 'ã…¬' => 'ᇗ', + 'ã…­' => 'ᇙ', + 'ã…®' => 'á„œ', + 'ã…¯' => 'á‡', + 'ã…°' => 'ᇟ', + 'ã…±' => 'á„', + 'ã…²' => 'á„ž', + 'ã…³' => 'á„ ', + 'ã…´' => 'á„¢', + 'ã…µ' => 'á„£', + 'ã…¶' => 'ᄧ', + 'ã…·' => 'á„©', + 'ã…¸' => 'á„«', + 'ã…¹' => 'ᄬ', + 'ã…º' => 'á„­', + 'ã…»' => 'á„®', + 'ã…¼' => 'ᄯ', + 'ã…½' => 'ᄲ', + 'ã…¾' => 'ᄶ', + 'ã…¿' => 'á…€', + 'ㆀ' => 'á…‡', + 'ã†' => 'á…Œ', + 'ㆂ' => 'ᇱ', + 'ㆃ' => 'ᇲ', + 'ㆄ' => 'á…—', + 'ㆅ' => 'á…˜', + 'ㆆ' => 'á…™', + 'ㆇ' => 'ᆄ', + 'ㆈ' => 'ᆅ', + 'ㆉ' => 'ᆈ', + 'ㆊ' => 'ᆑ', + 'ㆋ' => 'ᆒ', + 'ㆌ' => 'ᆔ', + 'ã†' => 'ᆞ', + 'ㆎ' => 'ᆡ', + '㆒' => '一', + '㆓' => '二', + '㆔' => '三', + '㆕' => 'å››', + '㆖' => '上', + '㆗' => '中', + '㆘' => '下', + '㆙' => '甲', + '㆚' => 'ä¹™', + '㆛' => '丙', + '㆜' => 'ä¸', + 'ã†' => '天', + '㆞' => '地', + '㆟' => '人', + '㈀' => '(á„€)', + 'ãˆ' => '(á„‚)', + '㈂' => '(ᄃ)', + '㈃' => '(á„…)', + '㈄' => '(ᄆ)', + '㈅' => '(ᄇ)', + '㈆' => '(ᄉ)', + '㈇' => '(á„‹)', + '㈈' => '(á„Œ)', + '㈉' => '(á„Ž)', + '㈊' => '(á„)', + '㈋' => '(á„)', + '㈌' => '(á„‘)', + 'ãˆ' => '(á„’)', + '㈎' => '(가)', + 'ãˆ' => '(á„‚á…¡)', + 'ãˆ' => '(다)', + '㈑' => '(á„…á…¡)', + '㈒' => '(마)', + '㈓' => '(바)', + '㈔' => '(사)', + '㈕' => '(á„‹á…¡)', + '㈖' => '(자)', + '㈗' => '(á„Žá…¡)', + '㈘' => '(á„á…¡)', + '㈙' => '(á„á…¡)', + '㈚' => '(á„‘á…¡)', + '㈛' => '(á„’á…¡)', + '㈜' => '(주)', + 'ãˆ' => '(오전)', + '㈞' => '(á„‹á…©á„’á…®)', + '㈠' => '(一)', + '㈡' => '(二)', + '㈢' => '(三)', + '㈣' => '(å››)', + '㈤' => '(五)', + '㈥' => '(å…­)', + '㈦' => '(七)', + '㈧' => '(å…«)', + '㈨' => '(ä¹)', + '㈩' => '(å)', + '㈪' => '(月)', + '㈫' => '(ç«)', + '㈬' => '(æ°´)', + '㈭' => '(木)', + '㈮' => '(金)', + '㈯' => '(土)', + '㈰' => '(æ—¥)', + '㈱' => '(æ ª)', + '㈲' => '(有)', + '㈳' => '(社)', + '㈴' => '(å)', + '㈵' => '(特)', + '㈶' => '(財)', + '㈷' => '(ç¥)', + '㈸' => '(労)', + '㈹' => '(代)', + '㈺' => '(呼)', + '㈻' => '(å­¦)', + '㈼' => '(監)', + '㈽' => '(ä¼)', + '㈾' => '(資)', + '㈿' => '(å”)', + '㉀' => '(祭)', + 'ã‰' => '(休)', + '㉂' => '(自)', + '㉃' => '(至)', + '㉄' => 'å•', + '㉅' => 'å¹¼', + '㉆' => 'æ–‡', + '㉇' => 'ç®', + 'ã‰' => 'PTE', + '㉑' => '21', + '㉒' => '22', + '㉓' => '23', + '㉔' => '24', + '㉕' => '25', + '㉖' => '26', + '㉗' => '27', + '㉘' => '28', + '㉙' => '29', + '㉚' => '30', + '㉛' => '31', + '㉜' => '32', + 'ã‰' => '33', + '㉞' => '34', + '㉟' => '35', + '㉠' => 'á„€', + '㉡' => 'á„‚', + '㉢' => 'ᄃ', + '㉣' => 'á„…', + '㉤' => 'ᄆ', + '㉥' => 'ᄇ', + '㉦' => 'ᄉ', + '㉧' => 'á„‹', + '㉨' => 'á„Œ', + '㉩' => 'á„Ž', + '㉪' => 'á„', + '㉫' => 'á„', + '㉬' => 'á„‘', + '㉭' => 'á„’', + '㉮' => '가', + '㉯' => 'á„‚á…¡', + '㉰' => '다', + '㉱' => 'á„…á…¡', + '㉲' => '마', + '㉳' => '바', + '㉴' => '사', + '㉵' => 'á„‹á…¡', + '㉶' => '자', + '㉷' => 'á„Žá…¡', + '㉸' => 'á„á…¡', + '㉹' => 'á„á…¡', + '㉺' => 'á„‘á…¡', + '㉻' => 'á„’á…¡', + '㉼' => '참고', + '㉽' => '주의', + '㉾' => 'á„‹á…®', + '㊀' => '一', + 'ãŠ' => '二', + '㊂' => '三', + '㊃' => 'å››', + '㊄' => '五', + '㊅' => 'å…­', + '㊆' => '七', + '㊇' => 'å…«', + '㊈' => 'ä¹', + '㊉' => 'å', + '㊊' => '月', + '㊋' => 'ç«', + '㊌' => 'æ°´', + 'ãŠ' => '木', + '㊎' => '金', + 'ãŠ' => '土', + 'ãŠ' => 'æ—¥', + '㊑' => 'æ ª', + '㊒' => '有', + '㊓' => '社', + '㊔' => 'å', + '㊕' => '特', + '㊖' => '財', + '㊗' => 'ç¥', + '㊘' => '労', + '㊙' => '秘', + '㊚' => 'ç”·', + '㊛' => '女', + '㊜' => 'é©', + 'ãŠ' => '優', + '㊞' => 'å°', + '㊟' => '注', + '㊠' => 'é …', + '㊡' => '休', + '㊢' => '写', + '㊣' => 'æ­£', + '㊤' => '上', + '㊥' => '中', + '㊦' => '下', + '㊧' => 'å·¦', + '㊨' => 'å³', + '㊩' => '医', + '㊪' => 'å®—', + '㊫' => 'å­¦', + '㊬' => '監', + '㊭' => 'ä¼', + '㊮' => '資', + '㊯' => 'å”', + '㊰' => '夜', + '㊱' => '36', + '㊲' => '37', + '㊳' => '38', + '㊴' => '39', + '㊵' => '40', + '㊶' => '41', + '㊷' => '42', + '㊸' => '43', + '㊹' => '44', + '㊺' => '45', + '㊻' => '46', + '㊼' => '47', + '㊽' => '48', + '㊾' => '49', + '㊿' => '50', + 'ã‹€' => '1月', + 'ã‹' => '2月', + 'ã‹‚' => '3月', + '㋃' => '4月', + 'ã‹„' => '5月', + 'ã‹…' => '6月', + '㋆' => '7月', + '㋇' => '8月', + '㋈' => '9月', + '㋉' => '10月', + 'ã‹Š' => '11月', + 'ã‹‹' => '12月', + 'ã‹Œ' => 'Hg', + 'ã‹' => 'erg', + 'ã‹Ž' => 'eV', + 'ã‹' => 'LTD', + 'ã‹' => 'ã‚¢', + 'ã‹‘' => 'イ', + 'ã‹’' => 'ウ', + 'ã‹“' => 'エ', + 'ã‹”' => 'オ', + 'ã‹•' => 'ã‚«', + 'ã‹–' => 'ã‚­', + 'ã‹—' => 'ク', + '㋘' => 'ケ', + 'ã‹™' => 'コ', + 'ã‹š' => 'サ', + 'ã‹›' => 'ã‚·', + 'ã‹œ' => 'ス', + 'ã‹' => 'ã‚»', + 'ã‹ž' => 'ソ', + 'ã‹Ÿ' => 'ã‚¿', + 'ã‹ ' => 'ãƒ', + 'ã‹¡' => 'ツ', + 'ã‹¢' => 'テ', + 'ã‹£' => 'ト', + '㋤' => 'ナ', + 'ã‹¥' => 'ニ', + '㋦' => 'ヌ', + '㋧' => 'ãƒ', + '㋨' => 'ノ', + 'ã‹©' => 'ãƒ', + '㋪' => 'ヒ', + 'ã‹«' => 'フ', + '㋬' => 'ヘ', + 'ã‹­' => 'ホ', + 'ã‹®' => 'マ', + '㋯' => 'ミ', + 'ã‹°' => 'ム', + '㋱' => 'メ', + '㋲' => 'モ', + '㋳' => 'ヤ', + 'ã‹´' => 'ユ', + '㋵' => 'ヨ', + '㋶' => 'ラ', + 'ã‹·' => 'リ', + '㋸' => 'ル', + '㋹' => 'レ', + '㋺' => 'ロ', + 'ã‹»' => 'ワ', + '㋼' => 'ヰ', + '㋽' => 'ヱ', + '㋾' => 'ヲ', + 'ã‹¿' => '令和', + '㌀' => 'ã‚¢ãƒã‚šãƒ¼ãƒˆ', + 'ãŒ' => 'アルファ', + '㌂' => 'アンペア', + '㌃' => 'アール', + '㌄' => 'イニング', + '㌅' => 'インãƒ', + '㌆' => 'ウォン', + '㌇' => 'エスクード', + '㌈' => 'エーカー', + '㌉' => 'オンス', + '㌊' => 'オーム', + '㌋' => 'カイリ', + '㌌' => 'カラット', + 'ãŒ' => 'カロリー', + '㌎' => 'ガロン', + 'ãŒ' => 'ガンマ', + 'ãŒ' => 'ギガ', + '㌑' => 'ギニー', + '㌒' => 'キュリー', + '㌓' => 'ギルダー', + '㌔' => 'キロ', + '㌕' => 'キログラム', + '㌖' => 'キロメートル', + '㌗' => 'キロワット', + '㌘' => 'グラム', + '㌙' => 'グラムトン', + '㌚' => 'クルゼイロ', + '㌛' => 'クローãƒ', + '㌜' => 'ケース', + 'ãŒ' => 'コルナ', + '㌞' => 'コーポ', + '㌟' => 'サイクル', + '㌠' => 'サンãƒãƒ¼ãƒ ', + '㌡' => 'シリング', + '㌢' => 'センãƒ', + '㌣' => 'セント', + '㌤' => 'ダース', + '㌥' => 'デシ', + '㌦' => 'ドル', + '㌧' => 'トン', + '㌨' => 'ナノ', + '㌩' => 'ノット', + '㌪' => 'ãƒã‚¤ãƒ„', + '㌫' => 'ãƒã‚šãƒ¼ã‚»ãƒ³ãƒˆ', + '㌬' => 'ãƒã‚šãƒ¼ãƒ„', + '㌭' => 'ãƒã‚™ãƒ¼ãƒ¬ãƒ«', + '㌮' => 'ピアストル', + '㌯' => 'ピクル', + '㌰' => 'ピコ', + '㌱' => 'ビル', + '㌲' => 'ファラッド', + '㌳' => 'フィート', + '㌴' => 'ブッシェル', + '㌵' => 'フラン', + '㌶' => 'ヘクタール', + '㌷' => 'ペソ', + '㌸' => 'ペニヒ', + '㌹' => 'ヘルツ', + '㌺' => 'ペンス', + '㌻' => 'ページ', + '㌼' => 'ベータ', + '㌽' => 'ポイント', + '㌾' => 'ボルト', + '㌿' => 'ホン', + 'ã€' => 'ポンド', + 'ã' => 'ホール', + 'ã‚' => 'ホーン', + 'ãƒ' => 'マイクロ', + 'ã„' => 'マイル', + 'ã…' => 'マッãƒ', + 'ã†' => 'マルク', + 'ã‡' => 'マンション', + 'ãˆ' => 'ミクロン', + 'ã‰' => 'ミリ', + 'ãŠ' => 'ミリãƒã‚™ãƒ¼ãƒ«', + 'ã‹' => 'メガ', + 'ãŒ' => 'メガトン', + 'ã' => 'メートル', + 'ãŽ' => 'ヤード', + 'ã' => 'ヤール', + 'ã' => 'ユアン', + 'ã‘' => 'リットル', + 'ã’' => 'リラ', + 'ã“' => 'ルピー', + 'ã”' => 'ルーブル', + 'ã•' => 'レム', + 'ã–' => 'レントゲン', + 'ã—' => 'ワット', + 'ã˜' => '0点', + 'ã™' => '1点', + 'ãš' => '2点', + 'ã›' => '3点', + 'ãœ' => '4点', + 'ã' => '5点', + 'ãž' => '6点', + 'ãŸ' => '7点', + 'ã ' => '8点', + 'ã¡' => '9点', + 'ã¢' => '10点', + 'ã£' => '11点', + 'ã¤' => '12点', + 'ã¥' => '13点', + 'ã¦' => '14点', + 'ã§' => '15点', + 'ã¨' => '16点', + 'ã©' => '17点', + 'ãª' => '18点', + 'ã«' => '19点', + 'ã¬' => '20点', + 'ã­' => '21点', + 'ã®' => '22点', + 'ã¯' => '23点', + 'ã°' => '24点', + 'ã±' => 'hPa', + 'ã²' => 'da', + 'ã³' => 'AU', + 'ã´' => 'bar', + 'ãµ' => 'oV', + 'ã¶' => 'pc', + 'ã·' => 'dm', + 'ã¸' => 'dm2', + 'ã¹' => 'dm3', + 'ãº' => 'IU', + 'ã»' => 'å¹³æˆ', + 'ã¼' => '昭和', + 'ã½' => '大正', + 'ã¾' => '明治', + 'ã¿' => 'æ ªå¼ä¼šç¤¾', + '㎀' => 'pA', + 'ãŽ' => 'nA', + '㎂' => 'μA', + '㎃' => 'mA', + '㎄' => 'kA', + '㎅' => 'KB', + '㎆' => 'MB', + '㎇' => 'GB', + '㎈' => 'cal', + '㎉' => 'kcal', + '㎊' => 'pF', + '㎋' => 'nF', + '㎌' => 'μF', + 'ãŽ' => 'μg', + '㎎' => 'mg', + 'ãŽ' => 'kg', + 'ãŽ' => 'Hz', + '㎑' => 'kHz', + '㎒' => 'MHz', + '㎓' => 'GHz', + '㎔' => 'THz', + '㎕' => 'μl', + '㎖' => 'ml', + '㎗' => 'dl', + '㎘' => 'kl', + '㎙' => 'fm', + '㎚' => 'nm', + '㎛' => 'μm', + '㎜' => 'mm', + 'ãŽ' => 'cm', + '㎞' => 'km', + '㎟' => 'mm2', + '㎠' => 'cm2', + '㎡' => 'm2', + '㎢' => 'km2', + '㎣' => 'mm3', + '㎤' => 'cm3', + '㎥' => 'm3', + '㎦' => 'km3', + '㎧' => 'm∕s', + '㎨' => 'm∕s2', + '㎩' => 'Pa', + '㎪' => 'kPa', + '㎫' => 'MPa', + '㎬' => 'GPa', + '㎭' => 'rad', + '㎮' => 'rad∕s', + '㎯' => 'rad∕s2', + '㎰' => 'ps', + '㎱' => 'ns', + '㎲' => 'μs', + '㎳' => 'ms', + '㎴' => 'pV', + '㎵' => 'nV', + '㎶' => 'μV', + '㎷' => 'mV', + '㎸' => 'kV', + '㎹' => 'MV', + '㎺' => 'pW', + '㎻' => 'nW', + '㎼' => 'μW', + '㎽' => 'mW', + '㎾' => 'kW', + '㎿' => 'MW', + 'ã€' => 'kΩ', + 'ã' => 'MΩ', + 'ã‚' => 'a.m.', + 'ãƒ' => 'Bq', + 'ã„' => 'cc', + 'ã…' => 'cd', + 'ã†' => 'C∕kg', + 'ã‡' => 'Co.', + 'ãˆ' => 'dB', + 'ã‰' => 'Gy', + 'ãŠ' => 'ha', + 'ã‹' => 'HP', + 'ãŒ' => 'in', + 'ã' => 'KK', + 'ãŽ' => 'KM', + 'ã' => 'kt', + 'ã' => 'lm', + 'ã‘' => 'ln', + 'ã’' => 'log', + 'ã“' => 'lx', + 'ã”' => 'mb', + 'ã•' => 'mil', + 'ã–' => 'mol', + 'ã—' => 'PH', + 'ã˜' => 'p.m.', + 'ã™' => 'PPM', + 'ãš' => 'PR', + 'ã›' => 'sr', + 'ãœ' => 'Sv', + 'ã' => 'Wb', + 'ãž' => 'V∕m', + 'ãŸ' => 'A∕m', + 'ã ' => '1æ—¥', + 'ã¡' => '2æ—¥', + 'ã¢' => '3æ—¥', + 'ã£' => '4æ—¥', + 'ã¤' => '5æ—¥', + 'ã¥' => '6æ—¥', + 'ã¦' => '7æ—¥', + 'ã§' => '8æ—¥', + 'ã¨' => '9æ—¥', + 'ã©' => '10æ—¥', + 'ãª' => '11æ—¥', + 'ã«' => '12æ—¥', + 'ã¬' => '13æ—¥', + 'ã­' => '14æ—¥', + 'ã®' => '15æ—¥', + 'ã¯' => '16æ—¥', + 'ã°' => '17æ—¥', + 'ã±' => '18æ—¥', + 'ã²' => '19æ—¥', + 'ã³' => '20æ—¥', + 'ã´' => '21æ—¥', + 'ãµ' => '22æ—¥', + 'ã¶' => '23æ—¥', + 'ã·' => '24æ—¥', + 'ã¸' => '25æ—¥', + 'ã¹' => '26æ—¥', + 'ãº' => '27æ—¥', + 'ã»' => '28æ—¥', + 'ã¼' => '29æ—¥', + 'ã½' => '30æ—¥', + 'ã¾' => '31æ—¥', + 'ã¿' => 'gal', + 'êšœ' => 'ÑŠ', + 'êš' => 'ÑŒ', + 'ê°' => 'ê¯', + 'ꟸ' => 'Ħ', + 'ꟹ' => 'Å“', + 'ê­œ' => 'ꜧ', + 'ê­' => 'ꬷ', + 'ê­ž' => 'É«', + 'ê­Ÿ' => 'ê­’', + 'ê­©' => 'Ê', + 'ff' => 'ff', + 'ï¬' => 'fi', + 'fl' => 'fl', + 'ffi' => 'ffi', + 'ffl' => 'ffl', + 'ſt' => 'st', + 'st' => 'st', + 'ﬓ' => 'Õ´Õ¶', + 'ﬔ' => 'Õ´Õ¥', + 'ﬕ' => 'Õ´Õ«', + 'ﬖ' => 'Õ¾Õ¶', + 'ﬗ' => 'Õ´Õ­', + 'ﬠ' => '×¢', + 'ﬡ' => '×', + 'ﬢ' => 'ד', + 'ﬣ' => '×”', + 'ﬤ' => '×›', + 'ﬥ' => 'ל', + 'ﬦ' => '×', + 'ﬧ' => 'ר', + 'ﬨ' => 'ת', + '﬩' => '+', + 'ï­' => '×ל', + 'ï­' => 'Ù±', + 'ï­‘' => 'Ù±', + 'ï­’' => 'Ù»', + 'ï­“' => 'Ù»', + 'ï­”' => 'Ù»', + 'ï­•' => 'Ù»', + 'ï­–' => 'Ù¾', + 'ï­—' => 'Ù¾', + 'ï­˜' => 'Ù¾', + 'ï­™' => 'Ù¾', + 'ï­š' => 'Ú€', + 'ï­›' => 'Ú€', + 'ï­œ' => 'Ú€', + 'ï­' => 'Ú€', + 'ï­ž' => 'Ùº', + 'ï­Ÿ' => 'Ùº', + 'ï­ ' => 'Ùº', + 'ï­¡' => 'Ùº', + 'ï­¢' => 'Ù¿', + 'ï­£' => 'Ù¿', + 'ï­¤' => 'Ù¿', + 'ï­¥' => 'Ù¿', + 'ï­¦' => 'Ù¹', + 'ï­§' => 'Ù¹', + 'ï­¨' => 'Ù¹', + 'ï­©' => 'Ù¹', + 'ï­ª' => 'Ú¤', + 'ï­«' => 'Ú¤', + 'ï­¬' => 'Ú¤', + 'ï­­' => 'Ú¤', + 'ï­®' => 'Ú¦', + 'ï­¯' => 'Ú¦', + 'ï­°' => 'Ú¦', + 'ï­±' => 'Ú¦', + 'ï­²' => 'Ú„', + 'ï­³' => 'Ú„', + 'ï­´' => 'Ú„', + 'ï­µ' => 'Ú„', + 'ï­¶' => 'Úƒ', + 'ï­·' => 'Úƒ', + 'ï­¸' => 'Úƒ', + 'ï­¹' => 'Úƒ', + 'ï­º' => 'Ú†', + 'ï­»' => 'Ú†', + 'ï­¼' => 'Ú†', + 'ï­½' => 'Ú†', + 'ï­¾' => 'Ú‡', + 'ï­¿' => 'Ú‡', + 'ﮀ' => 'Ú‡', + 'ï®' => 'Ú‡', + 'ﮂ' => 'Ú', + 'ﮃ' => 'Ú', + 'ﮄ' => 'ÚŒ', + 'ï®…' => 'ÚŒ', + 'ﮆ' => 'ÚŽ', + 'ﮇ' => 'ÚŽ', + 'ﮈ' => 'Úˆ', + 'ﮉ' => 'Úˆ', + 'ﮊ' => 'Ú˜', + 'ﮋ' => 'Ú˜', + 'ﮌ' => 'Ú‘', + 'ï®' => 'Ú‘', + 'ﮎ' => 'Ú©', + 'ï®' => 'Ú©', + 'ï®' => 'Ú©', + 'ﮑ' => 'Ú©', + 'ï®’' => 'Ú¯', + 'ﮓ' => 'Ú¯', + 'ï®”' => 'Ú¯', + 'ﮕ' => 'Ú¯', + 'ï®–' => 'Ú³', + 'ï®—' => 'Ú³', + 'ﮘ' => 'Ú³', + 'ï®™' => 'Ú³', + 'ﮚ' => 'Ú±', + 'ï®›' => 'Ú±', + 'ﮜ' => 'Ú±', + 'ï®' => 'Ú±', + 'ﮞ' => 'Úº', + 'ﮟ' => 'Úº', + 'ï® ' => 'Ú»', + 'ﮡ' => 'Ú»', + 'ﮢ' => 'Ú»', + 'ﮣ' => 'Ú»', + 'ﮤ' => 'Û•Ù”', + 'ﮥ' => 'Û•Ù”', + 'ﮦ' => 'Û', + 'ﮧ' => 'Û', + 'ﮨ' => 'Û', + 'ﮩ' => 'Û', + 'ﮪ' => 'Ú¾', + 'ﮫ' => 'Ú¾', + 'ﮬ' => 'Ú¾', + 'ï®­' => 'Ú¾', + 'ï®®' => 'Û’', + 'ﮯ' => 'Û’', + 'ï®°' => 'Û’Ù”', + 'ï®±' => 'Û’Ù”', + 'ﯓ' => 'Ú­', + 'ﯔ' => 'Ú­', + 'ﯕ' => 'Ú­', + 'ﯖ' => 'Ú­', + 'ﯗ' => 'Û‡', + 'ﯘ' => 'Û‡', + 'ﯙ' => 'Û†', + 'ﯚ' => 'Û†', + 'ﯛ' => 'Ûˆ', + 'ﯜ' => 'Ûˆ', + 'ï¯' => 'Û‡Ù´', + 'ﯞ' => 'Û‹', + 'ﯟ' => 'Û‹', + 'ﯠ' => 'Û…', + 'ﯡ' => 'Û…', + 'ﯢ' => 'Û‰', + 'ﯣ' => 'Û‰', + 'ﯤ' => 'Û', + 'ﯥ' => 'Û', + 'ﯦ' => 'Û', + 'ﯧ' => 'Û', + 'ﯨ' => 'Ù‰', + 'ﯩ' => 'Ù‰', + 'ﯪ' => 'ئا', + 'ﯫ' => 'ئا', + 'ﯬ' => 'ÙŠÙ”Û•', + 'ﯭ' => 'ÙŠÙ”Û•', + 'ﯮ' => 'ÙŠÙ”Ùˆ', + 'ﯯ' => 'ÙŠÙ”Ùˆ', + 'ﯰ' => 'ÙŠÙ”Û‡', + 'ﯱ' => 'ÙŠÙ”Û‡', + 'ﯲ' => 'ÙŠÙ”Û†', + 'ﯳ' => 'ÙŠÙ”Û†', + 'ﯴ' => 'ÙŠÙ”Ûˆ', + 'ﯵ' => 'ÙŠÙ”Ûˆ', + 'ﯶ' => 'ÙŠÙ”Û', + 'ﯷ' => 'ÙŠÙ”Û', + 'ﯸ' => 'ÙŠÙ”Û', + 'ﯹ' => 'ÙŠÙ”Ù‰', + 'ﯺ' => 'ÙŠÙ”Ù‰', + 'ﯻ' => 'ÙŠÙ”Ù‰', + 'ﯼ' => 'ÛŒ', + 'ﯽ' => 'ÛŒ', + 'ﯾ' => 'ÛŒ', + 'ﯿ' => 'ÛŒ', + 'ï°€' => 'ئج', + 'ï°' => 'ئح', + 'ï°‚' => 'ÙŠÙ”Ù…', + 'ï°ƒ' => 'ÙŠÙ”Ù‰', + 'ï°„' => 'ÙŠÙ”ÙŠ', + 'ï°…' => 'بج', + 'ï°†' => 'بح', + 'ï°‡' => 'بخ', + 'ï°ˆ' => 'بم', + 'ï°‰' => 'بى', + 'ï°Š' => 'بي', + 'ï°‹' => 'تج', + 'ï°Œ' => 'تح', + 'ï°' => 'تخ', + 'ï°Ž' => 'تم', + 'ï°' => 'تى', + 'ï°' => 'تي', + 'ï°‘' => 'ثج', + 'ï°’' => 'ثم', + 'ï°“' => 'ثى', + 'ï°”' => 'ثي', + 'ï°•' => 'جح', + 'ï°–' => 'جم', + 'ï°—' => 'حج', + 'ï°˜' => 'حم', + 'ï°™' => 'خج', + 'ï°š' => 'خح', + 'ï°›' => 'خم', + 'ï°œ' => 'سج', + 'ï°' => 'سح', + 'ï°ž' => 'سخ', + 'ï°Ÿ' => 'سم', + 'ï° ' => 'صح', + 'ï°¡' => 'صم', + 'ï°¢' => 'ضج', + 'ï°£' => 'ضح', + 'ï°¤' => 'ضخ', + 'ï°¥' => 'ضم', + 'ï°¦' => 'طح', + 'ï°§' => 'طم', + 'ï°¨' => 'ظم', + 'ï°©' => 'عج', + 'ï°ª' => 'عم', + 'ï°«' => 'غج', + 'ï°¬' => 'غم', + 'ï°­' => 'Ùج', + 'ï°®' => 'ÙØ­', + 'ï°¯' => 'ÙØ®', + 'ï°°' => 'ÙÙ…', + 'ï°±' => 'ÙÙ‰', + 'ï°²' => 'ÙÙŠ', + 'ï°³' => 'قح', + 'ï°´' => 'قم', + 'ï°µ' => 'قى', + 'ï°¶' => 'قي', + 'ï°·' => 'كا', + 'ï°¸' => 'كج', + 'ï°¹' => 'كح', + 'ï°º' => 'كخ', + 'ï°»' => 'كل', + 'ï°¼' => 'كم', + 'ï°½' => 'كى', + 'ï°¾' => 'كي', + 'ï°¿' => 'لج', + 'ï±€' => 'لح', + 'ï±' => 'لخ', + 'ﱂ' => 'لم', + 'ﱃ' => 'لى', + 'ﱄ' => 'لي', + 'ï±…' => 'مج', + 'ﱆ' => 'مح', + 'ﱇ' => 'مخ', + 'ﱈ' => 'مم', + 'ﱉ' => 'مى', + 'ﱊ' => 'مي', + 'ﱋ' => 'نج', + 'ﱌ' => 'نح', + 'ï±' => 'نخ', + 'ﱎ' => 'نم', + 'ï±' => 'نى', + 'ï±' => 'ني', + 'ﱑ' => 'هج', + 'ï±’' => 'هم', + 'ﱓ' => 'هى', + 'ï±”' => 'هي', + 'ﱕ' => 'يج', + 'ï±–' => 'يح', + 'ï±—' => 'يخ', + 'ﱘ' => 'يم', + 'ï±™' => 'يى', + 'ﱚ' => 'يي', + 'ï±›' => 'ذٰ', + 'ﱜ' => 'رٰ', + 'ï±' => 'ىٰ', + 'ﱞ' => ' ٌّ', + 'ﱟ' => ' ÙÙ‘', + 'ï± ' => ' ÙŽÙ‘', + 'ﱡ' => ' ÙÙ‘', + 'ï±¢' => ' ÙÙ‘', + 'ï±£' => ' ّٰ', + 'ﱤ' => 'ئر', + 'ï±¥' => 'ئز', + 'ﱦ' => 'ÙŠÙ”Ù…', + 'ﱧ' => 'ÙŠÙ”Ù†', + 'ﱨ' => 'ÙŠÙ”Ù‰', + 'ﱩ' => 'ÙŠÙ”ÙŠ', + 'ﱪ' => 'بر', + 'ﱫ' => 'بز', + 'ﱬ' => 'بم', + 'ï±­' => 'بن', + 'ï±®' => 'بى', + 'ﱯ' => 'بي', + 'ï±°' => 'تر', + 'ï±±' => 'تز', + 'ï±²' => 'تم', + 'ï±³' => 'تن', + 'ï±´' => 'تى', + 'ï±µ' => 'تي', + 'ﱶ' => 'ثر', + 'ï±·' => 'ثز', + 'ﱸ' => 'ثم', + 'ï±¹' => 'ثن', + 'ﱺ' => 'ثى', + 'ï±»' => 'ثي', + 'ï±¼' => 'ÙÙ‰', + 'ï±½' => 'ÙÙŠ', + 'ï±¾' => 'قى', + 'ﱿ' => 'قي', + 'ï²€' => 'كا', + 'ï²' => 'كل', + 'ﲂ' => 'كم', + 'ﲃ' => 'كى', + 'ﲄ' => 'كي', + 'ï²…' => 'لم', + 'ﲆ' => 'لى', + 'ﲇ' => 'لي', + 'ﲈ' => 'ما', + 'ﲉ' => 'مم', + 'ﲊ' => 'نر', + 'ﲋ' => 'نز', + 'ﲌ' => 'نم', + 'ï²' => 'نن', + 'ﲎ' => 'نى', + 'ï²' => 'ني', + 'ï²' => 'ىٰ', + 'ﲑ' => 'ير', + 'ï²’' => 'يز', + 'ﲓ' => 'يم', + 'ï²”' => 'ين', + 'ﲕ' => 'يى', + 'ï²–' => 'يي', + 'ï²—' => 'ئج', + 'ﲘ' => 'ئح', + 'ï²™' => 'ئخ', + 'ﲚ' => 'ÙŠÙ”Ù…', + 'ï²›' => 'ÙŠÙ”Ù‡', + 'ﲜ' => 'بج', + 'ï²' => 'بح', + 'ﲞ' => 'بخ', + 'ﲟ' => 'بم', + 'ï² ' => 'به', + 'ﲡ' => 'تج', + 'ï²¢' => 'تح', + 'ï²£' => 'تخ', + 'ﲤ' => 'تم', + 'ï²¥' => 'ته', + 'ﲦ' => 'ثم', + 'ﲧ' => 'جح', + 'ﲨ' => 'جم', + 'ﲩ' => 'حج', + 'ﲪ' => 'حم', + 'ﲫ' => 'خج', + 'ﲬ' => 'خم', + 'ï²­' => 'سج', + 'ï²®' => 'سح', + 'ﲯ' => 'سخ', + 'ï²°' => 'سم', + 'ï²±' => 'صح', + 'ï²²' => 'صخ', + 'ï²³' => 'صم', + 'ï²´' => 'ضج', + 'ï²µ' => 'ضح', + 'ﲶ' => 'ضخ', + 'ï²·' => 'ضم', + 'ﲸ' => 'طح', + 'ï²¹' => 'ظم', + 'ﲺ' => 'عج', + 'ï²»' => 'عم', + 'ï²¼' => 'غج', + 'ï²½' => 'غم', + 'ï²¾' => 'Ùج', + 'ﲿ' => 'ÙØ­', + 'ï³€' => 'ÙØ®', + 'ï³' => 'ÙÙ…', + 'ﳂ' => 'قح', + 'ﳃ' => 'قم', + 'ﳄ' => 'كج', + 'ï³…' => 'كح', + 'ﳆ' => 'كخ', + 'ﳇ' => 'كل', + 'ﳈ' => 'كم', + 'ﳉ' => 'لج', + 'ﳊ' => 'لح', + 'ﳋ' => 'لخ', + 'ﳌ' => 'لم', + 'ï³' => 'له', + 'ﳎ' => 'مج', + 'ï³' => 'مح', + 'ï³' => 'مخ', + 'ﳑ' => 'مم', + 'ï³’' => 'نج', + 'ﳓ' => 'نح', + 'ï³”' => 'نخ', + 'ﳕ' => 'نم', + 'ï³–' => 'نه', + 'ï³—' => 'هج', + 'ﳘ' => 'هم', + 'ï³™' => 'هٰ', + 'ﳚ' => 'يج', + 'ï³›' => 'يح', + 'ﳜ' => 'يخ', + 'ï³' => 'يم', + 'ﳞ' => 'يه', + 'ﳟ' => 'ÙŠÙ”Ù…', + 'ï³ ' => 'ÙŠÙ”Ù‡', + 'ﳡ' => 'بم', + 'ï³¢' => 'به', + 'ï³£' => 'تم', + 'ﳤ' => 'ته', + 'ï³¥' => 'ثم', + 'ﳦ' => 'ثه', + 'ﳧ' => 'سم', + 'ﳨ' => 'سه', + 'ﳩ' => 'شم', + 'ﳪ' => 'شه', + 'ﳫ' => 'كل', + 'ﳬ' => 'كم', + 'ï³­' => 'لم', + 'ï³®' => 'نم', + 'ﳯ' => 'نه', + 'ï³°' => 'يم', + 'ï³±' => 'يه', + 'ï³²' => 'Ù€ÙŽÙ‘', + 'ï³³' => 'Ù€ÙÙ‘', + 'ï³´' => 'Ù€ÙÙ‘', + 'ï³µ' => 'طى', + 'ﳶ' => 'طي', + 'ï³·' => 'عى', + 'ﳸ' => 'عي', + 'ï³¹' => 'غى', + 'ﳺ' => 'غي', + 'ï³»' => 'سى', + 'ï³¼' => 'سي', + 'ï³½' => 'شى', + 'ï³¾' => 'شي', + 'ﳿ' => 'حى', + 'ï´€' => 'حي', + 'ï´' => 'جى', + 'ï´‚' => 'جي', + 'ï´ƒ' => 'خى', + 'ï´„' => 'خي', + 'ï´…' => 'صى', + 'ï´†' => 'صي', + 'ï´‡' => 'ضى', + 'ï´ˆ' => 'ضي', + 'ï´‰' => 'شج', + 'ï´Š' => 'شح', + 'ï´‹' => 'شخ', + 'ï´Œ' => 'شم', + 'ï´' => 'شر', + 'ï´Ž' => 'سر', + 'ï´' => 'صر', + 'ï´' => 'ضر', + 'ï´‘' => 'طى', + 'ï´’' => 'طي', + 'ï´“' => 'عى', + 'ï´”' => 'عي', + 'ï´•' => 'غى', + 'ï´–' => 'غي', + 'ï´—' => 'سى', + 'ï´˜' => 'سي', + 'ï´™' => 'شى', + 'ï´š' => 'شي', + 'ï´›' => 'حى', + 'ï´œ' => 'حي', + 'ï´' => 'جى', + 'ï´ž' => 'جي', + 'ï´Ÿ' => 'خى', + 'ï´ ' => 'خي', + 'ï´¡' => 'صى', + 'ï´¢' => 'صي', + 'ï´£' => 'ضى', + 'ï´¤' => 'ضي', + 'ï´¥' => 'شج', + 'ï´¦' => 'شح', + 'ï´§' => 'شخ', + 'ï´¨' => 'شم', + 'ï´©' => 'شر', + 'ï´ª' => 'سر', + 'ï´«' => 'صر', + 'ï´¬' => 'ضر', + 'ï´­' => 'شج', + 'ï´®' => 'شح', + 'ï´¯' => 'شخ', + 'ï´°' => 'شم', + 'ï´±' => 'سه', + 'ï´²' => 'شه', + 'ï´³' => 'طم', + 'ï´´' => 'سج', + 'ï´µ' => 'سح', + 'ï´¶' => 'سخ', + 'ï´·' => 'شج', + 'ï´¸' => 'شح', + 'ï´¹' => 'شخ', + 'ï´º' => 'طم', + 'ï´»' => 'ظم', + 'ï´¼' => 'اً', + 'ï´½' => 'اً', + 'ïµ' => 'تجم', + 'ﵑ' => 'تحج', + 'ïµ’' => 'تحج', + 'ﵓ' => 'تحم', + 'ïµ”' => 'تخم', + 'ﵕ' => 'تمج', + 'ïµ–' => 'تمح', + 'ïµ—' => 'تمخ', + 'ﵘ' => 'جمح', + 'ïµ™' => 'جمح', + 'ﵚ' => 'حمي', + 'ïµ›' => 'حمى', + 'ﵜ' => 'سحج', + 'ïµ' => 'سجح', + 'ﵞ' => 'سجى', + 'ﵟ' => 'سمح', + 'ïµ ' => 'سمح', + 'ﵡ' => 'سمج', + 'ïµ¢' => 'سمم', + 'ïµ£' => 'سمم', + 'ﵤ' => 'صحح', + 'ïµ¥' => 'صحح', + 'ﵦ' => 'صمم', + 'ﵧ' => 'شحم', + 'ﵨ' => 'شحم', + 'ﵩ' => 'شجي', + 'ﵪ' => 'شمخ', + 'ﵫ' => 'شمخ', + 'ﵬ' => 'شمم', + 'ïµ­' => 'شمم', + 'ïµ®' => 'ضحى', + 'ﵯ' => 'ضخم', + 'ïµ°' => 'ضخم', + 'ïµ±' => 'طمح', + 'ïµ²' => 'طمح', + 'ïµ³' => 'طمم', + 'ïµ´' => 'طمي', + 'ïµµ' => 'عجم', + 'ﵶ' => 'عمم', + 'ïµ·' => 'عمم', + 'ﵸ' => 'عمى', + 'ïµ¹' => 'غمم', + 'ﵺ' => 'غمي', + 'ïµ»' => 'غمى', + 'ïµ¼' => 'Ùخم', + 'ïµ½' => 'Ùخم', + 'ïµ¾' => 'قمح', + 'ﵿ' => 'قمم', + 'ﶀ' => 'لحم', + 'ï¶' => 'لحي', + 'ﶂ' => 'لحى', + 'ﶃ' => 'لجج', + 'ﶄ' => 'لجج', + 'ﶅ' => 'لخم', + 'ﶆ' => 'لخم', + 'ﶇ' => 'لمح', + 'ﶈ' => 'لمح', + 'ﶉ' => 'محج', + 'ﶊ' => 'محم', + 'ﶋ' => 'محي', + 'ﶌ' => 'مجح', + 'ï¶' => 'مجم', + 'ﶎ' => 'مخج', + 'ï¶' => 'مخم', + 'ﶒ' => 'مجخ', + 'ﶓ' => 'همج', + 'ﶔ' => 'همم', + 'ﶕ' => 'نحم', + 'ﶖ' => 'نحى', + 'ﶗ' => 'نجم', + 'ﶘ' => 'نجم', + 'ﶙ' => 'نجى', + 'ﶚ' => 'نمي', + 'ﶛ' => 'نمى', + 'ﶜ' => 'يمم', + 'ï¶' => 'يمم', + 'ﶞ' => 'بخي', + 'ﶟ' => 'تجي', + 'ﶠ' => 'تجى', + 'ﶡ' => 'تخي', + 'ﶢ' => 'تخى', + 'ﶣ' => 'تمي', + 'ﶤ' => 'تمى', + 'ﶥ' => 'جمي', + 'ﶦ' => 'جحى', + 'ﶧ' => 'جمى', + 'ﶨ' => 'سخى', + 'ﶩ' => 'صحي', + 'ﶪ' => 'شحي', + 'ﶫ' => 'ضحي', + 'ﶬ' => 'لجي', + 'ﶭ' => 'لمي', + 'ﶮ' => 'يحي', + 'ﶯ' => 'يجي', + 'ﶰ' => 'يمي', + 'ﶱ' => 'ممي', + 'ﶲ' => 'قمي', + 'ﶳ' => 'نحي', + 'ﶴ' => 'قمح', + 'ﶵ' => 'لحم', + 'ﶶ' => 'عمي', + 'ﶷ' => 'كمي', + 'ﶸ' => 'نجح', + 'ﶹ' => 'مخي', + 'ﶺ' => 'لجم', + 'ﶻ' => 'كمم', + 'ﶼ' => 'لجم', + 'ﶽ' => 'نجح', + 'ﶾ' => 'جحي', + 'ﶿ' => 'حجي', + 'ï·€' => 'مجي', + 'ï·' => 'Ùمي', + 'ï·‚' => 'بحي', + 'ï·ƒ' => 'كمم', + 'ï·„' => 'عجم', + 'ï·…' => 'صمم', + 'ï·†' => 'سخي', + 'ï·‡' => 'نجي', + 'ï·°' => 'صلے', + 'ï·±' => 'قلے', + 'ï·²' => 'الله', + 'ï·³' => 'اكبر', + 'ï·´' => 'محمد', + 'ï·µ' => 'صلعم', + 'ï·¶' => 'رسول', + 'ï··' => 'عليه', + 'ï·¸' => 'وسلم', + 'ï·¹' => 'صلى', + 'ï·º' => 'صلى الله عليه وسلم', + 'ï·»' => 'جل جلاله', + 'ï·¼' => 'ریال', + 'ï¸' => ',', + '︑' => 'ã€', + '︒' => '。', + '︓' => ':', + '︔' => ';', + '︕' => '!', + '︖' => '?', + '︗' => '〖', + '︘' => '〗', + '︙' => '...', + '︰' => '..', + '︱' => '—', + '︲' => '–', + '︳' => '_', + '︴' => '_', + '︵' => '(', + '︶' => ')', + '︷' => '{', + '︸' => '}', + '︹' => '〔', + '︺' => '〕', + '︻' => 'ã€', + '︼' => '】', + '︽' => '《', + '︾' => '》', + '︿' => '〈', + 'ï¹€' => '〉', + 'ï¹' => '「', + '﹂' => 'ã€', + '﹃' => '『', + '﹄' => 'ã€', + '﹇' => '[', + '﹈' => ']', + '﹉' => ' Ì…', + '﹊' => ' Ì…', + '﹋' => ' Ì…', + '﹌' => ' Ì…', + 'ï¹' => '_', + '﹎' => '_', + 'ï¹' => '_', + 'ï¹' => ',', + '﹑' => 'ã€', + 'ï¹’' => '.', + 'ï¹”' => ';', + '﹕' => ':', + 'ï¹–' => '?', + 'ï¹—' => '!', + '﹘' => '—', + 'ï¹™' => '(', + '﹚' => ')', + 'ï¹›' => '{', + '﹜' => '}', + 'ï¹' => '〔', + '﹞' => '〕', + '﹟' => '#', + 'ï¹ ' => '&', + '﹡' => '*', + 'ï¹¢' => '+', + 'ï¹£' => '-', + '﹤' => '<', + 'ï¹¥' => '>', + '﹦' => '=', + '﹨' => '\\', + '﹩' => '$', + '﹪' => '%', + '﹫' => '@', + 'ï¹°' => ' Ù‹', + 'ï¹±' => 'ـً', + 'ï¹²' => ' ÙŒ', + 'ï¹´' => ' Ù', + 'ﹶ' => ' ÙŽ', + 'ï¹·' => 'Ù€ÙŽ', + 'ﹸ' => ' Ù', + 'ï¹¹' => 'Ù€Ù', + 'ﹺ' => ' Ù', + 'ï¹»' => 'Ù€Ù', + 'ï¹¼' => ' Ù‘', + 'ï¹½' => 'ـّ', + 'ï¹¾' => ' Ù’', + 'ﹿ' => 'ـْ', + 'ﺀ' => 'Ø¡', + 'ïº' => 'آ', + 'ﺂ' => 'آ', + 'ﺃ' => 'أ', + 'ﺄ' => 'أ', + 'ﺅ' => 'ÙˆÙ”', + 'ﺆ' => 'ÙˆÙ”', + 'ﺇ' => 'إ', + 'ﺈ' => 'إ', + 'ﺉ' => 'ÙŠÙ”', + 'ﺊ' => 'ÙŠÙ”', + 'ﺋ' => 'ÙŠÙ”', + 'ﺌ' => 'ÙŠÙ”', + 'ïº' => 'ا', + 'ﺎ' => 'ا', + 'ïº' => 'ب', + 'ïº' => 'ب', + 'ﺑ' => 'ب', + 'ﺒ' => 'ب', + 'ﺓ' => 'Ø©', + 'ﺔ' => 'Ø©', + 'ﺕ' => 'ت', + 'ﺖ' => 'ت', + 'ﺗ' => 'ت', + 'ﺘ' => 'ت', + 'ﺙ' => 'Ø«', + 'ﺚ' => 'Ø«', + 'ﺛ' => 'Ø«', + 'ﺜ' => 'Ø«', + 'ïº' => 'ج', + 'ﺞ' => 'ج', + 'ﺟ' => 'ج', + 'ﺠ' => 'ج', + 'ﺡ' => 'Ø­', + 'ﺢ' => 'Ø­', + 'ﺣ' => 'Ø­', + 'ﺤ' => 'Ø­', + 'ﺥ' => 'Ø®', + 'ﺦ' => 'Ø®', + 'ﺧ' => 'Ø®', + 'ﺨ' => 'Ø®', + 'ﺩ' => 'د', + 'ﺪ' => 'د', + 'ﺫ' => 'Ø°', + 'ﺬ' => 'Ø°', + 'ﺭ' => 'ر', + 'ﺮ' => 'ر', + 'ﺯ' => 'ز', + 'ﺰ' => 'ز', + 'ﺱ' => 'س', + 'ﺲ' => 'س', + 'ﺳ' => 'س', + 'ﺴ' => 'س', + 'ﺵ' => 'Ø´', + 'ﺶ' => 'Ø´', + 'ﺷ' => 'Ø´', + 'ﺸ' => 'Ø´', + 'ﺹ' => 'ص', + 'ﺺ' => 'ص', + 'ﺻ' => 'ص', + 'ﺼ' => 'ص', + 'ﺽ' => 'ض', + 'ﺾ' => 'ض', + 'ﺿ' => 'ض', + 'ﻀ' => 'ض', + 'ï»' => 'Ø·', + 'ﻂ' => 'Ø·', + 'ﻃ' => 'Ø·', + 'ﻄ' => 'Ø·', + 'ï»…' => 'ظ', + 'ﻆ' => 'ظ', + 'ﻇ' => 'ظ', + 'ﻈ' => 'ظ', + 'ﻉ' => 'ع', + 'ﻊ' => 'ع', + 'ﻋ' => 'ع', + 'ﻌ' => 'ع', + 'ï»' => 'غ', + 'ﻎ' => 'غ', + 'ï»' => 'غ', + 'ï»' => 'غ', + 'ﻑ' => 'Ù', + 'ï»’' => 'Ù', + 'ﻓ' => 'Ù', + 'ï»”' => 'Ù', + 'ﻕ' => 'Ù‚', + 'ï»–' => 'Ù‚', + 'ï»—' => 'Ù‚', + 'ﻘ' => 'Ù‚', + 'ï»™' => 'Ùƒ', + 'ﻚ' => 'Ùƒ', + 'ï»›' => 'Ùƒ', + 'ﻜ' => 'Ùƒ', + 'ï»' => 'Ù„', + 'ﻞ' => 'Ù„', + 'ﻟ' => 'Ù„', + 'ï» ' => 'Ù„', + 'ﻡ' => 'Ù…', + 'ﻢ' => 'Ù…', + 'ﻣ' => 'Ù…', + 'ﻤ' => 'Ù…', + 'ﻥ' => 'Ù†', + 'ﻦ' => 'Ù†', + 'ﻧ' => 'Ù†', + 'ﻨ' => 'Ù†', + 'ﻩ' => 'Ù‡', + 'ﻪ' => 'Ù‡', + 'ﻫ' => 'Ù‡', + 'ﻬ' => 'Ù‡', + 'ï»­' => 'Ùˆ', + 'ï»®' => 'Ùˆ', + 'ﻯ' => 'Ù‰', + 'ï»°' => 'Ù‰', + 'ï»±' => 'ÙŠ', + 'ﻲ' => 'ÙŠ', + 'ﻳ' => 'ÙŠ', + 'ï»´' => 'ÙŠ', + 'ﻵ' => 'لآ', + 'ﻶ' => 'لآ', + 'ï»·' => 'لأ', + 'ﻸ' => 'لأ', + 'ﻹ' => 'لإ', + 'ﻺ' => 'لإ', + 'ï»»' => 'لا', + 'ﻼ' => 'لا', + 'ï¼' => '!', + '"' => '"', + '#' => '#', + '$' => '$', + 'ï¼…' => '%', + '&' => '&', + ''' => '\'', + '(' => '(', + ')' => ')', + '*' => '*', + '+' => '+', + ',' => ',', + 'ï¼' => '-', + '.' => '.', + 'ï¼' => '/', + 'ï¼' => '0', + '1' => '1', + 'ï¼’' => '2', + '3' => '3', + 'ï¼”' => '4', + '5' => '5', + 'ï¼–' => '6', + 'ï¼—' => '7', + '8' => '8', + 'ï¼™' => '9', + ':' => ':', + 'ï¼›' => ';', + '<' => '<', + 'ï¼' => '=', + '>' => '>', + '?' => '?', + 'ï¼ ' => '@', + 'A' => 'A', + 'ï¼¢' => 'B', + 'ï¼£' => 'C', + 'D' => 'D', + 'ï¼¥' => 'E', + 'F' => 'F', + 'G' => 'G', + 'H' => 'H', + 'I' => 'I', + 'J' => 'J', + 'K' => 'K', + 'L' => 'L', + 'ï¼­' => 'M', + 'ï¼®' => 'N', + 'O' => 'O', + 'ï¼°' => 'P', + 'ï¼±' => 'Q', + 'ï¼²' => 'R', + 'ï¼³' => 'S', + 'ï¼´' => 'T', + 'ï¼µ' => 'U', + 'V' => 'V', + 'ï¼·' => 'W', + 'X' => 'X', + 'ï¼¹' => 'Y', + 'Z' => 'Z', + 'ï¼»' => '[', + 'ï¼¼' => '\\', + 'ï¼½' => ']', + 'ï¼¾' => '^', + '_' => '_', + 'ï½€' => '`', + 'ï½' => 'a', + 'b' => 'b', + 'c' => 'c', + 'd' => 'd', + 'ï½…' => 'e', + 'f' => 'f', + 'g' => 'g', + 'h' => 'h', + 'i' => 'i', + 'j' => 'j', + 'k' => 'k', + 'l' => 'l', + 'ï½' => 'm', + 'n' => 'n', + 'ï½' => 'o', + 'ï½' => 'p', + 'q' => 'q', + 'ï½’' => 'r', + 's' => 's', + 'ï½”' => 't', + 'u' => 'u', + 'ï½–' => 'v', + 'ï½—' => 'w', + 'x' => 'x', + 'ï½™' => 'y', + 'z' => 'z', + 'ï½›' => '{', + '|' => '|', + 'ï½' => '}', + '~' => '~', + '⦅' => '⦅', + 'ï½ ' => '⦆', + '。' => '。', + 'ï½¢' => '「', + 'ï½£' => 'ã€', + '、' => 'ã€', + 'ï½¥' => '・', + 'ヲ' => 'ヲ', + 'ァ' => 'ã‚¡', + 'ィ' => 'ã‚£', + 'ゥ' => 'ã‚¥', + 'ェ' => 'ェ', + 'ォ' => 'ã‚©', + 'ャ' => 'ャ', + 'ï½­' => 'ュ', + 'ï½®' => 'ョ', + 'ッ' => 'ッ', + 'ï½°' => 'ー', + 'ï½±' => 'ã‚¢', + 'ï½²' => 'イ', + 'ï½³' => 'ウ', + 'ï½´' => 'エ', + 'ï½µ' => 'オ', + 'カ' => 'ã‚«', + 'ï½·' => 'ã‚­', + 'ク' => 'ク', + 'ï½¹' => 'ケ', + 'コ' => 'コ', + 'ï½»' => 'サ', + 'ï½¼' => 'ã‚·', + 'ï½½' => 'ス', + 'ï½¾' => 'ã‚»', + 'ソ' => 'ソ', + 'ï¾€' => 'ã‚¿', + 'ï¾' => 'ãƒ', + 'ツ' => 'ツ', + 'テ' => 'テ', + 'ト' => 'ト', + 'ï¾…' => 'ナ', + 'ニ' => 'ニ', + 'ヌ' => 'ヌ', + 'ネ' => 'ãƒ', + 'ノ' => 'ノ', + 'ハ' => 'ãƒ', + 'ヒ' => 'ヒ', + 'フ' => 'フ', + 'ï¾' => 'ヘ', + 'ホ' => 'ホ', + 'ï¾' => 'マ', + 'ï¾' => 'ミ', + 'ム' => 'ム', + 'ï¾’' => 'メ', + 'モ' => 'モ', + 'ï¾”' => 'ヤ', + 'ユ' => 'ユ', + 'ï¾–' => 'ヨ', + 'ï¾—' => 'ラ', + 'リ' => 'リ', + 'ï¾™' => 'ル', + 'レ' => 'レ', + 'ï¾›' => 'ロ', + 'ワ' => 'ワ', + 'ï¾' => 'ン', + '゙' => 'ã‚™', + '゚' => 'ã‚š', + 'ï¾ ' => 'á… ', + 'ᄀ' => 'á„€', + 'ï¾¢' => 'á„', + 'ï¾£' => 'ᆪ', + 'ᄂ' => 'á„‚', + 'ï¾¥' => 'ᆬ', + 'ᆭ' => 'ᆭ', + 'ᄃ' => 'ᄃ', + 'ᄄ' => 'á„„', + 'ᄅ' => 'á„…', + 'ᆰ' => 'ᆰ', + 'ᆱ' => 'ᆱ', + 'ᆲ' => 'ᆲ', + 'ï¾­' => 'ᆳ', + 'ï¾®' => 'ᆴ', + 'ᆵ' => 'ᆵ', + 'ï¾°' => 'á„š', + 'ï¾±' => 'ᄆ', + 'ï¾²' => 'ᄇ', + 'ï¾³' => 'ᄈ', + 'ï¾´' => 'á„¡', + 'ï¾µ' => 'ᄉ', + 'ᄊ' => 'á„Š', + 'ï¾·' => 'á„‹', + 'ᄌ' => 'á„Œ', + 'ï¾¹' => 'á„', + 'ᄎ' => 'á„Ž', + 'ï¾»' => 'á„', + 'ï¾¼' => 'á„', + 'ï¾½' => 'á„‘', + 'ï¾¾' => 'á„’', + 'ï¿‚' => 'á…¡', + 'ᅢ' => 'á…¢', + 'ï¿„' => 'á…£', + 'ï¿…' => 'á…¤', + 'ᅥ' => 'á…¥', + 'ᅦ' => 'á…¦', + 'ï¿Š' => 'á…§', + 'ï¿‹' => 'á…¨', + 'ï¿Œ' => 'á…©', + 'ï¿' => 'á…ª', + 'ï¿Ž' => 'á…«', + 'ï¿' => 'á…¬', + 'ï¿’' => 'á…­', + 'ï¿“' => 'á…®', + 'ï¿”' => 'á…¯', + 'ï¿•' => 'á…°', + 'ï¿–' => 'á…±', + 'ï¿—' => 'á…²', + 'ï¿š' => 'á…³', + 'ï¿›' => 'á…´', + 'ï¿œ' => 'á…µ', + 'ï¿ ' => '¢', + 'ï¿¡' => '£', + 'ï¿¢' => '¬', + 'ï¿£' => ' Ì„', + '¦' => '¦', + 'ï¿¥' => 'Â¥', + '₩' => 'â‚©', + '│' => '│', + 'ï¿©' => 'â†', + '↑' => '↑', + 'ï¿«' => '→', + '↓' => '↓', + 'ï¿­' => 'â– ', + 'ï¿®' => 'â—‹', + 'ð€' => 'A', + 'ð' => 'B', + 'ð‚' => 'C', + 'ðƒ' => 'D', + 'ð„' => 'E', + 'ð…' => 'F', + 'ð†' => 'G', + 'ð‡' => 'H', + 'ðˆ' => 'I', + 'ð‰' => 'J', + 'ðŠ' => 'K', + 'ð‹' => 'L', + 'ðŒ' => 'M', + 'ð' => 'N', + 'ðŽ' => 'O', + 'ð' => 'P', + 'ð' => 'Q', + 'ð‘' => 'R', + 'ð’' => 'S', + 'ð“' => 'T', + 'ð”' => 'U', + 'ð•' => 'V', + 'ð–' => 'W', + 'ð—' => 'X', + 'ð˜' => 'Y', + 'ð™' => 'Z', + 'ðš' => 'a', + 'ð›' => 'b', + 'ðœ' => 'c', + 'ð' => 'd', + 'ðž' => 'e', + 'ðŸ' => 'f', + 'ð ' => 'g', + 'ð¡' => 'h', + 'ð¢' => 'i', + 'ð£' => 'j', + 'ð¤' => 'k', + 'ð¥' => 'l', + 'ð¦' => 'm', + 'ð§' => 'n', + 'ð¨' => 'o', + 'ð©' => 'p', + 'ðª' => 'q', + 'ð«' => 'r', + 'ð¬' => 's', + 'ð­' => 't', + 'ð®' => 'u', + 'ð¯' => 'v', + 'ð°' => 'w', + 'ð±' => 'x', + 'ð²' => 'y', + 'ð³' => 'z', + 'ð´' => 'A', + 'ðµ' => 'B', + 'ð¶' => 'C', + 'ð·' => 'D', + 'ð¸' => 'E', + 'ð¹' => 'F', + 'ðº' => 'G', + 'ð»' => 'H', + 'ð¼' => 'I', + 'ð½' => 'J', + 'ð¾' => 'K', + 'ð¿' => 'L', + 'ð‘€' => 'M', + 'ð‘' => 'N', + 'ð‘‚' => 'O', + 'ð‘ƒ' => 'P', + 'ð‘„' => 'Q', + 'ð‘…' => 'R', + 'ð‘†' => 'S', + 'ð‘‡' => 'T', + 'ð‘ˆ' => 'U', + 'ð‘‰' => 'V', + 'ð‘Š' => 'W', + 'ð‘‹' => 'X', + 'ð‘Œ' => 'Y', + 'ð‘' => 'Z', + 'ð‘Ž' => 'a', + 'ð‘' => 'b', + 'ð‘' => 'c', + 'ð‘‘' => 'd', + 'ð‘’' => 'e', + 'ð‘“' => 'f', + 'ð‘”' => 'g', + 'ð‘–' => 'i', + 'ð‘—' => 'j', + 'ð‘˜' => 'k', + 'ð‘™' => 'l', + 'ð‘š' => 'm', + 'ð‘›' => 'n', + 'ð‘œ' => 'o', + 'ð‘' => 'p', + 'ð‘ž' => 'q', + 'ð‘Ÿ' => 'r', + 'ð‘ ' => 's', + 'ð‘¡' => 't', + 'ð‘¢' => 'u', + 'ð‘£' => 'v', + 'ð‘¤' => 'w', + 'ð‘¥' => 'x', + 'ð‘¦' => 'y', + 'ð‘§' => 'z', + 'ð‘¨' => 'A', + 'ð‘©' => 'B', + 'ð‘ª' => 'C', + 'ð‘«' => 'D', + 'ð‘¬' => 'E', + 'ð‘­' => 'F', + 'ð‘®' => 'G', + 'ð‘¯' => 'H', + 'ð‘°' => 'I', + 'ð‘±' => 'J', + 'ð‘²' => 'K', + 'ð‘³' => 'L', + 'ð‘´' => 'M', + 'ð‘µ' => 'N', + 'ð‘¶' => 'O', + 'ð‘·' => 'P', + 'ð‘¸' => 'Q', + 'ð‘¹' => 'R', + 'ð‘º' => 'S', + 'ð‘»' => 'T', + 'ð‘¼' => 'U', + 'ð‘½' => 'V', + 'ð‘¾' => 'W', + 'ð‘¿' => 'X', + 'ð’€' => 'Y', + 'ð’' => 'Z', + 'ð’‚' => 'a', + 'ð’ƒ' => 'b', + 'ð’„' => 'c', + 'ð’…' => 'd', + 'ð’†' => 'e', + 'ð’‡' => 'f', + 'ð’ˆ' => 'g', + 'ð’‰' => 'h', + 'ð’Š' => 'i', + 'ð’‹' => 'j', + 'ð’Œ' => 'k', + 'ð’' => 'l', + 'ð’Ž' => 'm', + 'ð’' => 'n', + 'ð’' => 'o', + 'ð’‘' => 'p', + 'ð’’' => 'q', + 'ð’“' => 'r', + 'ð’”' => 's', + 'ð’•' => 't', + 'ð’–' => 'u', + 'ð’—' => 'v', + 'ð’˜' => 'w', + 'ð’™' => 'x', + 'ð’š' => 'y', + 'ð’›' => 'z', + 'ð’œ' => 'A', + 'ð’ž' => 'C', + 'ð’Ÿ' => 'D', + 'ð’¢' => 'G', + 'ð’¥' => 'J', + 'ð’¦' => 'K', + 'ð’©' => 'N', + 'ð’ª' => 'O', + 'ð’«' => 'P', + 'ð’¬' => 'Q', + 'ð’®' => 'S', + 'ð’¯' => 'T', + 'ð’°' => 'U', + 'ð’±' => 'V', + 'ð’²' => 'W', + 'ð’³' => 'X', + 'ð’´' => 'Y', + 'ð’µ' => 'Z', + 'ð’¶' => 'a', + 'ð’·' => 'b', + 'ð’¸' => 'c', + 'ð’¹' => 'd', + 'ð’»' => 'f', + 'ð’½' => 'h', + 'ð’¾' => 'i', + 'ð’¿' => 'j', + 'ð“€' => 'k', + 'ð“' => 'l', + 'ð“‚' => 'm', + 'ð“ƒ' => 'n', + 'ð“…' => 'p', + 'ð“†' => 'q', + 'ð“‡' => 'r', + 'ð“ˆ' => 's', + 'ð“‰' => 't', + 'ð“Š' => 'u', + 'ð“‹' => 'v', + 'ð“Œ' => 'w', + 'ð“' => 'x', + 'ð“Ž' => 'y', + 'ð“' => 'z', + 'ð“' => 'A', + 'ð“‘' => 'B', + 'ð“’' => 'C', + 'ð““' => 'D', + 'ð“”' => 'E', + 'ð“•' => 'F', + 'ð“–' => 'G', + 'ð“—' => 'H', + 'ð“˜' => 'I', + 'ð“™' => 'J', + 'ð“š' => 'K', + 'ð“›' => 'L', + 'ð“œ' => 'M', + 'ð“' => 'N', + 'ð“ž' => 'O', + 'ð“Ÿ' => 'P', + 'ð“ ' => 'Q', + 'ð“¡' => 'R', + 'ð“¢' => 'S', + 'ð“£' => 'T', + 'ð“¤' => 'U', + 'ð“¥' => 'V', + 'ð“¦' => 'W', + 'ð“§' => 'X', + 'ð“¨' => 'Y', + 'ð“©' => 'Z', + 'ð“ª' => 'a', + 'ð“«' => 'b', + 'ð“¬' => 'c', + 'ð“­' => 'd', + 'ð“®' => 'e', + 'ð“¯' => 'f', + 'ð“°' => 'g', + 'ð“±' => 'h', + 'ð“²' => 'i', + 'ð“³' => 'j', + 'ð“´' => 'k', + 'ð“µ' => 'l', + 'ð“¶' => 'm', + 'ð“·' => 'n', + 'ð“¸' => 'o', + 'ð“¹' => 'p', + 'ð“º' => 'q', + 'ð“»' => 'r', + 'ð“¼' => 's', + 'ð“½' => 't', + 'ð“¾' => 'u', + 'ð“¿' => 'v', + 'ð”€' => 'w', + 'ð”' => 'x', + 'ð”‚' => 'y', + 'ð”ƒ' => 'z', + 'ð”„' => 'A', + 'ð”…' => 'B', + 'ð”‡' => 'D', + 'ð”ˆ' => 'E', + 'ð”‰' => 'F', + 'ð”Š' => 'G', + 'ð”' => 'J', + 'ð”Ž' => 'K', + 'ð”' => 'L', + 'ð”' => 'M', + 'ð”‘' => 'N', + 'ð”’' => 'O', + 'ð”“' => 'P', + 'ð””' => 'Q', + 'ð”–' => 'S', + 'ð”—' => 'T', + 'ð”˜' => 'U', + 'ð”™' => 'V', + 'ð”š' => 'W', + 'ð”›' => 'X', + 'ð”œ' => 'Y', + 'ð”ž' => 'a', + 'ð”Ÿ' => 'b', + 'ð” ' => 'c', + 'ð”¡' => 'd', + 'ð”¢' => 'e', + 'ð”£' => 'f', + 'ð”¤' => 'g', + 'ð”¥' => 'h', + 'ð”¦' => 'i', + 'ð”§' => 'j', + 'ð”¨' => 'k', + 'ð”©' => 'l', + 'ð”ª' => 'm', + 'ð”«' => 'n', + 'ð”¬' => 'o', + 'ð”­' => 'p', + 'ð”®' => 'q', + 'ð”¯' => 'r', + 'ð”°' => 's', + 'ð”±' => 't', + 'ð”²' => 'u', + 'ð”³' => 'v', + 'ð”´' => 'w', + 'ð”µ' => 'x', + 'ð”¶' => 'y', + 'ð”·' => 'z', + 'ð”¸' => 'A', + 'ð”¹' => 'B', + 'ð”»' => 'D', + 'ð”¼' => 'E', + 'ð”½' => 'F', + 'ð”¾' => 'G', + 'ð•€' => 'I', + 'ð•' => 'J', + 'ð•‚' => 'K', + 'ð•ƒ' => 'L', + 'ð•„' => 'M', + 'ð•†' => 'O', + 'ð•Š' => 'S', + 'ð•‹' => 'T', + 'ð•Œ' => 'U', + 'ð•' => 'V', + 'ð•Ž' => 'W', + 'ð•' => 'X', + 'ð•' => 'Y', + 'ð•’' => 'a', + 'ð•“' => 'b', + 'ð•”' => 'c', + 'ð••' => 'd', + 'ð•–' => 'e', + 'ð•—' => 'f', + 'ð•˜' => 'g', + 'ð•™' => 'h', + 'ð•š' => 'i', + 'ð•›' => 'j', + 'ð•œ' => 'k', + 'ð•' => 'l', + 'ð•ž' => 'm', + 'ð•Ÿ' => 'n', + 'ð• ' => 'o', + 'ð•¡' => 'p', + 'ð•¢' => 'q', + 'ð•£' => 'r', + 'ð•¤' => 's', + 'ð•¥' => 't', + 'ð•¦' => 'u', + 'ð•§' => 'v', + 'ð•¨' => 'w', + 'ð•©' => 'x', + 'ð•ª' => 'y', + 'ð•«' => 'z', + 'ð•¬' => 'A', + 'ð•­' => 'B', + 'ð•®' => 'C', + 'ð•¯' => 'D', + 'ð•°' => 'E', + 'ð•±' => 'F', + 'ð•²' => 'G', + 'ð•³' => 'H', + 'ð•´' => 'I', + 'ð•µ' => 'J', + 'ð•¶' => 'K', + 'ð•·' => 'L', + 'ð•¸' => 'M', + 'ð•¹' => 'N', + 'ð•º' => 'O', + 'ð•»' => 'P', + 'ð•¼' => 'Q', + 'ð•½' => 'R', + 'ð•¾' => 'S', + 'ð•¿' => 'T', + 'ð–€' => 'U', + 'ð–' => 'V', + 'ð–‚' => 'W', + 'ð–ƒ' => 'X', + 'ð–„' => 'Y', + 'ð–…' => 'Z', + 'ð–†' => 'a', + 'ð–‡' => 'b', + 'ð–ˆ' => 'c', + 'ð–‰' => 'd', + 'ð–Š' => 'e', + 'ð–‹' => 'f', + 'ð–Œ' => 'g', + 'ð–' => 'h', + 'ð–Ž' => 'i', + 'ð–' => 'j', + 'ð–' => 'k', + 'ð–‘' => 'l', + 'ð–’' => 'm', + 'ð–“' => 'n', + 'ð–”' => 'o', + 'ð–•' => 'p', + 'ð––' => 'q', + 'ð–—' => 'r', + 'ð–˜' => 's', + 'ð–™' => 't', + 'ð–š' => 'u', + 'ð–›' => 'v', + 'ð–œ' => 'w', + 'ð–' => 'x', + 'ð–ž' => 'y', + 'ð–Ÿ' => 'z', + 'ð– ' => 'A', + 'ð–¡' => 'B', + 'ð–¢' => 'C', + 'ð–£' => 'D', + 'ð–¤' => 'E', + 'ð–¥' => 'F', + 'ð–¦' => 'G', + 'ð–§' => 'H', + 'ð–¨' => 'I', + 'ð–©' => 'J', + 'ð–ª' => 'K', + 'ð–«' => 'L', + 'ð–¬' => 'M', + 'ð–­' => 'N', + 'ð–®' => 'O', + 'ð–¯' => 'P', + 'ð–°' => 'Q', + 'ð–±' => 'R', + 'ð–²' => 'S', + 'ð–³' => 'T', + 'ð–´' => 'U', + 'ð–µ' => 'V', + 'ð–¶' => 'W', + 'ð–·' => 'X', + 'ð–¸' => 'Y', + 'ð–¹' => 'Z', + 'ð–º' => 'a', + 'ð–»' => 'b', + 'ð–¼' => 'c', + 'ð–½' => 'd', + 'ð–¾' => 'e', + 'ð–¿' => 'f', + 'ð—€' => 'g', + 'ð—' => 'h', + 'ð—‚' => 'i', + 'ð—ƒ' => 'j', + 'ð—„' => 'k', + 'ð—…' => 'l', + 'ð—†' => 'm', + 'ð—‡' => 'n', + 'ð—ˆ' => 'o', + 'ð—‰' => 'p', + 'ð—Š' => 'q', + 'ð—‹' => 'r', + 'ð—Œ' => 's', + 'ð—' => 't', + 'ð—Ž' => 'u', + 'ð—' => 'v', + 'ð—' => 'w', + 'ð—‘' => 'x', + 'ð—’' => 'y', + 'ð—“' => 'z', + 'ð—”' => 'A', + 'ð—•' => 'B', + 'ð—–' => 'C', + 'ð——' => 'D', + 'ð—˜' => 'E', + 'ð—™' => 'F', + 'ð—š' => 'G', + 'ð—›' => 'H', + 'ð—œ' => 'I', + 'ð—' => 'J', + 'ð—ž' => 'K', + 'ð—Ÿ' => 'L', + 'ð— ' => 'M', + 'ð—¡' => 'N', + 'ð—¢' => 'O', + 'ð—£' => 'P', + 'ð—¤' => 'Q', + 'ð—¥' => 'R', + 'ð—¦' => 'S', + 'ð—§' => 'T', + 'ð—¨' => 'U', + 'ð—©' => 'V', + 'ð—ª' => 'W', + 'ð—«' => 'X', + 'ð—¬' => 'Y', + 'ð—­' => 'Z', + 'ð—®' => 'a', + 'ð—¯' => 'b', + 'ð—°' => 'c', + 'ð—±' => 'd', + 'ð—²' => 'e', + 'ð—³' => 'f', + 'ð—´' => 'g', + 'ð—µ' => 'h', + 'ð—¶' => 'i', + 'ð—·' => 'j', + 'ð—¸' => 'k', + 'ð—¹' => 'l', + 'ð—º' => 'm', + 'ð—»' => 'n', + 'ð—¼' => 'o', + 'ð—½' => 'p', + 'ð—¾' => 'q', + 'ð—¿' => 'r', + 'ð˜€' => 's', + 'ð˜' => 't', + 'ð˜‚' => 'u', + 'ð˜ƒ' => 'v', + 'ð˜„' => 'w', + 'ð˜…' => 'x', + 'ð˜†' => 'y', + 'ð˜‡' => 'z', + 'ð˜ˆ' => 'A', + 'ð˜‰' => 'B', + 'ð˜Š' => 'C', + 'ð˜‹' => 'D', + 'ð˜Œ' => 'E', + 'ð˜' => 'F', + 'ð˜Ž' => 'G', + 'ð˜' => 'H', + 'ð˜' => 'I', + 'ð˜‘' => 'J', + 'ð˜’' => 'K', + 'ð˜“' => 'L', + 'ð˜”' => 'M', + 'ð˜•' => 'N', + 'ð˜–' => 'O', + 'ð˜—' => 'P', + 'ð˜˜' => 'Q', + 'ð˜™' => 'R', + 'ð˜š' => 'S', + 'ð˜›' => 'T', + 'ð˜œ' => 'U', + 'ð˜' => 'V', + 'ð˜ž' => 'W', + 'ð˜Ÿ' => 'X', + 'ð˜ ' => 'Y', + 'ð˜¡' => 'Z', + 'ð˜¢' => 'a', + 'ð˜£' => 'b', + 'ð˜¤' => 'c', + 'ð˜¥' => 'd', + 'ð˜¦' => 'e', + 'ð˜§' => 'f', + 'ð˜¨' => 'g', + 'ð˜©' => 'h', + 'ð˜ª' => 'i', + 'ð˜«' => 'j', + 'ð˜¬' => 'k', + 'ð˜­' => 'l', + 'ð˜®' => 'm', + 'ð˜¯' => 'n', + 'ð˜°' => 'o', + 'ð˜±' => 'p', + 'ð˜²' => 'q', + 'ð˜³' => 'r', + 'ð˜´' => 's', + 'ð˜µ' => 't', + 'ð˜¶' => 'u', + 'ð˜·' => 'v', + 'ð˜¸' => 'w', + 'ð˜¹' => 'x', + 'ð˜º' => 'y', + 'ð˜»' => 'z', + 'ð˜¼' => 'A', + 'ð˜½' => 'B', + 'ð˜¾' => 'C', + 'ð˜¿' => 'D', + 'ð™€' => 'E', + 'ð™' => 'F', + 'ð™‚' => 'G', + 'ð™ƒ' => 'H', + 'ð™„' => 'I', + 'ð™…' => 'J', + 'ð™†' => 'K', + 'ð™‡' => 'L', + 'ð™ˆ' => 'M', + 'ð™‰' => 'N', + 'ð™Š' => 'O', + 'ð™‹' => 'P', + 'ð™Œ' => 'Q', + 'ð™' => 'R', + 'ð™Ž' => 'S', + 'ð™' => 'T', + 'ð™' => 'U', + 'ð™‘' => 'V', + 'ð™’' => 'W', + 'ð™“' => 'X', + 'ð™”' => 'Y', + 'ð™•' => 'Z', + 'ð™–' => 'a', + 'ð™—' => 'b', + 'ð™˜' => 'c', + 'ð™™' => 'd', + 'ð™š' => 'e', + 'ð™›' => 'f', + 'ð™œ' => 'g', + 'ð™' => 'h', + 'ð™ž' => 'i', + 'ð™Ÿ' => 'j', + 'ð™ ' => 'k', + 'ð™¡' => 'l', + 'ð™¢' => 'm', + 'ð™£' => 'n', + 'ð™¤' => 'o', + 'ð™¥' => 'p', + 'ð™¦' => 'q', + 'ð™§' => 'r', + 'ð™¨' => 's', + 'ð™©' => 't', + 'ð™ª' => 'u', + 'ð™«' => 'v', + 'ð™¬' => 'w', + 'ð™­' => 'x', + 'ð™®' => 'y', + 'ð™¯' => 'z', + 'ð™°' => 'A', + 'ð™±' => 'B', + 'ð™²' => 'C', + 'ð™³' => 'D', + 'ð™´' => 'E', + 'ð™µ' => 'F', + 'ð™¶' => 'G', + 'ð™·' => 'H', + 'ð™¸' => 'I', + 'ð™¹' => 'J', + 'ð™º' => 'K', + 'ð™»' => 'L', + 'ð™¼' => 'M', + 'ð™½' => 'N', + 'ð™¾' => 'O', + 'ð™¿' => 'P', + 'ðš€' => 'Q', + 'ðš' => 'R', + 'ðš‚' => 'S', + 'ðšƒ' => 'T', + 'ðš„' => 'U', + 'ðš…' => 'V', + 'ðš†' => 'W', + 'ðš‡' => 'X', + 'ðšˆ' => 'Y', + 'ðš‰' => 'Z', + 'ðšŠ' => 'a', + 'ðš‹' => 'b', + 'ðšŒ' => 'c', + 'ðš' => 'd', + 'ðšŽ' => 'e', + 'ðš' => 'f', + 'ðš' => 'g', + 'ðš‘' => 'h', + 'ðš’' => 'i', + 'ðš“' => 'j', + 'ðš”' => 'k', + 'ðš•' => 'l', + 'ðš–' => 'm', + 'ðš—' => 'n', + 'ðš˜' => 'o', + 'ðš™' => 'p', + 'ðšš' => 'q', + 'ðš›' => 'r', + 'ðšœ' => 's', + 'ðš' => 't', + 'ðšž' => 'u', + 'ðšŸ' => 'v', + 'ðš ' => 'w', + 'ðš¡' => 'x', + 'ðš¢' => 'y', + 'ðš£' => 'z', + 'ðš¤' => 'ı', + 'ðš¥' => 'È·', + 'ðš¨' => 'Α', + 'ðš©' => 'Î’', + 'ðšª' => 'Γ', + 'ðš«' => 'Δ', + 'ðš¬' => 'Ε', + 'ðš­' => 'Ζ', + 'ðš®' => 'Η', + 'ðš¯' => 'Θ', + 'ðš°' => 'Ι', + 'ðš±' => 'Κ', + 'ðš²' => 'Λ', + 'ðš³' => 'Îœ', + 'ðš´' => 'Î', + 'ðšµ' => 'Ξ', + 'ðš¶' => 'Ο', + 'ðš·' => 'Π', + 'ðš¸' => 'Ρ', + 'ðš¹' => 'Θ', + 'ðšº' => 'Σ', + 'ðš»' => 'Τ', + 'ðš¼' => 'Î¥', + 'ðš½' => 'Φ', + 'ðš¾' => 'Χ', + 'ðš¿' => 'Ψ', + 'ð›€' => 'Ω', + 'ð›' => '∇', + 'ð›‚' => 'α', + 'ð›ƒ' => 'β', + 'ð›„' => 'γ', + 'ð›…' => 'δ', + 'ð›†' => 'ε', + 'ð›‡' => 'ζ', + 'ð›ˆ' => 'η', + 'ð›‰' => 'θ', + 'ð›Š' => 'ι', + 'ð›‹' => 'κ', + 'ð›Œ' => 'λ', + 'ð›' => 'μ', + 'ð›Ž' => 'ν', + 'ð›' => 'ξ', + 'ð›' => 'ο', + 'ð›‘' => 'Ï€', + 'ð›’' => 'Ï', + 'ð›“' => 'Ï‚', + 'ð›”' => 'σ', + 'ð›•' => 'Ï„', + 'ð›–' => 'Ï…', + 'ð›—' => 'φ', + 'ð›˜' => 'χ', + 'ð›™' => 'ψ', + 'ð›š' => 'ω', + 'ð››' => '∂', + 'ð›œ' => 'ε', + 'ð›' => 'θ', + 'ð›ž' => 'κ', + 'ð›Ÿ' => 'φ', + 'ð› ' => 'Ï', + 'ð›¡' => 'Ï€', + 'ð›¢' => 'Α', + 'ð›£' => 'Î’', + 'ð›¤' => 'Γ', + 'ð›¥' => 'Δ', + 'ð›¦' => 'Ε', + 'ð›§' => 'Ζ', + 'ð›¨' => 'Η', + 'ð›©' => 'Θ', + 'ð›ª' => 'Ι', + 'ð›«' => 'Κ', + 'ð›¬' => 'Λ', + 'ð›­' => 'Îœ', + 'ð›®' => 'Î', + 'ð›¯' => 'Ξ', + 'ð›°' => 'Ο', + 'ð›±' => 'Π', + 'ð›²' => 'Ρ', + 'ð›³' => 'Θ', + 'ð›´' => 'Σ', + 'ð›µ' => 'Τ', + 'ð›¶' => 'Î¥', + 'ð›·' => 'Φ', + 'ð›¸' => 'Χ', + 'ð›¹' => 'Ψ', + 'ð›º' => 'Ω', + 'ð›»' => '∇', + 'ð›¼' => 'α', + 'ð›½' => 'β', + 'ð›¾' => 'γ', + 'ð›¿' => 'δ', + 'ðœ€' => 'ε', + 'ðœ' => 'ζ', + 'ðœ‚' => 'η', + 'ðœƒ' => 'θ', + 'ðœ„' => 'ι', + 'ðœ…' => 'κ', + 'ðœ†' => 'λ', + 'ðœ‡' => 'μ', + 'ðœˆ' => 'ν', + 'ðœ‰' => 'ξ', + 'ðœŠ' => 'ο', + 'ðœ‹' => 'Ï€', + 'ðœŒ' => 'Ï', + 'ðœ' => 'Ï‚', + 'ðœŽ' => 'σ', + 'ðœ' => 'Ï„', + 'ðœ' => 'Ï…', + 'ðœ‘' => 'φ', + 'ðœ’' => 'χ', + 'ðœ“' => 'ψ', + 'ðœ”' => 'ω', + 'ðœ•' => '∂', + 'ðœ–' => 'ε', + 'ðœ—' => 'θ', + 'ðœ˜' => 'κ', + 'ðœ™' => 'φ', + 'ðœš' => 'Ï', + 'ðœ›' => 'Ï€', + 'ðœœ' => 'Α', + 'ðœ' => 'Î’', + 'ðœž' => 'Γ', + 'ðœŸ' => 'Δ', + 'ðœ ' => 'Ε', + 'ðœ¡' => 'Ζ', + 'ðœ¢' => 'Η', + 'ðœ£' => 'Θ', + 'ðœ¤' => 'Ι', + 'ðœ¥' => 'Κ', + 'ðœ¦' => 'Λ', + 'ðœ§' => 'Îœ', + 'ðœ¨' => 'Î', + 'ðœ©' => 'Ξ', + 'ðœª' => 'Ο', + 'ðœ«' => 'Π', + 'ðœ¬' => 'Ρ', + 'ðœ­' => 'Θ', + 'ðœ®' => 'Σ', + 'ðœ¯' => 'Τ', + 'ðœ°' => 'Î¥', + 'ðœ±' => 'Φ', + 'ðœ²' => 'Χ', + 'ðœ³' => 'Ψ', + 'ðœ´' => 'Ω', + 'ðœµ' => '∇', + 'ðœ¶' => 'α', + 'ðœ·' => 'β', + 'ðœ¸' => 'γ', + 'ðœ¹' => 'δ', + 'ðœº' => 'ε', + 'ðœ»' => 'ζ', + 'ðœ¼' => 'η', + 'ðœ½' => 'θ', + 'ðœ¾' => 'ι', + 'ðœ¿' => 'κ', + 'ð€' => 'λ', + 'ð' => 'μ', + 'ð‚' => 'ν', + 'ðƒ' => 'ξ', + 'ð„' => 'ο', + 'ð…' => 'Ï€', + 'ð†' => 'Ï', + 'ð‡' => 'Ï‚', + 'ðˆ' => 'σ', + 'ð‰' => 'Ï„', + 'ðŠ' => 'Ï…', + 'ð‹' => 'φ', + 'ðŒ' => 'χ', + 'ð' => 'ψ', + 'ðŽ' => 'ω', + 'ð' => '∂', + 'ð' => 'ε', + 'ð‘' => 'θ', + 'ð’' => 'κ', + 'ð“' => 'φ', + 'ð”' => 'Ï', + 'ð•' => 'Ï€', + 'ð–' => 'Α', + 'ð—' => 'Î’', + 'ð˜' => 'Γ', + 'ð™' => 'Δ', + 'ðš' => 'Ε', + 'ð›' => 'Ζ', + 'ðœ' => 'Η', + 'ð' => 'Θ', + 'ðž' => 'Ι', + 'ðŸ' => 'Κ', + 'ð ' => 'Λ', + 'ð¡' => 'Îœ', + 'ð¢' => 'Î', + 'ð£' => 'Ξ', + 'ð¤' => 'Ο', + 'ð¥' => 'Π', + 'ð¦' => 'Ρ', + 'ð§' => 'Θ', + 'ð¨' => 'Σ', + 'ð©' => 'Τ', + 'ðª' => 'Î¥', + 'ð«' => 'Φ', + 'ð¬' => 'Χ', + 'ð­' => 'Ψ', + 'ð®' => 'Ω', + 'ð¯' => '∇', + 'ð°' => 'α', + 'ð±' => 'β', + 'ð²' => 'γ', + 'ð³' => 'δ', + 'ð´' => 'ε', + 'ðµ' => 'ζ', + 'ð¶' => 'η', + 'ð·' => 'θ', + 'ð¸' => 'ι', + 'ð¹' => 'κ', + 'ðº' => 'λ', + 'ð»' => 'μ', + 'ð¼' => 'ν', + 'ð½' => 'ξ', + 'ð¾' => 'ο', + 'ð¿' => 'Ï€', + 'ðž€' => 'Ï', + 'ðž' => 'Ï‚', + 'ðž‚' => 'σ', + 'ðžƒ' => 'Ï„', + 'ðž„' => 'Ï…', + 'ðž…' => 'φ', + 'ðž†' => 'χ', + 'ðž‡' => 'ψ', + 'ðžˆ' => 'ω', + 'ðž‰' => '∂', + 'ðžŠ' => 'ε', + 'ðž‹' => 'θ', + 'ðžŒ' => 'κ', + 'ðž' => 'φ', + 'ðžŽ' => 'Ï', + 'ðž' => 'Ï€', + 'ðž' => 'Α', + 'ðž‘' => 'Î’', + 'ðž’' => 'Γ', + 'ðž“' => 'Δ', + 'ðž”' => 'Ε', + 'ðž•' => 'Ζ', + 'ðž–' => 'Η', + 'ðž—' => 'Θ', + 'ðž˜' => 'Ι', + 'ðž™' => 'Κ', + 'ðžš' => 'Λ', + 'ðž›' => 'Îœ', + 'ðžœ' => 'Î', + 'ðž' => 'Ξ', + 'ðžž' => 'Ο', + 'ðžŸ' => 'Π', + 'ðž ' => 'Ρ', + 'ðž¡' => 'Θ', + 'ðž¢' => 'Σ', + 'ðž£' => 'Τ', + 'ðž¤' => 'Î¥', + 'ðž¥' => 'Φ', + 'ðž¦' => 'Χ', + 'ðž§' => 'Ψ', + 'ðž¨' => 'Ω', + 'ðž©' => '∇', + 'ðžª' => 'α', + 'ðž«' => 'β', + 'ðž¬' => 'γ', + 'ðž­' => 'δ', + 'ðž®' => 'ε', + 'ðž¯' => 'ζ', + 'ðž°' => 'η', + 'ðž±' => 'θ', + 'ðž²' => 'ι', + 'ðž³' => 'κ', + 'ðž´' => 'λ', + 'ðžµ' => 'μ', + 'ðž¶' => 'ν', + 'ðž·' => 'ξ', + 'ðž¸' => 'ο', + 'ðž¹' => 'Ï€', + 'ðžº' => 'Ï', + 'ðž»' => 'Ï‚', + 'ðž¼' => 'σ', + 'ðž½' => 'Ï„', + 'ðž¾' => 'Ï…', + 'ðž¿' => 'φ', + 'ðŸ€' => 'χ', + 'ðŸ' => 'ψ', + 'ðŸ‚' => 'ω', + 'ðŸƒ' => '∂', + 'ðŸ„' => 'ε', + 'ðŸ…' => 'θ', + 'ðŸ†' => 'κ', + 'ðŸ‡' => 'φ', + 'ðŸˆ' => 'Ï', + 'ðŸ‰' => 'Ï€', + 'ðŸŠ' => 'Ïœ', + 'ðŸ‹' => 'Ï', + 'ðŸŽ' => '0', + 'ðŸ' => '1', + 'ðŸ' => '2', + 'ðŸ‘' => '3', + 'ðŸ’' => '4', + 'ðŸ“' => '5', + 'ðŸ”' => '6', + 'ðŸ•' => '7', + 'ðŸ–' => '8', + 'ðŸ—' => '9', + 'ðŸ˜' => '0', + 'ðŸ™' => '1', + 'ðŸš' => '2', + 'ðŸ›' => '3', + 'ðŸœ' => '4', + 'ðŸ' => '5', + 'ðŸž' => '6', + 'ðŸŸ' => '7', + 'ðŸ ' => '8', + 'ðŸ¡' => '9', + 'ðŸ¢' => '0', + 'ðŸ£' => '1', + 'ðŸ¤' => '2', + 'ðŸ¥' => '3', + 'ðŸ¦' => '4', + 'ðŸ§' => '5', + 'ðŸ¨' => '6', + 'ðŸ©' => '7', + 'ðŸª' => '8', + 'ðŸ«' => '9', + 'ðŸ¬' => '0', + 'ðŸ­' => '1', + 'ðŸ®' => '2', + 'ðŸ¯' => '3', + 'ðŸ°' => '4', + 'ðŸ±' => '5', + 'ðŸ²' => '6', + 'ðŸ³' => '7', + 'ðŸ´' => '8', + 'ðŸµ' => '9', + 'ðŸ¶' => '0', + 'ðŸ·' => '1', + 'ðŸ¸' => '2', + 'ðŸ¹' => '3', + 'ðŸº' => '4', + 'ðŸ»' => '5', + 'ðŸ¼' => '6', + 'ðŸ½' => '7', + 'ðŸ¾' => '8', + 'ðŸ¿' => '9', + '𞸀' => 'ا', + 'ðž¸' => 'ب', + '𞸂' => 'ج', + '𞸃' => 'د', + '𞸅' => 'Ùˆ', + '𞸆' => 'ز', + '𞸇' => 'Ø­', + '𞸈' => 'Ø·', + '𞸉' => 'ÙŠ', + '𞸊' => 'Ùƒ', + '𞸋' => 'Ù„', + '𞸌' => 'Ù…', + 'ðž¸' => 'Ù†', + '𞸎' => 'س', + 'ðž¸' => 'ع', + 'ðž¸' => 'Ù', + '𞸑' => 'ص', + '𞸒' => 'Ù‚', + '𞸓' => 'ر', + '𞸔' => 'Ø´', + '𞸕' => 'ت', + '𞸖' => 'Ø«', + '𞸗' => 'Ø®', + '𞸘' => 'Ø°', + '𞸙' => 'ض', + '𞸚' => 'ظ', + '𞸛' => 'غ', + '𞸜' => 'Ù®', + 'ðž¸' => 'Úº', + '𞸞' => 'Ú¡', + '𞸟' => 'Ù¯', + '𞸡' => 'ب', + '𞸢' => 'ج', + '𞸤' => 'Ù‡', + '𞸧' => 'Ø­', + '𞸩' => 'ÙŠ', + '𞸪' => 'Ùƒ', + '𞸫' => 'Ù„', + '𞸬' => 'Ù…', + '𞸭' => 'Ù†', + '𞸮' => 'س', + '𞸯' => 'ع', + '𞸰' => 'Ù', + '𞸱' => 'ص', + '𞸲' => 'Ù‚', + '𞸴' => 'Ø´', + '𞸵' => 'ت', + '𞸶' => 'Ø«', + '𞸷' => 'Ø®', + '𞸹' => 'ض', + '𞸻' => 'غ', + '𞹂' => 'ج', + '𞹇' => 'Ø­', + '𞹉' => 'ÙŠ', + '𞹋' => 'Ù„', + 'ðž¹' => 'Ù†', + '𞹎' => 'س', + 'ðž¹' => 'ع', + '𞹑' => 'ص', + 'ðž¹’' => 'Ù‚', + 'ðž¹”' => 'Ø´', + 'ðž¹—' => 'Ø®', + 'ðž¹™' => 'ض', + 'ðž¹›' => 'غ', + 'ðž¹' => 'Úº', + '𞹟' => 'Ù¯', + '𞹡' => 'ب', + 'ðž¹¢' => 'ج', + '𞹤' => 'Ù‡', + '𞹧' => 'Ø­', + '𞹨' => 'Ø·', + '𞹩' => 'ÙŠ', + '𞹪' => 'Ùƒ', + '𞹬' => 'Ù…', + 'ðž¹­' => 'Ù†', + 'ðž¹®' => 'س', + '𞹯' => 'ع', + 'ðž¹°' => 'Ù', + 'ðž¹±' => 'ص', + 'ðž¹²' => 'Ù‚', + 'ðž¹´' => 'Ø´', + 'ðž¹µ' => 'ت', + '𞹶' => 'Ø«', + 'ðž¹·' => 'Ø®', + 'ðž¹¹' => 'ض', + '𞹺' => 'ظ', + 'ðž¹»' => 'غ', + 'ðž¹¼' => 'Ù®', + 'ðž¹¾' => 'Ú¡', + '𞺀' => 'ا', + 'ðžº' => 'ب', + '𞺂' => 'ج', + '𞺃' => 'د', + '𞺄' => 'Ù‡', + '𞺅' => 'Ùˆ', + '𞺆' => 'ز', + '𞺇' => 'Ø­', + '𞺈' => 'Ø·', + '𞺉' => 'ÙŠ', + '𞺋' => 'Ù„', + '𞺌' => 'Ù…', + 'ðžº' => 'Ù†', + '𞺎' => 'س', + 'ðžº' => 'ع', + 'ðžº' => 'Ù', + '𞺑' => 'ص', + '𞺒' => 'Ù‚', + '𞺓' => 'ر', + '𞺔' => 'Ø´', + '𞺕' => 'ت', + '𞺖' => 'Ø«', + '𞺗' => 'Ø®', + '𞺘' => 'Ø°', + '𞺙' => 'ض', + '𞺚' => 'ظ', + '𞺛' => 'غ', + '𞺡' => 'ب', + '𞺢' => 'ج', + '𞺣' => 'د', + '𞺥' => 'Ùˆ', + '𞺦' => 'ز', + '𞺧' => 'Ø­', + '𞺨' => 'Ø·', + '𞺩' => 'ÙŠ', + '𞺫' => 'Ù„', + '𞺬' => 'Ù…', + '𞺭' => 'Ù†', + '𞺮' => 'س', + '𞺯' => 'ع', + '𞺰' => 'Ù', + '𞺱' => 'ص', + '𞺲' => 'Ù‚', + '𞺳' => 'ر', + '𞺴' => 'Ø´', + '𞺵' => 'ت', + '𞺶' => 'Ø«', + '𞺷' => 'Ø®', + '𞺸' => 'Ø°', + '𞺹' => 'ض', + '𞺺' => 'ظ', + '𞺻' => 'غ', + '🄀' => '0.', + 'ðŸ„' => '0,', + '🄂' => '1,', + '🄃' => '2,', + '🄄' => '3,', + '🄅' => '4,', + '🄆' => '5,', + '🄇' => '6,', + '🄈' => '7,', + '🄉' => '8,', + '🄊' => '9,', + 'ðŸ„' => '(A)', + '🄑' => '(B)', + '🄒' => '(C)', + '🄓' => '(D)', + '🄔' => '(E)', + '🄕' => '(F)', + '🄖' => '(G)', + '🄗' => '(H)', + '🄘' => '(I)', + '🄙' => '(J)', + '🄚' => '(K)', + '🄛' => '(L)', + '🄜' => '(M)', + 'ðŸ„' => '(N)', + '🄞' => '(O)', + '🄟' => '(P)', + '🄠' => '(Q)', + '🄡' => '(R)', + '🄢' => '(S)', + '🄣' => '(T)', + '🄤' => '(U)', + '🄥' => '(V)', + '🄦' => '(W)', + '🄧' => '(X)', + '🄨' => '(Y)', + '🄩' => '(Z)', + '🄪' => '〔S〕', + '🄫' => 'C', + '🄬' => 'R', + '🄭' => 'CD', + '🄮' => 'WZ', + '🄰' => 'A', + '🄱' => 'B', + '🄲' => 'C', + '🄳' => 'D', + '🄴' => 'E', + '🄵' => 'F', + '🄶' => 'G', + '🄷' => 'H', + '🄸' => 'I', + '🄹' => 'J', + '🄺' => 'K', + '🄻' => 'L', + '🄼' => 'M', + '🄽' => 'N', + '🄾' => 'O', + '🄿' => 'P', + '🅀' => 'Q', + 'ðŸ…' => 'R', + '🅂' => 'S', + '🅃' => 'T', + '🅄' => 'U', + '🅅' => 'V', + '🅆' => 'W', + '🅇' => 'X', + '🅈' => 'Y', + '🅉' => 'Z', + '🅊' => 'HV', + '🅋' => 'MV', + '🅌' => 'SD', + 'ðŸ…' => 'SS', + '🅎' => 'PPV', + 'ðŸ…' => 'WC', + '🅪' => 'MC', + '🅫' => 'MD', + '🅬' => 'MR', + 'ðŸ†' => 'DJ', + '🈀' => 'ã»ã‹', + 'ðŸˆ' => 'ココ', + '🈂' => 'サ', + 'ðŸˆ' => '手', + '🈑' => 'å­—', + '🈒' => 'åŒ', + '🈓' => 'デ', + '🈔' => '二', + '🈕' => '多', + '🈖' => '解', + '🈗' => '天', + '🈘' => '交', + '🈙' => '映', + '🈚' => 'ç„¡', + '🈛' => 'æ–™', + '🈜' => 'å‰', + 'ðŸˆ' => '後', + '🈞' => 'å†', + '🈟' => 'æ–°', + '🈠' => 'åˆ', + '🈡' => '終', + '🈢' => '生', + '🈣' => '販', + '🈤' => '声', + '🈥' => 'å¹', + '🈦' => 'æ¼”', + '🈧' => '投', + '🈨' => 'æ•', + '🈩' => '一', + '🈪' => '三', + '🈫' => 'éŠ', + '🈬' => 'å·¦', + '🈭' => '中', + '🈮' => 'å³', + '🈯' => '指', + '🈰' => 'èµ°', + '🈱' => '打', + '🈲' => 'ç¦', + '🈳' => '空', + '🈴' => 'åˆ', + '🈵' => '満', + '🈶' => '有', + '🈷' => '月', + '🈸' => '申', + '🈹' => '割', + '🈺' => 'å–¶', + '🈻' => 'é…', + '🉀' => '〔本〕', + 'ðŸ‰' => '〔三〕', + '🉂' => '〔二〕', + '🉃' => '〔安〕', + '🉄' => '〔点〕', + '🉅' => '〔打〕', + '🉆' => '〔盗〕', + '🉇' => '〔å‹ã€•', + '🉈' => '〔敗〕', + 'ðŸ‰' => 'å¾—', + '🉑' => 'å¯', + '🯰' => '0', + '🯱' => '1', + '🯲' => '2', + '🯳' => '3', + '🯴' => '4', + '🯵' => '5', + '🯶' => '6', + '🯷' => '7', + '🯸' => '8', + '🯹' => '9', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/bootstrap.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/bootstrap.php new file mode 100644 index 00000000..3608e5c0 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/bootstrap.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Normalizer as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('normalizer_is_normalized')) { + function normalizer_is_normalized($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::isNormalized($string, $form); } +} +if (!function_exists('normalizer_normalize')) { + function normalizer_normalize($string, $form = p\Normalizer::FORM_C) { return p\Normalizer::normalize($string, $form); } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php new file mode 100644 index 00000000..e36d1a94 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Intl\Normalizer as p; + +if (!function_exists('normalizer_is_normalized')) { + function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } +} +if (!function_exists('normalizer_normalize')) { + function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/composer.json b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/composer.json new file mode 100644 index 00000000..393edf70 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-intl-normalizer/composer.json @@ -0,0 +1,39 @@ +{ + "name": "symfony/polyfill-intl-normalizer", + "type": "library", + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "keywords": ["polyfill", "shim", "compatibility", "portable", "intl", "normalizer"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, + "files": [ "bootstrap.php" ], + "classmap": [ "Resources/stubs" ] + }, + "suggest": { + "ext-intl": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/LICENSE b/dev/plugins/email/vendor/symfony/polyfill-mbstring/LICENSE new file mode 100644 index 00000000..4cd8bdd3 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/Mbstring.php b/dev/plugins/email/vendor/symfony/polyfill-mbstring/Mbstring.php new file mode 100644 index 00000000..b5990956 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -0,0 +1,870 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Mbstring; + +/** + * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. + * + * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point + * - mb_convert_encoding - Convert character encoding + * - mb_convert_variables - Convert character code in variable(s) + * - mb_decode_mimeheader - Decode string in MIME header field + * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference + * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding + * - mb_get_info - Get internal settings of mbstring + * - mb_http_input - Detect HTTP input character encoding + * - mb_http_output - Set/Get HTTP output character encoding + * - mb_internal_encoding - Set/Get internal character encoding + * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character + * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters + * - mb_strlen - Get string length + * - mb_strpos - Find position of first occurrence of string in a string + * - mb_strrpos - Find position of last occurrence of a string in a string + * - mb_str_split - Convert a string to an array + * - mb_strtolower - Make a string lowercase + * - mb_strtoupper - Make a string uppercase + * - mb_substitute_character - Set/Get substitution character + * - mb_substr - Get part of string + * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive + * - mb_stristr - Finds first occurrence of a string within another, case insensitive + * - mb_strrchr - Finds the last occurrence of a character in a string within another + * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive + * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive + * - mb_strstr - Finds first occurrence of a string within another + * - mb_strwidth - Return width of string + * - mb_substr_count - Count the number of substring occurrences + * + * Not implemented: + * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) + * - mb_ereg_* - Regular expression with multibyte support + * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable + * - mb_preferred_mime_name - Get MIME charset string + * - mb_regex_encoding - Returns current encoding for multibyte regex as string + * - mb_regex_set_options - Set/Get the default options for mbregex functions + * - mb_send_mail - Send encoded mail + * - mb_split - Split multibyte string using regular expression + * - mb_strcut - Get part of string + * - mb_strimwidth - Get truncated string with specified width + * + * @author Nicolas Grekas + * + * @internal + */ +final class Mbstring +{ + public const MB_CASE_FOLD = \PHP_INT_MAX; + + private const CASE_FOLD = [ + ['µ', 'Å¿', "\xCD\x85", 'Ï‚', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], + ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'Ï€', 'κ', 'Ï', 'ε', "\xE1\xB9\xA1", 'ι'], + ]; + + private static $encodingList = ['ASCII', 'UTF-8']; + private static $language = 'neutral'; + private static $internalEncoding = 'UTF-8'; + + public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) + { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); + } else { + $fromEncoding = self::getEncoding($fromEncoding); + } + + $toEncoding = self::getEncoding($toEncoding); + + if ('BASE64' === $fromEncoding) { + $s = base64_decode($s); + $fromEncoding = $toEncoding; + } + + if ('BASE64' === $toEncoding) { + return base64_encode($s); + } + + if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { + if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { + $fromEncoding = 'Windows-1252'; + } + if ('UTF-8' !== $fromEncoding) { + $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); + } + + return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); + } + + if ('HTML-ENTITIES' === $fromEncoding) { + $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); + $fromEncoding = 'UTF-8'; + } + + return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s); + } + + public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) + { + $ok = true; + array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { + if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { + $ok = false; + } + }); + + return $ok ? $fromEncoding : false; + } + + public static function mb_decode_mimeheader($s) + { + return \iconv_mime_decode($s, 2, self::$internalEncoding); + } + + public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) + { + trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); + } + + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return self::mb_chr($c - $convmap[$i + 2]); + } + } + + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return \iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { + return false; + } + + if (null !== $encoding && !is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); + + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); + + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return \iconv('UTF-8', $encoding.'//IGNORE', $result); + } + + public static function mb_convert_case($s, $mode, $encoding = null) + { + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + if (\MB_CASE_TITLE == $mode) { + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); + } else { + if (\MB_CASE_UPPER == $mode) { + static $upper = null; + if (null === $upper) { + $upper = self::getData('upperCase'); + } + $map = $upper; + } else { + if (self::MB_CASE_FOLD === $mode) { + $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); + } + + static $lower = null; + if (null === $lower) { + $lower = self::getData('lowerCase'); + } + $map = $lower; + } + + static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; + + $i = 0; + $len = \strlen($s); + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + + if (isset($map[$uchr])) { + $uchr = $map[$uchr]; + $nlen = \strlen($uchr); + + if ($nlen == $ulen) { + $nlen = $i; + do { + $s[--$nlen] = $uchr[--$ulen]; + } while ($ulen); + } else { + $s = substr_replace($s, $uchr, $i - $ulen, $ulen); + $len += $nlen - $ulen; + $i += $nlen - $ulen; + } + } + } + } + + if (null === $encoding) { + return $s; + } + + return \iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_internal_encoding($encoding = null) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + $normalizedEncoding = self::getEncoding($encoding); + + if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { + self::$internalEncoding = $normalizedEncoding; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + public static function mb_language($lang = null) + { + if (null === $lang) { + return self::$language; + } + + switch ($normalizedLang = strtolower($lang)) { + case 'uni': + case 'neutral': + self::$language = $normalizedLang; + + return true; + } + + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); + } + + public static function mb_list_encodings() + { + return ['UTF-8']; + } + + public static function mb_encoding_aliases($encoding) + { + switch (strtoupper($encoding)) { + case 'UTF8': + case 'UTF-8': + return ['utf8']; + } + + return false; + } + + public static function mb_check_encoding($var = null, $encoding = null) + { + if (null === $encoding) { + if (null === $var) { + return false; + } + $encoding = self::$internalEncoding; + } + + return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var); + } + + public static function mb_detect_encoding($str, $encodingList = null, $strict = false) + { + if (null === $encodingList) { + $encodingList = self::$encodingList; + } else { + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + } + + foreach ($encodingList as $enc) { + switch ($enc) { + case 'ASCII': + if (!preg_match('/[\x80-\xFF]/', $str)) { + return $enc; + } + break; + + case 'UTF8': + case 'UTF-8': + if (preg_match('//u', $str)) { + return 'UTF-8'; + } + break; + + default: + if (0 === strncmp($enc, 'ISO-8859-', 9)) { + return $enc; + } + } + } + + return false; + } + + public static function mb_detect_order($encodingList = null) + { + if (null === $encodingList) { + return self::$encodingList; + } + + if (!\is_array($encodingList)) { + $encodingList = array_map('trim', explode(',', $encodingList)); + } + $encodingList = array_map('strtoupper', $encodingList); + + foreach ($encodingList as $enc) { + switch ($enc) { + default: + if (strncmp($enc, 'ISO-8859-', 9)) { + return false; + } + // no break + case 'ASCII': + case 'UTF8': + case 'UTF-8': + } + } + + self::$encodingList = $encodingList; + + return true; + } + + public static function mb_strlen($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return \strlen($s); + } + + return @\iconv_strlen($s, $encoding); + } + + public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strpos($haystack, $needle, $offset); + } + + $needle = (string) $needle; + if ('' === $needle) { + if (80000 > \PHP_VERSION_ID) { + trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); + + return false; + } + + return 0; + } + + return \iconv_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return strrpos($haystack, $needle, $offset); + } + + if ($offset != (int) $offset) { + $offset = 0; + } elseif ($offset = (int) $offset) { + if ($offset < 0) { + if (0 > $offset += self::mb_strlen($needle)) { + $haystack = self::mb_substr($haystack, 0, $offset, $encoding); + } + $offset = 0; + } else { + $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); + } + } + + $pos = '' !== $needle || 80000 > \PHP_VERSION_ID + ? \iconv_strrpos($haystack, $needle, $encoding) + : self::mb_strlen($haystack, $encoding); + + return false !== $pos ? $offset + $pos : false; + } + + public static function mb_str_split($string, $split_length = 1, $encoding = null) + { + if (null !== $string && !is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { + trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); + + return null; + } + + if (1 > $split_length = (int) $split_length) { + if (80000 > \PHP_VERSION_ID) { + trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); + return false; + } + + throw new \ValueError('Argument #2 ($length) must be greater than 0'); + } + + if (null === $encoding) { + $encoding = mb_internal_encoding(); + } + + if ('UTF-8' === $encoding = self::getEncoding($encoding)) { + $rx = '/('; + while (65535 < $split_length) { + $rx .= '.{65535}'; + $split_length -= 65535; + } + $rx .= '.{'.$split_length.'})/us'; + + return preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); + } + + $result = []; + $length = mb_strlen($string, $encoding); + + for ($i = 0; $i < $length; $i += $split_length) { + $result[] = mb_substr($string, $i, $split_length, $encoding); + } + + return $result; + } + + public static function mb_strtolower($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); + } + + public static function mb_strtoupper($s, $encoding = null) + { + return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); + } + + public static function mb_substitute_character($c = null) + { + if (null === $c) { + return 'none'; + } + if (0 === strcasecmp($c, 'none')) { + return true; + } + if (80000 > \PHP_VERSION_ID) { + return false; + } + + throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); + } + + public static function mb_substr($s, $start, $length = null, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + return (string) substr($s, $start, null === $length ? 2147483647 : $length); + } + + if ($start < 0) { + $start = \iconv_strlen($s, $encoding) + $start; + if ($start < 0) { + $start = 0; + } + } + + if (null === $length) { + $length = 2147483647; + } elseif ($length < 0) { + $length = \iconv_strlen($s, $encoding) + $length - $start; + if ($length < 0) { + return ''; + } + } + + return (string) \iconv_substr($s, $start, $length, $encoding); + } + + public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) + { + $pos = self::mb_stripos($haystack, $needle, 0, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) + { + $encoding = self::getEncoding($encoding); + if ('CP850' === $encoding || 'ASCII' === $encoding) { + $pos = strrpos($haystack, $needle); + } else { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = \iconv_strrpos($haystack, $needle, $encoding); + } + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) + { + $needle = self::mb_substr($needle, 0, 1, $encoding); + $pos = self::mb_strripos($haystack, $needle, $encoding); + + return self::getSubpart($pos, $part, $haystack, $encoding); + } + + public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) + { + $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); + $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + + return self::mb_strrpos($haystack, $needle, $offset, $encoding); + } + + public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) + { + $pos = strpos($haystack, $needle); + if (false === $pos) { + return false; + } + if ($part) { + return substr($haystack, 0, $pos); + } + + return substr($haystack, $pos); + } + + public static function mb_get_info($type = 'all') + { + $info = [ + 'internal_encoding' => self::$internalEncoding, + 'http_output' => 'pass', + 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', + 'func_overload' => 0, + 'func_overload_list' => 'no overload', + 'mail_charset' => 'UTF-8', + 'mail_header_encoding' => 'BASE64', + 'mail_body_encoding' => 'BASE64', + 'illegal_chars' => 0, + 'encoding_translation' => 'Off', + 'language' => self::$language, + 'detect_order' => self::$encodingList, + 'substitute_character' => 'none', + 'strict_detection' => 'Off', + ]; + + if ('all' === $type) { + return $info; + } + if (isset($info[$type])) { + return $info[$type]; + } + + return false; + } + + public static function mb_http_input($type = '') + { + return false; + } + + public static function mb_http_output($encoding = null) + { + return null !== $encoding ? 'pass' === $encoding : 'pass'; + } + + public static function mb_strwidth($s, $encoding = null) + { + $encoding = self::getEncoding($encoding); + + if ('UTF-8' !== $encoding) { + $s = \iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); + + return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); + } + + public static function mb_substr_count($haystack, $needle, $encoding = null) + { + return substr_count($haystack, $needle); + } + + public static function mb_output_handler($contents, $status) + { + return $contents; + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + + private static function getSubpart($pos, $part, $haystack, $encoding) + { + if (false === $pos) { + return false; + } + if ($part) { + return self::mb_substr($haystack, 0, $pos, $encoding); + } + + return self::mb_substr($haystack, $pos, null, $encoding); + } + + private static function html_encoding_callback(array $m) + { + $i = 1; + $entities = ''; + $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); + + while (isset($m[$i])) { + if (0x80 > $m[$i]) { + $entities .= \chr($m[$i++]); + continue; + } + if (0xF0 <= $m[$i]) { + $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } elseif (0xE0 <= $m[$i]) { + $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; + } else { + $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; + } + + $entities .= '&#'.$c.';'; + } + + return $entities; + } + + private static function title_case(array $s) + { + return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); + } + + private static function getData($file) + { + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; + } + + return false; + } + + private static function getEncoding($encoding) + { + if (null === $encoding) { + return self::$internalEncoding; + } + + if ('UTF-8' === $encoding) { + return 'UTF-8'; + } + + $encoding = strtoupper($encoding); + + if ('8BIT' === $encoding || 'BINARY' === $encoding) { + return 'CP850'; + } + + if ('UTF8' === $encoding) { + return 'UTF-8'; + } + + return $encoding; + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/README.md b/dev/plugins/email/vendor/symfony/polyfill-mbstring/README.md new file mode 100644 index 00000000..4efb599d --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/README.md @@ -0,0 +1,13 @@ +Symfony Polyfill / Mbstring +=========================== + +This component provides a partial, native PHP implementation for the +[Mbstring](https://php.net/mbstring) extension. + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/dev/plugins/email/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 00000000..fac60b08 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1397 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Ã' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Ã…' => 'Ã¥', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'ÃŒ' => 'ì', + 'Ã' => 'í', + 'ÃŽ' => 'î', + 'Ã' => 'ï', + 'Ã' => 'ð', + 'Ñ' => 'ñ', + 'Ã’' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ãœ' => 'ü', + 'Ã' => 'ý', + 'Þ' => 'þ', + 'Ä€' => 'Ä', + 'Ä‚' => 'ă', + 'Ä„' => 'Ä…', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'ÄŠ' => 'Ä‹', + 'ÄŒ' => 'Ä', + 'ÄŽ' => 'Ä', + 'Ä' => 'Ä‘', + 'Ä’' => 'Ä“', + 'Ä”' => 'Ä•', + 'Ä–' => 'Ä—', + 'Ę' => 'Ä™', + 'Äš' => 'Ä›', + 'Äœ' => 'Ä', + 'Äž' => 'ÄŸ', + 'Ä ' => 'Ä¡', + 'Ä¢' => 'Ä£', + 'Ĥ' => 'Ä¥', + 'Ħ' => 'ħ', + 'Ĩ' => 'Ä©', + 'Ī' => 'Ä«', + 'Ĭ' => 'Ä­', + 'Ä®' => 'į', + 'Ä°' => 'i̇', + 'IJ' => 'ij', + 'Ä´' => 'ĵ', + 'Ķ' => 'Ä·', + 'Ĺ' => 'ĺ', + 'Ä»' => 'ļ', + 'Ľ' => 'ľ', + 'Ä¿' => 'Å€', + 'Å' => 'Å‚', + 'Ń' => 'Å„', + 'Å…' => 'ņ', + 'Ň' => 'ň', + 'ÅŠ' => 'Å‹', + 'ÅŒ' => 'Å', + 'ÅŽ' => 'Å', + 'Å' => 'Å‘', + 'Å’' => 'Å“', + 'Å”' => 'Å•', + 'Å–' => 'Å—', + 'Ř' => 'Å™', + 'Åš' => 'Å›', + 'Åœ' => 'Å', + 'Åž' => 'ÅŸ', + 'Å ' => 'Å¡', + 'Å¢' => 'Å£', + 'Ť' => 'Å¥', + 'Ŧ' => 'ŧ', + 'Ũ' => 'Å©', + 'Ū' => 'Å«', + 'Ŭ' => 'Å­', + 'Å®' => 'ů', + 'Å°' => 'ű', + 'Ų' => 'ų', + 'Å´' => 'ŵ', + 'Ŷ' => 'Å·', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Å»' => 'ż', + 'Ž' => 'ž', + 'Æ' => 'É“', + 'Æ‚' => 'ƃ', + 'Æ„' => 'Æ…', + 'Ɔ' => 'É”', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'É–', + 'ÆŠ' => 'É—', + 'Æ‹' => 'ÆŒ', + 'ÆŽ' => 'Ç', + 'Æ' => 'É™', + 'Æ' => 'É›', + 'Æ‘' => 'Æ’', + 'Æ“' => 'É ', + 'Æ”' => 'É£', + 'Æ–' => 'É©', + 'Æ—' => 'ɨ', + 'Ƙ' => 'Æ™', + 'Æœ' => 'ɯ', + 'Æ' => 'ɲ', + 'ÆŸ' => 'ɵ', + 'Æ ' => 'Æ¡', + 'Æ¢' => 'Æ£', + 'Ƥ' => 'Æ¥', + 'Ʀ' => 'Ê€', + 'Ƨ' => 'ƨ', + 'Æ©' => 'ʃ', + 'Ƭ' => 'Æ­', + 'Æ®' => 'ʈ', + 'Ư' => 'Æ°', + 'Ʊ' => 'ÊŠ', + 'Ʋ' => 'Ê‹', + 'Ƴ' => 'Æ´', + 'Ƶ' => 'ƶ', + 'Æ·' => 'Ê’', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'Ç„' => 'dž', + 'Ç…' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'ÇŠ' => 'ÇŒ', + 'Ç‹' => 'ÇŒ', + 'Ç' => 'ÇŽ', + 'Ç' => 'Ç', + 'Ç‘' => 'Ç’', + 'Ç“' => 'Ç”', + 'Ç•' => 'Ç–', + 'Ç—' => 'ǘ', + 'Ç™' => 'Çš', + 'Ç›' => 'Çœ', + 'Çž' => 'ÇŸ', + 'Ç ' => 'Ç¡', + 'Ç¢' => 'Ç£', + 'Ǥ' => 'Ç¥', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'Ç©', + 'Ǫ' => 'Ç«', + 'Ǭ' => 'Ç­', + 'Ç®' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ç´' => 'ǵ', + 'Ƕ' => 'Æ•', + 'Ç·' => 'Æ¿', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'Ç»', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'Ç¿', + 'È€' => 'È', + 'È‚' => 'ȃ', + 'È„' => 'È…', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'ÈŠ' => 'È‹', + 'ÈŒ' => 'È', + 'ÈŽ' => 'È', + 'È' => 'È‘', + 'È’' => 'È“', + 'È”' => 'È•', + 'È–' => 'È—', + 'Ș' => 'È™', + 'Èš' => 'È›', + 'Èœ' => 'È', + 'Èž' => 'ÈŸ', + 'È ' => 'Æž', + 'È¢' => 'È£', + 'Ȥ' => 'È¥', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'È©', + 'Ȫ' => 'È«', + 'Ȭ' => 'È­', + 'È®' => 'ȯ', + 'È°' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'â±¥', + 'È»' => 'ȼ', + 'Ƚ' => 'Æš', + 'Ⱦ' => 'ⱦ', + 'É' => 'É‚', + 'Ƀ' => 'Æ€', + 'É„' => 'ʉ', + 'É…' => 'ÊŒ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'ÉŠ' => 'É‹', + 'ÉŒ' => 'É', + 'ÉŽ' => 'É', + 'Í°' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'Í·', + 'Í¿' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'ÎŒ' => 'ÏŒ', + 'ÎŽ' => 'Ï', + 'Î' => 'ÏŽ', + 'Α' => 'α', + 'Î’' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Îœ' => 'μ', + 'Î' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'Ï€', + 'Ρ' => 'Ï', + 'Σ' => 'σ', + 'Τ' => 'Ï„', + 'Î¥' => 'Ï…', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ÏŠ', + 'Ϋ' => 'Ï‹', + 'Ï' => 'Ï—', + 'Ϙ' => 'Ï™', + 'Ïš' => 'Ï›', + 'Ïœ' => 'Ï', + 'Ïž' => 'ÏŸ', + 'Ï ' => 'Ï¡', + 'Ï¢' => 'Ï£', + 'Ϥ' => 'Ï¥', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'Ï©', + 'Ϫ' => 'Ï«', + 'Ϭ' => 'Ï­', + 'Ï®' => 'ϯ', + 'Ï´' => 'θ', + 'Ï·' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'Ï»', + 'Ͻ' => 'Í»', + 'Ͼ' => 'ͼ', + 'Ï¿' => 'ͽ', + 'Ѐ' => 'Ñ', + 'Ð' => 'Ñ‘', + 'Ђ' => 'Ñ’', + 'Ѓ' => 'Ñ“', + 'Є' => 'Ñ”', + 'Ð…' => 'Ñ•', + 'І' => 'Ñ–', + 'Ї' => 'Ñ—', + 'Ј' => 'ј', + 'Љ' => 'Ñ™', + 'Њ' => 'Ñš', + 'Ћ' => 'Ñ›', + 'ÐŒ' => 'Ñœ', + 'Ð' => 'Ñ', + 'ÐŽ' => 'Ñž', + 'Ð' => 'ÑŸ', + 'Ð' => 'а', + 'Б' => 'б', + 'Ð’' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'Ðœ' => 'м', + 'Ð' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'Ñ€', + 'С' => 'Ñ', + 'Т' => 'Ñ‚', + 'У' => 'у', + 'Ф' => 'Ñ„', + 'Ð¥' => 'Ñ…', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ÑŠ', + 'Ы' => 'Ñ‹', + 'Ь' => 'ÑŒ', + 'Э' => 'Ñ', + 'Ю' => 'ÑŽ', + 'Я' => 'Ñ', + 'Ñ ' => 'Ñ¡', + 'Ñ¢' => 'Ñ£', + 'Ѥ' => 'Ñ¥', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'Ñ©', + 'Ѫ' => 'Ñ«', + 'Ѭ' => 'Ñ­', + 'Ñ®' => 'ѯ', + 'Ñ°' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ñ´' => 'ѵ', + 'Ѷ' => 'Ñ·', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'Ñ»', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'Ñ¿', + 'Ò€' => 'Ò', + 'ÒŠ' => 'Ò‹', + 'ÒŒ' => 'Ò', + 'ÒŽ' => 'Ò', + 'Ò' => 'Ò‘', + 'Ò’' => 'Ò“', + 'Ò”' => 'Ò•', + 'Ò–' => 'Ò—', + 'Ò˜' => 'Ò™', + 'Òš' => 'Ò›', + 'Òœ' => 'Ò', + 'Òž' => 'ÒŸ', + 'Ò ' => 'Ò¡', + 'Ò¢' => 'Ò£', + 'Ò¤' => 'Ò¥', + 'Ò¦' => 'Ò§', + 'Ò¨' => 'Ò©', + 'Òª' => 'Ò«', + 'Ò¬' => 'Ò­', + 'Ò®' => 'Ò¯', + 'Ò°' => 'Ò±', + 'Ò²' => 'Ò³', + 'Ò´' => 'Òµ', + 'Ò¶' => 'Ò·', + 'Ò¸' => 'Ò¹', + 'Òº' => 'Ò»', + 'Ò¼' => 'Ò½', + 'Ò¾' => 'Ò¿', + 'Ó€' => 'Ó', + 'Ó' => 'Ó‚', + 'Óƒ' => 'Ó„', + 'Ó…' => 'Ó†', + 'Ó‡' => 'Óˆ', + 'Ó‰' => 'ÓŠ', + 'Ó‹' => 'ÓŒ', + 'Ó' => 'ÓŽ', + 'Ó' => 'Ó‘', + 'Ó’' => 'Ó“', + 'Ó”' => 'Ó•', + 'Ó–' => 'Ó—', + 'Ó˜' => 'Ó™', + 'Óš' => 'Ó›', + 'Óœ' => 'Ó', + 'Óž' => 'ÓŸ', + 'Ó ' => 'Ó¡', + 'Ó¢' => 'Ó£', + 'Ó¤' => 'Ó¥', + 'Ó¦' => 'Ó§', + 'Ó¨' => 'Ó©', + 'Óª' => 'Ó«', + 'Ó¬' => 'Ó­', + 'Ó®' => 'Ó¯', + 'Ó°' => 'Ó±', + 'Ó²' => 'Ó³', + 'Ó´' => 'Óµ', + 'Ó¶' => 'Ó·', + 'Ó¸' => 'Ó¹', + 'Óº' => 'Ó»', + 'Ó¼' => 'Ó½', + 'Ó¾' => 'Ó¿', + 'Ô€' => 'Ô', + 'Ô‚' => 'Ôƒ', + 'Ô„' => 'Ô…', + 'Ô†' => 'Ô‡', + 'Ôˆ' => 'Ô‰', + 'ÔŠ' => 'Ô‹', + 'ÔŒ' => 'Ô', + 'ÔŽ' => 'Ô', + 'Ô' => 'Ô‘', + 'Ô’' => 'Ô“', + 'Ô”' => 'Ô•', + 'Ô–' => 'Ô—', + 'Ô˜' => 'Ô™', + 'Ôš' => 'Ô›', + 'Ôœ' => 'Ô', + 'Ôž' => 'ÔŸ', + 'Ô ' => 'Ô¡', + 'Ô¢' => 'Ô£', + 'Ô¤' => 'Ô¥', + 'Ô¦' => 'Ô§', + 'Ô¨' => 'Ô©', + 'Ôª' => 'Ô«', + 'Ô¬' => 'Ô­', + 'Ô®' => 'Ô¯', + 'Ô±' => 'Õ¡', + 'Ô²' => 'Õ¢', + 'Ô³' => 'Õ£', + 'Ô´' => 'Õ¤', + 'Ôµ' => 'Õ¥', + 'Ô¶' => 'Õ¦', + 'Ô·' => 'Õ§', + 'Ô¸' => 'Õ¨', + 'Ô¹' => 'Õ©', + 'Ôº' => 'Õª', + 'Ô»' => 'Õ«', + 'Ô¼' => 'Õ¬', + 'Ô½' => 'Õ­', + 'Ô¾' => 'Õ®', + 'Ô¿' => 'Õ¯', + 'Õ€' => 'Õ°', + 'Õ' => 'Õ±', + 'Õ‚' => 'Õ²', + 'Õƒ' => 'Õ³', + 'Õ„' => 'Õ´', + 'Õ…' => 'Õµ', + 'Õ†' => 'Õ¶', + 'Õ‡' => 'Õ·', + 'Õˆ' => 'Õ¸', + 'Õ‰' => 'Õ¹', + 'ÕŠ' => 'Õº', + 'Õ‹' => 'Õ»', + 'ÕŒ' => 'Õ¼', + 'Õ' => 'Õ½', + 'ÕŽ' => 'Õ¾', + 'Õ' => 'Õ¿', + 'Õ' => 'Ö€', + 'Õ‘' => 'Ö', + 'Õ’' => 'Ö‚', + 'Õ“' => 'Öƒ', + 'Õ”' => 'Ö„', + 'Õ•' => 'Ö…', + 'Õ–' => 'Ö†', + 'á‚ ' => 'â´€', + 'á‚¡' => 'â´', + 'á‚¢' => 'â´‚', + 'á‚£' => 'â´ƒ', + 'Ⴄ' => 'â´„', + 'á‚¥' => 'â´…', + 'Ⴆ' => 'â´†', + 'Ⴇ' => 'â´‡', + 'Ⴈ' => 'â´ˆ', + 'á‚©' => 'â´‰', + 'Ⴊ' => 'â´Š', + 'á‚«' => 'â´‹', + 'Ⴌ' => 'â´Œ', + 'á‚­' => 'â´', + 'á‚®' => 'â´Ž', + 'Ⴏ' => 'â´', + 'á‚°' => 'â´', + 'Ⴑ' => 'â´‘', + 'Ⴒ' => 'â´’', + 'Ⴓ' => 'â´“', + 'á‚´' => 'â´”', + 'Ⴕ' => 'â´•', + 'Ⴖ' => 'â´–', + 'á‚·' => 'â´—', + 'Ⴘ' => 'â´˜', + 'Ⴙ' => 'â´™', + 'Ⴚ' => 'â´š', + 'á‚»' => 'â´›', + 'Ⴜ' => 'â´œ', + 'Ⴝ' => 'â´', + 'Ⴞ' => 'â´ž', + 'á‚¿' => 'â´Ÿ', + 'Ⴠ' => 'â´ ', + 'áƒ' => 'â´¡', + 'Ⴢ' => 'â´¢', + 'Ⴣ' => 'â´£', + 'Ⴤ' => 'â´¤', + 'Ⴥ' => 'â´¥', + 'Ⴧ' => 'â´§', + 'áƒ' => 'â´­', + 'Ꭰ' => 'ê­°', + 'Ꭱ' => 'ê­±', + 'Ꭲ' => 'ê­²', + 'Ꭳ' => 'ê­³', + 'Ꭴ' => 'ê­´', + 'Ꭵ' => 'ê­µ', + 'Ꭶ' => 'ê­¶', + 'Ꭷ' => 'ê­·', + 'Ꭸ' => 'ê­¸', + 'Ꭹ' => 'ê­¹', + 'Ꭺ' => 'ê­º', + 'Ꭻ' => 'ê­»', + 'Ꭼ' => 'ê­¼', + 'Ꭽ' => 'ê­½', + 'Ꭾ' => 'ê­¾', + 'Ꭿ' => 'ê­¿', + 'Ꮀ' => 'ꮀ', + 'Ꮁ' => 'ê®', + 'Ꮂ' => 'ꮂ', + 'Ꮃ' => 'ꮃ', + 'Ꮄ' => 'ꮄ', + 'Ꮅ' => 'ê®…', + 'Ꮆ' => 'ꮆ', + 'Ꮇ' => 'ꮇ', + 'Ꮈ' => 'ꮈ', + 'Ꮉ' => 'ꮉ', + 'Ꮊ' => 'ꮊ', + 'Ꮋ' => 'ꮋ', + 'Ꮌ' => 'ꮌ', + 'Ꮍ' => 'ê®', + 'Ꮎ' => 'ꮎ', + 'Ꮏ' => 'ê®', + 'á€' => 'ê®', + 'á' => 'ꮑ', + 'á‚' => 'ê®’', + 'áƒ' => 'ꮓ', + 'á„' => 'ê®”', + 'á…' => 'ꮕ', + 'á†' => 'ê®–', + 'á‡' => 'ê®—', + 'áˆ' => 'ꮘ', + 'á‰' => 'ê®™', + 'áŠ' => 'ꮚ', + 'á‹' => 'ê®›', + 'áŒ' => 'ꮜ', + 'á' => 'ê®', + 'áŽ' => 'ꮞ', + 'á' => 'ꮟ', + 'á' => 'ê® ', + 'á‘' => 'ꮡ', + 'á’' => 'ꮢ', + 'á“' => 'ꮣ', + 'á”' => 'ꮤ', + 'á•' => 'ꮥ', + 'á–' => 'ꮦ', + 'á—' => 'ꮧ', + 'á˜' => 'ꮨ', + 'á™' => 'ꮩ', + 'áš' => 'ꮪ', + 'á›' => 'ꮫ', + 'áœ' => 'ꮬ', + 'á' => 'ê®­', + 'áž' => 'ê®®', + 'áŸ' => 'ꮯ', + 'á ' => 'ê®°', + 'á¡' => 'ê®±', + 'á¢' => 'ꮲ', + 'á£' => 'ꮳ', + 'á¤' => 'ê®´', + 'á¥' => 'ꮵ', + 'á¦' => 'ꮶ', + 'á§' => 'ê®·', + 'á¨' => 'ꮸ', + 'á©' => 'ꮹ', + 'áª' => 'ꮺ', + 'á«' => 'ê®»', + 'á¬' => 'ꮼ', + 'á­' => 'ꮽ', + 'á®' => 'ꮾ', + 'á¯' => 'ꮿ', + 'á°' => 'á¸', + 'á±' => 'á¹', + 'á²' => 'áº', + 'á³' => 'á»', + 'á´' => 'á¼', + 'áµ' => 'á½', + 'á²' => 'áƒ', + 'Ბ' => 'ბ', + 'á²’' => 'გ', + 'Დ' => 'დ', + 'á²”' => 'ე', + 'Ვ' => 'ვ', + 'á²–' => 'ზ', + 'á²—' => 'თ', + 'Ი' => 'ი', + 'á²™' => 'კ', + 'Ლ' => 'ლ', + 'á²›' => 'მ', + 'Ნ' => 'ნ', + 'á²' => 'áƒ', + 'Პ' => 'პ', + 'Ჟ' => 'ჟ', + 'á² ' => 'რ', + 'Ს' => 'ს', + 'á²¢' => 'ტ', + 'á²£' => 'უ', + 'Ფ' => 'ფ', + 'á²¥' => 'ქ', + 'Ღ' => 'ღ', + 'Ყ' => 'ყ', + 'Შ' => 'შ', + 'Ჩ' => 'ჩ', + 'Ც' => 'ც', + 'Ძ' => 'ძ', + 'Წ' => 'წ', + 'á²­' => 'ჭ', + 'á²®' => 'ხ', + 'Ჯ' => 'ჯ', + 'á²°' => 'ჰ', + 'á²±' => 'ჱ', + 'á²²' => 'ჲ', + 'á²³' => 'ჳ', + 'á²´' => 'ჴ', + 'á²µ' => 'ჵ', + 'Ჶ' => 'ჶ', + 'á²·' => 'ჷ', + 'Ჸ' => 'ჸ', + 'á²¹' => 'ჹ', + 'Ჺ' => 'ჺ', + 'á²½' => 'ჽ', + 'á²¾' => 'ჾ', + 'Ჿ' => 'ჿ', + 'Ḁ' => 'á¸', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'á¸', + 'Ḏ' => 'á¸', + 'á¸' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'á¸', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'á¹€' => 'á¹', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'á¹…', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'á¹', + 'Ṏ' => 'á¹', + 'á¹' => 'ṑ', + 'á¹’' => 'ṓ', + 'á¹”' => 'ṕ', + 'á¹–' => 'á¹—', + 'Ṙ' => 'á¹™', + 'Ṛ' => 'á¹›', + 'Ṝ' => 'á¹', + 'Ṟ' => 'ṟ', + 'á¹ ' => 'ṡ', + 'á¹¢' => 'á¹£', + 'Ṥ' => 'á¹¥', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'á¹­', + 'á¹®' => 'ṯ', + 'á¹°' => 'á¹±', + 'á¹²' => 'á¹³', + 'á¹´' => 'á¹µ', + 'Ṷ' => 'á¹·', + 'Ṹ' => 'á¹¹', + 'Ṻ' => 'á¹»', + 'á¹¼' => 'á¹½', + 'á¹¾' => 'ṿ', + 'Ẁ' => 'áº', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'áº', + 'Ẏ' => 'áº', + 'áº' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'á»', + 'Ể' => 'ể', + 'Ễ' => 'á»…', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'á»', + 'Ỏ' => 'á»', + 'á»' => 'ố', + 'á»’' => 'ồ', + 'á»”' => 'ổ', + 'á»–' => 'á»—', + 'Ộ' => 'á»™', + 'Ớ' => 'á»›', + 'Ờ' => 'á»', + 'Ở' => 'ở', + 'á» ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'á»­', + 'á»®' => 'ữ', + 'á»°' => 'á»±', + 'Ỳ' => 'ỳ', + 'á»´' => 'ỵ', + 'Ỷ' => 'á»·', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'á»»', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'á¼€', + 'Ἁ' => 'á¼', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'á¼' => 'á¼…', + 'Ἆ' => 'ἆ', + 'á¼' => 'ἇ', + 'Ἐ' => 'á¼', + 'á¼™' => 'ἑ', + 'Ἒ' => 'á¼’', + 'á¼›' => 'ἓ', + 'Ἔ' => 'á¼”', + 'á¼' => 'ἕ', + 'Ἠ' => 'á¼ ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'á¼¢', + 'Ἣ' => 'á¼£', + 'Ἤ' => 'ἤ', + 'á¼­' => 'á¼¥', + 'á¼®' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'á¼°', + 'á¼¹' => 'á¼±', + 'Ἲ' => 'á¼²', + 'á¼»' => 'á¼³', + 'á¼¼' => 'á¼´', + 'á¼½' => 'á¼µ', + 'á¼¾' => 'ἶ', + 'Ἷ' => 'á¼·', + 'Ὀ' => 'á½€', + 'Ὁ' => 'á½', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'á½' => 'á½…', + 'á½™' => 'ὑ', + 'á½›' => 'ὓ', + 'á½' => 'ὕ', + 'Ὗ' => 'á½—', + 'Ὠ' => 'á½ ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'á½¢', + 'Ὣ' => 'á½£', + 'Ὤ' => 'ὤ', + 'á½­' => 'á½¥', + 'á½®' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'á¾€', + 'ᾉ' => 'á¾', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'á¾' => 'á¾…', + 'ᾎ' => 'ᾆ', + 'á¾' => 'ᾇ', + 'ᾘ' => 'á¾', + 'á¾™' => 'ᾑ', + 'ᾚ' => 'á¾’', + 'á¾›' => 'ᾓ', + 'ᾜ' => 'á¾”', + 'á¾' => 'ᾕ', + 'ᾞ' => 'á¾–', + 'ᾟ' => 'á¾—', + 'ᾨ' => 'á¾ ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'á¾¢', + 'ᾫ' => 'á¾£', + 'ᾬ' => 'ᾤ', + 'á¾­' => 'á¾¥', + 'á¾®' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'á¾°', + 'á¾¹' => 'á¾±', + 'Ὰ' => 'á½°', + 'á¾»' => 'á½±', + 'á¾¼' => 'á¾³', + 'Ὲ' => 'á½²', + 'Έ' => 'á½³', + 'á¿Š' => 'á½´', + 'á¿‹' => 'á½µ', + 'á¿Œ' => 'ῃ', + 'Ῐ' => 'á¿', + 'á¿™' => 'á¿‘', + 'á¿š' => 'ὶ', + 'á¿›' => 'á½·', + 'Ῠ' => 'á¿ ', + 'á¿©' => 'á¿¡', + 'Ὺ' => 'ὺ', + 'á¿«' => 'á½»', + 'Ῥ' => 'á¿¥', + 'Ὸ' => 'ὸ', + 'Ό' => 'á½¹', + 'Ὼ' => 'á½¼', + 'á¿»' => 'á½½', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'â„«' => 'Ã¥', + 'Ⅎ' => 'â…Ž', + 'â… ' => 'â…°', + 'â…¡' => 'â…±', + 'â…¢' => 'â…²', + 'â…£' => 'â…³', + 'â…¤' => 'â…´', + 'â…¥' => 'â…µ', + 'â…¦' => 'â…¶', + 'â…§' => 'â…·', + 'â…¨' => 'â…¸', + 'â…©' => 'â…¹', + 'â…ª' => 'â…º', + 'â…«' => 'â…»', + 'â…¬' => 'â…¼', + 'â…­' => 'â…½', + 'â…®' => 'â…¾', + 'â…¯' => 'â…¿', + 'Ↄ' => 'ↄ', + 'â’¶' => 'â“', + 'â’·' => 'â“‘', + 'â’¸' => 'â“’', + 'â’¹' => 'â““', + 'â’º' => 'â“”', + 'â’»' => 'â“•', + 'â’¼' => 'â“–', + 'â’½' => 'â“—', + 'â’¾' => 'ⓘ', + 'â’¿' => 'â“™', + 'â“€' => 'â“š', + 'â“' => 'â“›', + 'â“‚' => 'â“œ', + 'Ⓝ' => 'â“', + 'â“„' => 'â“ž', + 'â“…' => 'â“Ÿ', + 'Ⓠ' => 'â“ ', + 'Ⓡ' => 'â“¡', + 'Ⓢ' => 'â“¢', + 'Ⓣ' => 'â“£', + 'â“Š' => 'ⓤ', + 'â“‹' => 'â“¥', + 'â“Œ' => 'ⓦ', + 'â“' => 'ⓧ', + 'â“Ž' => 'ⓨ', + 'â“' => 'â“©', + 'â°€' => 'â°°', + 'â°' => 'â°±', + 'â°‚' => 'â°²', + 'â°ƒ' => 'â°³', + 'â°„' => 'â°´', + 'â°…' => 'â°µ', + 'â°†' => 'â°¶', + 'â°‡' => 'â°·', + 'â°ˆ' => 'â°¸', + 'â°‰' => 'â°¹', + 'â°Š' => 'â°º', + 'â°‹' => 'â°»', + 'â°Œ' => 'â°¼', + 'â°' => 'â°½', + 'â°Ž' => 'â°¾', + 'â°' => 'â°¿', + 'â°' => 'â±€', + 'â°‘' => 'â±', + 'â°’' => 'ⱂ', + 'â°“' => 'ⱃ', + 'â°”' => 'ⱄ', + 'â°•' => 'â±…', + 'â°–' => 'ⱆ', + 'â°—' => 'ⱇ', + 'â°˜' => 'ⱈ', + 'â°™' => 'ⱉ', + 'â°š' => 'ⱊ', + 'â°›' => 'ⱋ', + 'â°œ' => 'ⱌ', + 'â°' => 'â±', + 'â°ž' => 'ⱎ', + 'â°Ÿ' => 'â±', + 'â° ' => 'â±', + 'â°¡' => 'ⱑ', + 'â°¢' => 'â±’', + 'â°£' => 'ⱓ', + 'â°¤' => 'â±”', + 'â°¥' => 'ⱕ', + 'â°¦' => 'â±–', + 'â°§' => 'â±—', + 'â°¨' => 'ⱘ', + 'â°©' => 'â±™', + 'â°ª' => 'ⱚ', + 'â°«' => 'â±›', + 'â°¬' => 'ⱜ', + 'â°­' => 'â±', + 'â°®' => 'ⱞ', + 'â± ' => 'ⱡ', + 'â±¢' => 'É«', + 'â±£' => 'áµ½', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'â±­' => 'É‘', + 'â±®' => 'ɱ', + 'Ɐ' => 'É', + 'â±°' => 'É’', + 'â±²' => 'â±³', + 'â±µ' => 'ⱶ', + 'â±¾' => 'È¿', + 'Ɀ' => 'É€', + 'â²€' => 'â²', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'â²…', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'â²', + 'Ⲏ' => 'â²', + 'â²' => 'ⲑ', + 'â²’' => 'ⲓ', + 'â²”' => 'ⲕ', + 'â²–' => 'â²—', + 'Ⲙ' => 'â²™', + 'Ⲛ' => 'â²›', + 'Ⲝ' => 'â²', + 'Ⲟ' => 'ⲟ', + 'â² ' => 'ⲡ', + 'â²¢' => 'â²£', + 'Ⲥ' => 'â²¥', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'â²­', + 'â²®' => 'ⲯ', + 'â²°' => 'â²±', + 'â²²' => 'â²³', + 'â²´' => 'â²µ', + 'Ⲷ' => 'â²·', + 'Ⲹ' => 'â²¹', + 'Ⲻ' => 'â²»', + 'â²¼' => 'â²½', + 'â²¾' => 'ⲿ', + 'â³€' => 'â³', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'â³…', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'â³', + 'Ⳏ' => 'â³', + 'â³' => 'ⳑ', + 'â³’' => 'ⳓ', + 'â³”' => 'ⳕ', + 'â³–' => 'â³—', + 'Ⳙ' => 'â³™', + 'Ⳛ' => 'â³›', + 'Ⳝ' => 'â³', + 'Ⳟ' => 'ⳟ', + 'â³ ' => 'ⳡ', + 'â³¢' => 'â³£', + 'Ⳬ' => 'ⳬ', + 'â³­' => 'â³®', + 'â³²' => 'â³³', + 'Ꙁ' => 'ê™', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ê™…', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ê™', + 'Ꙏ' => 'ê™', + 'ê™' => 'ꙑ', + 'ê™’' => 'ꙓ', + 'ê™”' => 'ꙕ', + 'ê™–' => 'ê™—', + 'Ꙙ' => 'ê™™', + 'Ꙛ' => 'ê™›', + 'Ꙝ' => 'ê™', + 'Ꙟ' => 'ꙟ', + 'ê™ ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ê™­', + 'Ꚁ' => 'êš', + 'êš‚' => 'ꚃ', + 'êš„' => 'êš…', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'êš‹', + 'Ꚍ' => 'êš', + 'Ꚏ' => 'êš', + 'êš' => 'êš‘', + 'êš’' => 'êš“', + 'êš”' => 'êš•', + 'êš–' => 'êš—', + 'Ꚙ' => 'êš™', + 'êšš' => 'êš›', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'ê€' => 'ê', + 'ê‚' => 'êƒ', + 'ê„' => 'ê…', + 'ê†' => 'ê‡', + 'êˆ' => 'ê‰', + 'êŠ' => 'ê‹', + 'êŒ' => 'ê', + 'êŽ' => 'ê', + 'ê' => 'ê‘', + 'ê’' => 'ê“', + 'ê”' => 'ê•', + 'ê–' => 'ê—', + 'ê˜' => 'ê™', + 'êš' => 'ê›', + 'êœ' => 'ê', + 'êž' => 'êŸ', + 'ê ' => 'ê¡', + 'ê¢' => 'ê£', + 'ê¤' => 'ê¥', + 'ê¦' => 'ê§', + 'ê¨' => 'ê©', + 'êª' => 'ê«', + 'ê¬' => 'ê­', + 'ê®' => 'ê¯', + 'ê¹' => 'êº', + 'ê»' => 'ê¼', + 'ê½' => 'áµ¹', + 'ê¾' => 'ê¿', + 'Ꞁ' => 'êž', + 'êž‚' => 'ꞃ', + 'êž„' => 'êž…', + 'Ꞇ' => 'ꞇ', + 'êž‹' => 'ꞌ', + 'êž' => 'É¥', + 'êž' => 'êž‘', + 'êž’' => 'êž“', + 'êž–' => 'êž—', + 'Ꞙ' => 'êž™', + 'êžš' => 'êž›', + 'êžœ' => 'êž', + 'êžž' => 'ꞟ', + 'êž ' => 'êž¡', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'êž©', + 'Ɦ' => 'ɦ', + 'êž«' => 'Éœ', + 'Ɡ' => 'É¡', + 'êž­' => 'ɬ', + 'êž®' => 'ɪ', + 'êž°' => 'Êž', + 'êž±' => 'ʇ', + 'êž²' => 'Ê', + 'êž³' => 'ê­“', + 'êž´' => 'êžµ', + 'Ꞷ' => 'êž·', + 'Ꞹ' => 'êž¹', + 'Ꞻ' => 'êž»', + 'êž¼' => 'êž½', + 'êž¾' => 'êž¿', + 'Ꟃ' => 'ꟃ', + 'Ꞔ' => 'êž”', + 'Ʂ' => 'Ê‚', + 'Ᶎ' => 'ᶎ', + 'Ꟈ' => 'ꟈ', + 'Ꟊ' => 'ꟊ', + 'Ꟶ' => 'ꟶ', + 'A' => 'ï½', + 'ï¼¢' => 'b', + 'ï¼£' => 'c', + 'D' => 'd', + 'ï¼¥' => 'ï½…', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'ï¼­' => 'ï½', + 'ï¼®' => 'n', + 'O' => 'ï½', + 'ï¼°' => 'ï½', + 'ï¼±' => 'q', + 'ï¼²' => 'ï½’', + 'ï¼³' => 's', + 'ï¼´' => 'ï½”', + 'ï¼µ' => 'u', + 'V' => 'ï½–', + 'ï¼·' => 'ï½—', + 'X' => 'x', + 'ï¼¹' => 'ï½™', + 'Z' => 'z', + 'ð€' => 'ð¨', + 'ð' => 'ð©', + 'ð‚' => 'ðª', + 'ðƒ' => 'ð«', + 'ð„' => 'ð¬', + 'ð…' => 'ð­', + 'ð†' => 'ð®', + 'ð‡' => 'ð¯', + 'ðˆ' => 'ð°', + 'ð‰' => 'ð±', + 'ðŠ' => 'ð²', + 'ð‹' => 'ð³', + 'ðŒ' => 'ð´', + 'ð' => 'ðµ', + 'ðŽ' => 'ð¶', + 'ð' => 'ð·', + 'ð' => 'ð¸', + 'ð‘' => 'ð¹', + 'ð’' => 'ðº', + 'ð“' => 'ð»', + 'ð”' => 'ð¼', + 'ð•' => 'ð½', + 'ð–' => 'ð¾', + 'ð—' => 'ð¿', + 'ð˜' => 'ð‘€', + 'ð™' => 'ð‘', + 'ðš' => 'ð‘‚', + 'ð›' => 'ð‘ƒ', + 'ðœ' => 'ð‘„', + 'ð' => 'ð‘…', + 'ðž' => 'ð‘†', + 'ðŸ' => 'ð‘‡', + 'ð ' => 'ð‘ˆ', + 'ð¡' => 'ð‘‰', + 'ð¢' => 'ð‘Š', + 'ð£' => 'ð‘‹', + 'ð¤' => 'ð‘Œ', + 'ð¥' => 'ð‘', + 'ð¦' => 'ð‘Ž', + 'ð§' => 'ð‘', + 'ð’°' => 'ð“˜', + 'ð’±' => 'ð“™', + 'ð’²' => 'ð“š', + 'ð’³' => 'ð“›', + 'ð’´' => 'ð“œ', + 'ð’µ' => 'ð“', + 'ð’¶' => 'ð“ž', + 'ð’·' => 'ð“Ÿ', + 'ð’¸' => 'ð“ ', + 'ð’¹' => 'ð“¡', + 'ð’º' => 'ð“¢', + 'ð’»' => 'ð“£', + 'ð’¼' => 'ð“¤', + 'ð’½' => 'ð“¥', + 'ð’¾' => 'ð“¦', + 'ð’¿' => 'ð“§', + 'ð“€' => 'ð“¨', + 'ð“' => 'ð“©', + 'ð“‚' => 'ð“ª', + 'ð“ƒ' => 'ð“«', + 'ð“„' => 'ð“¬', + 'ð“…' => 'ð“­', + 'ð“†' => 'ð“®', + 'ð“‡' => 'ð“¯', + 'ð“ˆ' => 'ð“°', + 'ð“‰' => 'ð“±', + 'ð“Š' => 'ð“²', + 'ð“‹' => 'ð“³', + 'ð“Œ' => 'ð“´', + 'ð“' => 'ð“µ', + 'ð“Ž' => 'ð“¶', + 'ð“' => 'ð“·', + 'ð“' => 'ð“¸', + 'ð“‘' => 'ð“¹', + 'ð“’' => 'ð“º', + 'ð““' => 'ð“»', + 'ð²€' => 'ð³€', + 'ð²' => 'ð³', + 'ð²‚' => 'ð³‚', + 'ð²ƒ' => 'ð³ƒ', + 'ð²„' => 'ð³„', + 'ð²…' => 'ð³…', + 'ð²†' => 'ð³†', + 'ð²‡' => 'ð³‡', + 'ð²ˆ' => 'ð³ˆ', + 'ð²‰' => 'ð³‰', + 'ð²Š' => 'ð³Š', + 'ð²‹' => 'ð³‹', + 'ð²Œ' => 'ð³Œ', + 'ð²' => 'ð³', + 'ð²Ž' => 'ð³Ž', + 'ð²' => 'ð³', + 'ð²' => 'ð³', + 'ð²‘' => 'ð³‘', + 'ð²’' => 'ð³’', + 'ð²“' => 'ð³“', + 'ð²”' => 'ð³”', + 'ð²•' => 'ð³•', + 'ð²–' => 'ð³–', + 'ð²—' => 'ð³—', + 'ð²˜' => 'ð³˜', + 'ð²™' => 'ð³™', + 'ð²š' => 'ð³š', + 'ð²›' => 'ð³›', + 'ð²œ' => 'ð³œ', + 'ð²' => 'ð³', + 'ð²ž' => 'ð³ž', + 'ð²Ÿ' => 'ð³Ÿ', + 'ð² ' => 'ð³ ', + 'ð²¡' => 'ð³¡', + 'ð²¢' => 'ð³¢', + 'ð²£' => 'ð³£', + 'ð²¤' => 'ð³¤', + 'ð²¥' => 'ð³¥', + 'ð²¦' => 'ð³¦', + 'ð²§' => 'ð³§', + 'ð²¨' => 'ð³¨', + 'ð²©' => 'ð³©', + 'ð²ª' => 'ð³ª', + 'ð²«' => 'ð³«', + 'ð²¬' => 'ð³¬', + 'ð²­' => 'ð³­', + 'ð²®' => 'ð³®', + 'ð²¯' => 'ð³¯', + 'ð²°' => 'ð³°', + 'ð²±' => 'ð³±', + 'ð²²' => 'ð³²', + 'ð‘¢ ' => 'ð‘£€', + '𑢡' => 'ð‘£', + 'ð‘¢¢' => '𑣂', + 'ð‘¢£' => '𑣃', + '𑢤' => '𑣄', + 'ð‘¢¥' => 'ð‘£…', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + 'ð‘¢­' => 'ð‘£', + 'ð‘¢®' => '𑣎', + '𑢯' => 'ð‘£', + 'ð‘¢°' => 'ð‘£', + 'ð‘¢±' => '𑣑', + 'ð‘¢²' => 'ð‘£’', + 'ð‘¢³' => '𑣓', + 'ð‘¢´' => 'ð‘£”', + 'ð‘¢µ' => '𑣕', + '𑢶' => 'ð‘£–', + 'ð‘¢·' => 'ð‘£—', + '𑢸' => '𑣘', + 'ð‘¢¹' => 'ð‘£™', + '𑢺' => '𑣚', + 'ð‘¢»' => 'ð‘£›', + 'ð‘¢¼' => '𑣜', + 'ð‘¢½' => 'ð‘£', + 'ð‘¢¾' => '𑣞', + '𑢿' => '𑣟', + 'ð–¹€' => 'ð–¹ ', + 'ð–¹' => '𖹡', + '𖹂' => 'ð–¹¢', + '𖹃' => 'ð–¹£', + '𖹄' => '𖹤', + 'ð–¹…' => 'ð–¹¥', + '𖹆' => '𖹦', + '𖹇' => '𖹧', + '𖹈' => '𖹨', + '𖹉' => '𖹩', + '𖹊' => '𖹪', + '𖹋' => '𖹫', + '𖹌' => '𖹬', + 'ð–¹' => 'ð–¹­', + '𖹎' => 'ð–¹®', + 'ð–¹' => '𖹯', + 'ð–¹' => 'ð–¹°', + '𖹑' => 'ð–¹±', + 'ð–¹’' => 'ð–¹²', + '𖹓' => 'ð–¹³', + 'ð–¹”' => 'ð–¹´', + '𖹕' => 'ð–¹µ', + 'ð–¹–' => '𖹶', + 'ð–¹—' => 'ð–¹·', + '𖹘' => '𖹸', + 'ð–¹™' => 'ð–¹¹', + '𖹚' => '𖹺', + 'ð–¹›' => 'ð–¹»', + '𖹜' => 'ð–¹¼', + 'ð–¹' => 'ð–¹½', + '𖹞' => 'ð–¹¾', + '𖹟' => '𖹿', + '𞤀' => '𞤢', + 'ðž¤' => '𞤣', + '𞤂' => '𞤤', + '𞤃' => '𞤥', + '𞤄' => '𞤦', + '𞤅' => '𞤧', + '𞤆' => '𞤨', + '𞤇' => '𞤩', + '𞤈' => '𞤪', + '𞤉' => '𞤫', + '𞤊' => '𞤬', + '𞤋' => '𞤭', + '𞤌' => '𞤮', + 'ðž¤' => '𞤯', + '𞤎' => '𞤰', + 'ðž¤' => '𞤱', + 'ðž¤' => '𞤲', + '𞤑' => '𞤳', + '𞤒' => '𞤴', + '𞤓' => '𞤵', + '𞤔' => '𞤶', + '𞤕' => '𞤷', + '𞤖' => '𞤸', + '𞤗' => '𞤹', + '𞤘' => '𞤺', + '𞤙' => '𞤻', + '𞤚' => '𞤼', + '𞤛' => '𞤽', + '𞤜' => '𞤾', + 'ðž¤' => '𞤿', + '𞤞' => '𞥀', + '𞤟' => 'ðž¥', + '𞤠' => '𞥂', + '𞤡' => '𞥃', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/dev/plugins/email/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php new file mode 100644 index 00000000..2a8f6e73 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php @@ -0,0 +1,5 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Îœ', + 'à' => 'À', + 'á' => 'Ã', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'Ã¥' => 'Ã…', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'ÃŒ', + 'í' => 'Ã', + 'î' => 'ÃŽ', + 'ï' => 'Ã', + 'ð' => 'Ã', + 'ñ' => 'Ñ', + 'ò' => 'Ã’', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ãœ', + 'ý' => 'Ã', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'Ä' => 'Ä€', + 'ă' => 'Ä‚', + 'Ä…' => 'Ä„', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'Ä‹' => 'ÄŠ', + 'Ä' => 'ÄŒ', + 'Ä' => 'ÄŽ', + 'Ä‘' => 'Ä', + 'Ä“' => 'Ä’', + 'Ä•' => 'Ä”', + 'Ä—' => 'Ä–', + 'Ä™' => 'Ę', + 'Ä›' => 'Äš', + 'Ä' => 'Äœ', + 'ÄŸ' => 'Äž', + 'Ä¡' => 'Ä ', + 'Ä£' => 'Ä¢', + 'Ä¥' => 'Ĥ', + 'ħ' => 'Ħ', + 'Ä©' => 'Ĩ', + 'Ä«' => 'Ī', + 'Ä­' => 'Ĭ', + 'į' => 'Ä®', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ä´', + 'Ä·' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ä»', + 'ľ' => 'Ľ', + 'Å€' => 'Ä¿', + 'Å‚' => 'Å', + 'Å„' => 'Ń', + 'ņ' => 'Å…', + 'ň' => 'Ň', + 'Å‹' => 'ÅŠ', + 'Å' => 'ÅŒ', + 'Å' => 'ÅŽ', + 'Å‘' => 'Å', + 'Å“' => 'Å’', + 'Å•' => 'Å”', + 'Å—' => 'Å–', + 'Å™' => 'Ř', + 'Å›' => 'Åš', + 'Å' => 'Åœ', + 'ÅŸ' => 'Åž', + 'Å¡' => 'Å ', + 'Å£' => 'Å¢', + 'Å¥' => 'Ť', + 'ŧ' => 'Ŧ', + 'Å©' => 'Ũ', + 'Å«' => 'Ū', + 'Å­' => 'Ŭ', + 'ů' => 'Å®', + 'ű' => 'Å°', + 'ų' => 'Ų', + 'ŵ' => 'Å´', + 'Å·' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Å»', + 'ž' => 'Ž', + 'Å¿' => 'S', + 'Æ€' => 'Ƀ', + 'ƃ' => 'Æ‚', + 'Æ…' => 'Æ„', + 'ƈ' => 'Ƈ', + 'ÆŒ' => 'Æ‹', + 'Æ’' => 'Æ‘', + 'Æ•' => 'Ƕ', + 'Æ™' => 'Ƙ', + 'Æš' => 'Ƚ', + 'Æž' => 'È ', + 'Æ¡' => 'Æ ', + 'Æ£' => 'Æ¢', + 'Æ¥' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'Æ­' => 'Ƭ', + 'Æ°' => 'Ư', + 'Æ´' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'Æ¿' => 'Ç·', + 'Ç…' => 'Ç„', + 'dž' => 'Ç„', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Ç‹' => 'ÇŠ', + 'ÇŒ' => 'ÇŠ', + 'ÇŽ' => 'Ç', + 'Ç' => 'Ç', + 'Ç’' => 'Ç‘', + 'Ç”' => 'Ç“', + 'Ç–' => 'Ç•', + 'ǘ' => 'Ç—', + 'Çš' => 'Ç™', + 'Çœ' => 'Ç›', + 'Ç' => 'ÆŽ', + 'ÇŸ' => 'Çž', + 'Ç¡' => 'Ç ', + 'Ç£' => 'Ç¢', + 'Ç¥' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'Ç©' => 'Ǩ', + 'Ç«' => 'Ǫ', + 'Ç­' => 'Ǭ', + 'ǯ' => 'Ç®', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ç´', + 'ǹ' => 'Ǹ', + 'Ç»' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'Ç¿' => 'Ǿ', + 'È' => 'È€', + 'ȃ' => 'È‚', + 'È…' => 'È„', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'È‹' => 'ÈŠ', + 'È' => 'ÈŒ', + 'È' => 'ÈŽ', + 'È‘' => 'È', + 'È“' => 'È’', + 'È•' => 'È”', + 'È—' => 'È–', + 'È™' => 'Ș', + 'È›' => 'Èš', + 'È' => 'Èœ', + 'ÈŸ' => 'Èž', + 'È£' => 'È¢', + 'È¥' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'È©' => 'Ȩ', + 'È«' => 'Ȫ', + 'È­' => 'Ȭ', + 'ȯ' => 'È®', + 'ȱ' => 'È°', + 'ȳ' => 'Ȳ', + 'ȼ' => 'È»', + 'È¿' => 'â±¾', + 'É€' => 'Ɀ', + 'É‚' => 'É', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'É‹' => 'ÉŠ', + 'É' => 'ÉŒ', + 'É' => 'ÉŽ', + 'É' => 'Ɐ', + 'É‘' => 'â±­', + 'É’' => 'â±°', + 'É“' => 'Æ', + 'É”' => 'Ɔ', + 'É–' => 'Ɖ', + 'É—' => 'ÆŠ', + 'É™' => 'Æ', + 'É›' => 'Æ', + 'Éœ' => 'êž«', + 'É ' => 'Æ“', + 'É¡' => 'Ɡ', + 'É£' => 'Æ”', + 'É¥' => 'êž', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Æ—', + 'É©' => 'Æ–', + 'ɪ' => 'êž®', + 'É«' => 'â±¢', + 'ɬ' => 'êž­', + 'ɯ' => 'Æœ', + 'ɱ' => 'â±®', + 'ɲ' => 'Æ', + 'ɵ' => 'ÆŸ', + 'ɽ' => 'Ɽ', + 'Ê€' => 'Ʀ', + 'Ê‚' => 'Ʂ', + 'ʃ' => 'Æ©', + 'ʇ' => 'êž±', + 'ʈ' => 'Æ®', + 'ʉ' => 'É„', + 'ÊŠ' => 'Ʊ', + 'Ê‹' => 'Ʋ', + 'ÊŒ' => 'É…', + 'Ê’' => 'Æ·', + 'Ê' => 'êž²', + 'Êž' => 'êž°', + 'Í…' => 'Ι', + 'ͱ' => 'Í°', + 'ͳ' => 'Ͳ', + 'Í·' => 'Ͷ', + 'Í»' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ï¿', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Î’', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Îœ', + 'ν' => 'Î', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'Ï€' => 'Π', + 'Ï' => 'Ρ', + 'Ï‚' => 'Σ', + 'σ' => 'Σ', + 'Ï„' => 'Τ', + 'Ï…' => 'Î¥', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ÏŠ' => 'Ϊ', + 'Ï‹' => 'Ϋ', + 'ÏŒ' => 'ÎŒ', + 'Ï' => 'ÎŽ', + 'ÏŽ' => 'Î', + 'Ï' => 'Î’', + 'Ï‘' => 'Θ', + 'Ï•' => 'Φ', + 'Ï–' => 'Π', + 'Ï—' => 'Ï', + 'Ï™' => 'Ϙ', + 'Ï›' => 'Ïš', + 'Ï' => 'Ïœ', + 'ÏŸ' => 'Ïž', + 'Ï¡' => 'Ï ', + 'Ï£' => 'Ï¢', + 'Ï¥' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'Ï©' => 'Ϩ', + 'Ï«' => 'Ϫ', + 'Ï­' => 'Ϭ', + 'ϯ' => 'Ï®', + 'Ï°' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Í¿', + 'ϵ' => 'Ε', + 'ϸ' => 'Ï·', + 'Ï»' => 'Ϻ', + 'а' => 'Ð', + 'б' => 'Б', + 'в' => 'Ð’', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'Ðœ', + 'н' => 'Ð', + 'о' => 'О', + 'п' => 'П', + 'Ñ€' => 'Р', + 'Ñ' => 'С', + 'Ñ‚' => 'Т', + 'у' => 'У', + 'Ñ„' => 'Ф', + 'Ñ…' => 'Ð¥', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ÑŠ' => 'Ъ', + 'Ñ‹' => 'Ы', + 'ÑŒ' => 'Ь', + 'Ñ' => 'Э', + 'ÑŽ' => 'Ю', + 'Ñ' => 'Я', + 'Ñ' => 'Ѐ', + 'Ñ‘' => 'Ð', + 'Ñ’' => 'Ђ', + 'Ñ“' => 'Ѓ', + 'Ñ”' => 'Є', + 'Ñ•' => 'Ð…', + 'Ñ–' => 'І', + 'Ñ—' => 'Ї', + 'ј' => 'Ј', + 'Ñ™' => 'Љ', + 'Ñš' => 'Њ', + 'Ñ›' => 'Ћ', + 'Ñœ' => 'ÐŒ', + 'Ñ' => 'Ð', + 'Ñž' => 'ÐŽ', + 'ÑŸ' => 'Ð', + 'Ñ¡' => 'Ñ ', + 'Ñ£' => 'Ñ¢', + 'Ñ¥' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'Ñ©' => 'Ѩ', + 'Ñ«' => 'Ѫ', + 'Ñ­' => 'Ѭ', + 'ѯ' => 'Ñ®', + 'ѱ' => 'Ñ°', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ñ´', + 'Ñ·' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'Ñ»' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'Ñ¿' => 'Ѿ', + 'Ò' => 'Ò€', + 'Ò‹' => 'ÒŠ', + 'Ò' => 'ÒŒ', + 'Ò' => 'ÒŽ', + 'Ò‘' => 'Ò', + 'Ò“' => 'Ò’', + 'Ò•' => 'Ò”', + 'Ò—' => 'Ò–', + 'Ò™' => 'Ò˜', + 'Ò›' => 'Òš', + 'Ò' => 'Òœ', + 'ÒŸ' => 'Òž', + 'Ò¡' => 'Ò ', + 'Ò£' => 'Ò¢', + 'Ò¥' => 'Ò¤', + 'Ò§' => 'Ò¦', + 'Ò©' => 'Ò¨', + 'Ò«' => 'Òª', + 'Ò­' => 'Ò¬', + 'Ò¯' => 'Ò®', + 'Ò±' => 'Ò°', + 'Ò³' => 'Ò²', + 'Òµ' => 'Ò´', + 'Ò·' => 'Ò¶', + 'Ò¹' => 'Ò¸', + 'Ò»' => 'Òº', + 'Ò½' => 'Ò¼', + 'Ò¿' => 'Ò¾', + 'Ó‚' => 'Ó', + 'Ó„' => 'Óƒ', + 'Ó†' => 'Ó…', + 'Óˆ' => 'Ó‡', + 'ÓŠ' => 'Ó‰', + 'ÓŒ' => 'Ó‹', + 'ÓŽ' => 'Ó', + 'Ó' => 'Ó€', + 'Ó‘' => 'Ó', + 'Ó“' => 'Ó’', + 'Ó•' => 'Ó”', + 'Ó—' => 'Ó–', + 'Ó™' => 'Ó˜', + 'Ó›' => 'Óš', + 'Ó' => 'Óœ', + 'ÓŸ' => 'Óž', + 'Ó¡' => 'Ó ', + 'Ó£' => 'Ó¢', + 'Ó¥' => 'Ó¤', + 'Ó§' => 'Ó¦', + 'Ó©' => 'Ó¨', + 'Ó«' => 'Óª', + 'Ó­' => 'Ó¬', + 'Ó¯' => 'Ó®', + 'Ó±' => 'Ó°', + 'Ó³' => 'Ó²', + 'Óµ' => 'Ó´', + 'Ó·' => 'Ó¶', + 'Ó¹' => 'Ó¸', + 'Ó»' => 'Óº', + 'Ó½' => 'Ó¼', + 'Ó¿' => 'Ó¾', + 'Ô' => 'Ô€', + 'Ôƒ' => 'Ô‚', + 'Ô…' => 'Ô„', + 'Ô‡' => 'Ô†', + 'Ô‰' => 'Ôˆ', + 'Ô‹' => 'ÔŠ', + 'Ô' => 'ÔŒ', + 'Ô' => 'ÔŽ', + 'Ô‘' => 'Ô', + 'Ô“' => 'Ô’', + 'Ô•' => 'Ô”', + 'Ô—' => 'Ô–', + 'Ô™' => 'Ô˜', + 'Ô›' => 'Ôš', + 'Ô' => 'Ôœ', + 'ÔŸ' => 'Ôž', + 'Ô¡' => 'Ô ', + 'Ô£' => 'Ô¢', + 'Ô¥' => 'Ô¤', + 'Ô§' => 'Ô¦', + 'Ô©' => 'Ô¨', + 'Ô«' => 'Ôª', + 'Ô­' => 'Ô¬', + 'Ô¯' => 'Ô®', + 'Õ¡' => 'Ô±', + 'Õ¢' => 'Ô²', + 'Õ£' => 'Ô³', + 'Õ¤' => 'Ô´', + 'Õ¥' => 'Ôµ', + 'Õ¦' => 'Ô¶', + 'Õ§' => 'Ô·', + 'Õ¨' => 'Ô¸', + 'Õ©' => 'Ô¹', + 'Õª' => 'Ôº', + 'Õ«' => 'Ô»', + 'Õ¬' => 'Ô¼', + 'Õ­' => 'Ô½', + 'Õ®' => 'Ô¾', + 'Õ¯' => 'Ô¿', + 'Õ°' => 'Õ€', + 'Õ±' => 'Õ', + 'Õ²' => 'Õ‚', + 'Õ³' => 'Õƒ', + 'Õ´' => 'Õ„', + 'Õµ' => 'Õ…', + 'Õ¶' => 'Õ†', + 'Õ·' => 'Õ‡', + 'Õ¸' => 'Õˆ', + 'Õ¹' => 'Õ‰', + 'Õº' => 'ÕŠ', + 'Õ»' => 'Õ‹', + 'Õ¼' => 'ÕŒ', + 'Õ½' => 'Õ', + 'Õ¾' => 'ÕŽ', + 'Õ¿' => 'Õ', + 'Ö€' => 'Õ', + 'Ö' => 'Õ‘', + 'Ö‚' => 'Õ’', + 'Öƒ' => 'Õ“', + 'Ö„' => 'Õ”', + 'Ö…' => 'Õ•', + 'Ö†' => 'Õ–', + 'áƒ' => 'á²', + 'ბ' => 'Ბ', + 'გ' => 'á²’', + 'დ' => 'Დ', + 'ე' => 'á²”', + 'ვ' => 'Ვ', + 'ზ' => 'á²–', + 'თ' => 'á²—', + 'ი' => 'Ი', + 'კ' => 'á²™', + 'ლ' => 'Ლ', + 'მ' => 'á²›', + 'ნ' => 'Ნ', + 'áƒ' => 'á²', + 'პ' => 'Პ', + 'ჟ' => 'Ჟ', + 'რ' => 'á² ', + 'ს' => 'Ს', + 'ტ' => 'á²¢', + 'უ' => 'á²£', + 'ფ' => 'Ფ', + 'ქ' => 'á²¥', + 'ღ' => 'Ღ', + 'ყ' => 'Ყ', + 'შ' => 'Შ', + 'ჩ' => 'Ჩ', + 'ც' => 'Ც', + 'ძ' => 'Ძ', + 'წ' => 'Წ', + 'ჭ' => 'á²­', + 'ხ' => 'á²®', + 'ჯ' => 'Ჯ', + 'ჰ' => 'á²°', + 'ჱ' => 'á²±', + 'ჲ' => 'á²²', + 'ჳ' => 'á²³', + 'ჴ' => 'á²´', + 'ჵ' => 'á²µ', + 'ჶ' => 'Ჶ', + 'ჷ' => 'á²·', + 'ჸ' => 'Ჸ', + 'ჹ' => 'á²¹', + 'ჺ' => 'Ჺ', + 'ჽ' => 'á²½', + 'ჾ' => 'á²¾', + 'ჿ' => 'Ჿ', + 'á¸' => 'á°', + 'á¹' => 'á±', + 'áº' => 'á²', + 'á»' => 'á³', + 'á¼' => 'á´', + 'á½' => 'áµ', + 'á²€' => 'Ð’', + 'á²' => 'Д', + 'ᲂ' => 'О', + 'ᲃ' => 'С', + 'ᲄ' => 'Т', + 'á²…' => 'Т', + 'ᲆ' => 'Ъ', + 'ᲇ' => 'Ñ¢', + 'ᲈ' => 'Ꙋ', + 'áµ¹' => 'ê½', + 'áµ½' => 'â±£', + 'ᶎ' => 'Ᶎ', + 'á¸' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'á¸' => 'Ḍ', + 'á¸' => 'Ḏ', + 'ḑ' => 'á¸', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'á¸' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'á¹' => 'á¹€', + 'ṃ' => 'Ṃ', + 'á¹…' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'á¹' => 'Ṍ', + 'á¹' => 'Ṏ', + 'ṑ' => 'á¹', + 'ṓ' => 'á¹’', + 'ṕ' => 'á¹”', + 'á¹—' => 'á¹–', + 'á¹™' => 'Ṙ', + 'á¹›' => 'Ṛ', + 'á¹' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'á¹ ', + 'á¹£' => 'á¹¢', + 'á¹¥' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'á¹­' => 'Ṭ', + 'ṯ' => 'á¹®', + 'á¹±' => 'á¹°', + 'á¹³' => 'á¹²', + 'á¹µ' => 'á¹´', + 'á¹·' => 'Ṷ', + 'á¹¹' => 'Ṹ', + 'á¹»' => 'Ṻ', + 'á¹½' => 'á¹¼', + 'ṿ' => 'á¹¾', + 'áº' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'áº' => 'Ẍ', + 'áº' => 'Ẏ', + 'ẑ' => 'áº', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'á¹ ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'á»' => 'Ề', + 'ể' => 'Ể', + 'á»…' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'á»' => 'Ọ', + 'á»' => 'Ỏ', + 'ố' => 'á»', + 'ồ' => 'á»’', + 'ổ' => 'á»”', + 'á»—' => 'á»–', + 'á»™' => 'Ộ', + 'á»›' => 'Ớ', + 'á»' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'á» ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'á»­' => 'Ử', + 'ữ' => 'á»®', + 'á»±' => 'á»°', + 'ỳ' => 'Ỳ', + 'ỵ' => 'á»´', + 'á»·' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'á»»' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'á¼€' => 'Ἀ', + 'á¼' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'á¼…' => 'á¼', + 'ἆ' => 'Ἆ', + 'ἇ' => 'á¼', + 'á¼' => 'Ἐ', + 'ἑ' => 'á¼™', + 'á¼’' => 'Ἒ', + 'ἓ' => 'á¼›', + 'á¼”' => 'Ἔ', + 'ἕ' => 'á¼', + 'á¼ ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'á¼¢' => 'Ἢ', + 'á¼£' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'á¼¥' => 'á¼­', + 'ἦ' => 'á¼®', + 'ἧ' => 'Ἧ', + 'á¼°' => 'Ἰ', + 'á¼±' => 'á¼¹', + 'á¼²' => 'Ἲ', + 'á¼³' => 'á¼»', + 'á¼´' => 'á¼¼', + 'á¼µ' => 'á¼½', + 'ἶ' => 'á¼¾', + 'á¼·' => 'Ἷ', + 'á½€' => 'Ὀ', + 'á½' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'á½…' => 'á½', + 'ὑ' => 'á½™', + 'ὓ' => 'á½›', + 'ὕ' => 'á½', + 'á½—' => 'Ὗ', + 'á½ ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'á½¢' => 'Ὢ', + 'á½£' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'á½¥' => 'á½­', + 'ὦ' => 'á½®', + 'ὧ' => 'Ὧ', + 'á½°' => 'Ὰ', + 'á½±' => 'á¾»', + 'á½²' => 'Ὲ', + 'á½³' => 'Έ', + 'á½´' => 'á¿Š', + 'á½µ' => 'á¿‹', + 'ὶ' => 'á¿š', + 'á½·' => 'á¿›', + 'ὸ' => 'Ὸ', + 'á½¹' => 'Ό', + 'ὺ' => 'Ὺ', + 'á½»' => 'á¿«', + 'á½¼' => 'Ὼ', + 'á½½' => 'á¿»', + 'á¾€' => 'ἈΙ', + 'á¾' => 'ἉΙ', + 'ᾂ' => 'ἊΙ', + 'ᾃ' => 'ἋΙ', + 'ᾄ' => 'ἌΙ', + 'á¾…' => 'á¼Î™', + 'ᾆ' => 'ἎΙ', + 'ᾇ' => 'á¼Î™', + 'á¾' => 'ἨΙ', + 'ᾑ' => 'ἩΙ', + 'á¾’' => 'ἪΙ', + 'ᾓ' => 'ἫΙ', + 'á¾”' => 'ἬΙ', + 'ᾕ' => 'ἭΙ', + 'á¾–' => 'ἮΙ', + 'á¾—' => 'ἯΙ', + 'á¾ ' => 'ὨΙ', + 'ᾡ' => 'ὩΙ', + 'á¾¢' => 'ὪΙ', + 'á¾£' => 'ὫΙ', + 'ᾤ' => 'ὬΙ', + 'á¾¥' => 'ὭΙ', + 'ᾦ' => 'ὮΙ', + 'ᾧ' => 'ὯΙ', + 'á¾°' => 'Ᾰ', + 'á¾±' => 'á¾¹', + 'á¾³' => 'ΑΙ', + 'á¾¾' => 'Ι', + 'ῃ' => 'ΗΙ', + 'á¿' => 'Ῐ', + 'á¿‘' => 'á¿™', + 'á¿ ' => 'Ῠ', + 'á¿¡' => 'á¿©', + 'á¿¥' => 'Ῥ', + 'ῳ' => 'ΩΙ', + 'â…Ž' => 'Ⅎ', + 'â…°' => 'â… ', + 'â…±' => 'â…¡', + 'â…²' => 'â…¢', + 'â…³' => 'â…£', + 'â…´' => 'â…¤', + 'â…µ' => 'â…¥', + 'â…¶' => 'â…¦', + 'â…·' => 'â…§', + 'â…¸' => 'â…¨', + 'â…¹' => 'â…©', + 'â…º' => 'â…ª', + 'â…»' => 'â…«', + 'â…¼' => 'â…¬', + 'â…½' => 'â…­', + 'â…¾' => 'â…®', + 'â…¿' => 'â…¯', + 'ↄ' => 'Ↄ', + 'â“' => 'â’¶', + 'â“‘' => 'â’·', + 'â“’' => 'â’¸', + 'â““' => 'â’¹', + 'â“”' => 'â’º', + 'â“•' => 'â’»', + 'â“–' => 'â’¼', + 'â“—' => 'â’½', + 'ⓘ' => 'â’¾', + 'â“™' => 'â’¿', + 'â“š' => 'â“€', + 'â“›' => 'â“', + 'â“œ' => 'â“‚', + 'â“' => 'Ⓝ', + 'â“ž' => 'â“„', + 'â“Ÿ' => 'â“…', + 'â“ ' => 'Ⓠ', + 'â“¡' => 'Ⓡ', + 'â“¢' => 'Ⓢ', + 'â“£' => 'Ⓣ', + 'ⓤ' => 'â“Š', + 'â“¥' => 'â“‹', + 'ⓦ' => 'â“Œ', + 'ⓧ' => 'â“', + 'ⓨ' => 'â“Ž', + 'â“©' => 'â“', + 'â°°' => 'â°€', + 'â°±' => 'â°', + 'â°²' => 'â°‚', + 'â°³' => 'â°ƒ', + 'â°´' => 'â°„', + 'â°µ' => 'â°…', + 'â°¶' => 'â°†', + 'â°·' => 'â°‡', + 'â°¸' => 'â°ˆ', + 'â°¹' => 'â°‰', + 'â°º' => 'â°Š', + 'â°»' => 'â°‹', + 'â°¼' => 'â°Œ', + 'â°½' => 'â°', + 'â°¾' => 'â°Ž', + 'â°¿' => 'â°', + 'â±€' => 'â°', + 'â±' => 'â°‘', + 'ⱂ' => 'â°’', + 'ⱃ' => 'â°“', + 'ⱄ' => 'â°”', + 'â±…' => 'â°•', + 'ⱆ' => 'â°–', + 'ⱇ' => 'â°—', + 'ⱈ' => 'â°˜', + 'ⱉ' => 'â°™', + 'ⱊ' => 'â°š', + 'ⱋ' => 'â°›', + 'ⱌ' => 'â°œ', + 'â±' => 'â°', + 'ⱎ' => 'â°ž', + 'â±' => 'â°Ÿ', + 'â±' => 'â° ', + 'ⱑ' => 'â°¡', + 'â±’' => 'â°¢', + 'ⱓ' => 'â°£', + 'â±”' => 'â°¤', + 'ⱕ' => 'â°¥', + 'â±–' => 'â°¦', + 'â±—' => 'â°§', + 'ⱘ' => 'â°¨', + 'â±™' => 'â°©', + 'ⱚ' => 'â°ª', + 'â±›' => 'â°«', + 'ⱜ' => 'â°¬', + 'â±' => 'â°­', + 'ⱞ' => 'â°®', + 'ⱡ' => 'â± ', + 'â±¥' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'â±³' => 'â±²', + 'ⱶ' => 'â±µ', + 'â²' => 'â²€', + 'ⲃ' => 'Ⲃ', + 'â²…' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'â²' => 'Ⲍ', + 'â²' => 'Ⲏ', + 'ⲑ' => 'â²', + 'ⲓ' => 'â²’', + 'ⲕ' => 'â²”', + 'â²—' => 'â²–', + 'â²™' => 'Ⲙ', + 'â²›' => 'Ⲛ', + 'â²' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'â² ', + 'â²£' => 'â²¢', + 'â²¥' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'â²­' => 'Ⲭ', + 'ⲯ' => 'â²®', + 'â²±' => 'â²°', + 'â²³' => 'â²²', + 'â²µ' => 'â²´', + 'â²·' => 'Ⲷ', + 'â²¹' => 'Ⲹ', + 'â²»' => 'Ⲻ', + 'â²½' => 'â²¼', + 'ⲿ' => 'â²¾', + 'â³' => 'â³€', + 'ⳃ' => 'Ⳃ', + 'â³…' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'â³' => 'Ⳍ', + 'â³' => 'Ⳏ', + 'ⳑ' => 'â³', + 'ⳓ' => 'â³’', + 'ⳕ' => 'â³”', + 'â³—' => 'â³–', + 'â³™' => 'Ⳙ', + 'â³›' => 'Ⳛ', + 'â³' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'â³ ', + 'â³£' => 'â³¢', + 'ⳬ' => 'Ⳬ', + 'â³®' => 'â³­', + 'â³³' => 'â³²', + 'â´€' => 'á‚ ', + 'â´' => 'á‚¡', + 'â´‚' => 'á‚¢', + 'â´ƒ' => 'á‚£', + 'â´„' => 'Ⴄ', + 'â´…' => 'á‚¥', + 'â´†' => 'Ⴆ', + 'â´‡' => 'Ⴇ', + 'â´ˆ' => 'Ⴈ', + 'â´‰' => 'á‚©', + 'â´Š' => 'Ⴊ', + 'â´‹' => 'á‚«', + 'â´Œ' => 'Ⴌ', + 'â´' => 'á‚­', + 'â´Ž' => 'á‚®', + 'â´' => 'Ⴏ', + 'â´' => 'á‚°', + 'â´‘' => 'Ⴑ', + 'â´’' => 'Ⴒ', + 'â´“' => 'Ⴓ', + 'â´”' => 'á‚´', + 'â´•' => 'Ⴕ', + 'â´–' => 'Ⴖ', + 'â´—' => 'á‚·', + 'â´˜' => 'Ⴘ', + 'â´™' => 'Ⴙ', + 'â´š' => 'Ⴚ', + 'â´›' => 'á‚»', + 'â´œ' => 'Ⴜ', + 'â´' => 'Ⴝ', + 'â´ž' => 'Ⴞ', + 'â´Ÿ' => 'á‚¿', + 'â´ ' => 'Ⴠ', + 'â´¡' => 'áƒ', + 'â´¢' => 'Ⴢ', + 'â´£' => 'Ⴣ', + 'â´¤' => 'Ⴤ', + 'â´¥' => 'Ⴥ', + 'â´§' => 'Ⴧ', + 'â´­' => 'áƒ', + 'ê™' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ê™…' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ê™' => 'Ꙍ', + 'ê™' => 'Ꙏ', + 'ꙑ' => 'ê™', + 'ꙓ' => 'ê™’', + 'ꙕ' => 'ê™”', + 'ê™—' => 'ê™–', + 'ê™™' => 'Ꙙ', + 'ê™›' => 'Ꙛ', + 'ê™' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'ê™ ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ê™­' => 'Ꙭ', + 'êš' => 'Ꚁ', + 'ꚃ' => 'êš‚', + 'êš…' => 'êš„', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'êš‹' => 'Ꚋ', + 'êš' => 'Ꚍ', + 'êš' => 'Ꚏ', + 'êš‘' => 'êš', + 'êš“' => 'êš’', + 'êš•' => 'êš”', + 'êš—' => 'êš–', + 'êš™' => 'Ꚙ', + 'êš›' => 'êšš', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ê' => 'ê€', + 'êƒ' => 'ê‚', + 'ê…' => 'ê„', + 'ê‡' => 'ê†', + 'ê‰' => 'êˆ', + 'ê‹' => 'êŠ', + 'ê' => 'êŒ', + 'ê' => 'êŽ', + 'ê‘' => 'ê', + 'ê“' => 'ê’', + 'ê•' => 'ê”', + 'ê—' => 'ê–', + 'ê™' => 'ê˜', + 'ê›' => 'êš', + 'ê' => 'êœ', + 'êŸ' => 'êž', + 'ê¡' => 'ê ', + 'ê£' => 'ê¢', + 'ê¥' => 'ê¤', + 'ê§' => 'ê¦', + 'ê©' => 'ê¨', + 'ê«' => 'êª', + 'ê­' => 'ê¬', + 'ê¯' => 'ê®', + 'êº' => 'ê¹', + 'ê¼' => 'ê»', + 'ê¿' => 'ê¾', + 'êž' => 'Ꞁ', + 'ꞃ' => 'êž‚', + 'êž…' => 'êž„', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'êž‹', + 'êž‘' => 'êž', + 'êž“' => 'êž’', + 'êž”' => 'Ꞔ', + 'êž—' => 'êž–', + 'êž™' => 'Ꞙ', + 'êž›' => 'êžš', + 'êž' => 'êžœ', + 'ꞟ' => 'êžž', + 'êž¡' => 'êž ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'êž©' => 'Ꞩ', + 'êžµ' => 'êž´', + 'êž·' => 'Ꞷ', + 'êž¹' => 'Ꞹ', + 'êž»' => 'Ꞻ', + 'êž½' => 'êž¼', + 'êž¿' => 'êž¾', + 'ꟃ' => 'Ꟃ', + 'ꟈ' => 'Ꟈ', + 'ꟊ' => 'Ꟊ', + 'ꟶ' => 'Ꟶ', + 'ê­“' => 'êž³', + 'ê­°' => 'Ꭰ', + 'ê­±' => 'Ꭱ', + 'ê­²' => 'Ꭲ', + 'ê­³' => 'Ꭳ', + 'ê­´' => 'Ꭴ', + 'ê­µ' => 'Ꭵ', + 'ê­¶' => 'Ꭶ', + 'ê­·' => 'Ꭷ', + 'ê­¸' => 'Ꭸ', + 'ê­¹' => 'Ꭹ', + 'ê­º' => 'Ꭺ', + 'ê­»' => 'Ꭻ', + 'ê­¼' => 'Ꭼ', + 'ê­½' => 'Ꭽ', + 'ê­¾' => 'Ꭾ', + 'ê­¿' => 'Ꭿ', + 'ꮀ' => 'Ꮀ', + 'ê®' => 'Ꮁ', + 'ꮂ' => 'Ꮂ', + 'ꮃ' => 'Ꮃ', + 'ꮄ' => 'Ꮄ', + 'ê®…' => 'Ꮅ', + 'ꮆ' => 'Ꮆ', + 'ꮇ' => 'Ꮇ', + 'ꮈ' => 'Ꮈ', + 'ꮉ' => 'Ꮉ', + 'ꮊ' => 'Ꮊ', + 'ꮋ' => 'Ꮋ', + 'ꮌ' => 'Ꮌ', + 'ê®' => 'Ꮍ', + 'ꮎ' => 'Ꮎ', + 'ê®' => 'Ꮏ', + 'ê®' => 'á€', + 'ꮑ' => 'á', + 'ê®’' => 'á‚', + 'ꮓ' => 'áƒ', + 'ê®”' => 'á„', + 'ꮕ' => 'á…', + 'ê®–' => 'á†', + 'ê®—' => 'á‡', + 'ꮘ' => 'áˆ', + 'ê®™' => 'á‰', + 'ꮚ' => 'áŠ', + 'ê®›' => 'á‹', + 'ꮜ' => 'áŒ', + 'ê®' => 'á', + 'ꮞ' => 'áŽ', + 'ꮟ' => 'á', + 'ê® ' => 'á', + 'ꮡ' => 'á‘', + 'ꮢ' => 'á’', + 'ꮣ' => 'á“', + 'ꮤ' => 'á”', + 'ꮥ' => 'á•', + 'ꮦ' => 'á–', + 'ꮧ' => 'á—', + 'ꮨ' => 'á˜', + 'ꮩ' => 'á™', + 'ꮪ' => 'áš', + 'ꮫ' => 'á›', + 'ꮬ' => 'áœ', + 'ê®­' => 'á', + 'ê®®' => 'áž', + 'ꮯ' => 'áŸ', + 'ê®°' => 'á ', + 'ê®±' => 'á¡', + 'ꮲ' => 'á¢', + 'ꮳ' => 'á£', + 'ê®´' => 'á¤', + 'ꮵ' => 'á¥', + 'ꮶ' => 'á¦', + 'ê®·' => 'á§', + 'ꮸ' => 'á¨', + 'ꮹ' => 'á©', + 'ꮺ' => 'áª', + 'ê®»' => 'á«', + 'ꮼ' => 'á¬', + 'ꮽ' => 'á­', + 'ꮾ' => 'á®', + 'ꮿ' => 'á¯', + 'ï½' => 'A', + 'b' => 'ï¼¢', + 'c' => 'ï¼£', + 'd' => 'D', + 'ï½…' => 'ï¼¥', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'ï½' => 'ï¼­', + 'n' => 'ï¼®', + 'ï½' => 'O', + 'ï½' => 'ï¼°', + 'q' => 'ï¼±', + 'ï½’' => 'ï¼²', + 's' => 'ï¼³', + 'ï½”' => 'ï¼´', + 'u' => 'ï¼µ', + 'ï½–' => 'V', + 'ï½—' => 'ï¼·', + 'x' => 'X', + 'ï½™' => 'ï¼¹', + 'z' => 'Z', + 'ð¨' => 'ð€', + 'ð©' => 'ð', + 'ðª' => 'ð‚', + 'ð«' => 'ðƒ', + 'ð¬' => 'ð„', + 'ð­' => 'ð…', + 'ð®' => 'ð†', + 'ð¯' => 'ð‡', + 'ð°' => 'ðˆ', + 'ð±' => 'ð‰', + 'ð²' => 'ðŠ', + 'ð³' => 'ð‹', + 'ð´' => 'ðŒ', + 'ðµ' => 'ð', + 'ð¶' => 'ðŽ', + 'ð·' => 'ð', + 'ð¸' => 'ð', + 'ð¹' => 'ð‘', + 'ðº' => 'ð’', + 'ð»' => 'ð“', + 'ð¼' => 'ð”', + 'ð½' => 'ð•', + 'ð¾' => 'ð–', + 'ð¿' => 'ð—', + 'ð‘€' => 'ð˜', + 'ð‘' => 'ð™', + 'ð‘‚' => 'ðš', + 'ð‘ƒ' => 'ð›', + 'ð‘„' => 'ðœ', + 'ð‘…' => 'ð', + 'ð‘†' => 'ðž', + 'ð‘‡' => 'ðŸ', + 'ð‘ˆ' => 'ð ', + 'ð‘‰' => 'ð¡', + 'ð‘Š' => 'ð¢', + 'ð‘‹' => 'ð£', + 'ð‘Œ' => 'ð¤', + 'ð‘' => 'ð¥', + 'ð‘Ž' => 'ð¦', + 'ð‘' => 'ð§', + 'ð“˜' => 'ð’°', + 'ð“™' => 'ð’±', + 'ð“š' => 'ð’²', + 'ð“›' => 'ð’³', + 'ð“œ' => 'ð’´', + 'ð“' => 'ð’µ', + 'ð“ž' => 'ð’¶', + 'ð“Ÿ' => 'ð’·', + 'ð“ ' => 'ð’¸', + 'ð“¡' => 'ð’¹', + 'ð“¢' => 'ð’º', + 'ð“£' => 'ð’»', + 'ð“¤' => 'ð’¼', + 'ð“¥' => 'ð’½', + 'ð“¦' => 'ð’¾', + 'ð“§' => 'ð’¿', + 'ð“¨' => 'ð“€', + 'ð“©' => 'ð“', + 'ð“ª' => 'ð“‚', + 'ð“«' => 'ð“ƒ', + 'ð“¬' => 'ð“„', + 'ð“­' => 'ð“…', + 'ð“®' => 'ð“†', + 'ð“¯' => 'ð“‡', + 'ð“°' => 'ð“ˆ', + 'ð“±' => 'ð“‰', + 'ð“²' => 'ð“Š', + 'ð“³' => 'ð“‹', + 'ð“´' => 'ð“Œ', + 'ð“µ' => 'ð“', + 'ð“¶' => 'ð“Ž', + 'ð“·' => 'ð“', + 'ð“¸' => 'ð“', + 'ð“¹' => 'ð“‘', + 'ð“º' => 'ð“’', + 'ð“»' => 'ð““', + 'ð³€' => 'ð²€', + 'ð³' => 'ð²', + 'ð³‚' => 'ð²‚', + 'ð³ƒ' => 'ð²ƒ', + 'ð³„' => 'ð²„', + 'ð³…' => 'ð²…', + 'ð³†' => 'ð²†', + 'ð³‡' => 'ð²‡', + 'ð³ˆ' => 'ð²ˆ', + 'ð³‰' => 'ð²‰', + 'ð³Š' => 'ð²Š', + 'ð³‹' => 'ð²‹', + 'ð³Œ' => 'ð²Œ', + 'ð³' => 'ð²', + 'ð³Ž' => 'ð²Ž', + 'ð³' => 'ð²', + 'ð³' => 'ð²', + 'ð³‘' => 'ð²‘', + 'ð³’' => 'ð²’', + 'ð³“' => 'ð²“', + 'ð³”' => 'ð²”', + 'ð³•' => 'ð²•', + 'ð³–' => 'ð²–', + 'ð³—' => 'ð²—', + 'ð³˜' => 'ð²˜', + 'ð³™' => 'ð²™', + 'ð³š' => 'ð²š', + 'ð³›' => 'ð²›', + 'ð³œ' => 'ð²œ', + 'ð³' => 'ð²', + 'ð³ž' => 'ð²ž', + 'ð³Ÿ' => 'ð²Ÿ', + 'ð³ ' => 'ð² ', + 'ð³¡' => 'ð²¡', + 'ð³¢' => 'ð²¢', + 'ð³£' => 'ð²£', + 'ð³¤' => 'ð²¤', + 'ð³¥' => 'ð²¥', + 'ð³¦' => 'ð²¦', + 'ð³§' => 'ð²§', + 'ð³¨' => 'ð²¨', + 'ð³©' => 'ð²©', + 'ð³ª' => 'ð²ª', + 'ð³«' => 'ð²«', + 'ð³¬' => 'ð²¬', + 'ð³­' => 'ð²­', + 'ð³®' => 'ð²®', + 'ð³¯' => 'ð²¯', + 'ð³°' => 'ð²°', + 'ð³±' => 'ð²±', + 'ð³²' => 'ð²²', + 'ð‘£€' => 'ð‘¢ ', + 'ð‘£' => '𑢡', + '𑣂' => 'ð‘¢¢', + '𑣃' => 'ð‘¢£', + '𑣄' => '𑢤', + 'ð‘£…' => 'ð‘¢¥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + 'ð‘£' => 'ð‘¢­', + '𑣎' => 'ð‘¢®', + 'ð‘£' => '𑢯', + 'ð‘£' => 'ð‘¢°', + '𑣑' => 'ð‘¢±', + 'ð‘£’' => 'ð‘¢²', + '𑣓' => 'ð‘¢³', + 'ð‘£”' => 'ð‘¢´', + '𑣕' => 'ð‘¢µ', + 'ð‘£–' => '𑢶', + 'ð‘£—' => 'ð‘¢·', + '𑣘' => '𑢸', + 'ð‘£™' => 'ð‘¢¹', + '𑣚' => '𑢺', + 'ð‘£›' => 'ð‘¢»', + '𑣜' => 'ð‘¢¼', + 'ð‘£' => 'ð‘¢½', + '𑣞' => 'ð‘¢¾', + '𑣟' => '𑢿', + 'ð–¹ ' => 'ð–¹€', + '𖹡' => 'ð–¹', + 'ð–¹¢' => '𖹂', + 'ð–¹£' => '𖹃', + '𖹤' => '𖹄', + 'ð–¹¥' => 'ð–¹…', + '𖹦' => '𖹆', + '𖹧' => '𖹇', + '𖹨' => '𖹈', + '𖹩' => '𖹉', + '𖹪' => '𖹊', + '𖹫' => '𖹋', + '𖹬' => '𖹌', + 'ð–¹­' => 'ð–¹', + 'ð–¹®' => '𖹎', + '𖹯' => 'ð–¹', + 'ð–¹°' => 'ð–¹', + 'ð–¹±' => '𖹑', + 'ð–¹²' => 'ð–¹’', + 'ð–¹³' => '𖹓', + 'ð–¹´' => 'ð–¹”', + 'ð–¹µ' => '𖹕', + '𖹶' => 'ð–¹–', + 'ð–¹·' => 'ð–¹—', + '𖹸' => '𖹘', + 'ð–¹¹' => 'ð–¹™', + '𖹺' => '𖹚', + 'ð–¹»' => 'ð–¹›', + 'ð–¹¼' => '𖹜', + 'ð–¹½' => 'ð–¹', + 'ð–¹¾' => '𖹞', + '𖹿' => '𖹟', + '𞤢' => '𞤀', + '𞤣' => 'ðž¤', + '𞤤' => '𞤂', + '𞤥' => '𞤃', + '𞤦' => '𞤄', + '𞤧' => '𞤅', + '𞤨' => '𞤆', + '𞤩' => '𞤇', + '𞤪' => '𞤈', + '𞤫' => '𞤉', + '𞤬' => '𞤊', + '𞤭' => '𞤋', + '𞤮' => '𞤌', + '𞤯' => 'ðž¤', + '𞤰' => '𞤎', + '𞤱' => 'ðž¤', + '𞤲' => 'ðž¤', + '𞤳' => '𞤑', + '𞤴' => '𞤒', + '𞤵' => '𞤓', + '𞤶' => '𞤔', + '𞤷' => '𞤕', + '𞤸' => '𞤖', + '𞤹' => '𞤗', + '𞤺' => '𞤘', + '𞤻' => '𞤙', + '𞤼' => '𞤚', + '𞤽' => '𞤛', + '𞤾' => '𞤜', + '𞤿' => 'ðž¤', + '𞥀' => '𞤞', + 'ðž¥' => '𞤟', + '𞥂' => '𞤠', + '𞥃' => '𞤡', + 'ß' => 'SS', + 'ff' => 'FF', + 'ï¬' => 'FI', + 'fl' => 'FL', + 'ffi' => 'FFI', + 'ffl' => 'FFL', + 'ſt' => 'ST', + 'st' => 'ST', + 'Ö‡' => 'ÔµÕ’', + 'ﬓ' => 'Õ„Õ†', + 'ﬔ' => 'Õ„Ôµ', + 'ﬕ' => 'Õ„Ô»', + 'ﬖ' => 'ÕŽÕ†', + 'ﬗ' => 'Õ„Ô½', + 'ʼn' => 'ʼN', + 'Î' => 'ΪÌ', + 'ΰ' => 'ΫÌ', + 'Ç°' => 'JÌŒ', + 'ẖ' => 'H̱', + 'ẗ' => 'T̈', + 'ẘ' => 'WÌŠ', + 'ẙ' => 'YÌŠ', + 'ẚ' => 'Aʾ', + 'á½' => 'Υ̓', + 'á½’' => 'Υ̓̀', + 'á½”' => 'Υ̓Ì', + 'á½–' => 'Υ̓͂', + 'ᾶ' => 'Α͂', + 'ῆ' => 'Η͂', + 'á¿’' => 'Ϊ̀', + 'á¿“' => 'ΪÌ', + 'á¿–' => 'Ι͂', + 'á¿—' => 'Ϊ͂', + 'á¿¢' => 'Ϋ̀', + 'á¿£' => 'ΫÌ', + 'ῤ' => 'Ρ̓', + 'ῦ' => 'Υ͂', + 'ῧ' => 'Ϋ͂', + 'ῶ' => 'Ω͂', + 'ᾈ' => 'ἈΙ', + 'ᾉ' => 'ἉΙ', + 'ᾊ' => 'ἊΙ', + 'ᾋ' => 'ἋΙ', + 'ᾌ' => 'ἌΙ', + 'á¾' => 'á¼Î™', + 'ᾎ' => 'ἎΙ', + 'á¾' => 'á¼Î™', + 'ᾘ' => 'ἨΙ', + 'á¾™' => 'ἩΙ', + 'ᾚ' => 'ἪΙ', + 'á¾›' => 'ἫΙ', + 'ᾜ' => 'ἬΙ', + 'á¾' => 'ἭΙ', + 'ᾞ' => 'ἮΙ', + 'ᾟ' => 'ἯΙ', + 'ᾨ' => 'ὨΙ', + 'ᾩ' => 'ὩΙ', + 'ᾪ' => 'ὪΙ', + 'ᾫ' => 'ὫΙ', + 'ᾬ' => 'ὬΙ', + 'á¾­' => 'ὭΙ', + 'á¾®' => 'ὮΙ', + 'ᾯ' => 'ὯΙ', + 'á¾¼' => 'ΑΙ', + 'á¿Œ' => 'ΗΙ', + 'ῼ' => 'ΩΙ', + 'á¾²' => 'ᾺΙ', + 'á¾´' => 'ΆΙ', + 'á¿‚' => 'ῊΙ', + 'á¿„' => 'ΉΙ', + 'ῲ' => 'ῺΙ', + 'á¿´' => 'ÎΙ', + 'á¾·' => 'Α͂Ι', + 'ῇ' => 'Η͂Ι', + 'á¿·' => 'Ω͂Ι', +); diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/bootstrap.php b/dev/plugins/email/vendor/symfony/polyfill-mbstring/bootstrap.php new file mode 100644 index 00000000..1fedd1f7 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (\PHP_VERSION_ID >= 80000) { + return require __DIR__.'/bootstrap80.php'; +} + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language($language = null) { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/bootstrap80.php b/dev/plugins/email/vendor/symfony/polyfill-mbstring/bootstrap80.php new file mode 100644 index 00000000..82f5ac4d --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Mbstring as p; + +if (!function_exists('mb_convert_encoding')) { + function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } +} +if (!function_exists('mb_decode_mimeheader')) { + function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } +} +if (!function_exists('mb_encode_mimeheader')) { + function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } +} +if (!function_exists('mb_decode_numericentity')) { + function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } +} +if (!function_exists('mb_encode_numericentity')) { + function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } +} +if (!function_exists('mb_convert_case')) { + function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } +} +if (!function_exists('mb_internal_encoding')) { + function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } +} +if (!function_exists('mb_language')) { + function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } +} +if (!function_exists('mb_list_encodings')) { + function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } +} +if (!function_exists('mb_encoding_aliases')) { + function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } +} +if (!function_exists('mb_check_encoding')) { + function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } +} +if (!function_exists('mb_detect_encoding')) { + function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } +} +if (!function_exists('mb_detect_order')) { + function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } +} +if (!function_exists('mb_parse_str')) { + function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } +} +if (!function_exists('mb_strlen')) { + function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } +} +if (!function_exists('mb_strpos')) { + function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strtolower')) { + function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } +} +if (!function_exists('mb_strtoupper')) { + function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } +} +if (!function_exists('mb_substitute_character')) { + function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } +} +if (!function_exists('mb_substr')) { + function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } +} +if (!function_exists('mb_stripos')) { + function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_stristr')) { + function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrchr')) { + function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strrichr')) { + function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_strripos')) { + function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strrpos')) { + function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } +} +if (!function_exists('mb_strstr')) { + function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } +} +if (!function_exists('mb_get_info')) { + function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } +} +if (!function_exists('mb_http_output')) { + function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } +} +if (!function_exists('mb_strwidth')) { + function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } +} +if (!function_exists('mb_substr_count')) { + function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } +} +if (!function_exists('mb_output_handler')) { + function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } +} +if (!function_exists('mb_http_input')) { + function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } +} + +if (!function_exists('mb_convert_variables')) { + function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } +} + +if (!function_exists('mb_ord')) { + function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } +} +if (!function_exists('mb_str_split')) { + function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } +} + +if (extension_loaded('mbstring')) { + return; +} + +if (!defined('MB_CASE_UPPER')) { + define('MB_CASE_UPPER', 0); +} +if (!defined('MB_CASE_LOWER')) { + define('MB_CASE_LOWER', 1); +} +if (!defined('MB_CASE_TITLE')) { + define('MB_CASE_TITLE', 2); +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-mbstring/composer.json b/dev/plugins/email/vendor/symfony/polyfill-mbstring/composer.json new file mode 100644 index 00000000..2ed7a743 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-mbstring/composer.json @@ -0,0 +1,38 @@ +{ + "name": "symfony/polyfill-mbstring", + "type": "library", + "description": "Symfony polyfill for the Mbstring extension", + "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, + "files": [ "bootstrap.php" ] + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-php72/LICENSE b/dev/plugins/email/vendor/symfony/polyfill-php72/LICENSE new file mode 100644 index 00000000..4cd8bdd3 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-php72/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015-2019 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/dev/plugins/email/vendor/symfony/polyfill-php72/Php72.php b/dev/plugins/email/vendor/symfony/polyfill-php72/Php72.php new file mode 100644 index 00000000..5e20d5bf --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-php72/Php72.php @@ -0,0 +1,217 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Polyfill\Php72; + +/** + * @author Nicolas Grekas + * @author Dariusz RumiÅ„ski + * + * @internal + */ +final class Php72 +{ + private static $hashMask; + + public static function utf8_encode($s) + { + $s .= $s; + $len = \strlen($s); + + for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { + switch (true) { + case $s[$i] < "\x80": $s[$j] = $s[$i]; break; + case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; + default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; + } + } + + return substr($s, 0, $j); + } + + public static function utf8_decode($s) + { + $s = (string) $s; + $len = \strlen($s); + + for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { + switch ($s[$i] & "\xF0") { + case "\xC0": + case "\xD0": + $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); + $s[$j] = $c < 256 ? \chr($c) : '?'; + break; + + case "\xF0": + ++$i; + // no break + + case "\xE0": + $s[$j] = '?'; + $i += 2; + break; + + default: + $s[$j] = $s[$i]; + } + } + + return substr($s, 0, $j); + } + + public static function php_os_family() + { + if ('\\' === \DIRECTORY_SEPARATOR) { + return 'Windows'; + } + + $map = [ + 'Darwin' => 'Darwin', + 'DragonFly' => 'BSD', + 'FreeBSD' => 'BSD', + 'NetBSD' => 'BSD', + 'OpenBSD' => 'BSD', + 'Linux' => 'Linux', + 'SunOS' => 'Solaris', + ]; + + return isset($map[\PHP_OS]) ? $map[\PHP_OS] : 'Unknown'; + } + + public static function spl_object_id($object) + { + if (null === self::$hashMask) { + self::initHashMask(); + } + if (null === $hash = spl_object_hash($object)) { + return; + } + + // On 32-bit systems, PHP_INT_SIZE is 4, + return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + } + + public static function sapi_windows_vt100_support($stream, $enable = null) + { + if (!\is_resource($stream)) { + trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); + + return false; + } + + $meta = stream_get_meta_data($stream); + + if ('STDIO' !== $meta['stream_type']) { + trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING); + + return false; + } + + // We cannot actually disable vt100 support if it is set + if (false === $enable || !self::stream_isatty($stream)) { + return false; + } + + // The native function does not apply to stdin + $meta = array_map('strtolower', $meta); + $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; + + return !$stdin + && (false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM')); + } + + public static function stream_isatty($stream) + { + if (!\is_resource($stream)) { + trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); + + return false; + } + + if ('\\' === \DIRECTORY_SEPARATOR) { + $stat = @fstat($stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + } + + return \function_exists('posix_isatty') && @posix_isatty($stream); + } + + private static function initHashMask() + { + $obj = (object) []; + self::$hashMask = -1; + + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; + foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = (int) substr(ob_get_clean(), 17); + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), (\PHP_INT_SIZE * 2 - 1))); + } + + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = \chr($code); + } elseif (0x800 > $code) { + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } else { + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if (null === $encoding) { + $s = mb_convert_encoding($s, 'UTF-8'); + } elseif ('UTF-8' !== $encoding) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + if (1 === \strlen($s)) { + return \ord($s); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-php72/README.md b/dev/plugins/email/vendor/symfony/polyfill-php72/README.md new file mode 100644 index 00000000..59dec8a2 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-php72/README.md @@ -0,0 +1,28 @@ +Symfony Polyfill / Php72 +======================== + +This component provides functions added to PHP 7.2 core: + +- [`spl_object_id`](https://php.net/spl_object_id) +- [`stream_isatty`](https://php.net/stream_isatty) + +On Windows only: + +- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) + +Moved to core since 7.2 (was in the optional XML extension earlier): + +- [`utf8_encode`](https://php.net/utf8_encode) +- [`utf8_decode`](https://php.net/utf8_decode) + +Also, it provides constants added to PHP 7.2: +- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig) +- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) + +More information can be found in the +[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). + +License +======= + +This library is released under the [MIT license](LICENSE). diff --git a/dev/plugins/email/vendor/symfony/polyfill-php72/bootstrap.php b/dev/plugins/email/vendor/symfony/polyfill-php72/bootstrap.php new file mode 100644 index 00000000..b5c92d4c --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-php72/bootstrap.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Polyfill\Php72 as p; + +if (\PHP_VERSION_ID >= 70200) { + return; +} + +if (!defined('PHP_FLOAT_DIG')) { + define('PHP_FLOAT_DIG', 15); +} +if (!defined('PHP_FLOAT_EPSILON')) { + define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); +} +if (!defined('PHP_FLOAT_MIN')) { + define('PHP_FLOAT_MIN', 2.2250738585072E-308); +} +if (!defined('PHP_FLOAT_MAX')) { + define('PHP_FLOAT_MAX', 1.7976931348623157E+308); +} +if (!defined('PHP_OS_FAMILY')) { + define('PHP_OS_FAMILY', p\Php72::php_os_family()); +} + +if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { + function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } +} +if (!function_exists('stream_isatty')) { + function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } +} +if (!function_exists('utf8_encode')) { + function utf8_encode($string) { return p\Php72::utf8_encode($string); } +} +if (!function_exists('utf8_decode')) { + function utf8_decode($string) { return p\Php72::utf8_decode($string); } +} +if (!function_exists('spl_object_id')) { + function spl_object_id($object) { return p\Php72::spl_object_id($object); } +} +if (!function_exists('mb_ord')) { + function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); } +} +if (!function_exists('mb_chr')) { + function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); } +} +if (!function_exists('mb_scrub')) { + function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } +} diff --git a/dev/plugins/email/vendor/symfony/polyfill-php72/composer.json b/dev/plugins/email/vendor/symfony/polyfill-php72/composer.json new file mode 100644 index 00000000..c96c8447 --- /dev/null +++ b/dev/plugins/email/vendor/symfony/polyfill-php72/composer.json @@ -0,0 +1,35 @@ +{ + "name": "symfony/polyfill-php72", + "type": "library", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "keywords": ["polyfill", "shim", "compatibility", "portable"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=7.1" + }, + "autoload": { + "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, + "files": [ "bootstrap.php" ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + } +} diff --git a/dev/plugins/error/CHANGELOG.md b/dev/plugins/error/CHANGELOG.md new file mode 100644 index 00000000..eec51610 --- /dev/null +++ b/dev/plugins/error/CHANGELOG.md @@ -0,0 +1,91 @@ +# v1.8.0 +## 09/07/2021 + +1. [](#new) + * Require **Grav 1.7.0** + * Added support for `{% throw 404 'Not Found' %}` from twig template to show the error page +1. [](#improved) + * Do not cache 404 error pages by default + +# v1.7.1 +## 10/08/2020 + +1. [](#bugfix) + * Fixed error page being cached, fixes issue with non-existing resources which later become available + +# v1.7.0 +## 07/01/2020 + +1. [](#new) + * Require Grav v1.6 +1. [](#bugfix) + * Added translated title programmatically [#40](https://github.com/getgrav/grav-plugin-error/pull/40) + +# v1.6.2 +## 05/09/2019 + +1. [](#new) + * Fixed a few issues found by phpstan + * Added `ru` and `uk` translations [#36](https://github.com/getgrav/grav-plugin-error/pull/36) + +# v1.6.1 +## 03/09/2018 + +1. [](#improved) + * Added Polish + Catalan translation + * Updated `README.md` to reference custom error pages + +# v1.6.0 +## 10/19/2016 + +1. [](#improved) + * Added Croatian translation + * Improved `autoescape: true` support +1. [](#bugfix) + * Fixed issue where template file for `error` page type is only available if page was not found + +# v1.5.1 +## 07/18/2016 + +1. [](#improved) + * Added chinese and german translations +1. [](#bugfix) + * Fixed issue with the Smartypants plugin running before Twig was processed + +# v1.5.0 +## 07/14/2015 + +1. [](#improved) + * Translate some blueprint configuration options + * Allow translating the error message + * Added french, russian, romanian, danish, italian + +# v1.4.1 +## 12/11/2015 + +1. [](#bugfix) + * Fixed CLI command for PHP 5.5 and lower + +# v1.4.0 +## 11/21/2015 + +1. [](#new) + * Implemented CLI commands for the plugin + +# v1.3.0 +## 08/25/2015 + +1. [](#improved) + * Added blueprints for Grav Admin plugin + +# v1.2.2 +## 01/06/2015 + +1. [](#new) + * Added a default `error.json.twig` file + +# v1.2.1 +## 11/30/2014 + +1. [](#new) + * ChangeLog started... diff --git a/dev/plugins/error/LICENSE b/dev/plugins/error/LICENSE new file mode 100644 index 00000000..484793ad --- /dev/null +++ b/dev/plugins/error/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Grav + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dev/plugins/error/README.md b/dev/plugins/error/README.md new file mode 100644 index 00000000..ef24726b --- /dev/null +++ b/dev/plugins/error/README.md @@ -0,0 +1,93 @@ +# Grav Error Plugin + +![GPM Installation](assets/readme_1.png) + +`error` is a [Grav](http://github.com/getgrav/grav) Plugin and allows to redirect errors to nice output pages. + +This plugin is included in any package distributed that contains Grav. If you decide to clone Grav from GitHub you will most likely want to install this. + +# Installation + +Installing the Error plugin can be done in one of two ways. Our GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file. + +## GPM Installation (Preferred) + +The simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's Terminal (also called the command line). From the root of your Grav install type: + + bin/gpm install error + +This will install the Error plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/error`. + +## Manual Installation + +To install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then, rename the folder to `error`. You can find these files either on [GitHub](https://github.com/getgrav/grav-plugin-error) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras). + +You should now have all the plugin files under + + /your/site/grav/user/plugins/error + +>> NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav), the [Problems](https://github.com/getgrav/grav-plugin-problems) plugin, and a theme to be installed in order to operate. + +# Usage + +The `error` plugin doesn't require any configuration. The moment you install it, it is ready to use. + +Something you might want to do is to override the look and feel of the error page, and with Grav it is super easy. + +### Template + +Copy the template file [error.html.twig](templates/error.html.twig) into the `templates` folder of your custom theme and that is it. + +``` +/your/site/grav/user/themes/custom-theme/templates/error.html.twig +``` + +You can now edit the override and tweak it however you prefer. + +### Page + +Copy the page file [error.md](pages/error.md) into the `pages` folder of your user directory and that is it. + +``` +/your/site/grav/user/pages/error/error.md +``` + +You can now edit the override and tweak it however you prefer. + +# Custom error pages + +The configuration allows to specify pages different than `/error` for specific error codes. By default, the `404` error leads to the `/error` page. If you change that, make sure the page you point to has a `error` template (which means, its markdown file is `error.md` or in the page frontmatter you specify `template: error`. + +# CLI Usage +The `error` plugin comes with a CLI command that outputs the `grav.log` in a beautified way, with possibility of limiting the amount of errors displayed, as well as include the trace in the output. + +### Commands + +| `bin/plugin error log` | | +|------------------------|-----------------------------------------------------------------| +| [ --limit N \| -l N ] | The amount of errors to display. Default is 5 | +| [ --trace \| -t ] | When used, it will add the backtrace in the output of the error | + + +# Updating + +As development for the Error plugin continues, new versions may become available that add additional features and functionality, improve compatibility with newer Grav releases, and generally provide a better user experience. Updating Error is easy, and can be done through Grav's GPM system, as well as manually. + +## GPM Update (Preferred) + +The simplest way to update this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm). You can do this with this by navigating to the root directory of your Grav install using your system's Terminal (also called command line) and typing the following: + + bin/gpm update error + +This command will check your Grav install to see if your Error plugin is due for an update. If a newer release is found, you will be asked whether or not you wish to update. To continue, type `y` and hit enter. The plugin will automatically update and clear Grav's cache. + +## Manual Update + +Manually updating Error is pretty simple. Here is what you will need to do to get this done: + +* Delete the `your/site/user/plugins/error` directory. +* Download the new version of the Error plugin from either [GitHub](https://github.com/getgrav/grav-plugin-error) or [GetGrav.org](http://getgrav.org/downloads/plugins#extras). +* Unzip the zip file in `your/site/user/plugins` and rename the resulting folder to `error`. +* Clear the Grav cache. The simplest way to do this is by going to the root Grav directory in terminal and typing `bin/grav clear-cache`. + +> Note: Any changes you have made to any of the files listed under this directory will also be removed and replaced by the new set. Any files located elsewhere (for example a YAML settings file placed in `user/config/plugins`) will remain intact. diff --git a/dev/plugins/error/assets/readme_1.png b/dev/plugins/error/assets/readme_1.png new file mode 100644 index 00000000..930b87bb Binary files /dev/null and b/dev/plugins/error/assets/readme_1.png differ diff --git a/dev/plugins/error/blueprints.yaml b/dev/plugins/error/blueprints.yaml new file mode 100644 index 00000000..b6421584 --- /dev/null +++ b/dev/plugins/error/blueprints.yaml @@ -0,0 +1,36 @@ +name: Error +version: 1.8.0 +description: Displays the error page. +type: plugin +slug: error +icon: warning +author: + name: Team Grav + email: devs@getgrav.org + url: http://getgrav.org +homepage: https://github.com/getgrav/grav-plugin-error +keywords: error, plugin, required +bugs: https://github.com/getgrav/grav-plugin-error/issues +license: MIT +dependencies: + - { name: grav, version: '>=1.7.0' } + +form: + validation: strict + fields: + enabled: + type: toggle + label: PLUGIN_ADMIN.PLUGIN_STATUS + highlight: 1 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + routes.404: + type: text + size: medium + label: PLUGIN_ERROR.ROUTE_404 + default: '/error' diff --git a/dev/plugins/error/cli/LogCommand.php b/dev/plugins/error/cli/LogCommand.php new file mode 100644 index 00000000..d29354ac --- /dev/null +++ b/dev/plugins/error/cli/LogCommand.php @@ -0,0 +1,130 @@ + 'green', + 'INFO' => 'cyan', + 'NOTICE' => 'yellow', + 'WARNING' => 'yellow', + 'ERROR' => 'red', + 'CRITICAL' => 'red', + 'ALERT' => 'red', + 'EMERGENCY' => 'magenta' + ]; + + /** + * + */ + protected function configure() + { + $this->logfile = LOG_DIR . 'grav.log'; + $this + ->setName("log") + ->setDescription("Outputs the Error Log") + ->addOption( + 'trace', + 't', + InputOption::VALUE_NONE, + 'Include the errors stack trace in the output' + ) + ->addOption( + 'limit', + 'l', + InputArgument::OPTIONAL, + 'Outputs only the last X amount of errors. Use as --limit 10 / -l 10 [default 5]', + 5 + ) + ->setHelp('The log outputs the Errors Log in Console') + ; + } + + /** + * @return int|null|void + */ + protected function serve() + { + $this->options = [ + 'trace' => $this->input->getOption('trace'), + 'limit' => $this->input->getOption('limit') + ]; + + if (!file_exists($this->logfile)) { + $this->output->writeln("\n" . "Log file not found." . "\n"); + exit; + } + + $log = file_get_contents($this->logfile); + $lines = explode("\n", $log); + + if (!is_numeric($this->options['limit'])) { + $this->options['limit'] = 5; + } + + $lines = array_slice($lines, -($this->options['limit'] + 1)); + + foreach ($lines as $line) { + $this->output->writeln($this->parseLine($line)); + } + } + + /** + * @param string $line + * + * @return null|string + */ + protected function parseLine($line) + { + $bit = explode(': ', $line); + $line1 = explode('] ', $bit[0]); + + if (!$line1[0]) { + return null; + } + + $line2 = explode(' - ', $bit[1]); + + $date = $line1[0] . ']'; + $type = str_replace('grav.', '', $line1[1]); + $color = $this->colors[$type]; + $error = $line2[0]; + $trace = implode(': ', array_slice($bit, 2)); + + $output = []; + + $output[] = ''; + $output[] = '' . $date . ''; + $output[] = sprintf(' <%s>%s ' . $error . '', $color, $type, $color); + + if ($this->options['trace']) { + $output[] = ' TRACE: '; + $output[] = ' ' . $trace; + } + + $output[] = '' . str_repeat('-', strlen($date)) . ''; + + return implode("\n", $output); + } +} + diff --git a/dev/plugins/error/composer.json b/dev/plugins/error/composer.json new file mode 100644 index 00000000..27ddfa99 --- /dev/null +++ b/dev/plugins/error/composer.json @@ -0,0 +1,39 @@ +{ + "name": "getgrav/grav-plugin-error", + "type": "grav-plugin", + "description": "Error plugin for Grav CMS", + "keywords": ["error", "plugin"], + "homepage": "https://github.com/getgrav/grav-plugin-error", + "license": "MIT", + "authors": [ + { + "name": "Team Grav", + "email": "devs@getgrav.org", + "homepage": "https://getgrav.org", + "role": "Developer" + } + ], + "support": { + "issues": "https://github.com/getgrav/grav-plugin-error/issues", + "irc": "https://chat.getgrav.org", + "forum": "https://getgrav.org/forum", + "docs": "https://github.com/getgrav/grav-plugin-error/blob/master/README.md" + }, + "autoload": { + "psr-4": { + "Grav\\Plugin\\Console\\": "cli/" + }, + "classmap": [ + "error.php" + ] + }, + "config": { + "platform": { + "php": "7.1.3" + } + }, + "scripts": { + "test": "vendor/bin/codecept run unit", + "test-windows": "vendor\\bin\\codecept run unit" + } +} diff --git a/dev/plugins/error/error.php b/dev/plugins/error/error.php new file mode 100644 index 00000000..edbaaff4 --- /dev/null +++ b/dev/plugins/error/error.php @@ -0,0 +1,117 @@ + [ + ['autoload', 100000], + ], + 'onPageNotFound' => [ + ['onPageNotFound', 0] + ], + 'onGetPageTemplates' => [ + ['onGetPageTemplates', 0] + ], + 'onTwigTemplatePaths' => [ + ['onTwigTemplatePaths', -10] + ], + 'onDisplayErrorPage.404'=> [ + ['onDisplayErrorPage404', -1] + ] + ]; + } + + /** + * [onPluginsInitialized:100000] Composer autoload. + * + * @return ClassLoader + */ + public function autoload(): ClassLoader + { + return require __DIR__ . '/vendor/autoload.php'; + } + + /** + * @param Event $event + */ + public function onDisplayErrorPage404(Event $event): void + { + if ($this->isAdmin()) { + return; + } + + $event['page'] = $this->getErrorPage(); + $event->stopPropagation(); + } + + /** + * Display error page if no page was found for the current route. + * + * @param Event $event + */ + public function onPageNotFound(Event $event): void + { + $event->page = $this->getErrorPage(); + $event->stopPropagation(); + } + + /** + * @return PageInterface + * @throws \Exception + */ + public function getErrorPage(): PageInterface + { + /** @var Pages $pages */ + $pages = $this->grav['pages']; + + // Try to load user error page. + $page = $pages->dispatch($this->config->get('plugins.error.routes.404', '/error'), true); + if (!$page) { + // If none provided use built in error page. + $page = new Page; + $page->init(new \SplFileInfo(__DIR__ . '/pages/error.md')); + $page->title($this->grav['language']->translate('PLUGIN_ERROR.ERROR') . ' ' . $page->header()->http_response_code); + + } + + // Login page may not have the correct Cache-Control header set, force no-store for the proxies. + $cacheControl = $page->cacheControl(); + if (!$cacheControl) { + $page->cacheControl('private, no-cache, must-revalidate'); + } + + return $page; + } + + /** + * Add page template types. + */ + public function onGetPageTemplates(Event $event): void + { + /** @var Types $types */ + $types = $event->types; + $types->register('error'); + } + + /** + * Add current directory to twig lookup paths. + */ + public function onTwigTemplatePaths(): void + { + $this->grav['twig']->twig_paths[] = __DIR__ . '/templates'; + } +} diff --git a/dev/plugins/error/error.yaml b/dev/plugins/error/error.yaml new file mode 100644 index 00000000..0a51d4c4 --- /dev/null +++ b/dev/plugins/error/error.yaml @@ -0,0 +1,3 @@ +enabled: true +routes: + 404: '/error' diff --git a/dev/plugins/error/languages.yaml b/dev/plugins/error/languages.yaml new file mode 100644 index 00000000..650e6175 --- /dev/null +++ b/dev/plugins/error/languages.yaml @@ -0,0 +1,55 @@ +en: + PLUGIN_ERROR: + ERROR: "Error" + ERROR_MESSAGE: "Woops. Looks like this page doesn't exist." + ROUTE_404: "404 Route" +de: + PLUGIN_ERROR: + ERROR: "Fehler" + ERROR_MESSAGE: "Uuups. Sieht aus als ob diese Seite nicht existiert." +hr: + PLUGIN_ERROR: + ERROR: "GreÅ¡ka" + ERROR_MESSAGE: "Uups. Izgleda da ova stranica ne postoji." +ro: + PLUGIN_ERROR: + ERROR: "Eroare" + ERROR_MESSAGE: "Ooops. Se pare că pagina nu există." +fr: + PLUGIN_ERROR: + ERROR: "Erreur" + ERROR_MESSAGE: "Oups. Il semble que cette page n’existe pas." +it: + PLUGIN_ERROR: + ERROR: "Errore" + ERROR_MESSAGE: "Ooops. A quanto pare, questa pagina non esiste." +ru: + PLUGIN_ERROR: + ERROR: "Ошибка" + ERROR_MESSAGE: "УпÑ. Похоже, Ñтой Ñтраницы не ÑущеÑтвует." + ROUTE_404: "Маршрут 404" +uk: + PLUGIN_ERROR: + ERROR: "Помилка" + ERROR_MESSAGE: "УпÑ. Схоже, цієї Ñторінки не Ñ–Ñнує." + ROUTE_404: "Маршрут 404" +da: + PLUGIN_ERROR: + ERROR: "Fejl" + ERROR_MESSAGE: "Ups. Det ser ud til at siden ikke eksisterer." +zh: + PLUGIN_ERROR: + ERROR: "错误" + ERROR_MESSAGE: "呃,似乎这个页é¢ä¸å­˜åœ¨ã€‚" +cs: + PLUGIN_ERROR: + ERROR: "Chyba" + ERROR_MESSAGE: "A jéje. Vypadá to, že hledaná stránka tu není." +pl: + PLUGIN_ERROR: + ERROR: "BÅ‚Ä…d" + ERROR_MESSAGE: "Ups. WyglÄ…da na to, że ta strona nie istnieje." +ca: + PLUGIN_ERROR: + ERROR: "Error" + ERROR_MESSAGE: "Ups. Sembla que aquesta pàgina no existeix." diff --git a/dev/plugins/error/templates/error.html.twig b/dev/plugins/error/templates/error.html.twig new file mode 100644 index 00000000..420702b3 --- /dev/null +++ b/dev/plugins/error/templates/error.html.twig @@ -0,0 +1,3 @@ +

    {{ 'PLUGIN_ERROR.ERROR'|t }} {{ header.http_response_code }}

    + +

    {{ page.content|raw }}

    diff --git a/dev/plugins/error/templates/error.json.twig b/dev/plugins/error/templates/error.json.twig new file mode 100644 index 00000000..27472f13 --- /dev/null +++ b/dev/plugins/error/templates/error.json.twig @@ -0,0 +1 @@ +{{ page.content|json_encode()|raw }} \ No newline at end of file diff --git a/dev/plugins/error/vendor/autoload.php b/dev/plugins/error/vendor/autoload.php new file mode 100644 index 00000000..b30c4e09 --- /dev/null +++ b/dev/plugins/error/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/dev/plugins/error/vendor/composer/LICENSE b/dev/plugins/error/vendor/composer/LICENSE new file mode 100644 index 00000000..f27399a0 --- /dev/null +++ b/dev/plugins/error/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/dev/plugins/error/vendor/composer/autoload_classmap.php b/dev/plugins/error/vendor/composer/autoload_classmap.php new file mode 100644 index 00000000..71c46665 --- /dev/null +++ b/dev/plugins/error/vendor/composer/autoload_classmap.php @@ -0,0 +1,10 @@ + $baseDir . '/error.php', +); diff --git a/dev/plugins/error/vendor/composer/autoload_namespaces.php b/dev/plugins/error/vendor/composer/autoload_namespaces.php new file mode 100644 index 00000000..b7fc0125 --- /dev/null +++ b/dev/plugins/error/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($baseDir . '/cli'), +); diff --git a/dev/plugins/error/vendor/composer/autoload_real.php b/dev/plugins/error/vendor/composer/autoload_real.php new file mode 100644 index 00000000..ee6a4c04 --- /dev/null +++ b/dev/plugins/error/vendor/composer/autoload_real.php @@ -0,0 +1,52 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit4e2f762c713c4d4aae8969c74f5623a3::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/dev/plugins/error/vendor/composer/autoload_static.php b/dev/plugins/error/vendor/composer/autoload_static.php new file mode 100644 index 00000000..11ca02ae --- /dev/null +++ b/dev/plugins/error/vendor/composer/autoload_static.php @@ -0,0 +1,36 @@ + + array ( + 'Grav\\Plugin\\Console\\' => 20, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Grav\\Plugin\\Console\\' => + array ( + 0 => __DIR__ . '/../..' . '/cli', + ), + ); + + public static $classMap = array ( + 'Grav\\Plugin\\ErrorPlugin' => __DIR__ . '/../..' . '/error.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit4e2f762c713c4d4aae8969c74f5623a3::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit4e2f762c713c4d4aae8969c74f5623a3::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit4e2f762c713c4d4aae8969c74f5623a3::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/dev/plugins/error/vendor/composer/installed.json b/dev/plugins/error/vendor/composer/installed.json new file mode 100644 index 00000000..fe51488c --- /dev/null +++ b/dev/plugins/error/vendor/composer/installed.json @@ -0,0 +1 @@ +[] diff --git a/dev/plugins/external_links/CHANGELOG.md b/dev/plugins/external_links/CHANGELOG.md new file mode 100644 index 00000000..d901c601 --- /dev/null +++ b/dev/plugins/external_links/CHANGELOG.md @@ -0,0 +1,189 @@ +# v1.6.3 +## 01/26/2021 + +1. [](#improved) + * Updated plugin blueprints for Grav 1.7 + +# v1.6.2 +## 10/28/2019 + +1. [](#improved) + * FlexObjects compatibility: change references to `Page` class to use `PageInterface` + * Updated Grav requirements to 1.6 or greater (thanks to [@mahagr](https://github.com/mahagr) for the heads-up) + +# v1.6.1 +## 07/12/2018 + +3. [](#bugfix) + * Fixed parsing tags other than links [#24](https://github.com/Sommerregen/grav-plugin-external-links/pull/24) (Fix loading of a href element) + +# v1.6.0 +## 02/22/2018 + +1. [](#new) + * Check for page redirects [#22](https://github.com/Sommerregen/grav-plugin-external-links/pull/22) (Check for redirecting pages if `links.redirects` is enabled, thanks to [@karfau](https://github.com/karfau)) +2. [](#improved) + * Set `rel="noopener noreferrer"` to all external links [#21](https://github.com/Sommerregen/grav-plugin-external-links/issues/21) + * Updated French translation strings [#19](https://github.com/Sommerregen/grav-plugin-external-links/pull/19) + * Improved `README.md` and YAML files + +# v1.5.3 +## 02/18/2017 + +3. [](#bugfix) + * Fixed Russian translation strings [#17](https://github.com/Sommerregen/grav-plugin-external-links/pull/17) (Thanks to [@geschke](https://github.com/geschke) for the fast PR) + +# v1.5.2 +## 02/17/2017 + +1. [](#new) + * Added Russian translations [#16](https://github.com/Sommerregen/grav-plugin-external-links/pull/16) (Thanks to [@ktaranov](https://github.com/ktaranov)) + +# v1.5.1 +## 02/10/2017 + +3. [](#bugfix) + * Fixed error in getting the remote image size + +# v1.5.0 +## 02/09/2017 + +2. [](#improved) + * Use tabs in admin panel settings for better user experience + * Use toggle buttons for page settings + +# v1.4.4 +## 01/11/2017 + +3. [](#bugfix) + * Fixed `CURLOPT_AUTOREFERER` constant + +# v1.4.3 +## 10/31/2016 + +3. [](#bugfix) + * Fixed [#11](https://github.com/Sommerregen/grav-plugin-external-links/issues/11) (Not working with cache enabling) (see PR [#15](https://github.com/Sommerregen/grav-plugin-external-links/pull/15)) + * Fixed [#13](https://github.com/Sommerregen/grav-plugin-external-links/issues/13) (Preferences Not Showing) + +# v1.4.2 +## 12/06/2015 + +1. [](#new) + * Added French translations [#8](https://github.com/Sommerregen/grav-plugin-external-links/pull/8) (Thanks to [@MATsxm](https://github.com/MATsxm)) + +# v1.4.1 +## 11/18/2015 + +2. [](#improved) + * Page specific options now respect the default configurations set in the admin panel + +# v1.4.0 +## 11/17/2015 + +1. [](#new) + * Added `External Links` options to page options tab +2. [](#improved) + * Improved `isExternalUrl` function to allow custom schemes and whether to evaluate links beginning with `.www` or not + * Added more blueprint options + * Improved code + * Updated docs +3. [](#bugfix) + * Fixed [#7](https://github.com/Sommerregen/grav-plugin-external-links/issues/7) (Possible issue with malformed URLs) + * Fixes `external_links` filter function + +# v1.3.1 +## 09/09/2015 + +2. [](#improved) + * Added blueprints for Grav Admin plugin +3. [](#bugfix) + * Fixed [#5](https://github.com/Sommerregen/grav-plugin-external-links/issues/5) (Works on first page displayed) + * Fixed [#6](https://github.com/Sommerregen/grav-plugin-external-links/issues/6) (Validation failed: title is not defined in blueprints) + +# v1.3.0 +## 08/08/2015 + +1. [](#new) + * Added admin configurations **(requires Grav 0.9.34+)** + * Added multi-language support **(requires Grav 0.9.33+)** + * Added default title message for external links +2. [](#improved) + * Switched to `onBuildPagesInitialized` event **(requires Grav 0.9.29+)** + * Updated `README.md` +3. [](#bugfix) + * Fixed [#4](https://github.com/Sommerregen/grav-plugin-external-links/issues/4) (Problem with non UTF-8 characters) + +# v1.2.2 +## 05/10/2015 + +2. [](#improved) + * PSR fixes + +# v1.2.1 +## 03/24/2015 + +3. [](#bugfix) + * Fixed active `mode` condition + +# v1.2.0 +## 02/21/2015 + +1. [](#new) + * Added option `mode` to parse links passively (where no CSS classes are set) and actively +2. [](#improved) + * Allow multiple classes to exclude in option `exclude.classes` + * Improved process engine to ensure not to alter HTML tags or HTML entities in content + * Refactored code + +# v1.1.3 +## 02/10/2015 + +3. [](#bugfix) + * Fixed self-closing tags in HTML5 and ensured to return contents compliant to HTML(5) + +# v1.1.2 +## 02/10/2015 + +1. [](#new) + * By default `External Links` now uses the class `external-links` for CSS styling; using `external` is still possible e.g. for manually markup external links +2. [](#improved) + * Improved usage example in `README.md` +3. [](#bugfix) + * Fixed [#1](https://github.com/Sommerregen/grav-plugin-external-links/issues/4) (Issue with LightSlider plugin) + +# v1.1.1 +## 02/06/2015 + +1. [](#new) + * Added usage example in `README.md` + * Add icons next to external links via CSS when using class `external` only +2. [](#improved) + * Added support for HHVM **(requires Grav 0.9.17+)** + * Added modular pages support +3. [](#bugfix) + * Fixed regular expression in `isExternalUrl($url)` method + +# v1.1.0 +## 02/05/2015 + +1. [](#new) + * IMPORTANT: Changed names of external link classes with images to `image`, `images` and `no-image` +2. [](#improved) + * Improved readability of code + * Updated plugin to use new `mergeConfig` method of Grav core + * Improved and corrected calculations of image size +3. [](#bugfix) + * Fixed some typo in the documentation + * Fixed and removed additional `` tag from page content + +# v1.0.1 +## 01/29/2015 + +1. [](#improved) + * Fixed minor issues (broken README link, removed debugging functions) + +# v1.0.0 +## 01/29/2015 + +1. [](#new) + * ChangeLog started... diff --git a/dev/plugins/external_links/LICENSE b/dev/plugins/external_links/LICENSE new file mode 100644 index 00000000..4d877f43 --- /dev/null +++ b/dev/plugins/external_links/LICENSE @@ -0,0 +1,727 @@ +Grav External Links Plugin License +================================== + +Grav External Links Plugin is meant to be a free and open source for all now +and in future. + +For ease of distribution, Grav External Links Plugin is licensed under a dual +license and is based on the principle of Give-and-Take. + +Unless otherwise noted Grav External Links Plugin is licensed under the terms +of GPLv3 (or see license text below). + +However it is licensed under the terms of MIT + + + +(or see license text below) when the following conditions are met: + + - Grav External Links Plugin is used, copied, merged, published for or + distributed with Grav (http://getgrav.org) + +and can be understood as a Free and Open Source Software ("FOSS") License +Exception especially for all plugins, themes, extensions available for Grav +using Grav External Links Plugin in any way. + + +MIT LICENSE +----------- + +Copyright (c) 2017+ Benjamin Regler, https://github.com/sommerregen/grav-plugin-external-links + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +GPL VERSION 3 +------------- + +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/dev/plugins/external_links/README.md b/dev/plugins/external_links/README.md new file mode 100644 index 00000000..41b3f3e6 --- /dev/null +++ b/dev/plugins/external_links/README.md @@ -0,0 +1,192 @@ +# [![Grav External Links Plugin](assets/logo.png)][project] + +[![Release](https://img.shields.io/github/release/sommerregen/grav-plugin-external-links.svg)][project] [![Issues](https://img.shields.io/github/issues/sommerregen/grav-plugin-external-links.svg)][issues] [![Dual license](https://img.shields.io/badge/dual%20license-MIT%2FGPL-blue.svg)](LICENSE "License") + +> This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client. + +**Note:** [hibbitts-design/grav-plugin-external-links](https://github.com/hibbitts-design/grav-plugin-external-links) is the new master repository for this plugin (see [getgrav/grav#2711](https://github.com/getgrav/grav/issues/2711)). Thanks to [@Sommerregen](https://github.com/Sommerregen) for originally developing this Plugin! + +##### Table of Contents: + +* [About](#about) +* [Installation and Updates](#installation-and-updates) +* [Usage](#usage) + * [Example](#example) + * [CSS Stylesheet Override](#css-stylesheet-override) + * [Twig Filter](#twig-filter) +* [Contributing](#contributing) +* [License](#license) + +## About + +`External Links` is a high-quality plugin for [GetGrav.org](http://getgrav.org) used to differentiate between internal and external links. It also includes the ability of adding `rel="nofollow"` to links and determines how external links shall be opened via the `target` attribute. [Wikipedia](https://www.wikipedia.org/) is a well-known example. + +Furthermore it enables you to specify multiple domains, each of them on a new line to prevent them from being seen as external sites. + +If you are interested in seeing this plugin in action, here is a screenshot: + +![Screenshot External Links Plugin](assets/screenshot.png "External Links Preview") + +## Installation and Updates + +Installing or updating the `External Links` plugin can be done in one of two ways. Using the GPM (Grav Package Manager) installation update method (i.e. `bin/gpm install external_links`) or manual install by downloading [this plugin](https://github.com/sommerregen/grav-plugin-external-links) and extracting all plugin files to + + /your/site/grav/user/plugins/external_links + +For more informations, please check the [Installation and update guide](docs/INSTALL.md). + +## Usage + +The `External Links` plugin comes with some sensible default configuration, that are pretty self explanatory: + +### Config Defaults + +```yaml +# Global plugin configurations + +enabled: true # Set to false to disable this plugin completely +built_in_css: true # Use built-in CSS of the plugin +weight: 0 # Set the weight (order of execution) + +# Default options for External Links configuration + +exclude: + classes: [exclude] # Exclude all links with this class + domains: # A list of domains to be excluded e.g + # - localhost/* # (any RegExp can be used) + # - img.domain.com/* + +links: + www: false # Autom. link any hostname that starts with "www." + redirects: false # Also mark links as external, that link to pages that redirect to an external URL + + schemes: # Allowed schemes + - 'http' + - 'https' + - 'ftp' + - 'irc' + - 'mailto' + - 'news' + - 'nntp' + - 'rtsp' + - 'sftp' + - 'ssh' + - 'tel' + - 'telnet' + - 'webcal' + +# Global and page specific configurations + +process: true # Filter external links + +title: false # Sets default title for external links +no_follow: true # Add rel="nofollow" to all external links +target: "_blank" # Set target attribute of link + +mode: "active" # active = process and parse all links; + # passive = parse links, but don't set CSS classes +``` + +If you need to change any value, then the best process is to copy the [external_links.yaml](external_links.yaml) file into your `users/config/plugins/` folder (create it if it doesn't exist), and then modify there. This will override the default settings. + +If you want to alter the settings for one or a few pages only, you can do so by adding page specific configurations into your page headers, e.g. + +```yaml +external_links: false +``` + +to switch off `External Links` plugin just for this page. + +### Example + +By default `External Links` adds a small icon to external or mailto links and opens by default links in a new tab. Any links in your Markdown file i.e. of the form + +```markdown +[External Link text](http://domain.com) + +or + +[External Link text](https://domain.com) +``` + +will then be recognized as an external link (an icon on the right is showing up), whereas + +```markdown +[My arcticle](my-article) +``` + +will not. You can exclude specific domains not to be seen as external either by adding them to the `exlcude.domains` option or by adding a class (default: `exclude`) to the desired links as in the following: + +```markdown +[Domain without external link icon](http://my-specific-domain.com) {.exclude} +``` + +> Please note that **Markdown Extra** should be enabled in your `user/config/systems.yaml` via `pages.markdown.extra: true` in order to add classes to these links. + +Sometimes you maybe wish to explicitly set a link to be "external". Although this should happen in really rare cases, since `External links` plugin will automatically detect external links, it is possible. Provided that **Markdown Extra** is enabled, adding the class `external` to the link will do the trick: + +```markdown +[Always show external link icon](my-external-article) {.external} +``` + +### CSS Stylesheet Override + +Something you might want to do is to override the look and feel of the external links, and with Grav it is super easy. + +Copy the stylesheet [assets/css/external_links.css](assets/css/external_links.css) into the `css` folder of your custom theme, and add it to the list of CSS files. + + user/themes/custom-theme/css/external_links.css + +After that set the `built_in_css` option of the `External Links` plugin to `false`. That's it. + +You can now edit, override and tweak it however you prefer. However, this plugin adds extra classes for styling to every link, you might wanna know: + +- `external`, `external-link` -- Used to identify external links. +- `mailto` -- Used to identify mailto links. +- `no-image` -- Set if a link does not contain any image tags. +- `icon`-- Set if a link contains an image (with size <= 32px). +- `image` -- Set if a link contains an image (with size > 32px). +- `images` -- Set if a link contains more than one image. + +### Twig Filter + +`External Links` provides a Twig filter to process external links inside contents. To do that, place the following line of code in the theme file you wish to add the `External Links` plugin for: + +``` +{{ page.content|external_links }} +``` + +You can pass arguments to the plugin filter, namely the same arguments as available in the [external_links.yaml](external_links.yaml) file. For example + +``` +{{ page.content|external_links({'mode': 'passive'}) }} +``` + +will change the mode of the `External Links` filter to parse links, but don't set CSS classes. + +## Contributing + +You can contribute at any time! Before opening any issue, please search for existing issues and review the [guidelines for contributing](docs/CONTRIBUTING.md). + +After that please note: + +* If you find a bug, would like to make a feature request or suggest an improvement, [please open a new issue][issues]. If you have any interesting ideas for additions to the syntax please do suggest them as well! +* Feature requests are more likely to get attention if you include a clearly described use case. +* If you wish to submit a pull request, please make again sure that your request match the [guidelines for contributing](docs/CONTRIBUTING.md) and that you keep track of adding unit tests for any new or changed functionality. + +## License + +Copyright (c) 2017+ [Benjamin Regler][github]. See also the list of [contributors] who participated in this project. + +[Dual-licensed](LICENSE) for use under the terms of the [MIT][mit-license] or [GPLv3][gpl-license] licenses. + +![GNU license - Some rights reserved][gnu] + +[github]: https://github.com/sommerregen/ "GitHub account from Benjamin Regler" +[gpl-license]: http://opensource.org/licenses/GPL-3.0 "GPLv3 license" +[mit-license]: http://www.opensource.org/licenses/mit-license.php "MIT license" +[gnu]: https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/License_icon-gpl-88x31.svg/88px-License_icon-gpl-88x31.svg.png "GNU license - Some rights reserved" + +[project]: https://github.com/sommerregen/grav-plugin-external-links +[issues]: https://github.com/sommerregen/grav-plugin-external-links/issues "GitHub Issues for Grav External Links Plugin" +[contributors]: https://github.com/sommerregen/grav-plugin-external-links/graphs/contributors "List of contributors of the project" diff --git a/dev/plugins/external_links/assets/css/external_links.css b/dev/plugins/external_links/assets/css/external_links.css new file mode 100644 index 00000000..c4f35de9 --- /dev/null +++ b/dev/plugins/external_links/assets/css/external_links.css @@ -0,0 +1,39 @@ +a.external-link.icon, a.external-link.no-image, a.external, a.external { + background: url(../images/link.png) right center no-repeat; + padding-right: 12px; + position: relative; +} +a.mailto { + background: url(../images/mail.png) right center no-repeat; + padding-right: 12px; +} + +.external-link[data-title]:after { + background-color: #444; + color: #fff; + content: attr(data-title); + display: inline; + font-size: xx-small; + font-weight: bold; + margin: -1em 0 0 16px; + min-width: 45em; + opacity: 0; + padding: .25em .5em; + position: absolute; + top: 50%; + transition: all 1s ease-in-out 1s; + visibility: hidden; +} + +.external-link[data-title]:hover:after { + opacity: 1; + visibility: visible; +} + +/* Hide link or mailto icons when printing. */ +@media print { + a.external, a.external-link, a.mailto { + background-image: none; + padding: 0; + } +} diff --git a/dev/plugins/external_links/assets/images/link.png b/dev/plugins/external_links/assets/images/link.png new file mode 100644 index 00000000..fb4f1f43 Binary files /dev/null and b/dev/plugins/external_links/assets/images/link.png differ diff --git a/dev/plugins/external_links/assets/images/mail.png b/dev/plugins/external_links/assets/images/mail.png new file mode 100644 index 00000000..2a0df46c Binary files /dev/null and b/dev/plugins/external_links/assets/images/mail.png differ diff --git a/dev/plugins/external_links/assets/logo.png b/dev/plugins/external_links/assets/logo.png new file mode 100644 index 00000000..11a99fbd Binary files /dev/null and b/dev/plugins/external_links/assets/logo.png differ diff --git a/dev/plugins/external_links/assets/screenshot.png b/dev/plugins/external_links/assets/screenshot.png new file mode 100644 index 00000000..1bf87ad5 Binary files /dev/null and b/dev/plugins/external_links/assets/screenshot.png differ diff --git a/dev/plugins/external_links/blueprints.yaml b/dev/plugins/external_links/blueprints.yaml new file mode 100644 index 00000000..b461b571 --- /dev/null +++ b/dev/plugins/external_links/blueprints.yaml @@ -0,0 +1,194 @@ +name: 'External Links' +type: plugin +slug: external_links +version: '1.6.3' +description: 'This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client.' +icon: 'external-link' +author: + name: 'Hibbitts Design' + email: 'hello@hibbittsdesign.org' +homepage: 'https://github.com/hibbitts-design/grav-plugin-external-links' +keywords: ['external', 'links', 'filter', 'formatter', 'plugin'] +docs: 'https://github.com/hibbitts-design/grav-plugin-external-links/blob/master/README.md' +bugs: 'https://github.com/hibbitts-design/grav-plugin-external-links/issues' +license: 'MIT/GPL' + +dependencies: + - { name: grav, version: ">=1.6" } + +form: + validation: strict + + fields: + tabs: + type: tabs + active: 1 + class: subtle + + fields: + external_links: + type: tab + title: PLUGINS.EXTERNAL_LINKS.PLUGIN_NAME + + fields: + enabled: + type: toggle + label: PLUGIN_ADMIN.PLUGIN_STATUS + help: PLUGINS.EXTERNAL_LINKS.STATUS_HELP + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + type: bool + + built_in_css: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.BUILTIN_CSS + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + weight: + type: text + size: x-small + label: PLUGINS.EXTERNAL_LINKS.WEIGHT + default: 0 + validate: + type: int + min: -100 + max: 100 + + settings: + type: tab + title: PLUGINS.EXTERNAL_LINKS.SETTINGS + + fields: + links: + type: section + title: PLUGINS.EXTERNAL_LINKS.LINKS.SECTION + text: PLUGINS.EXTERNAL_LINKS.LINKS.SECTION_HELP + + fields: + links.www: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.LINKS.WWW + help: PLUGINS.EXTERNAL_LINKS.LINKS.WWW_HELP + default: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + links.redirects: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.LINKS.REDIRECTS + help: PLUGINS.EXTERNAL_LINKS.LINKS.REDIRECTS_HELP + default: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + links.schemes: + type: selectize + size: large + label: PLUGINS.EXTERNAL_LINKS.LINKS.SCHEMES + help: PLUGINS.EXTERNAL_LINKS.LINKS.SCHEMES_HELP + validate: + type: commalist + + exclude: + type: section + title: PLUGINS.EXTERNAL_LINKS.EXCLUDE.SECTION + text: PLUGINS.EXTERNAL_LINKS.EXCLUDE.SECTION_HELP + + fields: + exclude.classes: + type: selectize + size: large + label: PLUGINS.EXTERNAL_LINKS.EXCLUDE.CLASSES + help: PLUGINS.EXTERNAL_LINKS.EXCLUDE.CLASSES_HELP + validate: + type: commalist + + exclude.domains: + type: selectize + size: large + label: PLUGINS.EXTERNAL_LINKS.EXCLUDE.DOMAINS + help: PLUGINS.EXTERNAL_LINKS.EXCLUDE.DOMAINS_HELP + placeholder: 'localhost/*, img.domain.com/*' + validate: + type: commalist + + content: + type: tab + title: PLUGINS.EXTERNAL_LINKS.CONTENT + + fields: + process: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.PROCESS + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + title: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.TITLE + default: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + no_follow: + type: toggle + label: PLUGINS.EXTERNAL_LINKS.NO_FOLLOW + default: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + target: + type: select + size: large + label: PLUGINS.EXTERNAL_LINKS.TARGET + default: _blank + placeholder: _blank + selectize: + create: true + options: + _blank: PLUGINS.EXTERNAL_LINKS.TARGET_BLANK + _self: PLUGINS.EXTERNAL_LINKS.TARGET_SELF + _parent: PLUGINS.EXTERNAL_LINKS.TARGET_PARENT + _top: PLUGINS.EXTERNAL_LINKS.TARGET_TOP + validate: + type: string + + mode: + type: select + size: large + classes: fancy + label: PLUGINS.EXTERNAL_LINKS.MODE + help: PLUGINS.EXTERNAL_LINKS.MODE_HELP + default: active + options: + active: PLUGINS.EXTERNAL_LINKS.MODE_ACTIVE + passive: PLUGINS.EXTERNAL_LINKS.MODE_PASSIVE + validate: + type: string diff --git a/dev/plugins/external_links/blueprints/external_links.yaml b/dev/plugins/external_links/blueprints/external_links.yaml new file mode 100644 index 00000000..d5599760 --- /dev/null +++ b/dev/plugins/external_links/blueprints/external_links.yaml @@ -0,0 +1,80 @@ +form: + validation: loose + + fields: + tabs: + type: tabs + active: 1 + + fields: + options: + type: tab + + fields: + external_links: + type: section + title: PLUGINS.EXTERNAL_LINKS.PLUGIN_NAME + underline: true + + fields: + header.external_links.process: + type: toggle + toggleable: true + label: PLUGINS.EXTERNAL_LINKS.PROCESS + highlight: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + header.external_links.title: + type: toggle + toggleable: true + label: PLUGINS.EXTERNAL_LINKS.TITLE + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + header.external_links.no_follow: + type: toggle + toggleable: true + label: PLUGINS.EXTERNAL_LINKS.NO_FOLLOW + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + header.external_links.target: + type: select + size: large + toggleable: true + label: PLUGINS.EXTERNAL_LINKS.TARGET + '@config-default': plugins.external_links.target + placeholder: _blank + selectize: + create: true + options: + _blank: PLUGINS.EXTERNAL_LINKS.TARGET_BLANK + _self: PLUGINS.EXTERNAL_LINKS.TARGET_SELF + _parent: PLUGINS.EXTERNAL_LINKS.TARGET_PARENT + _top: PLUGINS.EXTERNAL_LINKS.TARGET_TOP + validate: + type: string + + header.external_links.mode: + type: select + size: large + classes: fancy + toggleable: true + label: PLUGINS.EXTERNAL_LINKS.MODE + help: PLUGINS.EXTERNAL_LINKS.MODE_HELP + '@config-default': plugins.external_links.mode + options: + active: PLUGINS.EXTERNAL_LINKS.MODE_ACTIVE + passive: PLUGINS.EXTERNAL_LINKS.MODE_PASSIVE + validate: + type: string diff --git a/dev/plugins/external_links/classes/ExternalLinks.php b/dev/plugins/external_links/classes/ExternalLinks.php new file mode 100644 index 00000000..fca28eab --- /dev/null +++ b/dev/plugins/external_links/classes/ExternalLinks.php @@ -0,0 +1,505 @@ + tags and process them + $content = preg_replace_callback('~]*)?>.*?~i', + function($match) use ($options, $page) { + // Load PHP built-in DOMDocument class + if (($dom = $this->loadDOMDocument($match[0])) === null) { + return $match[0]; + } + + // Check that there is really a link tag + $a = $dom->getElementsByTagName('a'); + if ($a->length == 0) { + return $match[0]; + } + $a = $a->item(0); + + // Process links with non-empty href attribute + $href = $a->getAttribute('href'); + if (strlen($href) == 0) { + return $match[0]; + } + + // Get the class of the element + $class = $a->hasAttribute('class') ? $a->getAttribute('class') : ''; + $classes = array_filter(explode(' ', $class)); + + // Exclude links with specific class from processing + $exclude = $options->get('exclude.classes', null); + if ($exclude && !!array_intersect($exclude, $classes)) { + return $match[0]; + } + + // Get domains to be seen as internal + $domains = $options->get('exclude.domains', []); + + // This is a mailto link. + if (strpos($href, 'mailto:') === 0) { + $classes[] = 'mailto'; + } + + // The link is external + elseif ($url = $this->isExternalUrl($href, $domains, $page)) { + // Add external class + $classes[] = 'external-link'; + $a->setAttribute('href', $url); + + // Add target="_blank" + $target = $options->get('target'); + if ($target) { + $a->setAttribute('target', $target); + } + + // Add no-follow. + $nofollow = $options->get('no_follow'); + if ($nofollow) { + $rel = array_filter(explode(' ', $a->getAttribute('rel'))); + if (!in_array('nofollow', $rel)) { + $rel[] = 'nofollow'; + $a->setAttribute('rel', implode(' ', $rel)); + } + } + + // Set rel="noopener noreferrer" + $rel = $a->hasAttribute('rel') ? $a->getAttribute('rel') : ''; + $rel = array_filter(explode(' ', $rel)); + + $rel[] = 'noopener'; + $rel[] = 'noreferrer'; + $a->setAttribute('rel', implode(' ', array_unique($rel))); + + // Add image class to if it has at least one child element + $imgs = $a->getElementsByTagName('img'); + if ($imgs->length > 1) { + // Add "images" class to element, if it has multiple child images + $classes[] = 'images'; + } elseif ($imgs->length == 1) { + $imgNode = $imgs->item(0); + + // Get image size + list($width, $height) = $this->getImageSize($imgNode); + + // Determine maximum dimension of image size + $size = max($width, $height); + + // Depending on size determine image type + $classes[] = ((0 < $size) && ($size <= 32)) ? 'icon' : 'image'; + } else { + // Add "no-image" class to element, if it has no child images + $classes[] = 'no-image'; + } + + // Add title (aka alert text) + if ($options->get('title')) { + $language = Grav::instance()['language']; + $message = $language->translate(['PLUGINS.EXTERNAL_LINKS.TITLE_MESSAGE']); + + // Set default title to link else, set title as data attribute + $key = $a->hasAttribute('title') ? 'data-title' : 'title'; + $a->setAttribute($key, $message); + } + } + + // Set class attribute + if (count($classes) && ($options->get('mode') === 'active')) { + $a->setAttribute('class', implode(' ', $classes)); + } + + // Save Dom document back to HTML representation + $html = $this->saveDOMDocument($dom); + return $html; + }, $content); + + // Write content back to page + return $content; + } + + /** ------------------------------- + * Private/protected helper methods + * -------------------------------- + */ + + /** + * Test if a URL is external + * + * @param string $url The URL to test. + * @param array $domains An array of domains to be seen as internal. + * @param null|Page $page Null or an instance of \Grav\Common\Page. + * + * @return mixed Returns the URL as a string, if it is external, + * false otherwise. + */ + protected function isExternalUrl($url, $domains = [], $page = null) + { + static $allowed_protocols; + static $pattern; + + /** @var Config $config */ + $config = Grav::instance()['config']; + + /** @var Page $page */ + $page = $page ?: Grav::instance()['page']; + + // Statically store allowed protocols + if (!isset($allowed_protocols)) { + $allowed_protocols = array_flip( + $config->get('plugins.external_links.links.schemes', ['http', 'https']) + ); + } + + // Statically store internal domains as a PCRE pattern. + if (!isset($pattern) || (count($domains) > 0)) { + $domains = array_merge($domains, + array(Grav::instance()['base_url_absolute'])); + + foreach ($domains as $domain) { + $domains[] = preg_quote($domain, '#'); + } + $pattern = '#(' . str_replace(array('\*', '/*'), '.*?', + implode('|', $domains)) . ')#i'; + } + + $external = false; + // Check for URLs that don't match any excluded domain + if (!preg_match($pattern, $url)) { + // Check if URL is external by extracting colon position + $colonpos = strpos($url, ':'); + if ($colonpos > 0) { + // We found a colon, possibly a protocol. Verify. + $protocol = strtolower(substr($url, 0, $colonpos)); + if (isset($allowed_protocols[$protocol])) { + // The protocol turns out be an allowed protocol + $external = $url; + } + } else { + if ($config->get('plugins.external_links.links.www')) { + // Remove possible path duplicate + $route = Grav::instance()['base_url'] . $page->route(); + $href = Utils::startsWith($url, $route) + ? ltrim(mb_substr($url, mb_strlen($route)), '/') + : $url; + + // We found an url without protocol, but with starting 'www' (sub-)domain + if (Utils::startsWith($url, 'www.')) { + $external = 'http://' . $url; + } elseif (Utils::startsWith($href, 'www.')) { + $external = 'http://' . $href; + } + } + if ($config->get('plugins.external_links.links.redirects')) { + $targetPage = Grav::instance()['pages']->find($url); + if ($targetPage && $targetPage->redirect()) { + $external = $this->isExternalUrl($targetPage->redirect(), $domains, $page); + } + } + } + } + + // Only if a valid protocol or an URL starting with 'www.' was found return true + return $external; + } + + /** + * Determine the size of an image + * + * @param DOMNode $imgNode The image already parsed as a DOMNode + * @param integer $limit Load first $limit KB of remote image + * + * @return array Return the dimension of the image of the + * format array(width, height) + */ + protected function getImageSize($imgNode, $limit = 32) + { + // Hold units (assume standard font with 16px base pixel size) + // Calculations based on pixels + $units = array( + 'px' => 1, /* base unit: pixel */ + 'pt' => 16 / 12, /* 12 point = 16 pixel = 1/72 inch */ + 'pc' => 16, /* 1 pica = 16 pixel = 12 points */ + + 'in' => 96, /* 1 inch = 96 pixel = 2.54 centimeters */ + 'mm' => 96 / 25.4, /* 1 millimeter = 96 pixel / 1 inch [mm] */ + 'cm' => 96 / 2.54, /* 1 centimeter = 96 pixel / 1 inch [cm] */ + 'm' => 96 / 0.0254, /* 1 centimeter = 96 pixel / 1 inch [m] */ + + 'ex' => 7, /* 1 ex = 7 pixel */ + 'em' => 16, /* 1 em = 16 pixel */ + 'rem' => 16, /* 1 rem = 16 pixel */ + + '%' => 16 / 100, /* 100 percent = 16 pixel */ + ); + + // Initialize dimensions + $width = 0; + $height = 0; + + // Determine image dimensions based on "src" atrribute + if ($imgNode->hasAttribute('src')) { + $src = $imgNode->getAttribute('src'); + + // Simple check if the URL is internal i.e. check if path exists + $path = $_SERVER['DOCUMENT_ROOT'] . $src; + if (realpath($path) && is_file($path)) { + $size = @getimagesize($path); + } else { + // The URL is external; try to load it (default: 32 KB) + $size = $this->getRemoteImageSize($src, $limit * 1024); + } + } + + // Read out width and height from attributes + $width = $imgNode->hasAttribute('width') ? + $imgNode->getAttribute('width') : $size[0]; + $height = $imgNode->hasAttribute('height') ? + $imgNode->getAttribute('height') : $size[1]; + + // Get width and height from style attribute + if ( $imgNode->hasAttribute('style') ) { + $style = $imgNode->getAttribute('style'); + + // Width + if (preg_match('~width:\s*(\d+)([a-z]+)~i', $style, $matches)) { + $width = $matches[1]; + // Convert unit to pixel + if ( isset($units[$matches[2]]) ) { + $width *= $units[$matches[2]]; + } + } + + // Height + if (preg_match('~height:\s*(\d+)([a-z]+)~i', $style, $matches)) { + $height = $matches[1]; + // Convert unit to pixel + if (isset($units[$matches[2]])) { + $height *= $units[$matches[2]]; + } + } + } + + // Update width and height + $size[0] = $width; + $size[1] = $height; + + // Return image dimensions + return $size; + } + + /** + * Get the size of a remote image + * + * @param string $uri The URI of the remote image + * @param integer $limit Load first $limit bytes of remote image + * + * @return mixed Returns an array with up to 7 elements + */ + protected function getRemoteImageSize($uri, $limit = -1) + { + // Create temporary file to store data from $uri + $tmp_name = tempnam(sys_get_temp_dir(), uniqid('ris')); + if ($tmp_name === false) { + return false; + } + + // Open temporary file + $tmp = fopen($tmp_name, 'wb'); + + // Check which method we should use to get remote image sizes + $allow_url_fopen = ini_get('allow_url_fopen') ? true : false; + $use_curl = function_exists('curl_version'); + + // Use stream copy + if ($allow_url_fopen) { + $options = []; + if ( $limit > 0 ) { + // Loading number of $limit bytes + $options['http']['header'] = array('Range: bytes=0-' . $limit); + } + + // Create stream context + $context = stream_context_create($options); + @copy($uri, $tmp_name, $context); + + // Use Curl + } elseif ($use_curl) { + // Initialize Curl + $options = array( + CURLOPT_HEADER => false, // Don't return headers + CURLOPT_FOLLOWLOCATION => true, // Follow redirects + CURLOPT_AUTOREFERER => true, // Set referrer on redirect + CURLOPT_CONNECTTIMEOUT => 120, // Timeout on connect + CURLOPT_TIMEOUT => 120, // Timeout on response + CURLOPT_MAXREDIRS => 10, // Stop after 10 redirects + CURLOPT_ENCODING => '', // Handle all encodings + CURLOPT_BINARYTRANSFER => true, // Transfer as binary file + CURLOPT_FILE => $tmp, // Curl file + CURLOPT_URL => $uri, // URI + ); + + $curl = curl_init(); + curl_setopt_array($curl, $options); + + if ($limit > 0) { + // Loading number of $limit + $headers = array('Range: bytes=0-' . $limit); + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + curl_setopt($curl, CURLOPT_RANGE, '0-' . $limit); + + // Abort request when more data is received + curl_setopt($curl, CURLOPT_BUFFERSIZE, 512); // More progress info + curl_setopt($curl, CURLOPT_NOPROGRESS, false); // Monitor progress + curl_setopt($curl, CURLOPT_PROGRESSFUNCTION, + function($download_size, $downloaded, $upload_size, $uploaded) use ($limit) { + // If $downloaded exceeds $limit, returning non-zero breaks + // the connection! + return ( $downloaded > $limit ) ? 1 : 0; + }); + } + + // Execute Curl + curl_exec($curl); + curl_close($curl); + } + + // Close temporary file + fclose($tmp); + + // Retrieve image information + $info = array(0, 0, 'width="0" height="0"'); + if (filesize($tmp_name) > 0) { + $info = @getimagesize($tmp_name); + } + + // Delete temporary file + unlink($tmp_name); + + return $info; + } + + /** + * Load contents into PHP built-in DOMDocument object + * + * Two Really good resources to handle DOMDocument with HTML(5) + * correctly. + * + * @see http://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php + * @see http://stackoverflow.com/questions/7997936/how-do-you-format-dom-structures-in-php + * + * @param string $content The content to be loaded into the + * DOMDocument object + * + * @return DOMDocument DOMDocument object of content + */ + protected function loadDOMDocument($content) + { + // Clear previous errors + if (libxml_use_internal_errors(true) === true) { + libxml_clear_errors(); + } + + // Parse content using PHP built-in DOMDocument class + $document = new \DOMDocument('1.0', 'UTF-8'); + + // Encode contents as UTF-8, strip whitespaces & normalize newlines + $content = mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'); + + // $whitespaces = array( + // '~\R~u' => "\n", // Normalize new line + // '~\>[^\S ]+~s' => '>', // Strip whitespaces after tags, except space + // '~[^\S ]+\<~s' => '<', // Strip whitespaces before tags, except space + // '~(\s)+~s' => '\\1' // Shorten multiple whitespace sequences + // ); + // $content = preg_replace(array_keys($whitespaces), $whitespaces, $content); + + // Parse the HTML using UTF-8 + // The @ before the method call suppresses any warnings that + // loadHTML might throw because of invalid HTML in the page. + @$document->loadHTML($content); + + // Do nothing, if DOM is empty + if (is_null($document->documentElement)) { + return null; + } + + return $document; + } + + /** + * Save contents of PHP built-in DOMDocument object as HTML5 + * + * @param DOMDocument $document DOMDocument object with nodes + * + * @return string The outputted DOM document as HTML(5) + * compliant string + */ + protected function saveDOMDocument($document) + { + // Pretty print output + $document->preserveWhiteSpace = false; + $document->formatOutput = true; + + // Transform DOM document to valid HTML(5) + $content = ''; + $body = $document->getElementsByTagName('body')->item(0); + foreach ($body->childNodes as $node) { + // Expand empty tags (e.g.
    to

    ) + if (($html = $document->saveXML($node, LIBXML_NOEMPTYTAG)) !== false) { + $content .= $html; + } + } + + // Fix formatting for self-closing tags in HTML5 and removing + // encapsulated (uncommented) CDATA blocks in ` tag at the bottom with this code: + + ```html + + ``` + +# File Upload + +To upload files you can use the `file` form field. [The standard features apply](https://learn.getgrav.org/forms/blueprints/how-to-add-file-upload), and you can simply edit your custom blueprint with a field definition similar to: + +``` + item_image: + type: file + label: Item Image + random_name: true + destination: 'user/data/flex-objects/files' + multiple: true +``` + +> In order to fully take advantage of image uploads, you should always be using `FolderStorage`, meaning that the objects get saved to individual folders together with the images. Other storage layers may or may not support media. + +# Advanced + +You can radically alter the structure of the `contacts.json` data file by making major edits to the `contacts.yaml` blueprint file. However, it's best to start with an empty `contacts.json` if you are making wholesale changes or you will have data conflicts. Best to create your blueprint first. Reloading a **New Entry** until the form looks correct, then try saving, and check to make sure the stored `user/data/flex-objects/contacts.json` file looks correct. + +Then you will need to make more widespread changes to the site Twig templates. You might need to adjust the number of columns and the field names. You will also need to pay attention to the JavaScript initialization in each template. + +# Features + +Here are the main benefits of using Flex objects: + +* CRUD is automatically handled for you by Flex Objects plugin +* Objects can be stored using many different strategies, including single file, file per object or folder per object; using yaml, json etc. +* Flex types can be easily extended by custom PHP collection and object classes +* Both Flex objects and collections know how to render themselves: `echo $object->render($layout, $context)` or `{% render object layout: layout with context %}` +* You can easily create custom layouts for your objects and collections to be used in different pages +* Both Flex objects and collections support serialization and `json_encode()` +* Flex objects support Grav `Medium` objects with few lines of code +* Flex objects can have relations to other Flex objects with few lines of code defining the relation +* Flex directories support indexes which allow searching objects without loading all of them +* Efficient caching for indexes, searches, objects and rendered output + +# Limitations and future improvements + +Right now there are a few limitations: + +* Frontend only has a basic routing for the individual pages (you need to do the advanced routing manually by yourself) +* Administration needs more features like filtering, bulk updates etc +* It would be nice to have an easy way to display Flex admin in other admin plugins (it is already possible, but not easy) +* Optional database storage layer would be nice to have +* We need general collection functions to do simple filtering, like: "display all published items" without custom PHP code + +### Notes: + +1. You can actually use pretty much any folder under the `user/` folder of Grav. Simply edit the **Extra Admin Twig Path** option in the `flex-objects.yaml` file. It defaults to `theme://admin/templates` which means it uses the default theme's `admin/templates/` folder if it exists. +2. You can use any path for front end Twig templates also, if you don't want to put them in your theme, you can add an entry in the **Extra Site Twig Path** option of the `flex-objects.yaml` configuration and point to another location. + +# Tricks and tips + +* You can enable and disable directories from **Plugins** > **Flex Objects** + * New Flex Directories can be registered by simply creating a new blueprint file in `user/blueprints/flex-objects` folder + * You can also add types from your plugins by hooking into `onFlexInit` event (see `AccountsServiceProvider` in Grav) +* To properly create your own custom types, you need at least the object blueprint and the template files for collections and objects +* Use `flex-objects.md` page to create entry point for your own directory + * In page header you can use nested `flex.directory` variable to define the directory (or do it in admin) + * In Admin you can just select the directory under the page title + + +# Parameters supported by Flex page type: + +``` +--- +title: 'Flex Directories' +flex: + directories: + layout: default + list: + - accounts + - contacts +--- +``` + +`directories.layout`: uses template file `templates/flex-objects/directories/[LAYOUT].html.twig` +`directories.list`: list of flex directories displayed in this page diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects.html.twig new file mode 100644 index 00000000..74ee1ca4 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects.html.twig @@ -0,0 +1,30 @@ +{%- set user = admin.user -%} +{%- set route = controller.route -%} +{%- set type = directory.config('admin.template') ?? target -%} + +{# Set action from ?preview=1 #} +{%- if key and uri.currentUri().queryParam('preview') %} + {% set action = 'preview' %} +{% endif -%} + +{%- set template -%} + {%- if action == 'add' -%} + edit + {%- elseif action == 'delete' -%} + list + {%- else -%} + {{- action ?: task ?: 'types' -}} + {%- endif -%} +{%- endset -%} + +{%- set separator = config.system.param_sep -%} +{%- set view_config = directory.config('admin.views.' ~ template) ?? directory.config('admin.' ~ template) ?? [] -%} + +{%- include target ? [ + 'flex-objects/types/' ~ type ~ '/' ~ template ~ '.html.twig', + 'flex-objects/types/default/' ~ template ~ '.html.twig', + 'flex-objects/layouts/404.html.twig' + ] : [ + 'flex-objects/types/default/' ~ template ~ '.html.twig', + 'flex-objects/layouts/404.html.twig' + ] -%} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects.json.twig b/dev/plugins/flex-objects/admin/templates/flex-objects.json.twig new file mode 100644 index 00000000..c5b85dc9 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects.json.twig @@ -0,0 +1 @@ +{{- admin.json_response|json_encode|raw -}} \ No newline at end of file diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/layouts/404.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/layouts/404.html.twig new file mode 100644 index 00000000..6101c817 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/layouts/404.html.twig @@ -0,0 +1 @@ +{{ 'PLUGIN_FLEX_OBJECTS.ERROR.LAYOUT_NOT_FOUND'|tu(template, null) }} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/layouts/accounts/partials/top.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/layouts/accounts/partials/top.html.twig new file mode 100644 index 00000000..46b1ef6f --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/layouts/accounts/partials/top.html.twig @@ -0,0 +1,25 @@ +{% set active_html = 'class="active"' %} +{% set is_configure = route.gravParam('') is same as('configure') %} +{% set authorize = directory.config('admin.views.configure.authorize') ?? directory.config('admin.configure.authorize') ?? 'admin.super' %} + +{% if allowed %} +
    +{% endif %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/add.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/add.html.twig new file mode 100644 index 00000000..076f2933 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/add.html.twig @@ -0,0 +1,3 @@ + + {{ 'PLUGIN_ADMIN.ADD'|tu }} + diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/back.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/back.html.twig new file mode 100644 index 00000000..dbb57c61 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/back.html.twig @@ -0,0 +1,3 @@ + + {{ "PLUGIN_ADMIN.BACK"|tu }} + diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/configuration.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/configuration.html.twig new file mode 100644 index 00000000..2a463b26 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/configuration.html.twig @@ -0,0 +1,7 @@ +{%- set authorize = directory.config('admin.views.configure.authorize') ?? directory.config('admin.configure.authorize') ?? 'admin.super' %} + +{%- if configure_url and user.authorize(authorize) %} + + {{ 'PLUGIN_ADMIN.CONFIGURATION'|tu }} + +{% endif %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/delete.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/delete.html.twig new file mode 100644 index 00000000..779760e0 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/delete.html.twig @@ -0,0 +1,3 @@ + + {{ 'PLUGIN_ADMIN.DELETE'|tu }} + diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/export-csv.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/export-csv.html.twig new file mode 100644 index 00000000..8c53c1ba --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/export-csv.html.twig @@ -0,0 +1,3 @@ + + {{ 'PLUGIN_FLEX_OBJECTS.CSV'|tu }} + diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/export.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/export.html.twig new file mode 100644 index 00000000..0f8382b2 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/export.html.twig @@ -0,0 +1,21 @@ +{% if export.options %} +
    + + +
    + +{% else %} + + {{ export.title ?? (export.formatter.class ? 'PLUGIN_ADMIN.EXPORT'|tu : 'PLUGIN_FLEX_OBJECTS.CSV'|tu) }} + +{% endif %} \ No newline at end of file diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/languages.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/languages.html.twig new file mode 100644 index 00000000..58c2551e --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/languages.html.twig @@ -0,0 +1,18 @@ +
    + + {% if admin_languages|length > (language in admin_languages)|int %} + + + {% endif %} +
    diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/preview-open.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/preview-open.html.twig new file mode 100644 index 00000000..df8893da --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/preview-open.html.twig @@ -0,0 +1,5 @@ +{% if preview_url %} + + {{ "PLUGIN_ADMIN.OPEN_NEW_TAB"|tu }} + +{% endif %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/preview.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/preview.html.twig new file mode 100644 index 00000000..63079131 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/preview.html.twig @@ -0,0 +1,3 @@ + + {{ "PLUGIN_ADMIN.PREVIEW"|tu }} + diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/save.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/save.html.twig new file mode 100644 index 00000000..379d97d7 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/buttons/save.html.twig @@ -0,0 +1,4 @@ +{% set task = task ?? 'save' %} + diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/configure.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/configure.html.twig new file mode 100644 index 00000000..2d72493a --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/configure.html.twig @@ -0,0 +1,103 @@ +{% extends 'partials/base.html.twig' %} +{% use 'flex-objects/types/default/titlebar/configure.html.twig' %} + +{% set name = view_config['form'] %} +{% set form = form ?? directory.directoryForm(name) %} + +{# Allowed actions #} +{% set can_save = can_save ?? user.authorize(view_config['authorize'] ?? 'admin.super') %} + +{# These variables can be overridden from the main template file #} +{% set allowed = allowed ?? (directory and form and can_save) %} +{% set back_route = back_route ?? ('/' ~ route.getRoute(1)) %} +{% set title_icon = title_icon ?? view_config['icon'] ?? 'fa-cog' %} +{% set title -%} + {%- set title_config = view_config['title'] ?? null -%} + {%- if title_config.template -%} + {{- include(template_from_string(title_config.template, 'configure title template')) -}} + {%- else -%} + {{- directory.title|tu }} - {{ 'PLUGIN_ADMIN.CONFIGURATION'|tu -}} + {% endif %} +{%- endset %} + +{% macro spanToggle(input, length) %} + {{ (repeat('  ', (length - input|length) / 2) ~ input ~ repeat('  ', (length - input|length) / 2))|raw }} +{% endmacro %} +{% import _self as macro %} + +{% block body %} + {% set back_url = back_url ?? admin_route(back_route) %} + + {{ parent() }} +{% endblock body %} + +{% block content_top %} + {% if allowed and user.authorize('admin.super') %} + {% set save_location = directory.getDirectoryConfigUri(name) %} +
    {{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ url(save_location, false, true)|trim('/') }}
    + {% endif %} +{% endblock %} + +{% block topbar %} + {% if user.authorize('admin.super') %} +
    + {% set normalText = 'PLUGIN_ADMIN.NORMAL'|tu %} + {% set expertText = 'PLUGIN_ADMIN.EXPERT'|tu %} + {% set maxLen = max([normalText|length, expertText|length]) %} + {% set normalText = macro.spanToggle(normalText, maxLen) %} + {% set expertText = macro.spanToggle(expertText, maxLen) %} + +
    + + + + + +
    +
    + {% endif %} +{% endblock topbar %} + +{% block content %} + {{ parent() }} + + {% if allowed %} +
    +
    + {# TODO: RAW MODE +
    + {{ block('topbar') }} +
    + #} + {% block edit %} + {% include 'partials/blueprints.html.twig' with { form: form, data: form.data } %} + {% endblock %} +
    +
    + + {% include 'partials/modal-changes-detected.html.twig' %} + + {% else %} + + {% do page.modifyHeader('http_response_code', 404) %} +
    +

    {{ 'PLUGIN_ADMIN.ERROR'|tu }} 404

    +
    +

    + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.PAGE_NOT_EXIST'|tu }} +

    +
    +
    + + {% endif %} +{% endblock %} + +{% block bottom %} + {{ parent() }} + + {# TODO: RAW MODE + + #} +{% endblock bottom %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/edit.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/edit.html.twig new file mode 100644 index 00000000..ecab064b --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/edit.html.twig @@ -0,0 +1,121 @@ +{% extends 'partials/base.html.twig' %} +{% use 'flex-objects/types/default/titlebar/edit.html.twig' %} + +{# Avoid defining form and object twice: object should always come from the form! #} +{% if form is not defined %} + {% set form = object.form %} + {% set object = form.object %} +{% endif %} + +{# Allowed actions #} +{% set can_list = can_list ?? directory.isAuthorized('list', 'admin', user) %} +{% set can_read = can_read ?? (object.exists ? object.isAuthorized('read', 'admin', user) : directory.isAuthorized('create', 'admin', user)) %} +{% set can_create = can_create ?? object.isAuthorized('create', 'admin', user) %} +{% set can_save = can_save ?? (object.exists ? object.isAuthorized('update', 'admin', user) : directory.isAuthorized('create', 'admin', user)) %} +{% set can_delete = can_delete ?? (object.exists and object.isAuthorized('delete', 'admin', user)) %} +{% set can_translate = can_translate ?? (admin.multilang and object.hasFlexFeature('flex-translate')) %} +{% set can_preview = can_preview ?? (can_read and object.exists and (directory.config('admin.views.preview.enabled') ?? directory.config('admin.preview.enabled', false))) %} + +{# Translations #} +{% if can_translate %} + {% set translate_include_default = translate_include_default ?? grav.config.get('system.languages.include_default_lang_file_extension', true) %} + {% set all_languages = grav.admin.siteLanguages %} + {% set admin_languages = admin.languages_enabled %} + {% set default_language = grav.language.default %} + {% set object_language = object.language %} + {% set language = controller.language %} + {% set has_translation = object.hasTranslation(language, false) %} + + {# + {% if translate_include_default %} + {% set all_languages = all_languages|merge({'': 'Default'}) %} + {% set admin_languages = admin_languages|merge({'': ''}) %} + {% set object_languages = object.languages(true) %} + {% else %} + #} + {% set language = language ?: default_language %} + {% set object_language = object_language ?: default_language %} + {% set object_languages = object.languages(false) %} + {# endif #} +{% endif %} + +{# These variables can be overridden from the main template file #} +{% set allowed = allowed ?? (directory and (object.exists and (can_read or can_save)) or (action == 'add' and can_read)) %} +{% set back_route = back_route ?? ('/' ~ (action != 'edit' and not key ? route.getRoute(1, not can_list ? -1 : null) : route.getRoute(1, not can_list ? -2 : -1))) %} +{% set title_icon = title_icon ?? view_config['icon'] ?? directory.config.admin.menu.list.icon ?? 'fa-file-text-o' %} +{% set title -%} + {%- set title_config = view_config['title'] -%} + {%- if title_config.template -%} + {{- include(template_from_string(title_config.template, 'edit title template')) -}} + {%- else -%} + {{- title ?? object.form.getValue('title') ?? object.title ?? key -}} + {% endif %} +{%- endset %} + +{% block body %} + {% set back_url = back_url ?? admin_route(back_route) %} + {% set id = key %} + {% set blueprint = blueprint ?? form.blueprint %} + + {{ parent() }} +{% endblock body %} + +{% block content_top %} + {% if allowed and user.authorize('admin.super') %} + {% if directory and object or action == 'add' %} + {% set save_location = object.getStorageFolder() ?? directory.getStorageFolder() %} +
    {{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ url(save_location, false, true)|trim('/') }} {{ not object.exists ? '[' ~ 'PLUGIN_FLEX_OBJECTS.NEW'|tu|upper ~ ']' }}
    + {% endif %} + {% endif %} + {% if object.exists and form.flash.exists %} +
    + {{ 'PLUGIN_FLEX_OBJECTS.STATE.EDITING_DRAFT'|tu }} +
    + {% endif %} +{% endblock %} + +{% block content %} + {% if allowed %} +
    +
    +
    + {% block topbar %}{% endblock %} +
    + {% block edit %} + {% include 'partials/blueprints.html.twig' with { form: form, context: object, data: object } %} + {% endblock %} +
    +
    + + {% include 'partials/modal-changes-detected.html.twig' %} + + {% if can_delete %} + {% include ['flex-objects/types/' ~ target ~ '/modals/remove.html.twig', 'flex-objects/types/default/modals/remove.html.twig'] with { name: target } %} + {% endif %} + + {% elseif (object.exists) %} + + {% do page.modifyHeader('http_response_code', 403) %} +
    +

    {{ 'PLUGIN_ADMIN.ERROR'|tu }} 403

    +
    +

    + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.PAGE_FORBIDDEN'|tu }} +

    +
    +
    + + {% else %} + + {% do page.modifyHeader('http_response_code', 404) %} +
    +

    {{ 'PLUGIN_ADMIN.ERROR'|tu }} 404

    +
    +

    + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.PAGE_NOT_EXIST'|tu }} +

    +
    +
    + + {% endif %} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list.html.twig new file mode 100644 index 00000000..c9532d12 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list.html.twig @@ -0,0 +1,98 @@ +{% extends 'partials/base.html.twig' %} +{% use 'flex-objects/types/default/titlebar/list.html.twig' %} + +{# Allowed actions #} +{% set export = directory.config('admin.views.export') ?? directory.config('admin.export') ?? [] %} +{% set can_export = can_export ?? (export['enabled'] ?? export|array|count)|bool %} +{% set can_create = can_create ?? directory.isAuthorized('create', 'admin', user) %} +{% set can_translate = can_translate ?? (admin.multilang and directory.object.hasFlexFeature('flex-translate')) %} + +{% set per_page = per_page ?? grav.uri.currentUri.queryParam('per_page') %} + +{# Translations #} +{% if can_translate %} + {% set translate_include_default = translate_include_default ?? grav.config.get('system.languages.include_default_lang_file_extension', true) %} + {% set all_languages = grav.admin.siteLanguages %} + {% set admin_languages = admin.languages_enabled %} + {% set default_language = grav.language.default %} + {% set language = controller.language %} + {# + {% if translate_include_default %} + {% set all_languages = all_languages|merge({'': 'Default'}) %} + {% set admin_languages = admin_languages|merge({'': ''}) %} + {% else %} + #} + {% set language = language ?: default_language %} + {# endif #} +{% endif %} + +{# These variables can be overridden from the main template file #} +{% set allowed = allowed ?? (directory and directory.isAuthorized('list', 'admin', user)) %} +{% set back_route = back_route ?? route.getRoute(1, -1) %} + +{% set configure_path = directory.config('admin.router.actions.configure.path') %} +{% set configure_route = configure_route ?? (configure_path ? route.withRoute(admin_route(configure_path)|trim('/')) : null) %} +{% set configure_route = configure_route ?? route.withGravParam('', 'configure') %} + +{% set title_icon = title_icon ?? view_config['icon'] ?? directory.config.admin.menu.list.icon ?? 'fa-file-text-o' %} +{% set title -%} + {%- set title_config = view_config['title'] ?? null -%} + {%- if title_config.template -%} + {{- include(template_from_string(title_config.template, 'configure title template')) -}} + {%- else -%} + {{- directory.title|tu -}} + {% endif %} +{%- endset %} + +{% set schema = directory.blueprint.schema %} + +{% do assets.addJs('plugin://flex-objects/js/flex-objects.js', { 'group': 'bottom', 'loading': 'defer' }) %} + +{% block body %} + {% set collection = directory ? collection.isAuthorized('list', 'admin', user) %} + {% set directory_config = view_config['options'] ?? config.get('plugins.flex-objects.admin_list', { per_page: 15, order: { by: 'updated_timestamp', dir: 'desc' }}) %} + {% set per_page = max(1, per_page ?? directory_config.per_page) %} + {% set table = directory ? flex.dataTable(collection.flexDirectory(), { collection: collection, limit: per_page, sort: directory_config.order.by ~ '|' ~ directory_config.order.dir }) %} + {% set back_url = admin_route(back_route) %} + {% set configure_url = (directory.config('admin.views.configure.hidden') ?? directory.config('admin.configure.hidden', false)) is not same as(true) ? configure_route.toString(true) %} + + {% set fields = table.getColumns() %} + {% set fields_count = fields ? count(fields) : 0 %} + {% set fields_width = 8 %} + {% set fields_set = 0 %} + {% set title_field = view_config['title'] %} + {% for key,options in fields %} + {% set fields_width = fields_width + options.width ?: 0 %} + {% set fields_set = fields_set + (options.width ? 1 : 0) %} + {% if not title_field and options.link == 'edit' %} + {% set title_field = key %} + {% endif %} + {% endfor %} + + {{ parent() }} +{% endblock body %} + +{% block content_top %} +{% if allowed and user.authorize('admin.super') %} + {% set save_location = directory.getStorageFolder() %} +
    {{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ url(save_location, false, true)|trim('/') }}
    +{% endif %} +{% endblock %} + +{% block content %} +{% if allowed %} + {% block content_list %} + {% include ['flex-objects/types/' ~ target ~ '/list/list.html.twig', 'flex-objects/types/default/list/list.html.twig'] %} + {% endblock %} +{% else %} + {% do page.modifyHeader('http_response_code', 404) %} +
    +

    {{ 'PLUGIN_ADMIN.ERROR'|tu }} 404

    +
    +

    + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.PAGE_NOT_EXIST'|tu }} +

    +
    +
    +{% endif %} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig new file mode 100644 index 00000000..4f90ad96 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig @@ -0,0 +1,112 @@ +{% block directory %} +
    + {% if not fields %} + {% block no_list %} +
    +

    {{ 'PLUGIN_FLEX_OBJECTS.ERROR.BLUEPRINT_NO_LIST'|tu( target, null )|raw }}

    +
      +
    • + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.BLUEPRINT_NO_LIST_ADVISE'|tu }} +
    • +
    • + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.BLUEPRINT_NO_LIST_TEMPLATE'|tu( target, null )|raw }} +
    • +
    +
    + {% endblock %} + {% elseif not collection.count %} + {% block no_entries %} +
    + {% if directory.isAuthorized('create', 'admin', user) %} + {% set createLink = admin_route(flex.adminRoute(collection, {action: 'add'})) %} + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.LIST_EMPTY_ADD'|tu(createLink, null)|raw }} + {% else %} + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.LIST_EMPTY'|tu }} + {% endif %} +
    + {% endblock %} + {% else %} + {% block entries %} + {% set per_page = per_page ?? directory_config.per_page %} + + {% set tableFields = [] %} + {% set searchFields = [] %} + {% for key, options in fields %} + {% set name = key %} + {% set sortField = options.sort.field ?? key %} + {% set title = (options.field.label ?? schema.get(options.alias ?? key).label)|tu %} + {% set width = options.width ?: ((100-fields_width) / ((fields_count-fields_set) ?: 1))|round(3) %} + {% set title_class = options.title_class ?: '' %} + {% set data_class = options.data_class ?: '' %} + + {# Vuetable doesn't like field names with `.` in them, so we convert name and sortField to `_` #} + {% set tableFields = tableFields|merge([ + { + name: name|replace({'.': '_'}), + sortField: sortField, + title: title ?? 'N/A', + width: width ~ '%', + titleClass: title_class, + dataClass: data_class + } + ]) %} + + {# FIXME: Search fields should be passed and individually customizable, right now defaulting to all fields selected #} + {% set searchFields = searchFields|merge([key|replace({'.': '_'})]) %} + {% endfor %} + {% set tableFields = tableFields|merge([{ name: '_actions_', title: 'Actions', titleClass: 'right' }]) %} + + + {% set list = table.jsonSerialize %} + +
    + + {% for i in 0..((min(per_page, list.data|count) + 3) - 1) %} + + + + + + + + + + + + + + + + + + + + + + + + {% endfor %} + +
    + {% endblock %} + {% endif %} + + {% block modals %} + {% include 'flex-objects/types/default/modals/remove.html.twig' with { name: target } %} + {% endblock %} +
    +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list_actions.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list_actions.html.twig new file mode 100644 index 00000000..e4d9da5b --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list_actions.html.twig @@ -0,0 +1,39 @@ +{% set object_title = title_field ? "'" ~ object[title_field]|join(' ') ~ "'" : 'Item' %} +{% set can_read = object.isAuthorized('read', 'admin', user) %} +{% set can_update = object.isAuthorized('update', 'admin', user) %} +{% set can_delete = object.isAuthorized('delete', 'admin', user) %} + +{% if can_read and object.getRoute() %} + {% block action_preview %} + + + + {% endblock %} +{% endif %} + +{% if can_update %} + {% block action_edit %} + + + + {% endblock %} +{% elseif can_read %} + {% block action_read %} + + + + {% endblock %} +{% endif %} + +{% if can_delete %} + {% block action_delete %} + + + + {% endblock %} +{% endif %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/modals/remove.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/modals/remove.html.twig new file mode 100644 index 00000000..f37500a8 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/modals/remove.html.twig @@ -0,0 +1,13 @@ +
    +
    + {# FIXME -name|singularize- is not translatable #} +

    {{ 'PLUGIN_FLEX_OBJECTS.ACTION.DELETE_N'|tu }} {{ name|singularize|capitalize }}

    +

    + {{ 'PLUGIN_FLEX_OBJECTS.ACTION.REALLY_DELETE'|tu( name|singularize, null ) }} +

    +
    + + {{ "PLUGIN_ADMIN.CONTINUE"|tu }} +
    +
    +
    diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/preview.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/preview.html.twig new file mode 100644 index 00000000..3e24744e --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/preview.html.twig @@ -0,0 +1,62 @@ +{% extends 'partials/base.html.twig' %} +{% use 'flex-objects/types/default/titlebar/preview.html.twig' %} + +{# Allowed actions #} +{% set can_preview = can_preview ?? (object.exists and (view_config['enabled'] ?? false)) %} +{% set can_translate = can_translate ?? (admin.multilang and object.hasFlexFeature('flex-translate')) %} + +{# These variables can be overridden from the main template file #} +{% set allowed = allowed ?? (directory and (object.exists or action == 'add')) %} +{% set back_route = back_route ?? ('/' ~ route.getRoute(1)) %} +{% set title_icon = title_icon ?? view_config['icon'] ?? directory.config.admin.menu.list.icon ?? 'fa-file-text-o' %} +{% set title -%} + {%- set title_config = view_config['title'] -%} + {%- if title_config.template -%} + {{- include(template_from_string(title_config.template, 'edit title template')) -}} + {%- else -%} + {{- title ?? object.form.getValue('title') ?? object.title ?? key -}} + {% endif %} +{%- endset %} +{% set preview_url -%} + {%- set route_config = view_config['route'] -%} + {%- if route_config.template -%} + {{- include(template_from_string(route_config.template, 'preview route template')) -}} + {%- else -%} + {{- preview_url ?? object.getRoute().uri ?: '' -}} + {%- endif -%} +{% endset -%} + +{% block body %} + {% if not can_preview or not preview_url %} + {% set allowed = false %} + {% endif %} + {% set id = key %} + {% set blueprint = object.blueprint ?? directory.blueprint %} + {% set back_url = back_url ?? admin_route(back_route) %} + + {{ parent() }} +{% endblock body %} + +{% block content_wrapper %} +{% if can_preview and allowed and preview_url %} +
    +
    + +
    +
    +{% else %} + {{ parent() }} +{% endif %} +{% endblock content_wrapper %} + +{% block content %} + {% do page.modifyHeader('http_response_code', 404) %} +
    +

    {{ 'PLUGIN_ADMIN.ERROR'|tu }} 404

    +
    +

    + {{ 'PLUGIN_FLEX_OBJECTS.ERROR.PAGE_NOT_EXIST'|tu }} +

    +
    +
    +{% endblock content %} \ No newline at end of file diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/configure.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/configure.html.twig new file mode 100644 index 00000000..08d6f86a --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/configure.html.twig @@ -0,0 +1,32 @@ +{% block titlebar %} + {% block titlebar_button_bar %} +
    + {# BACK #} + {% block back_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} + {% endblock back_button %} + + {% block extra_buttons %}{% endblock extra_buttons %} + + {# SAVE #} + {% if can_save %} + {% block save_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/save.html.twig', 'flex-objects/types/default/buttons/save.html.twig'] with {task: 'configure'} %} + {% endblock save_button %} + {% endif %} +
    + {% endblock titlebar_button_bar %} + + {% block titlebar_title %} +

    + {% if allowed %} + + {{ title }} + {% else %} + + {{ 'PLUGIN_ADMIN.ERROR'|tu }} +   {% endif %} +

    + {% endblock titlebar_title %} + +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/edit.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/edit.html.twig new file mode 100644 index 00000000..b209e44b --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/edit.html.twig @@ -0,0 +1,46 @@ +{% block titlebar %} + {% block titlebar_button_bar %} +
    + {# BACK #} + {% block back_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} + {% endblock back_button %} + + {# PREVIEW #} + {% if can_preview %} + {% block preview_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/preview.html.twig', 'flex-objects/types/default/buttons/preview.html.twig'] %} + {% endblock preview_button %} + {% endif %} + + {# DELETE #} + {% if can_delete %} + {% block delete_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/delete.html.twig', 'flex-objects/types/default/buttons/delete.html.twig'] %} + {% endblock delete_button %} + {% endif %} + + {% block extra_buttons %}{% endblock extra_buttons %} + + {# SAVE #} + {% if allowed and can_save %} + {% block save_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/save.html.twig', 'flex-objects/types/default/buttons/save.html.twig'] with {task: 'save'} %} + {% endblock save_button %} + {% endif %} +
    + {% endblock titlebar_button_bar %} + + {% block titlebar_title %} +

    + {% if allowed %} + + {{ not object.exists ? '[' ~ 'PLUGIN_FLEX_OBJECTS.NEW'|tu|upper ~ ']' }} {{ title|tu }} + {% else %} + + {{ 'PLUGIN_ADMIN.ERROR'|tu }} + {% endif %} +

    + {% endblock titlebar_title %} + +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/list.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/list.html.twig new file mode 100644 index 00000000..03a01889 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/list.html.twig @@ -0,0 +1,48 @@ +{% block titlebar %} + {% block titlebar_button_bar %} +
    + {# BACK #} + {% block back_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} + {% endblock back_button %} + + {# EXPORT #} + {% if can_export %} + {% block export_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/export.html.twig', 'flex-objects/types/default/buttons/export.html.twig'] with {export: directory.config('admin.views.export') ?? directory.config('admin.export') ?? []} %} + {% endblock export_button %} + {% endif %} + + {# CREATE #} + {% if can_create %} + {% block create_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/add.html.twig', 'flex-objects/types/default/buttons/add.html.twig'] %} + {% endblock create_button %} + {% endif %} + + {# LANGUAGES #} + {% if can_translate %} + {% block languages_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/languages.html.twig', 'flex-objects/types/default/buttons/languages.html.twig'] %} + {% endblock languages_button %} + {% endif %} + + {# CONFIGURE #} + {% block configure %} + {% include 'flex-objects/types/default/buttons/configuration.html.twig' %} + {% endblock configure %} +
    + {% endblock titlebar_button_bar %} + + {% block titlebar_title %} +

    + {% if allowed %} + + {{ directory ? title|tu : 'Error' }} + {% else %} + + {{ 'PLUGIN_ADMIN.ERROR'|tu }} +  {% endif %} +

    + {% endblock titlebar_title %} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/preview.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/preview.html.twig new file mode 100644 index 00000000..6b7bad73 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/preview.html.twig @@ -0,0 +1,30 @@ +{% block titlebar %} + {% block titlebar_button_bar %} +
    + {# BACK #} + {% block back_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/back.html.twig', 'flex-objects/types/default/buttons/back.html.twig'] %} + {% endblock back_button %} + + {# PREVIEW #} + {% if can_preview %} + {% block preview_button %} + {% include ['flex-objects/types/' ~ target ~ '/buttons/preview-open.html.twig', 'flex-objects/types/default/buttons/preview-open.html.twig'] %} + {% endblock preview_button %} + {% endif %} +
    + {% endblock titlebar_button_bar %} + + {% block titlebar_title %} +

    + {% if allowed %} + + {{ "PLUGIN_ADMIN.PREVIEW"|tu }}: {{ not object.exists ? '[' ~ 'PLUGIN_FLEX_OBJECTS.NEW'|tu|upper ~ ']' }} {{ title }} + {% else %} + + {{ 'PLUGIN_ADMIN.ERROR'|tu }} + {% endif %} +

    + {% endblock titlebar_title %} + +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/types.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/types.html.twig new file mode 100644 index 00000000..97789de7 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/titlebar/types.html.twig @@ -0,0 +1,22 @@ +{% block titlebar %} + {% block titlebar_button_bar %} +
    + {# BACK #} + {% block back_button %} + {% include 'flex-objects/types/default/buttons/back.html.twig' %} + {% endblock back_button %} + + {# CONFIGURE #} + {% block configure %} + {% include 'flex-objects/types/default/buttons/configuration.html.twig' %} + {% endblock configure %} +
    + {% endblock titlebar_button_bar %} + + {% block titlebar_title %} +

    + + {{ "PLUGIN_FLEX_OBJECTS.TITLE"|tu }} +

    + {% endblock titlebar_title %} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/types.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/types.html.twig new file mode 100644 index 00000000..88b1ab23 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/default/types.html.twig @@ -0,0 +1,46 @@ +{% extends 'partials/base.html.twig' %} +{% use 'flex-objects/types/default/titlebar/types.html.twig' %} + +{% set flex = grav['flex_objects'] %} + +{# These variables can be overridden from the main template file #} +{% set back_route = back_route ?? ('/' ~ route.getRoute(1, -1)) %} +{% set configure_route = '/plugins/flex-objects' %} + +{% block body %} + {% set back_url = admin_route(back_route) %} + {% set configure_url = configure_route ? admin_route(configure_route) : null %} + + {{ parent() }} +{% endblock body %} + +{% block content %} + +

    {{ 'PLUGIN_FLEX_OBJECTS.TYPES_TITLE'|tu }}

    + +
    + {% for name,directory in flex.directories if directory.enabled and directory.config('admin.hidden', false) is not same as(true) and not directory.config('admin.menu') %} + {% try %} + {% set collection = directory.collection %} + {% if flex.adminRoute(collection) %} +
    + +

    {{ directory.title|tu }} {{ collection.isAuthorized('list', 'admin', user).count }}

    +

    + {{ directory.description }} +

    +
    + {% endif %} + {% catch %} +
    +

    {{ 'PLUGIN_FLEX_OBJECTS.ERROR.BAD_DIRECTORY'|tu }} '{{ name }}'

    +

    + {{ e.message }} +

    +
    + {% endcatch %} + {% endfor %} + +
    + +{% endblock %} \ No newline at end of file diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/configure.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/configure.html.twig new file mode 100644 index 00000000..23484170 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/configure.html.twig @@ -0,0 +1,9 @@ +{% extends 'flex-objects/types/default/configure.html.twig' %} + +{% set back_route = back_route ?? ('/' ~ route.getRoute(1, -1)) %} + +{% block content_top %} + {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} + + {{ parent() }} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/edit.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/edit.html.twig new file mode 100644 index 00000000..85fe5fd2 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/edit.html.twig @@ -0,0 +1,9 @@ +{% extends 'flex-objects/types/default/edit.html.twig' %} + +{% if not directory.isAuthorized('list', 'admin', user) %} + {% set back_route = '/' %} +{% endif %} + +{% if not object.exists %} + {% do object.onPrepareRegistration() %} +{% endif %} \ No newline at end of file diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/list.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/list.html.twig new file mode 100644 index 00000000..0cefbb87 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-accounts/list.html.twig @@ -0,0 +1,7 @@ +{% extends 'flex-objects/types/default/list.html.twig' %} + +{% block content_top %} + {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} + + {{ parent() }} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/configure.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/configure.html.twig new file mode 100644 index 00000000..23484170 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/configure.html.twig @@ -0,0 +1,9 @@ +{% extends 'flex-objects/types/default/configure.html.twig' %} + +{% set back_route = back_route ?? ('/' ~ route.getRoute(1, -1)) %} + +{% block content_top %} + {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} + + {{ parent() }} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/list.html.twig b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/list.html.twig new file mode 100644 index 00000000..0cefbb87 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/flex-objects/types/user-groups/list.html.twig @@ -0,0 +1,7 @@ +{% extends 'flex-objects/types/default/list.html.twig' %} + +{% block content_top %} + {% include 'flex-objects/layouts/accounts/partials/top.html.twig' %} + + {{ parent() }} +{% endblock %} diff --git a/dev/plugins/flex-objects/admin/templates/forms/fields/flex-objects/flex-objects.html.twig b/dev/plugins/flex-objects/admin/templates/forms/fields/flex-objects/flex-objects.html.twig new file mode 100644 index 00000000..ea0ad6a4 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/forms/fields/flex-objects/flex-objects.html.twig @@ -0,0 +1,69 @@ +{% extends "forms/field.html.twig" %} + +{% macro spanToggle(input, length) %} + {% set space = repeat('  ', (length - input|length) / 2) %} + {{ (space ~ input ~ space)|raw }} +{% endmacro %} + +{% import _self as macro %} + +{% set value = (value is null ? field.default : value) %} + +{% block global_attributes %} + {{ parent() }} + data-grav-field-name="{{ (scope ~ field.name)|fieldName }}" +{% endblock %} + +{% block input %} + {% set flex = grav['flex_objects'] %} + {% set all = flex.blueprints %} + {% if all|count %} + {% set legacy = flex.getLegacyBlueprintMap() %} + {% for label, directory in all %} + {% set url = directory.blueprintFile %} + {% set found = url in value %} + {% if not found and legacy[url] is defined %} + {% set found = legacy[url] in value %} + {% endif %} + +
    +
    + {% set maxLen = 0 %} + {% for text in ['PLUGIN_ADMIN.ENABLED', 'PLUGIN_ADMIN.DISABLED'] %} + {% set translation = grav.twig.twig.filters['tu'] is defined ? text|tu : text|t %} + {% set maxLen = max(translation|length, maxLen) %} + {% endfor %} + + {% set id = "toggle_" ~ field.name ~ '_' ~ label %} + + + {% set text = 'PLUGIN_ADMIN.ENABLED' %} + {% set translation = (grav.twig.twig.filters['tu'] is defined ? text|tu : text|t)|trim %} + + + {% set text = 'PLUGIN_ADMIN.DISABLED' %} + {% set translation = (grav.twig.twig.filters['tu'] is defined ? text|tu : text|t)|trim %} + +
    + {{ directory.title|tu }} +
    + {% endfor %} + {% else %} +
    {{ 'PLUGIN_FLEX_OBJECTS.ERROR.NO_FLEX_DIRECTORIES'|tu }}
    + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/dev/plugins/flex-objects/admin/templates/forms/fields/save-redirect/save-redirect.html.twig b/dev/plugins/flex-objects/admin/templates/forms/fields/save-redirect/save-redirect.html.twig new file mode 100644 index 00000000..2541a3f0 --- /dev/null +++ b/dev/plugins/flex-objects/admin/templates/forms/fields/save-redirect/save-redirect.html.twig @@ -0,0 +1,37 @@ +{% extends "forms/field.html.twig" %} + +{% set originalValue = value %} +{% set value = (value is null ? field.default : value) %} +{% set isNew = key ? false : true %} +{% set savedOption = grav.session.post_entries_save|default('create-new') %} + +{% if isNew %} + {% set options = {'create-new':'PLUGIN_FLEX_OBJECTS.ACTION.CREATE_NEW', 'edit':'PLUGIN_FLEX_OBJECTS.ACTION.EDIT_ITEM', 'list':'PLUGIN_FLEX_OBJECTS.ACTION.LIST_ITEMS'} %} +{% else %} + {% set options = {'edit':'PLUGIN_FLEX_OBJECTS.ACTION.EDIT_ITEM', 'list':'PLUGIN_FLEX_OBJECTS.ACTION.LIST_ITEMS'} %} +{% endif %} + +{% block input %} + {% set savedOption = not isNew and savedOption == 'create-new' ? 'edit' : savedOption %} + {% for key, text in options %} + {% set id = field.id|default(field.name) ~ '-' ~ key %} + + {% if savedOption == key %} + {% set value = savedOption %} + {% endif %} + + + + + + + + {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/dev/plugins/flex-objects/app/columns/finder.js b/dev/plugins/flex-objects/app/columns/finder.js new file mode 100644 index 00000000..ac623b2b --- /dev/null +++ b/dev/plugins/flex-objects/app/columns/finder.js @@ -0,0 +1,425 @@ +import $ from 'jquery'; +import Finder from '../utils/finder'; +import { getInitialRoute, getStore, setInitialRoute } from './index'; +// import getFilters from '../utils/get-filters'; + +let XHRUUID = 0; +const GRAV_CONFIG = typeof global.GravConfig !== 'undefined' ? global.GravConfig : global.GravAdmin.config; + +export const Instances = {}; + +const isInViewport = (elem) => { + const bounding = elem.getBoundingClientRect(); + const titlebar = document.querySelector('#titlebar'); + const offset = titlebar ? titlebar.getBoundingClientRect().height : 0; + return ( + bounding.top >= offset && + bounding.left >= 0 && + bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && + bounding.right <= (window.innerWidth || document.documentElement.clientWidth) + ); +}; + +export class FlexPages { + constructor(container, data) { + this.container = $(container); + this.data = data; + const dataLoad = this.dataLoad; + + this.finder = new Finder( + this.container, + (parent, callback) => { + return dataLoad.call(this, parent, callback); + }, + { + labelKey: 'title', + defaultPath: getInitialRoute(), + itemTrigger: '[data-flexpages-expand]', + createItem: function(item) { + return FlexPages.createItem(this.config, item, this); + }, + createItemContent: function(item) { + return FlexPages.createItemContent(this.config, item, this); + } + } + ); + + this.finder.$emitter.on('leaf-selected', (item) => { + setInitialRoute({ + route: item.route.raw + }); + }); + + this.finder.$emitter.on('interior-selected', (item) => { + setInitialRoute({ + route: item.route.raw + }); + }); + + /* + this.finder.$emitter.on('leaf-selected', (item) => { + console.log('selected', item); + this.finder.emit('create-column', () => this.createSimpleColumn(item)); + }); + + this.finder.$emitter.on('item-selected', (selected) => { + console.log('selected', selected); + // for future use only - create column-card creation for file with details like in macOS finder + // this.finder.$emitter('create-column', () => this.createSimpleColumn(selected)); + }); */ + + this.finder.$emitter.on('column-created', () => { + this.container[0].scrollLeft = this.container[0].scrollWidth - this.container[0].clientWidth; + }); + } + + static createItem(config, item, finder) { + const listItem = $('
  • '); + const listItemClasses = [config.className.item]; + // const href = `${GRAV_CONFIG.current_url}/${item.route.raw}`.replace('//', '/'); + const link = $('
    '); + const createItemContent = config.createItemContent || finder.createItemContent; + const fragment = createItemContent.call(this, item); + link.append(fragment) + // .attr('href', href) + .attr('tabindex', -1); + + if (item.url) { + link.attr('href', item.url); + listItemClasses.push(item.className); + } + + if (item[config.childKey]) { + listItemClasses.push(config.className[config.childKey]); + } + + if (item.filters_hit) { + listItemClasses.push('filters-hit'); + } + + listItem.addClass(listItemClasses.join(' ')); + listItem.append(link) + .attr('data-fjs-item', item[config.itemKey]); + + listItem[0]._item = item; + + return listItem; + } + + static createItemContent(config, item) { + const frag = document.createDocumentFragment(); + const route = `${GRAV_CONFIG.current_url}/${item.route.raw}`.replace('//', '/'); + const title = $('
    '); + const link = $(``); + const icon = $(``); + + if (item.extras && item.extras.lang) { + let status = ''; + if (item.extras.translated) { + status = 'translated'; + } + + if (item.extras.lang === 'n/a') { + status = 'not-available'; + } + + const lang = $(`${item.extras.lang}`); + lang.appendTo(icon); + } + + if (item.extras && item.extras && (item.extras.published_date || item.extras.unpublished_date)) { + const clock = $(''); + clock.appendTo(icon); + } + + const info = $(`${item.title} ${item.route.display}`); + const actions = $(''); + + let dotdotdot = null; + if (item.extras) { + const LANG_URL = $('[data-lang-url]').data('langUrl'); + dotdotdot = $('
    '); + dotdotdot.on('click', (event) => { + if (!dotdotdot.find('.dropdown-menu').length) { + let tags = ''; + let langs = ''; + + item.extras.tags.forEach((tag) => { + tags += `${tag}`; + }); + + const translations = item.extras.langs || {}; + Object.keys(translations).forEach((lang) => { + const translated = translations[lang]; + langs += `
    ${lang ? lang : 'default'}`; + }); + + const canPreview = item.extras.actions.includes('preview') && (!(item.extras.tags.includes('non-routable') || item.extras.tags.includes('unpublished'))); + const canEdit = item.extras.actions.includes('edit'); + const canCopy = item.extras.actions.includes('copy'); + const canMove = false; // item.extras.actions.includes('move'); + const canDelete = item.extras.actions.includes('delete'); + const ul = $(``); + ul.appendTo(dotdotdot); + } + + return true; + }); + } + + if (item.child_count) { + const button = $('